/*
  Unified Auth Pages Styles
  Consistent styling for Login, Signup, Forgot Password, Reset Password
  Version: 2.2
*/

/* ====================================
   AUTH PAGE BASE
==================================== */

.auth-page {
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    background: 
        radial-gradient(1200px 700px at 10% 10%, rgba(99,102,241,0.12), transparent 60%),
        radial-gradient(1000px 600px at 90% 20%, rgba(124,58,237,0.12), transparent 60%),
        linear-gradient(135deg, #0b1020 0%, #0f172a 50%, #0b1020 100%);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(124, 58, 237, 0.08) 0%, transparent 50%);
    animation: authPulse 10s ease-in-out infinite;
    pointer-events: none;
}

@keyframes authPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.auth-page::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, -30px) scale(1.1); }
}

/* ====================================
   AUTH LEFT (BRANDING)
==================================== */

.auth-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(15px, 2vw, 25px);
    position: relative;
    z-index: 1;
    overflow-y: auto;
}

.auth-brand {
    max-width: 420px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    backdrop-filter: blur(12px);
    font-weight: 700;
    font-size: 11px;
    color: rgba(255,255,255,0.95);
    margin-bottom: 10px;
    animation: slideInLeft 0.7s ease-out;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-kicker i {
    font-size: 13px;
}

.auth-title {
    margin-top: 8px;
    font-size: clamp(22px, 3.5vw, 32px);
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 50%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    animation: fadeInUp 0.9s ease-out 0.2s both;
}

.auth-subtitle {
    margin-top: 6px;
    color: rgba(255,255,255,0.82);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.auth-feature {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    animation: fadeInUp 1.1s ease-out 0.4s both;
}

.auth-feature > div {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: rgba(255,255,255,0.88);
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.auth-feature > div:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(6px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.auth-feature i {
    color: #6366f1;
    font-size: 13px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* ====================================
   AUTH RIGHT (FORM)
==================================== */

.auth-right {
    width: min(420px, 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    max-height: 100vh;
}

.auth-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 28px;
    box-shadow: 
        0 24px 72px rgba(2, 6, 23, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    color: var(--text);
    overflow: hidden;
    animation: slideInRight 0.7s ease-out;
    position: relative;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1 0%, #7c3aed 50%, #6366f1 100%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.auth-card-inner {
    padding: 18px;
    max-height: calc(100vh - 30px);
    overflow-y: auto;
    overflow-x: hidden;
}

.auth-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.auth-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.05) rotate(5deg);
}

.auth-company {
    display: grid;
    line-height: 1.3;
    flex: 1;
}

.auth-company strong {
    font-size: 15px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.auth-company span {
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
    margin-top: 1px;
}

.auth-body {
    margin-top: 12px;
}

.auth-body h2 {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 6px;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.auth-body > p {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 14px;
    line-height: 1.4;
}

/* ====================================
   AUTH ALERTS
==================================== */

.auth-alert {
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
    animation: shakeX 0.5s ease;
    border: 1px solid;
}

.auth-alert.is-animate {
    animation: slideDown 0.4s ease-out;
}

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

.auth-alert {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
    color: #991b1b;
}

.auth-alert.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
    color: #065f46;
}

.auth-alert i {
    font-size: 14px;
    margin-top: 1px;
    flex-shrink: 0;
}

.auth-alert strong {
    display: block;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 2px;
}

.auth-alert p {
    margin: 0;
    font-size: 10px;
    line-height: 1.3;
}

/* ====================================
   FORM FIELDS
==================================== */

.form-grid {
    display: grid;
    gap: 12px;
}

.float-field {
    position: relative;
    margin-bottom: 0;
}

.float-field .field-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    z-index: 2;
    transition: all 0.3s ease;
    pointer-events: none;
}

.float-field input:focus ~ .field-icon,
.float-field input:not(:placeholder-shown) ~ .field-icon {
    color: #6366f1;
    transform: translateY(-50%) scale(1.1);
}

.float-field input,
.float-field select,
.float-field textarea {
    width: 100%;
    height: 42px;
    padding: 0 42px 0 40px;
    border: 1.5px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: #ffffff;
    font-size: 13px;
    color: #0f172a;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-family: inherit;
}

.float-field textarea {
    height: auto;
    min-height: 60px;
    padding: 10px 12px;
    resize: vertical;
}

.float-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364728b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 50px;
}

.float-field input:focus,
.float-field select:focus,
.float-field textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.1);
    background: #ffffff;
    transform: translateY(-2px);
}

.float-field input:focus ~ label,
.float-field input:not(:placeholder-shown) ~ label,
.float-field select:focus ~ label,
.float-field select:not([value=""]) ~ label,
.float-field textarea:focus ~ label,
.float-field textarea:not(:placeholder-shown) ~ label {
    transform: translateY(-32px) translateX(-10px) scale(0.85);
    color: #6366f1;
    font-weight: 700;
    background: #ffffff;
    padding: 0 10px;
}

.float-field label {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 12px;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    padding: 0 6px;
    font-weight: 500;
}

.float-field textarea ~ label {
    top: 20px;
    transform: translateY(0);
}

.float-field textarea:focus ~ label,
.float-field textarea:not(:placeholder-shown) ~ label {
    transform: translateY(-12px) translateX(-10px) scale(0.85);
}

.field-action {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.2s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.field-action:hover {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-50%) scale(1.1);
}

/* ====================================
   AUTH ACTIONS
==================================== */

.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-actions label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #64748b;
    cursor: pointer;
    font-weight: 600;
    user-select: none;
}

.auth-actions input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #6366f1;
    border-radius: 3px;
}

.auth-actions a {
    font-size: 11px;
    color: #6366f1;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 1px 0;
}

.auth-actions a:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* ====================================
   SUBMIT BUTTON
==================================== */

.auth-submit {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 12px rgba(99, 102, 241, 0.35);
    margin-top: 6px;
    position: relative;
    overflow: hidden;
}

.auth-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.auth-submit:hover:not(:disabled)::before {
    left: 100%;
}

.auth-submit:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.45);
}

.auth-submit:active:not(:disabled) {
    transform: translateY(-1px);
}

.auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-submit i {
    font-size: 13px;
}

/* ====================================
   AUTH FOOTER
==================================== */

.auth-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.auth-footer small {
    display: block;
    text-align: center;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 500;
}

.auth-footer a {
    color: #6366f1;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.auth-footer a:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* ====================================
   INFO BOXES
==================================== */

.info-box {
    padding: 14px;
    background: rgba(99, 102, 241, 0.06);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.18);
    margin: 16px 0;
}

.info-box-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.info-box-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.info-box-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.info-box-text {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.info-box ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
}

/* ====================================
   RESPONSIVE
==================================== */

@media (max-width: 1024px) {
    .auth-left {
        display: none;
    }
    
    .auth-right {
        width: 100%;
        max-width: 540px;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .auth-card-inner {
        padding: 20px 16px;
        max-height: calc(100vh - 40px);
    }

    .auth-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .auth-logo {
        margin: 0 auto;
    }

    .auth-body h2 {
        font-size: 26px;
    }

    .auth-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .float-field input,
    .float-field select {
        height: 56px;
        font-size: 15px;
    }
}

/* ====================================
   LOADING STATES
==================================== */

.auth-submit.loading {
    pointer-events: none;
}

.auth-submit.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ====================================
   SUCCESS STATE
==================================== */

.auth-success-state {
    text-align: center;
    padding: 48px 24px;
}

.auth-success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #22c55e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.3);
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.auth-success-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 14px 0;
}

.auth-success-message {
    font-size: 16px;
    color: #64748b;
    margin: 0 0 32px 0;
    line-height: 1.6;
}
