.dash-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px;
  padding: 28px 32px; margin-bottom: 20px; border-radius: var(--radius-lg); color: #fff; overflow: hidden;
  background: radial-gradient(520px 280px at 88% 0%, rgba(125, 211, 252, .45), transparent 60%), linear-gradient(135deg, #0369a1 0%, #0284c7 45%, #1d4ed8 100%);
  box-shadow: 0 24px 50px -24px rgba(3, 105, 161, .8); animation: fadeUp .6s var(--ease) both;
}
.dash-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent, #000 70%); pointer-events: none; }
.dash-hero-main { position: relative; min-width: 0; }
.ops-eyebrow { display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border-radius: 30px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); margin-bottom: 12px; }
.dash-hero h3 { color: #fff; font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.dash-hero p { color: rgba(255, 255, 255, .9); margin-bottom: 14px; max-width: 640px; }
.ops-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ops-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; font-size: 12.5px; background: rgba(8, 47, 73, .35); border: 1px solid rgba(255, 255, 255, .18); }
.ops-chip strong { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.ops-chip strong + strong { margin-left: 4px; }
.ops-chip strong i { font-size: 11px; opacity: .8; }
.ops-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dash-hero .btn-light { background: #fff; color: var(--primary-700); border: 0; font-weight: 600; }
.btn-glass { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); color: #fff; }
.btn-glass:hover { background: rgba(255, 255, 255, .24); color: #fff; transform: translateY(-2px); }

.dash-hero-today { position: relative; display: flex; align-items: center; gap: 22px; padding: 18px 22px; border-radius: 18px; background: rgba(8, 47, 73, .28); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(6px); }
.today-ring { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.ring-center strong { font-family: var(--font-heading); font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-center span { font-size: 11px; opacity: .85; margin-top: 4px; max-width: 80px; line-height: 1.25; }
.today-families { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; min-width: 180px; }
.today-families a { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; color: #fff; }
.today-families a:hover .fam-name { text-decoration: underline; }
.fam-name { font-size: 13px; font-weight: 600; }
.fam-count { font-size: 12.5px; opacity: .9; font-variant-numeric: tabular-nums; }
.fam-count strong { font-size: 15px; }
.fam-bar { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.fam-bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #fde68a, #fff); transform-origin: left; animation: dashGrow 1s var(--ease) both; }
@keyframes dashGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.dash-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
@media (min-width: 768px) { .dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .dash-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.dash-kpi { display: flex; flex-direction: column; gap: 6px; padding: 16px; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: inherit; box-shadow: var(--shadow-xs); animation: fadeUp .5s var(--ease) both; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s; }
a.dash-kpi:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-100); color: inherit; }
a.dash-kpi:hover .icon-chip { transform: rotate(-8deg) scale(1.06); }
.dash-kpi .icon-chip { transition: transform .4s var(--ease-spring); }
.dash-kpi-top { display: flex; align-items: center; gap: 10px; }
.dash-kpi-label { font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.25; }
.dash-kpi-value { display: flex; align-items: baseline; gap: 4px; margin-top: 4px; }
.dash-kpi-value strong { font-family: var(--font-heading); font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dash-kpi-value span { font-size: 14px; color: var(--muted); font-weight: 600; }
.dash-kpi-sub { font-size: 12px; color: var(--muted); min-height: 32px; line-height: 1.35; }
.dash-kpi-sub.tone-warn { color: #b45309; }
.dash-kpi-sub.tone-ok { color: #047857; }
.dash-meter { height: 6px; margin-top: auto; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.dash-meter span { display: block; height: 100%; border-radius: 6px; background: var(--gradient-primary); transform-origin: left; animation: dashGrow 1s var(--ease) both; }
.dash-spark { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-top: auto; }
.dash-spark span { flex: 1; border-radius: 3px 3px 1px 1px; background: linear-gradient(180deg, #f43f5e, #fda4af); transform-origin: bottom; animation: dashRise .8s var(--ease) both; }
.dash-spark span:last-child { background: linear-gradient(180deg, #e11d48, #f43f5e); }
@keyframes dashRise { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.dash-grid > * { grid-column: span 12; min-width: 0; }
@media (min-width: 768px) {
  .dash-grid > .dash-span-4 { grid-column: span 6; }
}
@media (min-width: 1200px) {
  .dash-grid > .dash-span-4 { grid-column: span 4; }
  .dash-grid > .dash-span-5 { grid-column: span 5; }
  .dash-grid > .dash-span-7 { grid-column: span 7; }
  .dash-grid > .dash-span-8 { grid-column: span 8; }
}
.dash-grid > .insight-card.is-loading { padding: 20px; min-height: 300px; }
.dash-grid > .dash-span-8 .ic-canvas.plot { height: 260px; }

.attention-card { display: flex; flex-direction: column; }
.attention-list { padding: 8px; flex: 1; overflow-y: auto; max-height: 330px; }
.attention-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: inherit; animation: fadeUp .45s var(--ease) both; transition: background .2s; }
.attention-item:hover { background: var(--surface-2); color: inherit; }
.att-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; font-size: 16px; }
.att-text strong { display: block; font-size: 13.5px; font-weight: 600; }
.att-text small { display: block; color: var(--muted); font-size: 12px; }
.att-count { font-family: var(--font-heading); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.att-go { color: var(--muted-2); font-size: 12px; }
.tone-danger .att-icon { background: var(--danger-50); color: #dc2626; }
.tone-danger .att-count { color: #dc2626; }
.tone-warning .att-icon { background: var(--warning-50); color: #d97706; }
.tone-warning .att-count { color: #b45309; }
.tone-info .att-icon { background: var(--info-50); color: #2563eb; }
.tone-muted .att-icon { background: var(--secondary-50); color: #475569; }
.attention-clear { height: 100%; min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; color: var(--muted); }
.attention-clear i { font-size: 34px; color: var(--success); margin-bottom: 6px; }
.attention-clear strong { color: var(--text); font-size: 15px; }

.duty-head { flex-wrap: wrap; }
.segmented-sm button { padding: 5px 11px; font-size: 12.5px; }
.duty-list { max-height: 460px; overflow-y: auto; }
.duty-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--border); animation: rowIn .45s var(--ease) both; }
.duty-row:last-child { border-bottom: 0; }
.duty-row.is-ended { opacity: .62; }
.duty-main { min-width: 0; }
.duty-photo { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--primary-50); }
.duty-name { font-weight: 600; font-size: 14px; }
.duty-name small { display: block; font-family: 'Noto Sans Kannada', var(--font-body); color: var(--muted); font-weight: 400; font-size: 12px; }
.duty-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.duty-meta i { color: var(--primary); }
.route-pill { font-family: ui-monospace, Menlo, monospace; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 8px; background: var(--primary-50); color: var(--primary-700); white-space: nowrap; }
.route-pill.stale { background: var(--warning-50); color: #b45309; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding-bottom: 14px; animation: fadeUp .5s var(--ease) both; }
.timeline li:last-child { padding-bottom: 0; }
.tl-icon { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; font-size: 14px; }
.tl-body { font-size: 13px; color: var(--text-2); min-width: 0; overflow-wrap: anywhere; }
.tl-body small { display: block; color: var(--muted-2); font-size: 11.5px; margin-top: 2px; }
.act-insert { background: var(--success-50); color: #059669; }
.act-update { background: var(--info-50); color: #2563eb; }
.act-delete, .act-remove { background: var(--danger-50); color: #dc2626; }
.act-upload, .act-share { background: var(--primary-50); color: var(--primary-600); }
.act-other, .act-sign_in { background: var(--secondary-50); color: #475569; }

@media (max-width: 991.98px) {
  .dash-hero { grid-template-columns: 1fr; }
  .dash-hero-today { justify-self: stretch; }
  .today-families { flex: 1; }
}
@media (max-width: 575.98px) {
  .dash-hero { padding: 20px 16px; gap: 16px; }
  .dash-hero p { font-size: 13.5px; }
  .ops-hero-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px; scrollbar-width: none; }
  .ops-hero-chips::-webkit-scrollbar { display: none; }
  .ops-chip { flex-shrink: 0; font-size: 12px; }
  .ops-hero-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ops-hero-actions .btn { padding: 9px 6px; font-size: 12.5px; gap: 5px; white-space: nowrap; }
  .dash-hero h3 { font-size: 21px; }
  .dash-hero-today { gap: 16px; padding: 14px; }
  .today-ring { width: 104px; height: 104px; }
  .ring-center strong { font-size: 22px; }
  .today-families { min-width: 0; }
  .dash-kpi { padding: 14px; }
  .dash-kpi-value strong { font-size: 22px; }
  .duty-row { padding: 12px 14px; gap: 10px; }
  .duty-head .segmented { width: 100%; display: flex; }
  .duty-head .segmented button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .fam-bar span, .dash-meter span, .dash-spark span, .dash-kpi, .attention-item { animation: none; }
}
