:root {
    --bg-main: #0b0f19;
    --bg-sidebar: #111827;
    --bg-card: #1f2937;
    --bg-card-hover: #374151;
    --border-color: #374151;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --accent-primary: #6366f1;
    --accent-hover: #4f46e5;
    --accent-success: #10b981;
    --accent-danger: #ef4444;
    --radius: 12px;
    --transition: all 0.2s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
}

/* Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-main);
}

.sidebar-brand span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sidebar-nav {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    color: var(--text-main);
    background-color: var(--bg-card);
}

.main-wrapper {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background-color: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 90;
}

.page-heading {
    font-size: 1.25rem;
    font-weight: 600;
}

.content-container {
    padding: 32px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
    padding-bottom: 100px;
}

/* Dashboard Welcome & Counters */
.dashboard-welcome {
    margin-bottom: 24px;
}

.dashboard-welcome h2 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.current-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.counters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.counter-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--transition);
}

.counter-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.counter-card.alert-card:hover {
    border-color: var(--accent-danger);
}

.counter-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.counter-value {
    font-size: 1.75rem;
    font-weight: 700;
}

/* Sections & Cards */
.hq-section {
    margin-bottom: 32px;
}

.section-header {
    margin-bottom: 12px;
}

.section-header h3 {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
}

.now-card {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), var(--bg-card));
}

.now-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

.empty-card {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.task-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.filter-tabs a {
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.filter-tabs a:hover, .filter-tabs a.active {
    color: var(--text-main);
    background-color: var(--bg-card);
}

/* Buttons & Forms */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-success {
    background-color: var(--accent-success);
    color: white;
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

.checkbox-btn {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-btn:hover {
    border-color: var(--accent-success);
    background-color: rgba(16, 185, 129, 0.1);
}

.checked-box {
    color: var(--accent-success);
    font-weight: bold;
}

.strikethrough {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Forms */
.form-container {
    max-width: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    margin: 40px auto;
}

.hq-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input, .form-group select, .form-group textarea {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--accent-primary);
}

/* Auth Pages */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
}

.auth-card h2 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.auth-footer-text {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer-text a {
    color: var(--accent-primary);
    text-decoration: none;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--accent-danger);
    color: var(--accent-danger);
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.mt-10 { margin-top: 10px; }
.text-muted { color: var(--text-muted); }

/* Mobile Navigation Helpers */
.desktop-only { display: flex; }
.mobile-only { display: none; }

.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background-color: var(--accent-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    z-index: 1000;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-wrapper { margin-left: 0; }
    .desktop-only { display: none !important; }
    .mobile-only { display: flex !important; }
    .counters-grid { grid-template-columns: repeat(2, 1fr); }
    .content-container { padding: 20px; }
    
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: var(--bg-sidebar);
        border-top: 1px solid var(--border-color);
        display: flex;
        justify-content: space-around;
        padding: 12px;
        z-index: 999;
    }
    
    .mobile-nav a {
        color: var(--text-muted);
        text-decoration: none;
        font-weight: 600;
        font-size: 0.9rem;
    }
    
    .mobile-nav a.active {
        color: var(--accent-primary);
    }
}