:root {
    --bg-color: #000000;
    --card-bg: #0f1115;
    --primary-color: #3b82f6;
    --secondary-color: #10b981;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --border-color: #334155;
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Auth Page specific layout */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
}

/* Ambient glow behind the auth card */
.auth-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(16, 185, 129, 0.05) 50%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: -1;
    animation: pulseGlow 8s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* Hard Grid Background */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    animation: panGrid 60s linear infinite;
}

@keyframes panGrid {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.font-mono {
    font-family: var(--font-mono);
}

.text-gradient {
    color: var(--primary-color);
}

/* Layout Components */
header {
    width: 100%;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #000;
    border-bottom: 2px solid #1e293b;
    z-index: 1000;
}

.card {
    background: #09090b;
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(15, 17, 21, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

/* Subtle top highlight for auth card */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
}

.stat-card {
    background: #09090b;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 4px;
}

/* Buttons (Industrial Style) */
.btn {
    padding: 0.6rem 1.25rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: #475569;
}

/* Responsive Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 80px 1fr;
    }
    .sidebar span, .sidebar p {
        display: none;
    }
    .sidebar {
        padding: 2rem 1rem;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        width: 100%;
        height: auto;
        flex-direction: row;
        border-right: none;
        border-top: 2px solid #1e293b;
        padding: 0.75rem;
        z-index: 2000;
    }
    .sidebar .logo, .sidebar div:last-child {
        display: none;
    }
    .sidebar nav ul {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
    }
    .sidebar .btn {
        padding: 0.5rem;
        border: none;
    }
    .main-content {
        padding: 1.5rem;
        padding-bottom: 5rem; /* Space for mobile nav */
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
}

.main-content {
    padding: 2.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

/* Utilities */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 480px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }
}

.stat-val {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 600;
}

/* Tables Responsive Wrapper */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th {
    text-align: left;
    padding: 1rem;
    font-size: 0.75rem;
    color: var(--text-dim);
    border-bottom: 2px solid #1e293b;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #1e293b;
    font-size: 0.9rem;
}

.status-pill {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-active { background: rgba(16, 185, 129, 0.1); color: var(--secondary-color); border: 1px solid rgba(16, 185, 129, 0.2); }
.status-pending { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2); }

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

input, select {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: white;
    font-family: var(--font-sans);
    transition: all 0.2s ease;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: rgba(0, 0, 0, 0.6);
}

input:hover {
    border-color: #475569;
}

/* Form group label tweaks */
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 500;
}

/* Animations */
@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-stagger {
    opacity: 0;
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* Role Switcher specific */
.role-switcher {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.role-switcher .role-btn {
    flex: 1;
    text-align: center;
    padding: 0.6rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    transition: all 0.2s;
}

.role-switcher .role-btn.active {
    background: var(--primary-color);
    color: white;
}
/* Landing Page Hero & Responsiveness */
.hero {
    padding-top: 8rem;
    padding-bottom: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .hero {
        padding-top: 6rem;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    .hero-btns .btn {
        width: 100%;
        padding: 1rem !important;
    }
    header {
        padding: 1rem;
    }
    header nav, .header-cta {
        display: none; /* Mobile menu would go here */
    }
}

.hero-stats {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    max-width: 800px;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 600px) {
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
}

/* Feature Grid Responsiveness */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 4rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    footer .container {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    footer div {
        justify-content: center;
    }
}
