/* TotalEnergies Authentication Portal - Flat Design */

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* CSS Custom Properties */
:root {
    --tte-red: #ED0000;
    --tte-red-dark: #C50000;
    --success-green: #059669;
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    --border-color: #E5E7EB;
    --border-light: #F3F4F6;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
}

/* Reset and base styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #F3F4F6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

/* Container styles */
.container {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* Logo section */
.logo-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.company-logo {
    height: 56px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

/* Typography */
.title {
    color: var(--tte-red);
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.success-title {
    color: var(--success-green);
}

.message {
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.welcome-text {
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.portal-name {
    color: var(--text-primary);
    font-weight: 600;
}

.user-email {
    color: var(--success-green);
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: #ECFDF5;
    border-radius: var(--radius-md);
    border: 1px solid #D1FAE5;
}

/* Icon containers */
.icon-container {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-container svg {
    width: 36px;
    height: 36px;
    stroke-width: 2.5;
}

/* Error icon */
.error-icon {
    background: var(--tte-red);
}

.error-icon svg {
    color: white;
}

/* Success icon */
.success-icon {
    background: var(--success-green);
}

.success-icon svg {
    color: white;
}

/* Buttons */
.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.btn:focus-visible {
    outline: 2px solid var(--tte-red);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--tte-red);
    color: white;
}

.btn-primary:hover {
    background: var(--tte-red-dark);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Action buttons container */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

/* Error specific styles */
.error-code {
    font-size: 4.5rem;
    font-weight: 800;
    color: var(--tte-red);
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.04em;
}

.error-details {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    text-align: left;
}

.error-details-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
}

.error-details-text {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.8125rem;
    color: var(--text-primary);
}

/* Success specific styles */
.redirect-info {
    background: #ECFDF5;
    border: 1px solid #D1FAE5;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.redirect-text {
    font-size: 0.875rem;
    color: var(--success-green);
    font-weight: 500;
}

/* Footer */
.footer {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}

.footer p {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Responsive design */
@media (max-width: 480px) {
    body {
        padding: 1rem;
    }

    .container {
        padding: 2rem 1.5rem;
    }

    .logo-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1.25rem;
    }

    .company-logo {
        height: 48px;
    }

    .title {
        font-size: 1.25rem;
    }

    .error-code {
        font-size: 3.5rem;
    }

    .icon-container {
        width: 60px;
        height: 60px;
    }

    .icon-container svg {
        width: 30px;
        height: 30px;
    }
}

/* Simple logout bar */
.simple-logout {
    position: fixed;
    top: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 99999;
    border-bottom-left-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    border-top: none;
    border-right: none;
}

.simple-logout a {
    color: var(--text-secondary);
    text-decoration: none;
}

.simple-logout a:hover {
    color: var(--tte-red);
}
