:root {
    --bg-color: #ffffff;
    --text-color: #334155;
    /* Slate 700 */
    --text-heading: #0f172a;
    /* Slate 900 */
    --primary-color: #0f172a;
    /* Deep Navy */
    --accent-color: #3b82f6;
    /* Blue 500 - restrained accent */
    --surface-color: #ffffff;
    --surface-alt: #f8fafc;
    /* Slate 50 */
    --border-color: #e2e8f0;
    /* Slate 200 */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Inter', sans-serif;
    /* Unify fonts for cleaner look */
    --container-width: 1140px;
    /* Slightly tighter container */
    --header-height: 80px;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 8px;
}

/* Dark Mode Overrides */
body.dark-mode {
    --bg-color: #0f172a;
    /* Main background matches sidebar (or slightly lighter) */
    --surface-color: #1e293b;
    /* Card background */
    --surface-alt: #020617;
    /* Alt background */
    --text-color: #cbd5e1;
    /* Light text */
    --text-heading: #f8fafc;
    /* White heading */
    --border-color: #334155;
    /* Darker border */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -2px rgb(0 0 0 / 0.3);
}

/* Ensure Sidebar stays distinct if needed, but it uses hardcoded colors mostly */
/* Adjust dashboard layout background to match */
body.dark-mode .dashboard-layout,
body.dark-mode.dashboard-layout {
    background-color: #020617;
    /* Very dark background for layout */
}

/* Update Card backgrounds for Dark Mode */
body.dark-mode .card,
body.dark-mode .dashboard-navbar,
body.dark-mode .user-profile,
body.dark-mode .search-input,
body.dark-mode .icon-btn {
    background-color: var(--surface-color);
    border-color: var(--border-color);
    color: var(--text-color);
}

body.dark-mode .dashboard-navbar {
    background: rgba(30, 41, 59, 0.85);
    /* Proper glassmorphism dark */
}

body.dark-mode .dashboard-navbar.scrolled {
    background: rgba(30, 41, 59, 0.95);
}

body.dark-mode .form-control,
body.dark-mode select {
    background-color: #0f172a;
    border-color: var(--border-color);
    color: var(--text-heading);
}

body.dark-mode .form-control:focus {
    background-color: #0f172a;
}

body.dark-mode .breadcrumb-item {
    color: #94a3b8 !important;
}

body.dark-mode .breadcrumb-item.active {
    color: #f1f5f9 !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    line-height: 1.25;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    box-shadow: none;
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border-bottom-color: var(--border-color);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2563eb;
    /* Royal Blue to match image */
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
}

.logo-icon {
    font-family: monospace;
    font-weight: 700;
    font-size: 1.4rem;
    color: #3b82f6;
    /* Slightly lighter blue for the icon if needed, or keep same */
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-heading);
}

.btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background: #1e293b;
    /* Slate 800 */
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-heading);
    box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
    background: var(--surface-alt);
    border-color: #cbd5e1;
}

/* Hero Section */
.hero {
    padding: 180px 0 100px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top right, #f1f5f9 0%, #ffffff 40%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 700px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-heading);
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 2.5rem;
    max-width: 580px;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Services Section */
.services {
    padding: 100px 0;
    background: #fff;
}

.section-header {
    text-align: left;
    margin-bottom: 4rem;
    max-width: 600px;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-color);
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.service-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.service-icon {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    background: #eff6ff;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--surface-alt);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-content h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.stat-item h4 {
    font-size: 2rem;
    color: var(--text-heading);
    margin-bottom: 0.25rem;
}

.stat-item p {
    font-size: 0.875rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Footer */
footer {
    padding: 80px 0 30px;
    background: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-heading);
}

.footer-brand p {
    color: var(--text-color);
    font-size: 0.9rem;
    max-width: 300px;
}

.footer-col h4 {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    color: var(--text-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: var(--text-color);
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Auth Pages */
.auth-body {
    background-color: var(--surface-alt);
    background-image: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border-color);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-heading);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--text-color);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-color);
}

.auth-footer a {
    color: var(--accent-color);
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: none;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* --- Dashboard Unified Styles (v3.0) --- */
/* --- Premium Dashboard Redesign (v4.0) --- */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background-color: #f8fafc;
    padding: 0;
    gap: 0;
    font-family: 'Inter', sans-serif;
}

.sidebar {
    width: 280px;
    background: #0f172a;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1000;
}

.sidebar .logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 3.5rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.5rem;
}

.sidebar .logo-icon {
    color: #3b82f6;
    font-family: monospace;
}

.sidebar-nav {
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    color: #94a3b8;
    border-radius: 14px;
    margin-bottom: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    padding-left: 1.5rem;
}

.nav-item.active {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.sidebar-footer {
    padding-top: 1.5rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dashboard Wrapper */
.dashboard-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.50rem;
}

/* Standardized Navbar (90px Premium) */
.dashboard-navbar {
    height: 90px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
}

.dashboard-navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-color: #e2e8f0;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.05);
}

.navbar-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.menu-toggle {
    display: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    box-shadow: var(--shadow-sm);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: var(--text-heading);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.search-wrapper {
    position: relative;
    width: 320px;
}

.search-wrapper i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

.icon-btn {
    background: #fff;
    border: 1px solid #e2e8f0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.icon-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.icon-btn i {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.45rem 0.5rem 0.45rem 1.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.user-profile:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #ffffff;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Page Header Component */
.page-header {
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.page-header p {
    color: #64748b;
    font-size: 1.1rem;
    margin: 0;
}

/* Banner Notification Styles */
.notification-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-150%);
    width: 90%;
    max-width: 500px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 2000;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-radius: 20px;
}

body.dark-mode .notification-banner {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.1);
}

.notification-banner.show {
    transform: translateX(-50%) translateY(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
}

.notification-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-banner.success .notification-icon {
    background: #ecfdf5;
    color: #10b981;
}

body.dark-mode .notification-banner.success .notification-icon {
    background: #064e3b;
    color: #34d399;
}

.notification-banner.error .notification-icon {
    background: #fef2f2;
    color: #ef4444;
}

body.dark-mode .notification-banner.error .notification-icon {
    background: #450a0a;
    color: #f87171;
}

.notification-banner.info .notification-icon {
    background: #eff6ff;
    color: #3b82f6;
}

.notification-banner.warning .notification-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.notification-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.notification-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-heading);
    letter-spacing: -0.01em;
}

.notification-message {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

.notification-close {
    background: transparent;
    border: none;
    padding: 0.6rem;
    cursor: pointer;
    color: #94a3b8;
    border-radius: 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    background: var(--surface-alt);
    color: var(--text-heading);
}

@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }
}

.user-profile i {
    width: 16px;
    height: 16px;
    color: #94a3b8;
    stroke-width: 2.5;
    margin-right: 0.25rem;
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Page Standard Elements */
.dashboard-main {
    flex: 1;
    padding: 3.5rem;
}

.dashboard-header {
    margin-bottom: 3rem;
    padding: 0 0.5rem;
}

.dashboard-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.dashboard-header p {
    font-size: 1.1rem;
    color: #64748b;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 32px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.02);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 40px -15px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-color);
}

.stat-card .icon-box {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    background: #f8fafc;
    color: var(--text-heading);
}

.stat-card h4 {
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text-heading);
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.02em;
}

/* Visual Content Blocks */
.content-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 2rem;
}

.card {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 32px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.02);
}

.card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.activity-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

/* Mobile Responsiveness Redefined */
@media (max-width: 1200px) {
    .content-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .dashboard-layout {
        flex-direction: column;
        padding: 1rem;
    }

    .sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        bottom: 0;
        width: 300px;
        height: 100vh;
        border-radius: 0;
        z-index: 2000;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(8px);
        z-index: 1500;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .menu-toggle {
        display: flex;
    }

    .navbar-container .breadcrumb,
    .navbar-container .search-wrapper {
        display: none;
    }

    .dashboard-navbar {
        padding: 0 1.25rem;
        border-radius: 0;
        height: 90px;
    }
}

/* Banner Style Notifications */
.toast-container {
    position: fixed;
    top: 90px;
    left: 280px;
    right: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    transition: all 0.3s ease;
}

@media (max-width: 900px) {
    .toast-container {
        left: 0;
    }
}

.toast {
    pointer-events: auto;
    width: 100%;
    padding: 1.25rem 2.5rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transform: translateY(-100%);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.toast.show {
    transform: translateY(0);
}

.toast-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-success {
    border-left: 6px solid #10b981;
}

.toast-error {
    border-left: 6px solid #f43f5e;
}

.toast-info {
    border-top: 3px solid #3b82f6;
}

/* Dashboard Utilities (Replacing Inline Styles & Resotring Settings) */
.page-header {
    margin-bottom: 3rem;
}

.page-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-heading);
}

.page-header p {
    color: #64748b;
    font-size: 1.1rem;
    margin: 0;
}

body.dark-mode .page-header p {
    color: var(--text-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

body.dark-mode .stat-card {
    background: var(--surface-color);
    border-color: var(--border-color);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.stat-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

body.dark-mode .stat-card h4 {
    color: var(--text-color);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Recent Activity & System Status */
.content-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .content-row {
        grid-template-columns: 1fr;
    }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-heading);
}

.view-all-link {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 500;
    text-decoration: none;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

body.dark-mode .activity-item {
    border-color: var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    flex-shrink: 0;
}

body.dark-mode .activity-icon {
    background: var(--surface-alt);
    color: var(--text-color);
}

.activity-details p {
    margin: 0 0 0.25rem 0;
    font-weight: 500;
    color: var(--text-heading);
}

.activity-details span {
    font-size: 0.85rem;
    color: #94a3b8;
}

.empty-state-small {
    color: #64748b;
    font-size: 0.9rem;
    text-align: center;
    padding: 2rem;
}

/* System Status List */
.status-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

body.dark-mode .status-item {
    border-color: var(--border-color);
}

.status-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.status-label {
    font-size: 0.9rem;
    color: #64748b;
}

body.dark-mode .status-label {
    color: var(--text-color);
}

.status-value {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-heading);
}

.status-value.warning {
    color: #f59e0b;
}

.role-badge {
    color: #3b82f6;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.id-badge {
    color: #10b981;
    font-size: 0.85rem;
    font-family: monospace;
}

/* Settings Specific & Restored Layout */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 800px;
}

.profile-upload-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f1f5f9;
}

body.dark-mode .profile-upload-section {
    border-color: var(--border-color);
}

.avatar-preview-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    font-size: 2rem;
    font-weight: 700;
    color: #334155;
}

body.dark-mode .avatar-preview-lg {
    border-color: var(--surface-alt);
    background: var(--surface-alt);
    color: var(--text-color);
}

.upload-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.upload-controls h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-heading);
}

.upload-controls p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 1rem;
}

body.dark-mode .upload-controls p {
    color: var(--text-color);
}

.form-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-section {
        grid-template-columns: 1fr;
    }

    .profile-upload-section {
        flex-direction: column;
        align-items: flex-start;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #334155;
}

body.dark-mode .form-group label {
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    outline: none;
    transition: all 0.2s;
    background: #ffffff;
    color: var(--text-heading);
    font-size: 0.95rem;
}

body.dark-mode .form-control {
    background: var(--surface-alt);
    border-color: var(--border-color);
    color: var(--text-heading);
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-outline {
    border: 1px solid #e2e8f0;
    color: #334155;
    background: transparent;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

body.dark-mode .btn-outline {
    border-color: var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    background: #f8fafc;
}

body.dark-mode .btn-outline:hover {
    background: var(--surface-alt);
}

.btn-danger-outline {
    color: #ef4444;
    border-color: #fecaca;
}

body.dark-mode .btn-danger-outline {
    color: #f87171;
    border-color: #7f1d1d;
}

.btn-danger-outline:hover {
    background: #fef2f2;
}

body.dark-mode .btn-danger-outline:hover {
    background: #450a0a;
}

/* Dark Mode Contrast Fixes */
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #94a3b8;
    /* slate-400 - distinct but visible */
    opacity: 1;
}

body.dark-mode .card,
body.dark-mode .stat-card,
body.dark-mode .settings-grid .card {
    color: var(--text-color);
}

body.dark-mode .card h1,
body.dark-mode .card h2,
body.dark-mode .card h3,
body.dark-mode .card h4,
body.dark-mode .card h5,
body.dark-mode .card h6 {
    color: var(--text-heading) !important;
}

body.dark-mode .card p,
body.dark-mode .card span,
body.dark-mode .card label,
body.dark-mode .card li {
    color: var(--text-color);
}

body.dark-mode .text-muted,
body.dark-mode .form-text {
    color: #94a3b8 !important;
}

/* Ensure disabled inputs are readable */
body.dark-mode input[readonly],
body.dark-mode input[disabled] {
    background-color: rgba(15, 23, 42, 0.5) !important;
    color: #94a3b8 !important;
    border-color: rgba(51, 65, 85, 0.5);
}

/* Fix specific elements found in analysis */
body.dark-mode .upload-controls p {
    color: #cbd5e1 !important;
}

body.dark-mode .profile-upload-section {
    border-color: #334155;
}

/* Ensure select dropdowns are visible (browser dependent but helpful) */
body.dark-mode select option {
    background-color: #1e293b;
    color: #f8fafc;
}

/* Specific Dark Mode Text Fixes */
/* Header User Name */
body.dark-mode .user-profile .user-name {
    color: var(--text-heading);
}

body.dark-mode .navbar-right .icon-btn {
    color: var(--text-color);
}

body.dark-mode .navbar-right .icon-btn:hover {
    color: var(--text-heading);
    background: var(--surface-alt);
}

/* Home Page Empty State */
body.dark-mode .empty-state h2 {
    color: var(--text-heading) !important;
}

body.dark-mode .empty-state p {
    color: var(--text-color) !important;
}

body.dark-mode .project-icon i {
    color: #475569 !important;
    /* darker slate for icon in dark mode */
}

/* Empty State Styles */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    text-align: center;
}

body.dark-mode .empty-state {
    background: var(--surface-color);
    border-color: var(--border-color);
}

.project-icon {
    width: 80px;
    height: 80px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

body.dark-mode .project-icon {
    background: var(--surface-alt);
}

/* Page Header Update */
.page-header {
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    /* Increased to match premium look */
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.page-header p {
    color: #64748b;
    font-size: 1.1rem;
    margin: 0;
}

/* Unified Welcome Header */
.welcome-header {
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.welcome-header h1 {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin-bottom: 0.5rem !important;
    color: var(--text-heading);
    letter-spacing: -0.02em !important;
}

.welcome-header p {
    color: #64748b;
    font-size: 1.1rem !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

body.dark-mode .welcome-header p {
    color: var(--text-color);
}

/* User Profile Dropdown Styles */
.user-profile {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.dropdown-menu {
    position: absolute;
    top: 120%;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    width: 260px;
    display: none;
    z-index: 1000;
    padding: 0;
    overflow: hidden;
    transform-origin: top right;
}

.dropdown-menu.show {
    display: block;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

body.dark-mode .dropdown-menu {
    background: #1e293b;
    /* surface-color */
    border-color: #334155;
    /* border-color */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.dropdown-header {
    padding: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

body.dark-mode .dropdown-header {
    border-color: #334155;
    background: #0f172a;
    /* bg-color matching darker tone */
}

.dropdown-name {
    display: block;
    font-weight: 700;
    color: var(--text-heading);
    font-size: 1rem;
    margin-bottom: 0.25rem;
    font-family: 'Space Grotesk', sans-serif;
}

.dropdown-role {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
    text-transform: capitalize;
    margin-bottom: 0.25rem;
}

.dropdown-id {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    font-family: monospace;
}

body.dark-mode .dropdown-role,
body.dark-mode .dropdown-id {
    color: #94a3b8;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
    font-weight: 500;
}

.dropdown-item i {
    width: 18px;
    height: 18px;
    color: #94a3b8;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: var(--text-heading);
}

.dropdown-item:hover i {
    color: var(--accent-color);
}

body.dark-mode .dropdown-item:hover {
    background: #28374f;
    /* slightly lighter than surface */
    color: #f8fafc;
}

.dropdown-item.text-danger {
    color: #ef4444;
}

.dropdown-item.text-danger i {
    color: #ef4444;
}

.dropdown-item.text-danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

body.dark-mode .dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .dropdown-menu {
        position: fixed;
        top: 80px;
        left: 1rem;
        right: 1rem;
        width: auto;
        bottom: auto;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1.5rem;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--surface-color);
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    border: 1px solid var(--border-color);
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-color);
    font-size: 0.95rem;
    opacity: 0.8;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-heading);
    font-size: 0.9rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2.5rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

body.dark-mode .modal-content {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .modal-overlay {
    background: rgba(2, 6, 23, 0.8);
}

/* Refined Project Cards */
.project-card {
    background: var(--surface-color);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.project-icon {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}

body.dark-mode .project-icon {
    background: #0f172a;
}

.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.active {
    background: #f0fdf4;
    color: #166534;
}

body.dark-mode .status-badge.active {
    background: rgba(22, 101, 52, 0.2);
    color: #4ade80;
}