:root {
    --bg-dark: #0f172a;
    --nav-bg: linear-gradient(135deg, #1e293b, #0f172a);
    --card-bg: rgba(30, 41, 59, 0.5);
    --primary: #fbbf24;
    --accent: #3b82f6;
    --text-white: #f1f5f9;
    --text-gray: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --border: rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    height: 100vh;
    overflow: hidden;
    font-size: 14.5px; /* Increased font size for readability */
}

/* Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }

/* Top Navigation Bar */
.top-nav-bar {
    height: 60px;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.nav-left { display: flex; align-items: center; gap: 12px; }
.logo { width: 34px; height: 34px; background: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #000; font-weight: 800; font-size: 0.9rem; }
.brand { font-family: 'Outfit'; font-weight: 700; font-size: 1rem; color: #fff; letter-spacing: 0.5px; }

.nav-links { display: flex; gap: 4px; margin-left: 32px; }
.nav-item {
    padding: 8px 16px; text-decoration: none; color: var(--text-gray); border-radius: 8px;
    font-size: 0.85rem; font-weight: 600; transition: all 0.2s;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.nav-item.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }

.nav-right { display: flex; align-items: center; gap: 20px; }
.search-box { background: rgba(0,0,0,0.2); padding: 6px 14px; border-radius: 10px; border: 1px solid var(--border); width: 220px; }
.search-box input { background: transparent; border: none; color: #fff; outline: none; width: 100%; font-size: 0.85rem; }

.user-pill { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.03); padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border); }
.user-pill span { font-weight: 600; font-size: 0.85rem; }
.avatar-sm { width: 28px; height: 28px; background: var(--primary); color: #000; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.7rem; }
#logoutBtn { background: none; border: none; cursor: pointer; color: var(--text-gray); font-size: 1rem; transition: 0.2s; }
#logoutBtn:hover { color: var(--error); transform: scale(1.1); }

/* Sub Header */
.sub-header {
    height: 45px; background: rgba(15, 23, 42, 0.8); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
}
.month-selector { display: flex; align-items: center; gap: 16px; font-weight: 700; font-size: 0.9rem; }
.btn-prev, .btn-next { background: none; border: none; color: var(--text-gray); cursor: pointer; padding: 4px; border-radius: 4px; }
.btn-prev:hover, .btn-next:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Dashboard Layout */
.main-content { overflow-y: auto; height: calc(100vh - 105px); background: #0b1120; }
.dashboard-layout {
    display: grid; grid-template-columns: 280px 1fr 320px; gap: 20px; padding: 20px; min-height: 100%;
}

.column { display: flex; flex-direction: column; gap: 20px; }

/* Cards & Components */
.card {
    background: var(--card-bg); border-radius: 12px; border: 1px solid var(--border); padding: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2); backdrop-filter: blur(4px);
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-header h2 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-gray); }

.bg-accent { border-left: 4px solid var(--accent); background: linear-gradient(to right, rgba(59, 130, 246, 0.05), transparent); }
.bg-warn { border-left: 4px solid var(--primary); background: linear-gradient(to right, rgba(251, 191, 36, 0.05), transparent); }

.stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-mini { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 0.75rem; color: var(--text-gray); }
.stat-val { font-size: 1.4rem; font-weight: 800; color: #fff; }

.countdown-text { font-size: 1.1rem; font-weight: 800; color: var(--warning); margin: 4px 0; }
.card-sub-text { font-size: 0.75rem; color: var(--text-gray); }

/* Matrix Table */
.matrix-card { height: 100%; overflow: hidden; display: flex; flex-direction: column; }
.matrix-scroll { flex:1; overflow: auto; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th { text-align: left; padding: 10px 16px; font-size: 0.75rem; background: rgba(30, 41, 59, 0.8); border-bottom: 1px solid var(--border); position: sticky; top:0; z-index: 10; color: #cbd5e1; }
td { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 0.85rem; white-space: nowrap; }

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; cursor: pointer; transition: 0.2s; }
.dot.success { background: var(--success); box-shadow: 0 0 8px var(--success); }
.dot.empty { background: rgba(255,255,255,0.05); border: 1px solid var(--border); }
.dot.empty:hover { background: var(--warning); }

.matrix-legend { display: flex; gap: 16px; font-size: 0.7rem; color: var(--text-gray); padding-top: 12px; }

/* Urgent Actions */
.urgent-scroll { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.urgent-item { padding: 12px; background: rgba(239, 68, 68, 0.03); border: 1px solid rgba(239, 68, 68, 0.1); border-left: 3px solid var(--error); border-radius: 8px; }
.urgent-item h4 { font-size: 0.85rem; margin-bottom: 4px; }
.urgent-item p { font-size: 0.75rem; color: var(--text-gray); margin-bottom: 8px; }

/* Log List */
.log-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.log-item { display: flex; gap: 10px; font-size: 0.75rem; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.log-user { color: var(--accent); font-weight: 700; }

/* Buttons & Controls */
.btn-primary { background: linear-gradient(to bottom, var(--primary), #d97706); color: #000; border: none; padding: 10px 20px; border-radius: 8px; font-weight: 800; cursor: pointer; transition: 0.2s; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4); }
.btn-primary.full-width { width: 100%; }

.btn-outline { background: transparent; border: 1px solid var(--border); color: #fff; padding: 8px 12px; border-radius: 8px; font-size: 0.8rem; cursor: pointer; text-align: left; }
.btn-outline:hover { border-color: var(--accent); background: rgba(59, 130, 246, 0.05); }

.cred-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 20px; }
.cred-card { background: rgba(255,255,255,0.03); border: 1px solid var(--border); padding: 16px; border-radius: 12px; }
.cred-card h3 { font-size: 0.75rem; color: var(--primary); text-transform: uppercase; margin-bottom: 12px; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.cred-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cred-label { font-size: 0.75rem; color: var(--text-gray); }
.cred-field-group { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.2); padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border); min-width: 180px; justify-content: flex-end; }
.cred-value { font-family: monospace; font-size: 0.85rem; color: #fff; }
.cred-value.obfuscated { color: var(--text-gray); }
.btn-icon { background: none; border: none; cursor: pointer; color: var(--text-gray); transition: 0.2s; font-size: 0.9rem; }
.btn-icon:hover { color: var(--primary); transform: scale(1.1); }

/* Tab Visibility Logic */
.tab-content { display: none; padding: 20px; animation: slideIn 0.3s ease-out; }
.tab-content.active { display: block; }

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

.shortcut-grid { display: grid; gap: 8px; }

/* Filing Workspace */
.filing-workspace { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; }
.checklist-grid { display: grid; gap: 12px; margin-top: 10px; }
.checklist-item { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 16px; border: 1px solid var(--border); border-radius: 12px;
    background: rgba(255, 255, 255, 0.02); transition: 0.3s;
}
.checklist-item.done { border-left: 4px solid var(--success); background: rgba(16, 185, 129, 0.05); }
.checklist-item.todo { border-left: 4px solid var(--warning); }
.check-info h4 { font-size: 1rem; margin-bottom: 4px; }
.check-info p { font-size: 0.75rem; color: var(--text-gray); }

/* Login */
.login-overlay { position: fixed; top: 0; left:0; width: 100%; height: 100%; background: radial-gradient(circle at center, #1e293b, #0f172a); display: none; align-items: center; justify-content: center; z-index: 1000; }
.login-overlay.active { display: flex; }
.login-box { width: 340px; text-align: center; }

.role-hidden { display: none !important; }

@media (max-width: 1200px) {
    .dashboard-layout { grid-template-columns: 1fr; }
}
