:root {
    --sidebar-width: 220px;
    --nav-height: 56px;
    --mobile-nav-height: 64px;
    --primary: #0d6efd;
    --dark: #1a1d23;
}

body {
    background: #f0f2f5;
    font-size: 15px;
}

/* ── Sidebar ── */
.sidebar {
    background: #fff;
    min-height: calc(100vh - var(--nav-height));
    border-right: 1px solid #e5e7eb;
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
}

.sidebar .nav-link {
    color: #4b5563;
    border-radius: 8px;
    margin: 2px 8px;
    padding: 10px 12px;
    font-size: 14px;
    transition: all .15s;
}
.sidebar .nav-link:hover { background: #f3f4f6; color: #111; }
.sidebar .nav-link.active { background: var(--primary); color: #fff !important; font-weight: 600; }

/* ── Main content ── */
.main-content {
    padding: 24px 20px 100px;
    min-height: calc(100vh - var(--nav-height));
}

/* ── Cards ── */
.card {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.card-header { border-bottom: 1px solid #f0f0f0; background: #fff; border-radius: 12px 12px 0 0 !important; }

/* ── Stat cards ── */
.stat-card {
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-card .stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.stat-card .stat-num { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-card .stat-label { font-size: 13px; color: #6b7280; margin-top: 4px; }

/* ── Content card ── */
.content-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform .15s, box-shadow .15s;
    cursor: pointer;
}
.content-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.content-card .thumb {
    height: 160px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; color: rgba(255,255,255,.7);
    position: relative;
}
.content-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.content-card .platform-badge {
    position: absolute; top: 10px; right: 10px;
    background: rgba(0,0,0,.55);
    color: #fff; border-radius: 20px; padding: 3px 10px;
    font-size: 12px; backdrop-filter: blur(4px);
}
.content-card .priority-indicator {
    position: absolute; top: 10px; left: 10px;
}

/* ── Avatar ── */
.avatar-sm {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--primary);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.avatar { width: 40px; height: 40px; font-size: 16px; }
.avatar-lg { width: 56px; height: 56px; font-size: 22px; }

/* ── Mobile nav ── */
.mobile-nav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    z-index: 1030;
    height: var(--mobile-nav-height);
    box-shadow: 0 -2px 12px rgba(0,0,0,.08);
}
.mobile-nav-item {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    flex: 1; height: 100%;
    text-decoration: none; color: #9ca3af;
    font-size: 10px; gap: 3px;
    position: relative;
    transition: color .15s;
}
.mobile-nav-item i { font-size: 20px; }
.mobile-nav-item.active { color: var(--primary); }
.notif-dot {
    position: absolute; top: 8px; right: calc(50% - 18px);
    background: #ef4444; color: #fff;
    border-radius: 50%; width: 16px; height: 16px;
    font-size: 9px; display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}

@media (max-width: 767px) {
    .mobile-nav { display: flex; }
    .main-content { padding: 16px 12px 80px; }
}

/* ── Login page ── */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1d23 0%, #2563eb 100%);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
    background: #fff; border-radius: 20px;
    padding: 40px 36px; width: 100%; max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.login-logo {
    width: 64px; height: 64px; border-radius: 16px;
    background: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff; margin: 0 auto 16px;
}

/* ── Form controls ── */
.form-control, .form-select {
    border-radius: 8px;
    border-color: #d1d5db;
    padding: 10px 14px;
}
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,110,253,.15); }

/* ── Approval actions ── */
.action-bar {
    position: sticky; bottom: 0; background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
    z-index: 10;
    display: flex; gap: 10px;
}

/* ── Timeline ── */
.timeline { position: relative; }
.timeline::before {
    content: ''; position: absolute;
    left: 20px; top: 0; bottom: 0;
    width: 2px; background: #e5e7eb;
}
.timeline-item { display: flex; gap: 14px; margin-bottom: 20px; position: relative; }
.timeline-icon {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; z-index: 1; font-size: 16px;
}

/* ── File upload ── */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary);
    background: rgba(13,110,253,.04);
}
.upload-preview { max-height: 200px; border-radius: 8px; margin-top: 12px; }

/* ── Tables on mobile ── */
@media (max-width: 576px) {
    .table-responsive-card table thead { display: none; }
    .table-responsive-card table tbody tr {
        display: block; border: 1px solid #e5e7eb;
        border-radius: 10px; margin-bottom: 12px; padding: 12px;
        background: #fff;
    }
    .table-responsive-card table tbody td {
        display: flex; justify-content: space-between;
        align-items: center; border: 0; padding: 4px 0;
        font-size: 13px;
    }
    .table-responsive-card table tbody td::before {
        content: attr(data-label);
        font-weight: 600; color: #6b7280; font-size: 12px;
    }
}

/* ── Misc ── */
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.badge { font-size: .75rem; font-weight: 600; }
.btn { border-radius: 8px; }
.btn-lg { padding: 12px 24px; }

.empty-state {
    text-align: center; padding: 60px 20px;
    color: #9ca3af;
}
.empty-state i { font-size: 56px; display: block; margin-bottom: 12px; }
