/* ==========================================================================
   FREETHON LUMINOUS SHINE-WHITE GLASSMORPHISM AUTH (LOGIN & SIGN UP)
   Pure Pearl-White Frosted Glass · Brand Cyan Accents (#0ab3e4 / #0284c7)
   ========================================================================== */

:root {
    --glass-primary: #0ab3e4;
    --glass-primary-hover: #0284c7;
    --glass-accent: #0284c7;
    --glass-card-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 250, 252, 0.86) 100%);
    --glass-card-border: rgba(255, 255, 255, 0.98);
    --glass-card-shadow: 0 20px 48px -16px rgba(15, 23, 42, 0.14), 0 4px 16px -4px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 1);
    --glass-input-bg: rgba(255, 255, 255, 0.9);
    --glass-input-hover: #ffffff;
    --glass-input-focus: #ffffff;
    --glass-input-border: #dbe4ef;
    --glass-input-border-hover: #93c5fd;
    --glass-text-dark: #0f172a;
    --glass-text-dim: #475569;
    --glass-text-muted: #64748b;
    --glass-radius-card: 22px;
    --glass-radius-sm: 12px;
}

/* Luminous Shine-White Ambient Canvas */
.compact-auth-wrapper {
    position: relative;
    min-height: calc(100vh - 90px);
    padding: 36px 16px 56px;
    background-color: #f8fafc;
    background-image:
        radial-gradient(circle at 14% 18%, rgba(10, 179, 228, 0.12) 0%, transparent 44%),
        radial-gradient(circle at 86% 16%, rgba(56, 189, 248, 0.11) 0%, transparent 42%),
        radial-gradient(circle at 50% 88%, rgba(224, 242, 254, 0.7) 0%, transparent 52%),
        linear-gradient(135deg, #ffffff 0%, #f1f5f9 50%, #e0f2fe 100%);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
}

/* Soft Glass Specular Shimmer Orbs */
.compact-auth-wrapper::before,
.compact-auth-wrapper::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(48px);
    z-index: 1;
}

.compact-auth-wrapper::before {
    width: 380px;
    height: 380px;
    top: -110px;
    left: -90px;
    background: rgba(10, 179, 228, 0.14);
}

.compact-auth-wrapper::after {
    width: 340px;
    height: 340px;
    bottom: -100px;
    right: -70px;
    background: rgba(56, 189, 248, 0.16);
}

/* Shine-White Frosted Glassmorphism Card */
.compact-auth-card {
    width: 100%;
    max-width: 430px;
    background: var(--glass-card-bg);
    backdrop-filter: blur(26px) saturate(185%);
    -webkit-backdrop-filter: blur(26px) saturate(185%);
    border: 1.5px solid var(--glass-card-border);
    border-radius: var(--glass-radius-card);
    box-shadow: var(--glass-card-shadow);
    padding: 26px 28px 24px;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    color: var(--glass-text-dark);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Card for registration - Compact 2-Col Layout */
.compact-auth-card.card-register {
    max-width: 560px;
    padding: 22px 26px 20px;
}

.compact-auth-card.card-register .compact-auth-header {
    margin-bottom: 14px;
}

.compact-auth-card.card-register .compact-logo-img {
    max-height: 44px;
    max-width: 185px;
}

/* 2-Column Desktop Grid for Registration */
.compact-register-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
    row-gap: 12px;
    margin-bottom: 8px;
}

.compact-register-grid .compact-form-group {
    margin-bottom: 0 !important;
}

.compact-register-grid .compact-label {
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 5px;
}

.compact-register-grid .compact-input {
    height: 42px;
    font-size: 13.5px;
}

.compact-register-grid .compact-input-icon {
    font-size: 14px;
    left: 13px;
}

.compact-register-grid .compact-input-wrap .compact-input {
    padding-left: 38px;
}

.compact-auth-card.card-register .compact-options-row {
    margin: 8px 0 14px;
}

.compact-auth-card.card-register .compact-checkbox-label {
    font-size: 12.5px;
}

.compact-auth-card.card-register .compact-submit-btn {
    height: 44px;
    font-size: 14px;
}

.compact-auth-card.card-register .compact-auth-footer {
    margin-top: 12px;
    font-size: 12.5px;
}

.compact-auth-card.card-register .compact-security-note {
    margin-top: 10px;
    font-size: 11px;
}

/* Top White Shine Specular Edge */
.compact-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 1), rgba(10, 179, 228, 0.35), rgba(255, 255, 255, 1), transparent);
    pointer-events: none;
}

/* Header & Full-Color Logo */
.compact-auth-header {
    text-align: center;
    margin-bottom: 18px;
}

.compact-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin: 0 auto;
    padding: 2px 0;
}

.compact-logo-img {
    width: auto;
    max-width: 200px;
    max-height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.08));
    transition: transform 0.25s ease;
}

.compact-logo-wrap:hover .compact-logo-img {
    transform: scale(1.03);
}

.compact-auth-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--glass-text-dark);
    margin: 10px 0 4px 0;
    letter-spacing: -0.4px;
}

.compact-auth-subtitle {
    font-size: 13.5px;
    color: var(--glass-text-dim);
    margin: 0;
    line-height: 1.45;
}

/* Error Alert */
.compact-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: var(--glass-radius-sm);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.compact-alert-error:empty {
    display: none;
}

/* Clean Divider Line */
.compact-divider {
    display: flex;
    align-items: center;
    margin: 14px 0;
    text-align: center;
}

.compact-divider-line {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.compact-divider-text {
    padding: 0 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--glass-text-muted);
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

/* Shine-White Bottom Google Line Button */
.compact-google-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 44px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.96);
    border: 1.5px solid #94a3b8;
    border-radius: var(--glass-radius-sm);
    color: #0f172a;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.15px;
    text-decoration: none;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 1);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-google-line:hover {
    background: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.compact-google-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.compact-auth-card.card-register .compact-google-line {
    height: 42px;
    font-size: 13px;
}

/* Form Groups & Labels */
.compact-form-group {
    margin-bottom: 16px;
    position: relative;
    text-align: left;
}

.compact-label-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
    width: 100%;
}

.compact-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.1px;
    margin: 0;
    line-height: 1.3;
}

.compact-form-group > .compact-label {
    display: block;
    margin-bottom: 7px;
}

.compact-forgot-link {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--glass-accent);
    text-decoration: none;
    line-height: 1.3;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.compact-forgot-link:hover {
    color: #0369a1;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Input Wrapper with Left Contextual Icon */
.compact-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.compact-input-icon {
    position: absolute;
    left: 14px;
    z-index: 5;
    color: #94a3b8;
    font-size: 14.5px;
    pointer-events: none;
    transition: color 0.2s ease;
}

/* Uniform Shiny White Frosted Input */
.compact-input {
    width: 100%;
    height: 45px;
    padding: 0 16px 0 42px;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    caret-color: var(--glass-accent);
    background: var(--glass-input-bg);
    border: 1.5px solid var(--glass-input-border);
    border-radius: var(--glass-radius-sm);
    box-sizing: border-box;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    font-family: inherit;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
    -webkit-appearance: none;
    appearance: none;
}

.compact-input-wrap.with-toggle .compact-input {
    padding-right: 44px;
}

.compact-input::placeholder {
    color: #94a3b8;
    font-size: 13.5px;
    font-weight: 400;
}

.compact-input:hover:not(:focus) {
    background: var(--glass-input-hover);
    border-color: var(--glass-input-border-hover);
}

.compact-input:focus {
    background: var(--glass-input-focus);
    border-color: var(--glass-primary);
    box-shadow: 0 0 0 3.5px rgba(10, 179, 228, 0.16);
}

/* Light-Theme Browser Autofill Override */
.compact-input:-webkit-autofill,
.compact-input:-webkit-autofill:hover,
.compact-input:-webkit-autofill:focus,
.compact-input:-webkit-autofill:active {
    -webkit-text-fill-color: #0f172a !important;
    caret-color: var(--glass-accent) !important;
    border-color: var(--glass-input-border) !important;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    transition: background-color 50000s ease-in-out 0s;
}

.compact-input:-webkit-autofill:focus {
    border-color: var(--glass-primary) !important;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset, 0 0 0 3.5px rgba(10, 179, 228, 0.16) !important;
    box-shadow: 0 0 0 1000px #ffffff inset, 0 0 0 3.5px rgba(10, 179, 228, 0.16) !important;
}

.compact-input:focus ~ .compact-input-icon,
.compact-input-wrap:focus-within .compact-input-icon {
    color: var(--glass-accent);
}

.compact-field-error {
    color: #dc2626;
    font-size: 11.5px;
    font-weight: 600;
    margin-top: 5px;
    display: block;
}

.compact-field-error:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Password Toggle Eye Icon Button */
.compact-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    z-index: 5;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #64748b;
    font-size: 15px;
    line-height: 1;
    transition: color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compact-password-toggle:hover {
    color: var(--glass-accent);
}

/* Options Row: Remember Me / Terms */
.compact-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0 18px;
}

.compact-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--glass-text-dim);
    user-select: none;
}

.compact-checkbox-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--glass-primary);
    cursor: pointer;
    border-radius: 4px;
    margin: 0;
}

/* Primary Submit Button (Glossy Freethon Brand Cyan) */
.compact-submit-btn {
    width: 100%;
    height: 46px;
    padding: 0 22px;
    background: linear-gradient(135deg, #0ab3e4 0%, #0284c7 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 6px 18px -4px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-radius: var(--glass-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.compact-submit-btn:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transform: translateY(-1px);
}

.compact-submit-btn:active {
    transform: translateY(0);
}

.compact-submit-btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
}

/* Card Bottom Footer */
.compact-auth-footer {
    margin-top: 16px;
    text-align: center;
    font-size: 13.5px;
    color: var(--glass-text-dim);
    font-weight: 500;
}

.compact-auth-footer a {
    color: var(--glass-accent);
    font-weight: 700;
    text-decoration: underline;
    margin-left: 4px;
    transition: color 0.15s;
}

.compact-auth-footer a:hover {
    color: #0369a1;
}

/* Security Note */
.compact-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--glass-text-muted);
}

.compact-security-note i {
    color: #059669;
    font-size: 12px;
}

@media (max-width: 640px) {
    .compact-auth-card.card-register {
        max-width: 440px;
        padding: 22px 18px 18px;
    }

    .compact-register-grid {
        grid-template-columns: 1fr;
        row-gap: 10px;
    }
}

/* International Tel Input integration in Shine-White Glassmorphism */
.compact-input-wrap .iti {
    width: 100%;
    display: block;
}

.compact-input-wrap .iti__tel-input {
    width: 100% !important;
    height: 42px !important;
    padding-left: 88px !important;
    color: #0f172a !important;
    background: var(--glass-input-bg) !important;
    border: 1.5px solid var(--glass-input-border) !important;
}

.compact-input-wrap .iti__tel-input:focus {
    background: var(--glass-input-focus) !important;
    border-color: var(--glass-primary) !important;
    box-shadow: 0 0 0 3.5px rgba(10, 179, 228, 0.16) !important;
}

.compact-input-wrap .iti__flag-container {
    z-index: 6;
}

.compact-input-wrap .iti__selected-flag {
    padding: 0 10px 0 12px;
    background: transparent !important;
    border-right: 1px solid #e2e8f0;
    border-radius: var(--glass-radius-sm) 0 0 var(--glass-radius-sm);
}

.compact-input-wrap .iti__arrow {
    border-top-color: #475569;
}

.compact-input-wrap .iti__selected-dial-code {
    font-weight: 700;
    color: #0f172a;
    font-size: 13px;
}

.compact-input-wrap .iti__country-list {
    background: #ffffff;
    color: #0f172a;
    border-radius: var(--glass-radius-sm);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    border: 1px solid #e2e8f0;
    z-index: 1000;
}

.compact-input-wrap .iti__country-list .iti__country {
    color: #0f172a;
}

.compact-input-wrap .iti__country-list .iti__country.iti__highlight {
    background: #e0f2fe;
    color: #0369a1;
}

/* Responsive Scaling for Mobile & Small Screens */
@media (max-width: 540px) {
    .compact-auth-wrapper {
        width: 100%;
        padding: 20px 14px 36px;
        justify-content: center;
    }

    .compact-auth-card,
    .compact-auth-card.card-register {
        width: 100%;
        max-width: 440px;
        margin: 0 auto;
        padding: 22px 16px 20px;
        border-radius: 18px;
    }

    .compact-auth-title {
        font-size: 19px;
        margin-top: 8px;
    }

    .compact-auth-subtitle {
        font-size: 12.5px;
    }

    .compact-form-group {
        margin-bottom: 14px;
    }

    .compact-label {
        font-size: 13px;
    }

    .compact-forgot-link {
        font-size: 12px;
    }

    .compact-options-row {
        margin: 12px 0 16px;
    }

    .compact-input {
        height: 44px;
        font-size: 13.5px;
    }

    .compact-submit-btn {
        height: 45px;
        font-size: 14.5px;
    }

    .compact-google-line {
        height: 42px;
        font-size: 13px;
    }

    .compact-divider {
        margin: 13px 0;
    }
}
