/* Auth Pages Styles - Modern Yellow Theme */
:root {
    --auth-primary: #432F2E;
    --auth-accent: #FACC15;
    --auth-accent-dark: #EAB308;
    --auth-accent-light: #FEF9C3;
    --auth-gradient: linear-gradient(135deg, #FDE047 0%, #FACC15 100%);
}

.auth-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 50%, #FFF8E6 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Back to site link */
.auth-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
    padding: 12px 20px;
    color: #6B7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    transition: all 0.2s;
    background: transparent;
}

.auth-back-link:hover {
    color: #111827;
    border-color: #D1D5DB;
    background: #F9FAFB;
}

.auth-back-link svg {
    flex-shrink: 0;
}

.auth-container {
    width: 100%;
    max-width: 460px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 48px 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--auth-gradient);
}

.auth-card-wide {
    max-width: 580px;
}

.auth-logo {
    display: block;
    width: 140px;
    height: 45px;
    background-size: contain;
    margin: 0 auto 36px;
}

.auth-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin: 0 0 12px;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 14px;
    color: #9CA3AF;
    text-align: center;
    margin: 0 0 32px;
    line-height: 1.5;
    font-weight: 400;
}

.auth-error {
    background: #FEE2E2;
    border: none;
    border-left: 4px solid #EF4444;
    color: #991B1B;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-error::before {
    content: '!';
    width: 22px;
    height: 22px;
    background: #EF4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.form-input,
.form-select,
.form-textarea {
    padding: 14px 18px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    background: #FAFAFA;
}

.form-input::placeholder {
    color: #9CA3AF;
}

.form-input:hover {
    border-color: #D1D5DB;
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.2);
    background: white;
}

/* Custom select (auth) */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select select.hidden-select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    height: 0;
    width: 0;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px;
    background: #FAFAFA;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: #111827;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.custom-select-trigger:hover {
    border-color: #D1D5DB;
    background: white;
}

.custom-select.open .custom-select-trigger {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.2);
    background: white;
}

.custom-select-value.placeholder {
    color: #9CA3AF;
}

.custom-select-arrow {
    transition: transform 0.2s ease;
    color: #6B7280;
    flex-shrink: 0;
}

.custom-select.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
    max-height: 260px;
    overflow-y: auto;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    padding: 6px;
}

.custom-select.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    transition: background 0.15s ease, color 0.15s ease;
}

.custom-select-option:hover {
    background: var(--auth-accent-light);
}

.custom-select-option.selected {
    background: var(--auth-accent);
    color: var(--auth-primary);
    font-weight: 600;
}

/* Inline field errors — absolute so form height stays fixed */
.field-error {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 10px;
    color: #B91C1C;
    font-size: 13px;
    line-height: 1.3;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.12);
}

.field-error.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.field-error::before {
    content: '!';
    width: 18px;
    height: 18px;
    background: #EF4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}

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

.form-input.input-invalid,
.custom-select.input-invalid .custom-select-trigger {
    border-color: #EF4444 !important;
    background: #FEF2F2;
}

.form-input.input-invalid:focus,
.custom-select.input-invalid .custom-select-trigger:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}

/* Password input with toggle */
.password-wrap {
    position: relative;
}

.password-wrap .form-input {
    width: 100%;
    padding-right: 48px;
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

.password-toggle:hover {
    color: var(--auth-primary);
    background: rgba(0, 0, 0, 0.04);
}

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

.password-toggle .icon-eye-off { display: none; }
.password-toggle.is-visible .icon-eye { display: none; }
.password-toggle.is-visible .icon-eye-off { display: block; }

.auth-submit {
    padding: 16px 28px;
    background: var(--auth-gradient);
    color: #422006;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    box-shadow: 0 4px 14px rgba(250, 204, 21, 0.4);
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(250, 204, 21, 0.5);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 14px;
    color: #6B7280;
}

.auth-footer a {
    color: var(--auth-accent-dark);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--auth-primary);
    text-decoration: underline;
}

.auth-demo {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 2px solid #F3F4F6;
}

.auth-demo-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9CA3AF;
    margin-bottom: 14px;
    font-weight: 600;
    text-align: center;
}

.auth-demo-accounts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-demo-account {
    font-size: 13px;
    color: #6B7280;
    padding: 12px 16px;
    background: linear-gradient(135deg, #FEF9C3 0%, #FEFCE8 100%);
    border-radius: 10px;
    border: 1px solid rgba(250, 204, 21, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.auth-demo-account:hover {
    border-color: var(--auth-accent);
    transform: translateX(4px);
}

.auth-demo-account strong {
    color: #111827;
    min-width: 80px;
}

.auth-demo-account::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--auth-accent);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Password Requirements */
.password-hints {
    font-size: 12px;
    color: #9CA3AF;
    margin-top: -6px;
}

.password-hints ul {
    margin: 6px 0 0 0;
    padding-left: 16px;
}

.password-hints li {
    margin-bottom: 2px;
}

/* Success Message */
.auth-success {
    background: #DCFCE7;
    border-left: 4px solid #22C55E;
    color: #166534;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 600px) {
    .auth-card {
        padding: 36px 24px;
        border-radius: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .auth-title {
        font-size: 22px;
    }

    .auth-subtitle {
        font-size: 14px;
        margin-bottom: 28px;
    }

    .auth-demo-account {
        font-size: 12px;
        padding: 10px 14px;
    }

    .auth-demo-account strong {
        min-width: 70px;
    }
}

/* Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: slideUp 0.4s ease;
}
