/* ─────────────────────────────────────────────────────────────────────────────
   Overview dashboard
   ───────────────────────────────────────────────────────────────────────── */

.db-wrap { padding: 22px 24px 48px; }
.db-page { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; animation: fadeIn var(--t-base); }
.db-page .pos { color: #059669; }
.db-page .neg { color: #dc2626; }

/* Hero */
.db-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  min-height: 190px; padding: 28px 30px; border-radius: var(--r-xl); color: #fff;
  background: #000;
  box-shadow: 0 14px 40px rgba(20, 20, 60, 0.28);
}
.db-ribbons { position: absolute; inset: 0; pointer-events: none; }
.db-ribbons canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.db-ribbons-grain { position: absolute; inset: 0; background-size: 160px 160px; mix-blend-mode: overlay; opacity: 0.16; }
/* Keeps the text readable where a bright ribbon passes behind it */
.db-hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.25) 35%, rgba(0, 0, 0, 0) 60%);
}
.db-hero-main, .db-hero-actions { position: relative; z-index: 1; }
.db-hero-main { min-width: 0; text-shadow: 0 1px 14px rgba(5, 10, 30, 0.55); }
.db-hero-date { font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.72; font-weight: 600; }
.db-hero h1 { margin: 6px 0 6px; font-size: 30px; letter-spacing: -0.02em; font-weight: 700; }
.db-hero p { margin: 0; font-size: 14.5px; opacity: 0.85; }
.db-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.db-btn-glass { background: rgba(255, 255, 255, 0.14); color: #fff; backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, 0.22); }
.db-btn-glass:hover { background: rgba(255, 255, 255, 0.24); }
.db-btn-solid { background: #fff; color: #3b3fa8; font-weight: 600; }
.db-btn-solid:hover { background: #f3f4ff; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); }
.db-hero-actions .btn { display: inline-flex; align-items: center; gap: 7px; }
.db-agent.active { background: rgba(255, 255, 255, 0.3); }
.db-spin { display: inline-flex; }
.db-spin.on { animation: gloss-spin 0.9s linear infinite; }

/* Attention strip */
.db-attention {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-xs);
}
.db-attention-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); margin-right: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.db-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500; border: 1px solid transparent; transition: var(--t-fast);
}
.db-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.db-chip.danger { background: #fef1f1; color: #b1231d; border-color: #fbd5d3; }
.db-chip.warn { background: #fff4e5; color: #b45309; border-color: #fde2b5; }
.db-chip.info { background: var(--accent-soft); color: var(--accent); border-color: #dcdfff; }

/* KPI tiles */
.db-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(166px, 1fr)); gap: 12px; }
.db-kpi {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 14px; box-shadow: var(--shadow-sm); transition: var(--t-base);
}
.db-kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.db-kpi.alert { border-color: #fbd5d3; background: linear-gradient(180deg, #fff 0%, #fff8f8 100%); }
.db-kpi-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.db-kpi-body { min-width: 0; }
.db-kpi-value { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-kpi-label { color: var(--text-2); font-size: 12.5px; font-weight: 500; margin-top: 3px; }
.db-kpi-sub { color: var(--text-3); font-size: 11.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Layout */
.db-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.db-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Panels */
.db-panel { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.db-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.db-panel-head h3 { margin: 0; font-size: 15px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 9px; }
.db-panel-ic { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.db-head-actions { display: flex; align-items: center; gap: 10px; }
.db-link { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 600; color: var(--accent); padding: 4px 6px; border-radius: 8px; }
.db-link:hover { background: var(--accent-soft); }
.db-stamp, .db-more { font-size: 11.5px; color: var(--text-3); }
.db-more { text-align: center; padding-top: 8px; }
.db-muted { font-size: 12.5px; color: var(--text-3); padding: 6px 0; }

/* Empty + skeleton */
.db-empty { text-align: center; padding: 22px 12px; color: var(--text-3); }
.db-empty-ic { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--bg-soft); margin-bottom: 8px; }
.db-empty-title { font-weight: 600; color: var(--text-2); font-size: 14px; }
.db-empty-sub { font-size: 12.5px; margin-top: 3px; }
.db-skel { display: flex; flex-direction: column; gap: 10px; }
.db-skel-row { height: 38px; border-radius: 10px; background: linear-gradient(90deg, var(--bg-soft) 25%, #e4e8f0 50%, var(--bg-soft) 75%); background-size: 200% 100%; animation: db-shimmer 1.3s infinite; }
@keyframes db-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Pills, counts, bars */
.db-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; text-transform: capitalize; }
.db-pill.danger { background: #fef1f1; color: #b1231d; }
.db-pill.warn { background: #fff4e5; color: #b45309; }
.db-pill.ok { background: #ecfdf5; color: #047857; }
.db-pill.muted { background: var(--bg-soft); color: var(--text-2); }
.db-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; }
.db-count.big { height: 24px; min-width: 26px; font-size: 12.5px; }
.db-bar, .db-meter-track { height: 7px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.db-bar > div, .db-meter-fill { height: 100%; border-radius: 999px; transition: width var(--t-base); }
.db-meter-fill { background: #10b981; }
.db-meter-fill.warn { background: var(--warning); }
.db-meter-fill.crit { background: var(--danger); }

/* Segmented switch */
.db-seg-group { display: inline-flex; padding: 3px; background: var(--bg-soft); border-radius: 10px; gap: 2px; }
.db-seg { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.db-seg.active { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-xs); }
.db-seg-n { font-size: 11px; background: var(--border); border-radius: 999px; padding: 0 6px; color: var(--text-2); }

/* Task rows */
.db-list { display: flex; flex-direction: column; gap: 2px; }
.db-task, .db-mail, .db-feed-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 11px; cursor: pointer; transition: background var(--t-fast);
}
.db-task:hover, .db-mail:hover, .db-feed-item:hover { background: var(--bg-soft); }
.db-task-swatch { width: 4px; align-self: stretch; border-radius: 4px; flex-shrink: 0; min-height: 28px; }
.db-task-main, .db-mail-main { flex: 1; min-width: 0; }
.db-task-title, .db-mail-subj { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-task-sub { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Projects */
.db-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; }
.db-project {
  text-align: left; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--bg); display: flex; flex-direction: column; gap: 8px; transition: var(--t-base);
}
.db-project:hover { background: var(--bg-elev); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.db-project-head { display: flex; align-items: center; gap: 9px; }
.db-project-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.db-project-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-project-meta { font-size: 12px; color: var(--text-3); }
.db-project-pct { font-size: 11.5px; color: var(--text-3); text-align: right; margin-top: -4px; }

/* Controlling */
.db-fin-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.db-fin-summary > div { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.db-fin-summary b { font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-fin-k { font-size: 11.5px; color: var(--text-3); }
.db-fin-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); margin-bottom: 6px; align-items: center; }
.db-fin-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.db-fin-legend-note { margin-left: auto; color: var(--text-3); }
.db-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.db-sub-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.db-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.db-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.db-row-main { flex: 1; min-width: 0; }
.db-row-title { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-row-sub { font-size: 12px; color: var(--text-3); }
.db-row-amt { font-size: 13.5px; }
.db-budget { margin-bottom: 11px; }
.db-budget-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 5px; }
.db-budget-n { color: var(--text-3); font-size: 12px; }
.db-budget-n.warn { color: #b45309; font-weight: 600; }
.db-budget-n.crit { color: #dc2626; font-weight: 600; }

/* Email */
.db-inboxes { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.db-inbox { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 10px; text-align: left; width: 100%; font-size: 13px; }
.db-inbox:hover { background: var(--bg-soft); }
.db-inbox-dot, .db-mail-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.db-inbox-name { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-inbox-zero { color: #10b981; display: inline-flex; }
.db-mail-from { font-size: 12.5px; color: var(--text-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-mail-subj { font-weight: 500; font-size: 13px; }
.db-mail-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); flex-shrink: 0; }

/* Servers */
.db-servers { display: flex; flex-direction: column; gap: 10px; }
.db-server { border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; background: var(--bg); }
.db-server.warn { border-color: #fde2b5; background: #fffbf3; }
.db-server.critical, .db-server.offline { border-color: #fbd5d3; background: #fff8f8; }
.db-server.offline { border-color: var(--border-strong); background: var(--bg-soft); }
.db-server-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.db-server-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12); flex-shrink: 0; }
.db-server-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-meters { display: flex; flex-direction: column; gap: 9px; }
.db-meter-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; gap: 8px; }
.db-meter-label { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); font-weight: 500; }
.db-meter-val { color: var(--text-3); white-space: nowrap; }
.db-server-foot { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 11.5px; color: var(--text-3); }
.db-server-foot span { display: inline-flex; align-items: center; gap: 4px; }
.db-server-issues { margin-top: 8px; font-size: 12px; color: #b45309; display: flex; flex-direction: column; gap: 3px; }
.db-server.critical .db-server-issues, .db-server.offline .db-server-issues { color: #b1231d; }
.db-server-issues div { display: flex; align-items: center; gap: 5px; }

/* Breakdown */
.db-break { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.db-break-legend { flex: 1; min-width: 120px; display: flex; flex-direction: column; gap: 8px; }
.db-leg { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.db-leg i { width: 9px; height: 9px; border-radius: 50%; }
.db-leg span { flex: 1; }
.db-prio { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.db-prio-row { display: grid; grid-template-columns: 54px 1fr 24px; align-items: center; gap: 10px; margin-bottom: 7px; font-size: 12.5px; }
.db-prio-label { text-transform: capitalize; color: var(--text-2); }
.db-prio-row b { text-align: right; }

/* Team + activity */
.db-online { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); font-weight: 600; }
.db-online i { width: 8px; height: 8px; border-radius: 50%; background: #10b981; }
.db-online-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.db-online-user { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; background: var(--bg-soft); font-size: 12px; font-weight: 500; }
.db-feed { display: flex; flex-direction: column; gap: 1px; }
.db-feed-item { padding: 7px 8px; font-size: 12.5px; }
.db-feed-ic { width: 24px; height: 24px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.db-feed-text { flex: 1; min-width: 0; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-feed-text b { color: var(--text); }
.db-feed-text em { font-style: normal; color: var(--text); }
.db-feed-time { font-size: 11.5px; color: var(--text-3); flex-shrink: 0; }

@media (max-width: 1100px) {
  .db-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .db-wrap { padding: 16px; }
}
@media (max-width: 640px) {
  .db-hero { padding: 20px; }
  .db-hero h1 { font-size: 24px; }
  .db-fin-summary { grid-template-columns: 1fr 1fr; }
  .db-two { grid-template-columns: 1fr; }
  .db-kpis { grid-template-columns: 1fr 1fr; }
  .db-kpi { padding: 12px; gap: 10px; }
  .db-kpi-ic { display: none; }
  .db-kpi-value { font-size: 20px; }
}
