/* ============================================================
   Senaro Studio OS — PHP edition
   One stylesheet, no build step. Works on any browser.
   ============================================================ */

* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f7fa;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
input, select, textarea, button { font: inherit; }

:root {
    --brand:        #ef4444;
    --brand-dark:   #b91c1c;
    --bg:           #f5f7fa;
    --card:         #ffffff;
    --border:       #e2e8f0;
    --text:         #0f172a;
    --muted:        #64748b;
    --accent:       #f1f5f9;
    --shadow:       0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
}

/* ---- Login page ---- */
.login-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 50%, #1e293b 100%);
    padding: 20px;
}
.login-card {
    background: white;
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
    width: 100%; max-width: 420px;
}
.login-card h1 { margin: 16px 0 4px; font-size: 24px; }
.login-card label { display: block; margin: 12px 0 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.login-card input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; }
.login-card input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.login-card .muted { color: var(--muted); }
.login-brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { background: linear-gradient(135deg, #ef4444, #b91c1c); color: white; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; font-weight: 800; font-size: 18px; box-shadow: 0 4px 12px rgba(239,68,68,.3); }
.brand-logo.big { width: 44px; height: 44px; font-size: 22px; }
.brand-name { font-weight: 800; font-size: 14px; letter-spacing: -0.01em; }
.brand-name.big { font-size: 20px; }
.brand-tag { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }

/* ---- Layout ---- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 240px; background: white;
    border-right: 1px solid var(--border);
    padding: 20px 12px;
    flex-shrink: 0;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 8px 8px 20px; border-bottom: 1px solid var(--border); }
.sidebar nav { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    color: var(--muted);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.15s;
}
.nav-item:hover { background: var(--accent); color: var(--text); }
.nav-item.active { background: linear-gradient(135deg, #ef4444, #b91c1c); color: white; box-shadow: 0 4px 12px rgba(239,68,68,.25); }
.nav-item.active .nav-icon { filter: brightness(2); }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    height: 60px;
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.topbar-title { font-weight: 700; font-size: 16px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.cal-pill { background: var(--accent); padding: 6px 12px; border-radius: 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.user-chip { display: flex; align-items: center; gap: 8px; background: var(--accent); padding: 4px 8px 4px 4px; border-radius: 20px; }
.user-meta { font-size: 11px; line-height: 1.2; }
.user-name { font-weight: 700; }
.user-role { color: var(--muted); }
.logout { color: var(--muted); text-decoration: none; padding: 4px 8px; border-radius: 6px; font-size: 16px; }
.logout:hover { background: white; color: var(--brand); }

.content { padding: 24px; max-width: 1400px; width: 100%; }

/* ---- Hero ---- */
.hero {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 50%, #1e293b 100%);
    color: white;
    padding: 28px 32px;
    border-radius: 20px;
    margin-bottom: 24px;
    display: flex; justify-content: space-between; align-items: end;
    flex-wrap: wrap; gap: 16px;
}
.hero-pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; background: rgba(255,255,255,.15); border-radius: 99px; font-size: 11px; font-weight: 600; backdrop-filter: blur(8px); }
.hero-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: #6ee7b7; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% {opacity:1} 50% {opacity:.5} }
.hero-title { margin: 12px 0 8px; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.hero-sub { margin: 0; opacity: .85; max-width: 460px; }
.hero-actions { display: flex; gap: 10px; }

/* ---- Stat cards ---- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.stat-card {
    background: white;
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.stat-card::before { content:''; position: absolute; top: -20px; right: -20px; width: 80px; height: 80px; border-radius: 50%; opacity: .12; }
.stat-brand::before   { background: #ef4444; }
.stat-amber::before   { background: #f59e0b; }
.stat-emerald::before { background: #10b981; }
.stat-indigo::before  { background: #6366f1; }
.stat-ash::before     { background: #64748b; }
.stat-green::before   { background: #059669; }
.stat-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 32px; font-weight: 800; margin: 4px 0; letter-spacing: -0.02em; }
.stat-sub { font-size: 11px; color: var(--muted); }

/* ---- Cards ---- */
.card {
    background: white;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 16px;
}
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-header h2 { margin: 0; font-size: 16px; font-weight: 700; }
.card-body { padding: 16px 20px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---- Page head ---- */
.page-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.page-head h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 600; font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    background: white;
    color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, #ef4444, #b91c1c); color: white; box-shadow: 0 4px 12px rgba(239,68,68,.25); }
.btn-primary:hover { box-shadow: 0 6px 16px rgba(239,68,68,.35); }
.btn-glass { background: rgba(255,255,255,.2); color: white; border-color: rgba(255,255,255,.3); backdrop-filter: blur(8px); }
.btn-white { background: white; color: #1e293b; }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--accent); color: var(--text); }
.btn-success { background: #10b981; color: white; }
.btn-danger-ghost { background: transparent; color: var(--brand); border-color: var(--border); }
.btn-danger-ghost:hover { background: #fee2e2; color: var(--brand-dark); }
.btn-block { width: 100%; justify-content: center; padding: 10px; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ---- Forms ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.form-grid input, .form-grid select, .form-grid textarea {
    width: 100%; padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 4px;
    background: white;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(239,68,68,.08);
}
.form-actions { display: flex; gap: 8px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filters input, .filters select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: white; }
.filters input { flex: 1; min-width: 200px; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
.task-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.task-table th { text-align: left; padding: 10px 14px; background: var(--accent); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.task-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.task-table tr:hover td { background: #fafbfc; }
.task-table .empty { text-align: center; color: var(--muted); padding: 40px; }
.task-title { font-weight: 600; }
.task-type { display: inline-block; background: rgba(239,68,68,.1); color: var(--brand); padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }

/* ---- Priority chips ---- */
.pri { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pri-low    { background: #e0f2fe; color: #075985; }
.pri-medium { background: #fef3c7; color: #92400e; }
.pri-high   { background: #ffedd5; color: #9a3412; }
.pri-urgent { background: #fee2e2; color: var(--brand-dark); }

/* ---- Status chips + dropdown ---- */
.chip { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.status-select { padding: 4px 10px; border: 1px solid transparent; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.status-select:hover { filter: brightness(1.05); }

.chip-designing, .status-designing            { background: #fef3c7; color: #92400e; }
.chip-approval, .status-approval              { background: #e0f2fe; color: #075985; }
.chip-revision, .status-revision              { background: #fee2e2; color: var(--brand-dark); }
.chip-approved, .status-approved              { background: #d1fae5; color: #065f46; }
.chip-sent_final, .status-sent_final          { background: #f1f5f9; color: #475569; }
.chip-waiting_caption, .status-waiting_caption{ background: #f1f5f9; color: #475569; }
.chip-caption_done, .status-caption_done      { background: #e0f2fe; color: #075985; }
.chip-sent_boost, .status-sent_boost          { background: #fef3c7; color: #92400e; }
.chip-post_published, .status-post_published  { background: #d1fae5; color: #065f46; }
.chip-need_share, .status-need_share          { background: #fae8ff; color: #6b21a8; }
.chip-no_need_share, .status-no_need_share    { background: #f1f5f9; color: #475569; }

/* ---- Check toggle ---- */
.check {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: white;
    color: white;
    cursor: pointer;
}
.check.on { background: #10b981; border-color: #10b981; }
.check:hover { border-color: #10b981; }

/* ---- Avatars ---- */
.avatar, .avatar-fallback { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: white; background: linear-gradient(135deg, #ef4444, #b91c1c); font-size: 12px; }
.avatar-xs { width: 22px; height: 22px; font-size: 10px; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; border: 3px solid white; box-shadow: 0 2px 8px rgba(0,0,0,.1); }

/* ---- Alerts ---- */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 13px; border: 1px solid; }
.alert-error   { background: #fee2e2; color: var(--brand-dark); border-color: #fecaca; }
.alert-success { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.alert-warning { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.alert-info    { background: #e0f2fe; color: #075985; border-color: #bae6fd; }

/* ---- Distribution chart ---- */
.dist-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.dist-dot { width: 10px; height: 10px; border-radius: 50%; }
.dist-label { width: 100px; }
.dist-bar { flex: 1; height: 8px; background: var(--accent); border-radius: 99px; overflow: hidden; }
.dist-fill { height: 100%; border-radius: 99px; transition: width .3s; }
.dist-count { font-weight: 700; min-width: 30px; text-align: right; }

/* ---- Activity feed ---- */
.activity-feed { list-style: none; padding: 0; margin: 0; }
.activity-feed li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.activity-feed li:last-child { border: none; }
.activity-line { font-size: 13px; }
.activity-time { font-size: 11px; }

/* ---- Users grid ---- */
.users-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.user-card { background: white; border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.user-card-top { display: flex; gap: 12px; align-items: start; }
.user-card-name { font-weight: 700; font-size: 16px; }
.user-card-email { word-break: break-all; }
.role-chip { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.role-admin        { background: #fee2e2; color: var(--brand-dark); }
.role-team_leader  { background: #ede9fe; color: #6d28d9; }
.role-designer     { background: #fef3c7; color: #92400e; }
.role-post_caption { background: #e0f2fe; color: #075985; }
.role-post_share   { background: #fae8ff; color: #6b21a8; }
.role-viewer       { background: #f1f5f9; color: #475569; }
.user-bio { margin: 12px 0; color: var(--muted); font-size: 12px; }
.user-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 12px 0; }
.user-stats > div { background: var(--accent); padding: 10px; border-radius: 8px; text-align: center; }
.user-stats b { display: block; font-size: 18px; font-weight: 800; }
.user-stats span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.workload { margin: 12px 0; }
.workload-label { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.workload-bar { height: 8px; background: var(--accent); border-radius: 99px; overflow: hidden; }
.workload-fill { height: 100%; border-radius: 99px; transition: width .3s; }
.load-empty { background: #cbd5e1; }
.load-light { background: linear-gradient(90deg, #10b981, #059669); }
.load-busy  { background: linear-gradient(90deg, #f59e0b, #d97706); }
.load-heavy { background: linear-gradient(90deg, #ef4444, #b91c1c); }
.workload-hint { text-align: right; margin-top: 4px; }
.user-card-actions { margin-top: 12px; }

/* ---- News grid ---- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.news-card { background: white; border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; gap: 12px; box-shadow: var(--shadow); }
.news-card.is-hidden { opacity: .5; }
.news-emoji { font-size: 28px; flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; }
.news-brand .news-emoji   { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.news-amber .news-emoji   { background: linear-gradient(135deg, #f59e0b, #d97706); }
.news-emerald .news-emoji { background: linear-gradient(135deg, #10b981, #059669); }
.news-sky .news-emoji     { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.news-violet .news-emoji  { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.news-ash .news-emoji     { background: linear-gradient(135deg, #64748b, #475569); }
.news-body { flex: 1; }
.news-title { font-weight: 700; margin-bottom: 4px; }
.news-msg { margin: 0; font-size: 13px; color: var(--muted); }
.news-date { display: inline-block; margin-top: 8px; font-size: 11px; background: var(--accent); padding: 3px 8px; border-radius: 6px; color: var(--muted); }
.news-actions { display: flex; gap: 4px; flex-direction: column; }

/* ---- Range tabs ---- */
.range-tabs { display: flex; gap: 4px; background: var(--accent); padding: 4px; border-radius: 10px; }
.range-tabs a { padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 12px; }
.range-tabs a.active { background: white; color: var(--text); box-shadow: var(--shadow); }

/* ---- Helpers ---- */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.inline-form { display: inline; margin: 0; }

/* ---- Mobile ---- */
@media (max-width: 800px) {
    .sidebar { width: 64px; padding: 16px 8px; }
    .sidebar .brand div, .nav-item span:not(.nav-icon) { display: none; }
    .nav-item { justify-content: center; padding: 12px; }
    .content { padding: 16px; }
    .hero { padding: 20px; }
    .hero-title { font-size: 22px; }
    .user-meta { display: none; }
    .topbar { padding: 0 16px; }
}

/* ============================================================
   NEW: Dashboard news banner (sliding), header calendar +
   notifications bell, photo uploader, bar chart, leaderboard
   ============================================================ */

/* News banner — auto-rotating */
.news-banner {
    position: relative;
    margin-bottom: 24px;
    height: 100px;
    border-radius: 16px;
    overflow: hidden;
}
.news-slide {
    position: absolute; inset: 0;
    display: flex; align-items: center; gap: 14px;
    padding: 16px 22px;
    opacity: 0;
    transition: opacity .5s ease;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}
.news-slide.active { opacity: 1; }
.news-amber   { background: linear-gradient(135deg, #f59e0b, #b45309); }
.news-emerald { background: linear-gradient(135deg, #10b981, #065f46); }
.news-sky     { background: linear-gradient(135deg, #0ea5e9, #1e40af); }
.news-violet  { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.news-ash     { background: linear-gradient(135deg, #64748b, #334155); }
.news-banner .news-emoji {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,0.2);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.news-banner .news-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.news-banner .news-title { font-weight: 700; font-size: 16px; }
.news-banner .news-msg { font-size: 13px; opacity: 0.92; }
.news-dots {
    position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px;
}
.news-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
}
.news-dot.active { background: #fff; width: 18px; border-radius: 4px; }

/* Calendar + Notifications dropdown framework */
.popmenu { position: relative; }
.popmenu-panel {
    position: absolute; top: calc(100% + 8px); right: 0;
    min-width: 320px; max-width: 360px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.2);
    z-index: 50;
    padding: 12px;
    display: none;
}
.popmenu.open .popmenu-panel { display: block; }

/* Calendar pill */
.cal-pill {
    position: relative;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-weight: 600; font-size: 13px;
    cursor: pointer;
}
.cal-pill:hover { background: var(--accent); }
.cal-icon { font-size: 14px; }
.cal-badge {
    background: var(--brand); color: #fff;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 10px; font-weight: 700;
}

.cal-head { padding: 4px 8px 8px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.cal-grid {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.cal-dow {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    color: var(--muted); text-align: center; padding: 4px 0;
}
.cal-cell {
    position: relative;
    height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    font-size: 12px;
    cursor: default;
}
.cal-cell.empty { visibility: hidden; }
.cal-cell.today { background: var(--brand); color: #fff; font-weight: 700; }
.cal-cell.has-event:not(.today) { background: rgba(239,68,68,0.08); font-weight: 700; }
.cal-cell .cal-dot {
    position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px; border-radius: 50%; background: var(--brand);
}
.cal-cell.today .cal-dot { background: #fff; }

.cal-section-head {
    margin: 10px 0 6px;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    color: var(--brand);
}
.cal-event {
    display: flex; gap: 10px; padding: 6px;
    border-radius: 8px;
}
.cal-event:hover { background: var(--accent); }
.cal-event.today-event { background: rgba(239,68,68,0.06); }
.cal-event-emoji {
    width: 28px; height: 28px;
    border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent);
    flex-shrink: 0;
}
.cal-event-title { font-weight: 600; font-size: 13px; line-height: 1.2; }
.cal-event-msg { line-height: 1.3; }
.cal-empty { text-align: center; padding: 8px 0; }

/* Notifications bell */
.bell-btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
}
.bell-btn:hover { background: var(--accent); }
.bell-badge {
    position: absolute; top: -2px; right: -2px;
    min-width: 16px; height: 16px;
    background: var(--brand); color: #fff;
    border-radius: 8px;
    padding: 0 4px;
    font-size: 9px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 2px #fff;
}
.bell-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 4px 8px 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}
.bell-list { max-height: 360px; overflow-y: auto; }
.bell-item {
    display: flex; gap: 10px;
    padding: 8px;
    border-radius: 8px;
}
.bell-item:hover { background: var(--accent); }
.bell-item.unread { background: rgba(239,68,68,0.04); }
.bell-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--border); flex-shrink: 0;
    margin-top: 6px;
}
.bell-dot.on { background: var(--brand); }
.bell-title { font-weight: 600; font-size: 13px; line-height: 1.3; }
.bell-msg { line-height: 1.4; margin-top: 2px; }
.bell-time { margin-top: 4px; }
.bell-empty {
    text-align: center; padding: 16px 8px;
    line-height: 1.6;
}
.link-btn {
    background: none; border: none;
    color: var(--brand); cursor: pointer;
    font-weight: 600; padding: 4px;
}
.link-btn:hover { text-decoration: underline; }

/* Photo uploader (settings + new user) */
.photo-uploader {
    display: flex; gap: 16px; align-items: center;
    padding: 12px;
    border: 2px dashed var(--border);
    border-radius: 12px;
}
.photo-preview {
    width: 72px; height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--accent);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--border);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-fallback {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff; font-weight: 700; font-size: 24px;
    display: inline-flex; align-items: center; justify-content: center;
}
.photo-actions {
    display: flex; flex-direction: column; gap: 6px;
    align-items: flex-start;
}

/* Bar chart for throughput */
.bar-chart {
    display: flex; gap: 6px; align-items: flex-end;
    height: 180px; padding: 8px 4px;
}
.bar-col {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.bar-pair {
    flex: 1; width: 100%;
    display: flex; gap: 2px; align-items: flex-end;
}
.bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    transition: height .3s ease;
}
.bar-created   { background: #ef4444; }
.bar-completed { background: #10b981; }
.bar-x {
    font-size: 10px;
    color: var(--muted);
}
.legend {
    display: flex; gap: 14px;
    justify-content: center;
    font-size: 11px; color: var(--muted);
    margin-top: 8px;
}
.legend-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

/* Mini-table (used in reports + dashboard leaderboard) */
.mini-table {
    width: 100%; border-collapse: collapse;
    font-size: 13px;
}
.mini-table th {
    text-align: left; padding: 8px 6px;
    color: var(--muted); font-size: 11px;
    text-transform: uppercase; font-weight: 700;
    border-bottom: 1px solid var(--border);
}
.mini-table td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.mini-table tbody tr:hover { background: var(--accent); }
.mini-table .rank {
    width: 28px; text-align: center;
    font-weight: 700;
}
.rank-0 { color: #f59e0b; }   /* gold */
.rank-1 { color: #94a3b8; }   /* silver */
.rank-2 { color: #a16207; }   /* bronze */
.user-cell {
    display: flex; align-items: center; gap: 8px;
}
.avatar-xs {
    width: 28px; height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.avatar-xs-fallback {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff; font-weight: 700; font-size: 11px;
    display: inline-flex; align-items: center; justify-content: center;
}

/* Pills (used for counts in tables) */
.pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px; font-weight: 700;
}
.pill-brand   { background: rgba(239,68,68,0.1);  color: #b91c1c; }
.pill-amber   { background: rgba(245,158,11,0.1); color: #b45309; }
.pill-emerald { background: rgba(16,185,129,0.1); color: #065f46; }
.pill-indigo  { background: rgba(99,102,241,0.1); color: #4338ca; }
.pill-priority { font-size: 10px; padding: 2px 6px; }
.pill-low     { background: rgba(148,163,184,0.15); color: #64748b; }
.pill-medium  { background: rgba(14,165,233,0.1);  color: #0369a1; }
.pill-high    { background: rgba(245,158,11,0.15); color: #b45309; }
.pill-urgent  { background: rgba(239,68,68,0.15);  color: #b91c1c; }

/* Range buttons (reports) */
.report-range {
    display: inline-flex; gap: 4px;
    background: var(--accent);
    padding: 4px;
    border-radius: 10px;
}
.range-btn {
    padding: 6px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--muted); font-weight: 600; font-size: 12px;
}
.range-btn.active {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
}

/* Upcoming/recent list */
.upcoming-list {
    list-style: none; margin: 0; padding: 0;
}
.upcoming-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.upcoming-list li:last-child { border-bottom: 0; }
.upcoming-title { font-weight: 600; font-size: 13px; }
.upcoming-meta { margin-top: 2px; }
.upcoming-meta .overdue { color: var(--brand); font-weight: 700; }

/* stats-5 (reports KPI grid uses 5 columns) */
.stats-5 {
    grid-template-columns: repeat(5, 1fr);
}
@media (max-width: 1100px) {
    .stats-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
    .stats-5 { grid-template-columns: repeat(2, 1fr); }
}

/* Activity feed (already exists, but ensure styling) */
.activity-feed {
    list-style: none; margin: 0; padding: 0;
    max-height: 320px; overflow-y: auto;
}
.activity-feed li {
    display: flex; gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.activity-feed li:last-child { border-bottom: 0; }
.activity-line { font-size: 13px; line-height: 1.3; }
.activity-time { margin-top: 2px; }
