:root {
    --font-family: 'Manrope', sans-serif;
    
    /* New Design System - Light Mode (Synced with dashboard.css) */
    --background-main: #F7F8FA;
    --background-card: #FFFFFF;
    --text-primary: #1A202C;
    --text-secondary: #718096;
    --border-primary: #E2E8F0;
    --border-focus: #0B3D2E;
    
    --primary-main: #0B3D2E;
    --primary-hover: #00715d;
    --primary-gradient: linear-gradient(100deg, #00715d 0%, #0B3D2E 100%);
    
    --danger-main: #D92E1C;
    --danger-hover: #c32918;
    --success-main: #48BB78;
    --warning-main: #ED8936;

    --radius-md: 8px;
    --radius-lg: 16px; /* Increased for a softer look */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body.dark-mode {
    /* Synced with modern dark theme from dashboard.css */
    --background-main: #121212;
    --background-card: #1E1E1E;
    --text-primary: #E0E0E0;
    --text-secondary: #a0a0a0;
    --border-primary: #333333;
    --border-focus: #0B3D2E;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-main);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-main);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--primary-hover);
}

/* --- Global Loader --- */
#app-loader-overlay {
    position: fixed; inset: 0;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
body.dark-mode #app-loader-overlay {
    background-color: rgba(18, 18, 18, 0.7);
}
#app-loader-overlay.visible { opacity: 1; visibility: visible; }
.app-loader-spinner {
    width: 48px; height: 48px;
    border: 4px solid var(--border-primary);
    border-top-color: var(--primary-main);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
#app-loader-message { font-size: 1rem; font-weight: 600; margin-top: 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Toast Notifications --- */
#toast-container { position: fixed; top: 1.5rem; right: 1.5rem; z-index: 9000; display: flex; flex-direction: column; gap: 0.75rem; }
.toast {
    background-color: var(--background-card);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex; align-items: center; gap: 0.75rem;
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out, fadeOut 0.5s ease-in 4.5s forwards;
    border: 1px solid var(--border-primary);
}
.toast p { font-size: 0.9rem; font-weight: 500; }
.toast.success { border-left-color: var(--success-main); }
.toast.error { border-left-color: var(--danger-main); }
.toast.info { border-left-color: var(--primary-main); }
.toast-icon { font-size: 1.1rem; }
.toast.success .toast-icon { color: var(--success-main); }
.toast.error .toast-icon { color: var(--danger-main); }
.toast.info .toast-icon { color: var(--primary-main); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; transform: translateX(120%); } }

/* --- Buttons & Forms --- */
.btn {
    width: 100%; padding: 0.875rem 1rem;
    border: 1px solid transparent; border-radius: var(--radius-md);
    font-family: var(--font-family); font-size: 0.9rem; font-weight: 700;
    cursor: pointer; transition: all 0.2s ease-in-out;
    display: inline-flex; justify-content: center; align-items: center; gap: 0.5rem;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--primary-gradient); color: #000; }
.btn-primary:not(:disabled):hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-danger { background-color: var(--danger-main); color: white; }
.btn-danger:hover { background-color: var(--danger-hover); }
.btn .btn-loader {
    width: 18px; height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.4);
    border-left-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block; font-size: 0.875rem; font-weight: 600;
    margin-bottom: 0.5rem; color: var(--text-secondary);
}
.input-group { position: relative; }
.input-group .input-icon {
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    color: var(--text-secondary); transition: color 0.2s ease;
}
.input-group input:focus ~ .input-icon { color: var(--primary-main); }

.form-group input {
    width: 100%; padding: 0.875rem;
    border: 1px solid var(--border-primary); border-radius: var(--radius-md);
    font-size: 1rem; font-family: var(--font-family);
    background-color: var(--background-main);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-group input { padding-left: 2.75rem; }
.form-group input:focus {
    outline: none; border-color: var(--border-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-main) 20%, transparent);
}
#reset-email-display { background-color: var(--background-main); cursor: not-allowed; opacity: 0.7; }

.form-header { text-align: center; margin-bottom: 2rem; }
.form-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.form-header p, .form-intro { color: var(--text-secondary); font-size: 1rem; line-height: 1.5; }
.form-intro { text-align: center; margin-bottom: 1.5rem; }
.form-footer { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: var(--text-secondary); }
.form-actions { text-align: right; margin-top: 0.5rem; }
.link-btn {
    background: none; border: none;
    color: var(--primary-main); font-weight: 600; cursor: pointer;
    padding: 0; font-size: 0.875rem;
}
.link-btn:hover { text-decoration: underline; color: var(--primary-hover); }

/* Password Strength Meter */
#password-strength-meter { margin-top: 0.5rem; }
.strength-bar {
    height: 6px; width: 100%;
    background-color: var(--border-primary);
    border-radius: 3px; overflow: hidden; position: relative;
}
.strength-bar::after {
    content: ''; display: block; height: 100%; width: 0;
    border-radius: 3px; background-color: var(--danger-main);
    transition: width 0.3s ease, background-color 0.3s ease;
}
.strength-text {
    font-size: 0.75rem; font-weight: 600; margin-top: 0.375rem;
    color: var(--danger-main); transition: color 0.3s ease;
    text-align: right; height: 1em; /* Prevents layout shift */
}
#password-strength-meter.weak .strength-bar::after { width: 33%; background-color: var(--danger-main); }
#password-strength-meter.weak .strength-text { color: var(--danger-main); }
#password-strength-meter.medium .strength-bar::after { width: 66%; background-color: var(--warning-main); }
#password-strength-meter.medium .strength-text { color: var(--warning-main); }
#password-strength-meter.strong .strength-bar::after { width: 100%; background-color: var(--success-main); }
#password-strength-meter.strong .strength-text { color: var(--success-main); }

/* --- Auth Wrapper --- */
#auth-wrapper {
    display: none; 
    justify-content: center; 
    align-items: center;
    min-height: 100vh;
}

.auth-container {
    display: grid; 
    grid-template-columns: 45% 1fr;
    width: 100%; 
    min-height: 100vh;
}

.form-panel {
    display: flex; 
    justify-content: center; 
    align-items: center;
    padding: 2rem; 
    background-color: var(--background-card);
}

.form-container { 
    width: 100%; 
    max-width: 420px; 
}

.form-view { 
    width: 100%; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
}

#password-view { 
    align-items: center; 
}

#password-view > form {
    display: flex; 
    flex-grow: 1; 
    flex-direction: column;
    justify-content: center; 
    width: 100%;
}

.auth-profile-header { 
    text-align: center; 
    margin-bottom: 2rem; 
    flex-shrink: 0; 
}

#auth-avatar {
    width: 90px; 
    height: 90px;
    border-radius: 50%; 
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--primary-main);
    box-shadow: var(--shadow-md);
    background: #fff; /* Ensure profile pic background is clean */
}

#auth-welcome-message { 
    color: var(--text-secondary); 
    font-weight: 500; 
    margin-bottom: 0.25rem; 
    font-size: 0.9rem; 
}

#auth-user-name { 
    font-size: 1.5rem; 
    font-weight: 700; 
    margin-bottom: 0.25rem; 
}

#auth-user-identifier-wrapper {
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 0.5rem; 
    color: var(--text-secondary); 
    font-size: 0.9rem;
}

/* --- Showcase Panel Container --- */
.showcase-panel {
    position: relative; 
    overflow: hidden;
    background-color: #050505; 
    display: flex;
}

.showcase-panel::before {
    content: ''; 
    position: absolute; 
    inset: 0;
    /* Using your brand colors for the gradient overlay */
    background: linear-gradient(165deg, rgba(139, 0, 0, 0.3) 0%, rgba(11, 61, 46, 0.4) 50%, rgba(0, 0, 0, 0.9) 100%);
    z-index: 1;
}

.showcase-overlay-content {
    position: relative; 
    z-index: 2;
    height: 100%; 
    width: 100%;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* --- Centering Logic for the Large Card --- */
.brand-hero-container {
    width: 100%;
    display: flex;
    justify-content: center; /* Centers the card horizontally */
    align-items: flex-start; /* Keeps it at the top */
}

/* --- Large Modern Split Card --- */
.brand-header-card-large {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 2rem 3rem;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    width: 100%;
    max-width: 550px; /* Large width */
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: fadeInDown 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-card-logo {
    width: 80px; /* Bigger logo */
    height: 80px;
    background: #FFFFFF;
    border-radius: 18px;
    padding: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.brand-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-card-divider {
    width: 1px;
    height: 60px; /* Taller divider for the big card */
    background: rgba(255, 255, 255, 0.2);
}

.brand-card-body {
    text-align: left;
}

.brand-card-title {
    font-size: 1.8rem; /* Large title */
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: 2px;
    margin: 0;
    line-height: 1.1;
}

.brand-card-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 8px;
}

/* --- Footer (Stays pinned to bottom right) --- */
.showcase-footer {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.symtech-footer-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 22px;
    border-radius: 14px;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.symtech-footer-card:hover {
    background: #FFFFFF;
    transform: translateY(-5px);
}

.symtech-footer-card:hover .powered-text { color: #888; }
.symtech-footer-card:hover .symtech-name { color: #000; }

.powered-text { font-size: 10px; font-weight: 700; color: rgba(255, 255, 255, 0.4); letter-spacing: 1px; }
.symtech-name { font-size: 14px; font-weight: 800; color: #FFFFFF; }
.symtech-status-dot { width: 8px; height: 8px; background: #48BB78; border-radius: 50%; box-shadow: 0 0 8px #48BB78; }

/* --- Slides & Animations --- */
.showcase-container { position: absolute; inset: 0; z-index: 0; }
.showcase-slide {
    position: absolute; inset: 0; opacity: 0;
    width: 100%; height: 100%; object-fit: cover;
    transition: opacity 2s ease;
    filter: brightness(0.4) contrast(1.1);
}
.showcase-slide.active { opacity: 1; }

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
/* --- Onboarding & Pricing --- */
.onboarding-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}
.pricing-card {
    background-color: var(--background-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 900px;
    text-align: center;
    border: 1px solid var(--border-primary);
}
.pricing-card h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}
.pricing-card p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.plan-card {
    position: relative;
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}
.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.plan-card.recommended {
    border-color: var(--primary-main);
    box-shadow: 0 0 20px color-mix(in srgb, var(--primary-main) 20%, transparent);
}
.plan-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-gradient);
    color: #000;
    padding: 0.375rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}
.plan-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.plan-price-wrapper {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.25rem;
    color: var(--text-primary);
}
.plan-currency {
    font-size: 1.5rem;
    font-weight: 600;
}
.plan-price {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}
.plan-billing {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}
.plan-cta-btn {
    width: 100%;
}
.plan-card:not(.recommended) .plan-cta-btn {
    background: transparent;
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
}
.plan-card:not(.recommended) .plan-cta-btn:hover {
    background: var(--background-main);
    border-color: var(--text-secondary);
}

/* Critical Error Box */
.critical-error-container {
    padding: 2rem; border: 1px solid var(--danger-main);
    border-radius: var(--radius-md); background-color: rgba(229, 62, 62, 0.05);
    text-align: center;
}
.critical-error-icon { color: var(--danger-main); font-size: 2.5rem; margin-bottom: 1rem; }
.critical-error-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.critical-error-description { font-size: 0.9rem; color: var(--text-secondary); }


/* --- Responsive --- */
@media (max-width: 992px) {
    .auth-container { grid-template-columns: 1fr; }
    .showcase-panel { display: none; }
    .form-panel { background-color: var(--background-main); }
    .form-container {
        padding: 2rem;
        background-color: var(--background-card);
        border: 1px solid var(--border-primary);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
    }
}
@media (max-width: 480px) {
    #toast-container { right: 1rem; top: 1rem; left: 1rem; }
    .form-panel { padding: 1rem 0; }
    .form-container {
        border: none; box-shadow: none; padding: 1.5rem;
        min-height: 100vh; border-radius: 0;
    }
    .pricing-card {
        padding: 1.5rem;
    }
}
.plan-cta-btn {
    position: relative;
    transition: all 0.3s ease;
}

.plan-cta-btn.loading {
    background: #1a1c1b !important; /* Darker while loading */
    cursor: not-allowed;
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #28a745;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -10px;
    margin-top: -10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}