:root {
    --sidebar-width: 220px;
    --sidebar-bg: #0f1117;
    --topbar-bg: #151820;
    --card-bg: #181c25;
    --card-border: rgba(255, 255, 255, 0.06);
    --accent: #4f8cff;
    --accent-glow: rgba(79, 140, 255, 0.15);
}

body {
    min-height: 100vh;
    background: #111318;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--card-border);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

.sidebar-brand {
    font-size: 1.1rem;
    color: #fff;
}

.sidebar-brand i {
    font-size: 1.3rem;
    color: var(--accent);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 9px 14px;
    margin-bottom: 1px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar .nav-link.active {
    color: #fff;
    background: var(--accent-glow);
    box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ---- Main ---- */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
}

.topbar {
    height: 52px;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--card-border);
}

.content-area {
    width: 100%;
}

/* ---- Cards ---- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
}

.card-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--card-border);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    padding: 12px 20px;
}

.card-body { padding: 20px; }

/* ---- Stat cards ---- */
.stat-card {
    border-radius: 10px;
    padding: 18px 22px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}

.stat-card.stat-total::before { background: var(--accent); }
.stat-card.stat-published::before { background: #22c55e; }
.stat-card.stat-progress::before { background: #f59e0b; }
.stat-card.stat-failed::before { background: #ef4444; }
.stat-card.stat-today::before { background: #8b5cf6; }
.stat-card.stat-week::before { background: #06b6d4; }

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    font-size: 1.8rem;
    opacity: 0.1;
    position: absolute;
    top: 14px; right: 18px;
}

/* ---- Tables ---- */
.table { font-size: 0.85rem; }

.table td, .table th {
    vertical-align: middle;
    padding: 10px 14px;
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.35);
    border-bottom: 1px solid var(--card-border);
}

/* ---- Badges ---- */
.status-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ---- Auth ---- */
.auth-wrapper {
    background: radial-gradient(ellipse at top, #1a1f2e 0%, #111318 70%);
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-logo {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 8px;
}

/* ---- Article content ---- */
.article-content {
    max-height: 500px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 6px 0;
}

/* ---- Task items ---- */
.task-item {
    padding: 10px 16px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-item:last-child { border-bottom: none; }
a.task-item:hover { background: rgba(255,255,255,0.04); }

.task-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .sidebar { width: 56px; padding: 8px !important; }
    .sidebar-brand span, .sidebar .nav-link span { display: none; }
    .main-content { margin-left: 56px; width: calc(100% - 56px); }
}
