/* Shared dashboard styles (admin + staff). Scoped to .dash. */
  /* Dashboard styles are scoped to .dash so the shared admin layout is untouched */
  .dash {
    --navy: #242d6e;
    --navy-soft: #eef0fa;
    --green: #86c33f;
    --green-soft: #f0f8e6;
    --amber: #e9a23b;
    --amber-soft: #fdf4e6;
    --red: #d9534f;
    --red-soft: #fbeceb;
    --ink: #1d2340;
    --muted: #6b7290;
    --line: #e7e9f2;
    --card: #ffffff;
    --radius: 14px;
    padding: 104px 28px 40px;
    color: var(--ink);
  }
  .dash a { text-decoration: none; }

  /* Header */
  .dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
  .dash-head h1 { font-size: 1.6rem; font-weight: 600; margin: 0; }
  .dash-head p { color: var(--muted); margin: 4px 0 0; font-size: .92rem; }
  .dash-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .dash-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 10px; font-size: .88rem; font-weight: 500; border: 1px solid var(--line); background: var(--card); color: var(--ink); transition: .2s; }
  .dash-btn:hover { border-color: var(--navy); color: var(--navy); }
  .dash-btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
  .dash-btn.primary:hover { background: #1a2154; color: #fff; }
  .dash-btn i { font-size: 1.1rem; }

  /* Layout grids */
  .dash-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
  .dash-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
  @media (max-width: 1200px) { .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 992px)  { .dash-row { grid-template-columns: minmax(0, 1fr); } }
  @media (max-width: 576px)  { .dash { padding: 96px 14px 28px; } .dash-kpis { grid-template-columns: minmax(0, 1fr); } }

  .dash-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(29, 35, 64, .04); }
  .dash-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
  .dash-card-head h2 { font-size: 1rem; font-weight: 600; margin: 0; }
  .dash-card-head span { color: var(--muted); font-size: .82rem; }
  .dash-card-body { padding: 16px 20px 20px; }
  .dash-link { font-size: .85rem; font-weight: 500; color: var(--navy); display: inline-flex; align-items: center; gap: 2px; }
  .dash-link:hover { color: var(--green); }

  /* KPI cards */
  .kpi { display: flex; gap: 16px; padding: 20px; color: inherit; transition: transform .2s, box-shadow .2s; }
  a.kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(29, 35, 64, .08); color: inherit; }
  .kpi-icon { flex: 0 0 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem; }
  .kpi-label { color: var(--muted); font-size: .85rem; margin: 0; }
  .kpi-value { font-size: 1.75rem; font-weight: 600; line-height: 1.2; margin: 2px 0 6px; font-variant-numeric: tabular-nums; }
  .kpi-sub { font-size: .8rem; color: var(--muted); }
  .kpi-sub b { font-weight: 600; }
  .tone-navy  { background: var(--navy-soft);  color: var(--navy); }
  .tone-green { background: var(--green-soft); color: #5d9a1c; }
  .tone-amber { background: var(--amber-soft); color: #b9771a; }
  .tone-red   { background: var(--red-soft);   color: var(--red); }

  /* Charts */
  .chart-box { position: relative; height: 290px; }
  .donut-box { position: relative; height: 200px; }
  .donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
  .donut-center strong { display: block; font-size: 1.6rem; font-weight: 600; line-height: 1; }
  .donut-center small { color: var(--muted); font-size: .78rem; }
  .legend { list-style: none; padding: 0; margin: 18px 0 0; }
  .legend li { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); font-size: .88rem; }
  .legend li:first-child { border-top: 0; }
  .legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 10px; }
  .legend b { font-variant-numeric: tabular-nums; }

  /* Recent orders table */
  .dash-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
  .dash-table th { color: var(--muted); font-weight: 500; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; }
  .dash-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
  .dash-table tr:last-child td { border-bottom: 0; }
  .dash-table tbody tr:hover { background: #fafbfe; }
  .dash-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .who { display: flex; flex-direction: column; }
  .who small { color: var(--muted); }
  .pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 500; white-space: nowrap; }
  .empty { text-align: center; color: var(--muted); padding: 36px 12px; }
  .empty i { font-size: 2rem; display: block; margin-bottom: 6px; color: #c3c7d9; }

  /* Attention list + shortcuts */
  .todo { list-style: none; margin: 0; padding: 0; }
  .todo li a { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink); }
  .todo li:first-child a { border-top: 0; padding-top: 4px; }
  .todo li a:hover .todo-text { color: var(--navy); }
  .todo-icon { flex: 0 0 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem; }
  .todo-text { flex: 1; font-size: .88rem; }
  .todo-count { font-weight: 600; font-variant-numeric: tabular-nums; }
  .shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .shortcut { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-size: .8rem; text-align: center; transition: .2s; }
  .shortcut i { font-size: 1.35rem; color: var(--navy); }
  .shortcut:hover { border-color: var(--green); background: var(--green-soft); color: var(--ink); }

  /* Flash messages */
  .dash-messages { list-style: none; padding: 0; margin: 0 0 18px; }
  .dash-messages li { padding: 12px 16px; border-radius: 10px; margin-bottom: 8px; font-size: .9rem; background: var(--navy-soft); color: var(--navy); }
  .dash-messages .success { background: var(--green-soft); color: #4c7f16; }
  .dash-messages .error   { background: var(--red-soft);   color: var(--red); }
  .dash-messages .warning { background: var(--amber-soft); color: #9a6212; }

  /* New-order toast notifications */
  .notification-container { display: flex; flex-direction: column; align-items: flex-end; position: fixed; top: 6rem; right: 20px; width: 340px; z-index: 1050; }
  .notification { width: 100%; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 12px; box-shadow: 0 10px 30px rgba(29, 35, 64, .12); background: #fff; margin-bottom: 12px; transform: translateX(110%); opacity: 0; transition: transform .6s ease-out, opacity .4s ease-out; }
  .notification:not(.hidden) { opacity: 1; transform: translateX(0); }
  .innernoti { padding: 12px 14px; font-size: .86rem; }
  .notification-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
  .notification-title { font-weight: 600; color: var(--navy); }
  .close-btn { cursor: pointer; border: none; background: transparent; font-size: 1.2rem; color: var(--muted); line-height: 1; }
  .view-order { display: inline-block; margin-top: 6px; font-weight: 500; color: var(--navy); }
  @media (max-width: 400px) { .notification-container { right: 10px; width: calc(100% - 20px); } }

  /* Order tracker */
  .stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .stage { position: relative; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink); transition: .2s; }
  .stage:hover { border-color: var(--navy); color: var(--ink); }
  .stage-top { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); }
  .stage-top i { font-size: 1.1rem; }
  .stage-count { font-size: 1.6rem; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
  .stage-step { position: absolute; top: 12px; right: 14px; font-size: .7rem; font-weight: 600; color: #c3c7d9; }
  .stage-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: #eef0f5; margin-top: 16px; }
  .stage-bar span { display: block; height: 100%; }
  @media (max-width: 768px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stage-step { display: none; } }

  .alert-strip { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 14px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: .85rem; }
  .alert-strip.ok { background: var(--green-soft); color: #4c7f16; }
  .alert-strip i { font-size: 1.2rem; }
  .mini-list { list-style: none; margin: 10px 0 0; padding: 0; }
  .mini-list li a { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-top: 1px solid var(--line); color: var(--ink); font-size: .85rem; }
  .mini-list li a:hover { background: #fafbfe; }
  .mini-list .grow { flex: 1; min-width: 0; }
  .mini-list .grow small { display: block; color: var(--muted); }
  .badge-days { font-size: .75rem; font-weight: 600; color: var(--red); white-space: nowrap; }

  /* Upcoming work */
  .pending-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
  .pending { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink); font-size: .78rem; transition: .2s; }
  .pending:hover { border-color: var(--navy); color: var(--ink); }
  .pending b { font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; }
  .pending .todo-icon { flex: 0 0 auto; width: 30px; height: 30px; font-size: 1rem; border-radius: 8px; }
  .pending.zero { opacity: .6; }
  @media (max-width: 1200px) { .pending-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (max-width: 576px)  { .pending-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .when { font-size: .78rem; font-weight: 600; white-space: nowrap; color: var(--navy); }
  .when.overdue { color: var(--red); }
  .section-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 4px 0 2px; }

  /* Payments */
  .pay-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pay-tile { padding: 12px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink); }
  a.pay-tile:hover { border-color: var(--navy); color: var(--ink); }
  .pay-tile small { display: block; color: var(--muted); font-size: .76rem; }
  .pay-tile b { font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
  .pay-month { padding: 14px; border-radius: 12px; background: var(--navy); color: #fff; margin-bottom: 10px; }
  .pay-month small { opacity: .75; font-size: .78rem; }
  .pay-month .amt { font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; }
  .pay-month .amt span { font-size: .8rem; opacity: .8; margin-left: 4px; font-weight: 500; }

  /* Activity feed */
  .feed { list-style: none; margin: 0; padding: 0; max-height: 430px; overflow-y: auto; }
  .feed li a { display: flex; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--line); color: var(--ink); font-size: .84rem; }
  .feed li:first-child a { border-top: 0; }
  .feed li a:hover { background: #fafbfe; }
  .feed .todo-icon { flex: 0 0 32px; height: 32px; font-size: 1rem; border-radius: 9px; }
  .feed .grow { flex: 1; min-width: 0; }
  .feed .grow small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .feed time { font-size: .74rem; color: var(--muted); white-space: nowrap; }
  .feed-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
  .chip { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: 4px 12px; font-size: .78rem; cursor: pointer; transition: .2s; }
  .chip:hover { border-color: var(--navy); color: var(--navy); }
  .chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
  .new-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-left: 6px; vertical-align: middle; }

  /* Staff workload */
  .load-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .85rem; }
  .load-row:first-child { border-top: 0; }
  .avatar { flex: 0 0 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .8rem; background: var(--navy-soft); color: var(--navy); }
  .load-bar { height: 6px; border-radius: 999px; background: #eef0f5; overflow: hidden; margin-top: 4px; }
  .load-bar span { display: block; height: 100%; background: var(--green); }
