/* =========================
   AUTH PAGES - PREMIUM DESIGN
   TodoSign Signature Platform
   Version 2.0.0
========================= */

@import url('design-tokens.css');
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600&display=swap');

/* =========================
   CSS CUSTOM PROPERTIES
========================= */
:root {
    /* Auth-specific palette (light theme default) */
    --auth-bg-primary: #f8fafc;
    --auth-bg-secondary: #ffffff;
    --auth-text-primary: #0f172a;
    --auth-text-secondary: #64748b;
    --auth-text-muted: #94a3b8;
    --auth-border: rgba(148, 163, 184, 0.2);
    --auth-input-bg: rgba(241, 245, 249, 0.8);
    --auth-input-hover: rgba(226, 232, 240, 0.9);
    --auth-input-focus: #ffffff;

    /* Premium accent colors */
    --auth-accent: #06b6d4;
    --auth-accent-light: #60a5fa;
    --auth-accent-dark: #6366f1;
    --auth-accent-glow: rgba(6, 182, 212, 0.25);
    --auth-accent-subtle: rgba(6, 182, 212, 0.08);

    /* Secondary accent */
    --auth-secondary: #6366f1;
    --auth-secondary-glow: rgba(99, 102, 241, 0.2);

    /* Glass effects */
    --auth-glass-bg: rgba(255, 255, 255, 0.85);
    --auth-glass-border: rgba(255, 255, 255, 0.5);
    --auth-glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);

    /* Typography */
    --auth-font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --auth-font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Animations */
    --auth-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --auth-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --auth-ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --auth-duration-fast: 150ms;
    --auth-duration-normal: 250ms;
    --auth-duration-slow: 400ms;
}

/* =========================
   GLOBAL RESET & BASE
========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--auth-font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--auth-text-primary);
    background: var(--auth-bg-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================
   ANIMATED BACKGROUND
========================= */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 50% 90%, rgba(6, 182, 212, 0.04) 0%, transparent 40%);
    animation: authBgFloat 20s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.015;
    pointer-events: none;
}

@keyframes authBgFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.02); }
}

/* =========================
   MAIN CONTAINER
========================= */
.auth-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* =========================
   AUTH CARD - GLASSMORPHISM
========================= */
.auth-card {
    background: var(--auth-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--auth-glass-border);
    border-radius: 28px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 440px;
    position: relative;
    overflow: hidden;

    /* Premium shadow system */
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.02),
        0 12px 24px rgba(0, 0, 0, 0.04),
        0 24px 48px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);

    /* Animation */
    animation: authCardEnter 0.6s var(--auth-ease-spring) forwards;
    transform: translateY(30px);
    opacity: 0;

    /* Hover transition */
    transition: border-color var(--auth-duration-normal) var(--auth-ease-smooth),
                box-shadow var(--auth-duration-normal) var(--auth-ease-smooth);
}

.auth-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.02),
        0 12px 24px rgba(0, 0, 0, 0.04),
        0 24px 48px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 0 0 1px rgba(99, 102, 241, 0.15);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.8) 50%,
        transparent 100%);
}


.register-card {
    max-width: 480px;
}

@keyframes authCardEnter {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* =========================
   CARD HEADER
========================= */
.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: authHeaderEnter 0.5s var(--auth-ease-spring) 0.1s forwards;
    opacity: 0;
    transform: translateY(15px);
}

@keyframes authHeaderEnter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header .logo {
    width: 140px;
    height: auto;
    margin-bottom: 1.75rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
    transition: transform var(--auth-duration-normal) var(--auth-ease-spring);
}

.auth-header .logo:hover {
    transform: scale(1.05);
}

.auth-header h1 {
    font-family: var(--auth-font-display);
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--auth-text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--auth-text-primary) 0%, var(--auth-text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    font-size: 0.95rem;
    color: var(--auth-text-secondary);
}

/* =========================
   FORM STYLES
========================= */
.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.25rem;
    position: relative;
    animation: authFormGroupEnter 0.4s var(--auth-ease-spring) forwards;
    opacity: 0;
    transform: translateY(10px);
}

.form-group:nth-child(1) { animation-delay: 0.15s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.25s; }
.form-group:nth-child(4) { animation-delay: 0.3s; }

@keyframes authFormGroupEnter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   INPUT FIELDS - PREMIUM
========================= */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input {
    width: 100%;
    padding: 16px 18px;
    background: var(--auth-input-bg);
    border: 2px solid transparent;
    border-radius: 14px;
    font-family: var(--auth-font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--auth-text-primary);
    outline: none;
    transition:
        background var(--auth-duration-normal) var(--auth-ease-smooth),
        border-color var(--auth-duration-normal) var(--auth-ease-smooth),
        box-shadow var(--auth-duration-normal) var(--auth-ease-smooth),
        transform var(--auth-duration-fast) var(--auth-ease-smooth);
}

.input-group input::placeholder {
    color: var(--auth-text-muted);
    font-weight: 400;
    transition: color var(--auth-duration-fast) var(--auth-ease-smooth);
}

.input-group input:hover {
    background: var(--auth-input-hover);
    border-color: rgba(6, 182, 212, 0.15);
}

.input-group input:focus {
    background: var(--auth-input-focus);
    border-color: var(--auth-accent);
    box-shadow:
        0 0 0 4px var(--auth-accent-subtle),
        0 4px 12px rgba(6, 182, 212, 0.1);
    transform: translateY(-1px);
}

.input-group input:focus::placeholder {
    color: transparent;
}

/* Input icon indicator (optional) */
.input-group .input-icon {
    position: absolute;
    right: 16px;
    color: var(--auth-text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: color var(--auth-duration-fast) var(--auth-ease-smooth);
}

.input-group input:focus ~ .input-icon {
    color: var(--auth-accent);
}

/* =========================
   FORM OPTIONS
========================= */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    animation: authFormGroupEnter 0.4s var(--auth-ease-spring) 0.3s forwards;
    opacity: 0;
}

/* Premium Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--auth-text-secondary);
    user-select: none;
    gap: 10px;
    font-weight: 500;
    transition: color var(--auth-duration-fast) var(--auth-ease-smooth);
}

.checkbox-container:hover {
    color: var(--auth-text-primary);
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: var(--auth-input-bg);
    border: 2px solid var(--auth-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background var(--auth-duration-fast) var(--auth-ease-smooth),
        border-color var(--auth-duration-fast) var(--auth-ease-smooth),
        transform var(--auth-duration-fast) var(--auth-ease-spring);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.checkbox-container input:checked + .checkmark {
    background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-dark) 100%);
    border-color: var(--auth-accent);
    transform: scale(1.05);
}

.checkbox-container input:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 10px;
    animation: checkmarkPop 0.3s var(--auth-ease-spring);
}

@keyframes checkmarkPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.checkbox-container:hover .checkmark {
    border-color: var(--auth-accent);
    transform: scale(1.02);
}

/* Forgot Password Link */
.forgot-password {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 600;
    transition:
        color var(--auth-duration-fast) var(--auth-ease-smooth),
        transform var(--auth-duration-fast) var(--auth-ease-smooth);
    display: inline-block;
}

.forgot-password:hover {
    color: var(--auth-accent-dark);
    transform: translateX(2px);
}

/* Terms Text */
.terms-text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--auth-text-secondary);
}

.terms-link {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--auth-duration-fast) var(--auth-ease-smooth);
}

.terms-link:hover {
    color: var(--auth-accent-dark);
    text-decoration: underline;
}

/* =========================
   AUTH BUTTON - PREMIUM
========================= */
.auth-button {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-dark) 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-family: var(--auth-font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;

    /* Premium shadow */
    box-shadow:
        0 4px 12px var(--auth-accent-glow),
        0 8px 24px rgba(6, 182, 212, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);

    /* Animation */
    transition:
        transform var(--auth-duration-fast) var(--auth-ease-spring),
        box-shadow var(--auth-duration-normal) var(--auth-ease-smooth);

    animation: authFormGroupEnter 0.4s var(--auth-ease-spring) 0.35s forwards;
    opacity: 0;
}

/* Shine effect */
.auth-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    transition: left 0.5s var(--auth-ease-smooth);
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 16px var(--auth-accent-glow),
        0 12px 32px rgba(6, 182, 212, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.auth-button:hover::before {
    left: 100%;
}

.auth-button:active {
    transform: translateY(0);
    box-shadow:
        0 2px 8px var(--auth-accent-glow),
        0 4px 16px rgba(6, 182, 212, 0.15);
}

.auth-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-button:disabled:hover {
    transform: none;
    box-shadow:
        0 4px 12px var(--auth-accent-glow),
        0 8px 24px rgba(6, 182, 212, 0.2);
}

.auth-button:disabled::before {
    display: none;
}

/* Loading State */
.loading-spinner {
    display: none;
}

.auth-button.loading .button-text {
    display: none;
}

.auth-button.loading .loading-spinner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-button.loading .loading-spinner i {
    animation: authSpinnerRotate 1s linear infinite;
}

@keyframes authSpinnerRotate {
    to { transform: rotate(360deg); }
}

/* =========================
   MESSAGES - PREMIUM
========================= */
.error-message,
.success-message {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    animation: authMessageEnter 0.3s var(--auth-ease-spring);
}

@keyframes authMessageEnter {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.error-message i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
}

.success-message i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* =========================
   CARD FOOTER
========================= */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--auth-border);
    animation: authFormGroupEnter 0.4s var(--auth-ease-spring) 0.4s forwards;
    opacity: 0;
}

.auth-footer p {
    color: var(--auth-text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.auth-footer a {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 700;
    transition:
        color var(--auth-duration-fast) var(--auth-ease-smooth),
        transform var(--auth-duration-fast) var(--auth-ease-smooth);
    display: inline-block;
}

.auth-footer a:hover {
    color: var(--auth-accent-dark);
    transform: translateX(2px);
}

/* Legal Links */
.legal-links {
    margin-top: 1rem !important;
    font-size: 0.8rem !important;
}

.legal-links .separator {
    margin: 0 0.5rem;
    color: var(--auth-text-muted);
}

/* =========================
   LANGUAGE TOGGLE - PREMIUM
========================= */
.language-toggle-auth {
    position: absolute !important;
    top: 24px !important;
    right: 24px !important;
    z-index: 1000;
    animation: authLangEnter 0.5s var(--auth-ease-spring) 0.5s forwards;
    opacity: 0;
}

@keyframes authLangEnter {
    to { opacity: 1; }
}

.language-selector {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--auth-glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--auth-glass-border);
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--auth-font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-text-secondary);
    transition: all var(--auth-duration-fast) var(--auth-ease-smooth);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--auth-accent);
    color: var(--auth-text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.language-btn.active {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px var(--auth-accent-subtle);
}

.language-btn .fa-globe {
    font-size: 1rem;
    color: var(--auth-accent);
}

.language-btn .language-code {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.language-btn .fa-chevron-down {
    font-size: 0.6rem;
    transition: transform var(--auth-duration-fast) var(--auth-ease-smooth);
    color: var(--auth-text-muted);
}

.language-btn.active .fa-chevron-down {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: var(--auth-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--auth-glass-border);
    border-radius: 14px;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--auth-duration-fast) var(--auth-ease-smooth);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.12),
        0 2px 10px rgba(0, 0, 0, 0.06);
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--auth-font-body);
    font-size: 0.875rem;
    color: var(--auth-text-secondary);
    transition: all var(--auth-duration-fast) var(--auth-ease-smooth);
}

.language-option:hover {
    background: var(--auth-accent-subtle);
    color: var(--auth-text-primary);
}

.language-option .language-name {
    font-weight: 500;
}

/* =========================
   SOCIAL LOGIN BUTTONS
========================= */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.social-btn {
    width: 100%;
    padding: 14px 18px;
    background: var(--auth-input-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    font-family: var(--auth-font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--auth-text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition:
        background var(--auth-duration-fast) var(--auth-ease-smooth),
        border-color var(--auth-duration-fast) var(--auth-ease-smooth),
        transform var(--auth-duration-fast) var(--auth-ease-spring);
}

.social-btn:hover {
    background: var(--auth-input-hover);
    border-color: var(--auth-border);
    transform: translateY(-2px);
}

.social-btn:active {
    transform: translateY(0);
}

.social-btn i {
    font-size: 1.25rem;
}

.social-btn.google i {
    color: #ea4335;
}

.social-btn.microsoft i {
    color: #00a4ef;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    gap: 16px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.divider span {
    font-size: 0.8rem;
    color: var(--auth-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================
   PHONE INPUT WITH COUNTRY CODE
========================= */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-text-secondary);
    margin-bottom: 8px;
}

.phone-input-group {
    display: flex;
    gap: 8px;
}

.country-code-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--auth-input-bg);
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 16px 12px;
    font-family: var(--auth-font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--auth-text-primary);
    cursor: pointer;
    min-width: 110px;
    outline: none;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;

    transition:
        background-color var(--auth-duration-normal) var(--auth-ease-smooth),
        border-color var(--auth-duration-normal) var(--auth-ease-smooth),
        box-shadow var(--auth-duration-normal) var(--auth-ease-smooth);
}

.country-code-select:hover {
    background-color: var(--auth-input-hover);
    border-color: rgba(6, 182, 212, 0.15);
}

.country-code-select:focus {
    background-color: var(--auth-input-focus);
    border-color: var(--auth-accent);
    box-shadow:
        0 0 0 4px var(--auth-accent-subtle),
        0 4px 12px rgba(6, 182, 212, 0.1);
}

.phone-number-input {
    flex: 1;
    padding: 16px 18px;
    background: var(--auth-input-bg);
    border: 2px solid transparent;
    border-radius: 14px;
    font-family: var(--auth-font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--auth-text-primary);
    outline: none;
    transition:
        background var(--auth-duration-normal) var(--auth-ease-smooth),
        border-color var(--auth-duration-normal) var(--auth-ease-smooth),
        box-shadow var(--auth-duration-normal) var(--auth-ease-smooth),
        transform var(--auth-duration-fast) var(--auth-ease-smooth);
}

.phone-number-input::placeholder {
    color: var(--auth-text-muted);
    font-weight: 400;
}

.phone-number-input:hover {
    background: var(--auth-input-hover);
    border-color: rgba(6, 182, 212, 0.15);
}

.phone-number-input:focus {
    background: var(--auth-input-focus);
    border-color: var(--auth-accent);
    box-shadow:
        0 0 0 4px var(--auth-accent-subtle),
        0 4px 12px rgba(6, 182, 212, 0.1);
    transform: translateY(-1px);
}

/* =========================
   PASSWORD TOGGLE (EYE ICON)
========================= */
.password-group {
    position: relative;
}

.password-group input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--auth-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition:
        color var(--auth-duration-fast) var(--auth-ease-smooth),
        background var(--auth-duration-fast) var(--auth-ease-smooth);
}

.toggle-password:hover {
    color: var(--auth-accent);
    background: var(--auth-accent-subtle);
}

.toggle-password:focus {
    outline: none;
    color: var(--auth-accent);
}

.toggle-password i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* =========================
   PASSWORD STRENGTH
========================= */
.password-strength {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.password-strength .strength-bars {
    display: flex;
    gap: 4px;
}

.password-strength .strength-bar {
    flex: 1;
    height: 4px;
    background: var(--auth-border);
    border-radius: 2px;
    transition: background var(--auth-duration-fast) var(--auth-ease-smooth);
}

.password-strength .strength-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--auth-text-muted);
    transition: color var(--auth-duration-fast) var(--auth-ease-smooth);
}

/* Weak - 1 bar red */
.password-strength.strength-weak .strength-bar:nth-child(1) {
    background: #ef4444;
}
.password-strength.strength-weak .strength-text {
    color: #ef4444;
}

/* Fair - 2 bars orange */
.password-strength.strength-fair .strength-bar:nth-child(1),
.password-strength.strength-fair .strength-bar:nth-child(2) {
    background: #f59e0b;
}
.password-strength.strength-fair .strength-text {
    color: #f59e0b;
}

/* Good - 3 bars yellow-green */
.password-strength.strength-good .strength-bar:nth-child(1),
.password-strength.strength-good .strength-bar:nth-child(2),
.password-strength.strength-good .strength-bar:nth-child(3) {
    background: #84cc16;
}
.password-strength.strength-good .strength-text {
    color: #84cc16;
}

/* Strong - 4 bars green */
.password-strength.strength-strong .strength-bar {
    background: #22c55e;
}
.password-strength.strength-strong .strength-text {
    color: #22c55e;
}

.password-hint {
    font-size: 0.8rem;
    color: var(--auth-text-muted);
    margin-top: 6px;
}

/* =========================
   RESPONSIVE DESIGN
========================= */
@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 24px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .auth-header .logo {
        width: 120px;
    }

    .input-group input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .auth-button {
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .language-toggle-auth {
        top: 16px !important;
        right: 16px !important;
    }

    .language-toggle-auth select {
        padding: 8px 32px 8px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .auth-card {
        padding: 1.75rem 1.25rem;
    }

    .auth-header {
        margin-bottom: 2rem;
    }

    .auth-header h1 {
        font-size: 1.375rem;
    }
}

/* =========================
   ACCESSIBILITY
========================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    body::before {
        animation: none;
    }
}

/* Focus visible for keyboard navigation */
.auth-button:focus-visible,
.input-group input:focus-visible,
.checkbox-container input:focus-visible + .checkmark,
.forgot-password:focus-visible,
.terms-link:focus-visible,
.auth-footer a:focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .auth-card {
        border: 2px solid var(--auth-text-primary);
    }

    .input-group input {
        border: 2px solid var(--auth-text-secondary);
    }

    .auth-button {
        border: 2px solid var(--auth-accent-dark);
    }
}

/* ==================== AUTH TOAST ==================== */
.auth-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 90%;
}

.auth-toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.auth-toast i {
    font-size: 1.2rem;
}

.auth-toast-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.auth-toast-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.auth-toast-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.auth-toast-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}
