/* ==========================================================================
   FeastFlow — Universal Multi-Theme Authentication Styles
   Fully compliant with CodeCanyon Theme Architecture & Zero Inline Styles
   ========================================================================== */

/* Base Page Wrapper — Atmospheric Culinary Depth */
.auth-page {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--theme-bg);
    padding: 3.5rem 1.5rem;
    font-family: inherit;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 22%, rgba(var(--theme-primary-rgb), 0.14) 0%, transparent 48%),
                radial-gradient(circle at 82% 78%, rgba(var(--theme-primary-rgb), 0.09) 0%, transparent 52%);
    pointer-events: none;
    z-index: 0;
}

/* Split Card Container */
.auth-split-card {
    display: grid;
    grid-template-columns: 44% 56%;
    max-width: 1040px;
    width: 100%;
    background: var(--theme-bg-card);
    border: 1px solid var(--theme-border);
    border-radius: 28px;
    box-shadow: 0 25px 65px -15px rgba(0, 0, 0, 0.45), 0 0 1px 1px rgba(255, 255, 255, 0.04);
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: authFadeIn 0.4s ease-out forwards;
}

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

/* Brand Panel (Left Column) — Restaurant Showcase */
.auth-brand {
    position: relative;
    background-image: url('../images/frontend-media/hero-gourmet-feast.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    padding: 3.25rem 2.5rem;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    z-index: 1;
}

/* Dynamic CMS Restaurant Background Photo */
.auth-brand-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Scrim Gradient Overlay — Ensures 100% Contrast & Legibility */
.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(160deg, rgba(4, 25, 17, 0.93) 0%, rgba(6, 44, 29, 0.86) 45%, rgba(0, 168, 122, 0.78) 100%);
    transition: background 0.3s ease;
}

/* Ambient Radial Glow & Vignette */
.auth-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.1) 0%, transparent 55%),
                linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, transparent 45%);
}

/* Ensure all child content sits safely above the overlay */
.auth-brand > * {
    position: relative;
    z-index: 2;
}

/* Culinary Platform Badge */
.auth-brand-culinary-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(0, 200, 150, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 200, 150, 0.35);
    color: #5eead4;
    margin-bottom: 1.25rem;
    width: fit-content;
}

.auth-brand-logo {
    font-size: 1.55rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.auth-brand-logo i {
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.auth-brand-tagline {
    font-size: 2.15rem;
    font-weight: 800;
    margin-top: 1.35rem;
    line-height: 1.22;
    letter-spacing: -0.025em;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.auth-brand-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
    margin-top: 0.9rem;
    margin-bottom: 1.85rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.auth-brand-bottom-wrap {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-brand-features li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.auth-brand-feature-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Social Proof & Restaurant Trust Pill */
.auth-brand-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.15rem;
    background: rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    font-size: 0.85rem;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    width: fit-content;
}

.auth-trust-stars {
    color: #fbbf24;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.auth-trust-caption {
    letter-spacing: -0.01em;
    font-weight: 500;
}

.auth-trust-caption strong {
    font-weight: 700;
    color: #ffffff;
}

/* Form Panel (Right Column) */
.auth-form-panel {
    background: var(--theme-bg-card);
    padding: 3.25rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--theme-text);
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
}

.auth-form-subtitle {
    color: var(--theme-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

.auth-label {
    display: block;
    color: var(--theme-text);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.45rem;
}

/* Input Groups with Integrated Icon */
.auth-input-group {
    display: flex;
    align-items: stretch;
    background: var(--theme-bg-alt);
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.auth-input-group:focus-within {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb), 0.15);
}

.auth-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    color: var(--theme-text-muted);
    background: transparent;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.auth-input-group:focus-within .auth-input-icon {
    color: var(--theme-primary);
}

.auth-input-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    background: transparent;
    border: none;
    color: var(--theme-text-muted);
    font-size: 0.95rem;
    flex-shrink: 0;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0;
}

.auth-input-btn:hover {
    color: var(--theme-primary);
}

.auth-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--theme-text);
    padding: 0.85rem 1rem 0.85rem 0.25rem;
    outline: none;
    font-size: 0.92rem;
    min-width: 0;
}

.auth-input::placeholder {
    color: var(--theme-text-muted);
    opacity: 0.7;
}

/* Chrome Autofill Reset */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover, 
.auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--theme-text) !important;
    -webkit-box-shadow: 0 0 0px 1000px var(--theme-bg-alt) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

.auth-otp-input {
    letter-spacing: 0.35em;
    font-size: 1.35rem;
    font-weight: 800;
    text-align: center;
}

.auth-toggle-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--theme-primary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.auth-toggle-link:hover {
    text-decoration: underline;
}

.auth-error {
    color: #ef4444;
    font-size: 0.82rem;
    font-weight: 500;
    margin-top: 0.35rem;
}

/* Demo Credentials Fast Fill Box */
.auth-demo-box {
    background: rgba(var(--theme-primary-rgb), 0.04);
    border: 1px dashed var(--theme-border);
    border-radius: 14px;
    padding: 1rem 1.15rem;
    margin-bottom: 1.5rem;
}

.auth-demo-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--theme-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.auth-demo-title i {
    color: var(--theme-primary);
}

.auth-demo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.auth-demo-chip {
    background: var(--theme-surface, var(--theme-bg));
    border: 1px solid var(--theme-border);
    color: var(--theme-text);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    user-select: none;
}

.auth-demo-chip:hover {
    border-color: var(--theme-primary);
    background: rgba(var(--theme-primary-rgb), 0.12);
    color: var(--theme-primary);
    transform: translateY(-1px);
}

/* Options Row (Remember me & Forgot Password) */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    color: var(--theme-text-sub);
    font-size: 0.88rem;
    font-weight: 500;
    user-select: none;
    margin-bottom: 0;
}

.auth-checkbox input[type="checkbox"] {
    accent-color: var(--theme-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}

.auth-forgot-link {
    color: var(--theme-primary);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.auth-forgot-link:hover {
    text-decoration: underline;
    opacity: 0.85;
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: var(--theme-primary-grad);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(var(--theme-primary-rgb), 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(var(--theme-primary-rgb), 0.45);
}

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

/* Role Selector (Registration) */
.auth-role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-role-card {
    border: 1px solid var(--theme-border);
    border-radius: 14px;
    padding: 1rem;
    cursor: pointer;
    background: var(--theme-bg-alt);
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    user-select: none;
    margin-bottom: 0;
}

.auth-role-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-role-card-inner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.auth-role-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(var(--theme-primary-rgb), 0.1);
    color: var(--theme-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.auth-role-info strong {
    display: block;
    color: var(--theme-text);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.auth-role-info span {
    display: block;
    color: var(--theme-text-muted);
    font-size: 0.78rem;
    line-height: 1.3;
}

.auth-role-card:hover {
    border-color: var(--theme-primary);
}

.auth-role-card.active,
.auth-role-card:has(input:checked) {
    border-color: var(--theme-primary);
    background: rgba(var(--theme-primary-rgb), 0.08);
    box-shadow: 0 0 0 1px var(--theme-primary);
}

.auth-role-card.active .auth-role-icon,
.auth-role-card:has(input:checked) .auth-role-icon {
    background: var(--theme-primary);
    color: #ffffff;
}

/* Footer Link */
.auth-footer {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.92rem;
    color: var(--theme-text-muted);
}

.auth-footer a {
    color: var(--theme-primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ── Theme Specific Aesthetics ── */

/* Midnight Emerald (Default) */
body[data-theme="midnight-emerald"] .auth-brand {
    background-image: url('../images/frontend-media/hero-gourmet-feast.jpg');
}

body[data-theme="midnight-emerald"] .auth-brand::before {
    background: linear-gradient(160deg, 
        rgba(4, 25, 17, 0.93) 0%, 
        rgba(6, 44, 29, 0.86) 45%, 
        rgba(0, 168, 122, 0.78) 100%
    );
}

body[data-theme="midnight-emerald"] .auth-split-card {
    border-color: rgba(0, 200, 150, 0.22);
    box-shadow: 0 25px 65px -15px rgba(0, 0, 0, 0.55), 0 0 35px rgba(0, 200, 150, 0.08);
}

body[data-theme="midnight-emerald"] .auth-brand-culinary-tag {
    background: rgba(0, 200, 150, 0.2);
    border-color: rgba(0, 200, 150, 0.35);
    color: #5eead4;
}

body[data-theme="midnight-emerald"] .auth-brand-trust-pill {
    background: rgba(4, 25, 17, 0.6);
    border-color: rgba(0, 200, 150, 0.25);
}

/* Midnight Violet Theme */
body[data-theme="midnight-violet"] .auth-brand {
    background-image: url('../images/restaurants/ocean-blue.jpg');
    border-right: 1px solid rgba(245, 200, 66, 0.22);
}

body[data-theme="midnight-violet"] .auth-brand::before {
    background: linear-gradient(160deg, 
        rgba(16, 6, 35, 0.94) 0%, 
        rgba(46, 16, 99, 0.88) 48%, 
        rgba(109, 40, 217, 0.78) 100%
    );
}

body[data-theme="midnight-violet"] .auth-split-card {
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: 0 25px 65px -15px rgba(15, 7, 35, 0.7), 0 0 40px rgba(139, 92, 246, 0.08);
}

body[data-theme="midnight-violet"] .auth-brand-culinary-tag {
    background: rgba(245, 200, 66, 0.16);
    border-color: rgba(245, 200, 66, 0.35);
    color: #fde68a;
}

body[data-theme="midnight-violet"] .auth-brand-logo i,
body[data-theme="midnight-violet"] .auth-brand-feature-icon {
    color: #f5c842;
    background: rgba(245, 200, 66, 0.2);
    border-color: rgba(245, 200, 66, 0.4);
}

body[data-theme="midnight-violet"] .auth-brand-trust-pill {
    background: rgba(16, 6, 35, 0.62);
    border-color: rgba(245, 200, 66, 0.25);
}

body[data-theme="midnight-violet"] .auth-trust-stars {
    color: #f5c842;
}

/* Editorial Light Theme */
body[data-theme="editorial-light"] .auth-brand {
    background-image: url('../images/restaurants/la-maison.jpg');
}

body[data-theme="editorial-light"] .auth-brand::before {
    background: linear-gradient(160deg, 
        rgba(15, 23, 42, 0.93) 0%, 
        rgba(30, 41, 59, 0.86) 50%, 
        rgba(15, 23, 42, 0.92) 100%
    );
}

body[data-theme="editorial-light"] .auth-split-card {
    background: #ffffff;
    border-color: rgba(226, 232, 240, 0.95);
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.12), 0 10px 25px -5px rgba(15, 23, 42, 0.05);
}

body[data-theme="editorial-light"] .auth-form-panel {
    background: #ffffff;
}

body[data-theme="editorial-light"] .auth-input-group {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body[data-theme="editorial-light"] .auth-input {
    color: #0f172a;
}

body[data-theme="editorial-light"] .auth-brand-culinary-tag {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    color: #f8fafc;
}

body[data-theme="editorial-light"] .auth-brand-trust-pill {
    background: rgba(15, 23, 42, 0.58);
    border-color: rgba(255, 255, 255, 0.22);
}

/* Responsive Breakpoints */
@media (max-width: 991.98px) {
    .auth-split-card {
        grid-template-columns: 1fr;
        max-width: 580px;
        border-radius: 22px;
    }

    .auth-brand {
        padding: 2.5rem 2rem 2.25rem;
    }

    .auth-brand-tagline {
        font-size: 1.7rem;
        margin-top: 1rem;
    }

    .auth-brand-desc {
        display: block;
        font-size: 0.88rem;
        margin-bottom: 1.25rem;
        opacity: 0.9;
    }

    .auth-brand-features {
        display: none;
    }

    .auth-brand-bottom-wrap {
        gap: 0;
    }

    .auth-brand-trust-pill {
        margin-top: 0;
    }

    .auth-form-panel {
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 575.98px) {
    .auth-page {
        padding: 1.5rem 1rem;
    }

    .auth-brand {
        padding: 2rem 1.5rem 1.75rem;
    }

    .auth-brand-tagline {
        font-size: 1.45rem;
    }

    .auth-brand-desc {
        display: none;
    }

    .auth-form-panel {
        padding: 2rem 1.25rem;
    }

    .auth-role-selector {
        grid-template-columns: 1fr;
    }
}

/* ── Admin Master Auth ── */
.admin-auth-bg {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.admin-auth-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../images/frontend-media/restaurant-kitchen-partner.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.08;
    filter: blur(8px);
    pointer-events: none;
    z-index: 0;
}

.admin-auth-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 65px -12px rgba(15, 23, 42, 0.35);
    overflow: hidden;
    max-width: 980px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.admin-auth-brand-side {
    position: relative;
    background-image: url('../images/frontend-media/restaurant-kitchen-partner.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: #ffffff;
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    z-index: 1;
}

.admin-auth-brand-side::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(145deg, 
        rgba(15, 23, 42, 0.94) 0%, 
        rgba(30, 27, 75, 0.88) 50%, 
        rgba(79, 70, 229, 0.78) 100%
    );
}

.admin-auth-brand-side > * {
    position: relative;
    z-index: 2;
}

.admin-auth-form-side {
    padding: 3.5rem 3rem;
}
