/* Dashboard Shared Styles — loaded globally via main_layout.php */

/* ══════════════════════════════════════════════════════════════
   Dashboard — Shared Components (all roles)
   ══════════════════════════════════════════════════════════════ */

/* ── Universal dashboard banner ─────────────────────────────────
   Replaces: .admin-banner .cm-banner .dc-banner .pm-banner
             .staff-banner .picker-banner .supp-banner .db-welcome
   Usage: <div class="db-banner db-banner-blue"> or -green/-teal/-orange/-brown
   ─────────────────────────────────────────────────────────────── */
.db-banner {
    border-radius: var(--radius);
    padding: 20px 28px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    border-bottom: 3px solid var(--ns-accent);
}
.db-banner h2  { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: #fff; text-transform: none; }
.db-banner p   { margin: 0; font-size: 13px; color: rgba(255,255,255,.7); }
.db-banner-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* Colour variants */
.db-banner-blue   { background: linear-gradient(135deg, #1f3a5f, #2c5282); }
.db-banner-navy   { background: linear-gradient(135deg, #1a3a5c, #2c5282); border-left: 5px solid var(--ns-accent); border-bottom: none; }
.db-banner-teal   { background: linear-gradient(135deg, #1a5276, #1f618d); }
.db-banner-green  { background: linear-gradient(135deg, #1a4731, #1e6b47); }
.db-banner-orange { background: linear-gradient(135deg, #744210, #975a16); }
.db-banner-purple { background: linear-gradient(135deg, #4a235a, #6c3483); }

/* ── Banner buttons (unified) ────────────────────────────────── */
.db-btn-accent {
    padding: 9px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    background: var(--ns-accent);
    color: #fff;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.db-btn-outline {
    padding: 9px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    background: rgba(255,255,255,.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,.4);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.db-btn-accent:hover, .db-btn-outline:hover { filter: brightness(.9); text-decoration: none; color: #fff; }

/* ── Small inline action buttons ─────────────────────────────── */
.ns-btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: filter .15s;
}
.ns-btn-sm:hover { filter: brightness(.9); text-decoration: none; }
.btn-view  { background: #eaf1fb; color: var(--ns-button); }
.btn-view:hover { color: var(--ns-button); }
.btn-edit  { background: #fff3cd; color: #856404; }
.btn-edit:hover { color: #856404; }
.btn-del   { background: #fde8e8; color: #c0392b; }
.btn-del:hover { color: #c0392b; }

/* ── Progress / budget bar ───────────────────────────────────── */
.db-progress-bar  { height: 8px; background: #edf0f5; border-radius: 4px; overflow: hidden; margin-top: 5px; }
.db-progress-fill { height: 100%; border-radius: 4px; transition: width .8s ease; }
/* Alias for legacy names */
.low-bar      { height: 6px; background: #edf0f5; border-radius: 3px; margin-top: 4px; overflow: hidden; }
.low-bar-fill { height: 100%; border-radius: 3px; background: #e74c3c; }
.db-budget-bar  { height: 10px; background: #edf0f5; border-radius: 5px; overflow: hidden; margin-top: 6px; }
.db-budget-fill { height: 100%; border-radius: 5px; transition: width 1s ease; }

/* ── Section title ───────────────────────────────────────────── */
.section-title {
    font-size: 11px;
    font-weight: 700;
    color: #8896a5;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin: 20px 0 10px;
    padding-left: 2px;
}

/* ── Alert / notification badge on icon ─────────────────────── */
.db-alert-badge {
    background: #e74c3c;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    margin-left: 4px;
    color: #fff;
    font-weight: 700;
}

/* ── Staff dashboard alert cards ─────────────────────────────── */
.db-card-links { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.db-card-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--ns-border);
    border-left: 4px solid var(--ns-border);
    border-radius: var(--radius);
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: box-shadow .15s;
}
.db-card-link:hover { box-shadow: 0 2px 8px rgba(0,0,0,.1); text-decoration: none; color: var(--text-primary); }
.db-card-link-danger  { border-left-color: #e74c3c; }
.db-card-link-warning { border-left-color: #ffc107; }
.db-card-link .db-card-val { font-size: 20px; font-weight: 700; }
.db-card-link-danger  .db-card-val { color: #721c24; }
.db-card-link-warning .db-card-val { color: #856404; }
.db-card-link .db-card-lbl { font-size: 12px; color: #8896a5; }

/* ── Container status badges (pm dashboard) ──────────────────── */
.container-badge-0 { background: #fff3cd; color: #856404; display: inline-block; padding: 2px 8px; border-radius: 2px; font-size: 11px; font-weight: 600; }
.container-badge-1 { background: #d4edda; color: #155724; display: inline-block; padding: 2px 8px; border-radius: 2px; font-size: 11px; font-weight: 600; }

/* ── Chart panel padding ─────────────────────────────────────── */
.db-chart-pad { padding: 10px 14px; }

/* ── Top products / items list row ──────────────────────────────
   Shared by store, dc, pm dashboards
   ─────────────────────────────────────────────────────────────── */
.db-list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 16px;
    border-bottom: 1px solid #f0f2f5;
}
.db-list-row:last-child { border-bottom: none; }
.db-list-info  { flex: 1; min-width: 0; }
.db-list-name  { font-size: 13px; font-weight: 600; color: var(--ns-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-list-sub   { font-size: 11.5px; color: var(--text-muted); }
.db-list-val   { font-size: 13px; font-weight: 700; color: var(--ns-button); flex-shrink: 0; }
.db-list-mono  { font-family: monospace; font-size: 12px; }
