/* ============================================================
   D&D Mobility — Web dashboard shell (Fleet / Ops / Corporate)
   Loads after ds.css.
   ============================================================ */

.app { display: grid; grid-template-columns: 248px 1fr; height: 100vh; background: var(--cream); }

/* ---- Sidebar ---- */
.side { background: #20211D; color: #D9D2C4; display: flex; flex-direction: column; padding: 18px 14px; gap: 4px; }
.side .brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; }
.side .brand .logo { width: 38px; height: 38px; border-radius: 11px; background: var(--gold); color: #2A1E07; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 17px; }
.side .brand .bt { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: #fff; line-height: 1; white-space: nowrap; }
.side .brand .bs { font-size: 11px; color: #8A8577; margin-top: 3px; white-space: nowrap; }

.side .switcher { background: #2C2D27; border: 1px solid #3A3B33; border-radius: 12px; padding: 9px 11px; display: flex; align-items: center; gap: 9px; margin-bottom: 14px; cursor: pointer; }
.side .switcher:hover { background: #34352E; }
.side .switcher .sw-ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; }
.side .switcher .sw-t { font-size: 13px; font-weight: 600; color: #EDE8DC; line-height: 1.1; }
.side .switcher .sw-s { font-size: 10.5px; color: #8A8577; }

.side .nav-label { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6F6B5E; padding: 14px 10px 6px; }
.side .nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: #BDB6A6; font-size: 13.5px; font-weight: 500; cursor: pointer; text-decoration: none; transition: all .12s; white-space: nowrap; }
.side .nav-item > span:first-of-type { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.side .nav-item:hover { background: #2C2D27; color: #fff; }
.side .nav-item.on { background: var(--gold); color: #2A1E07; font-weight: 600; }
.side .nav-item .badge { margin-left: auto; font-size: 11px; font-weight: 700; background: #3A3B33; color: #D9D2C4; padding: 1px 7px; border-radius: 99px; }
.side .nav-item.on .badge { background: rgba(42,30,7,.18); color: #2A1E07; }

.side .side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid #34352E; }
.side .side-foot .av { width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }

/* ---- Main ---- */
.main { display: flex; flex-direction: column; overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 16px 26px; border-bottom: 1px solid var(--hair); background: var(--paper); }
.topbar h1 { font-family: var(--font-display); font-weight: 700; font-size: 22px; margin: 0; letter-spacing: -.02em; }
.topbar .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.searchbox { display: flex; align-items: center; gap: 9px; background: var(--cream-2); border: 1px solid var(--hair); border-radius: 11px; padding: 9px 13px; color: var(--ink-3); min-width: 240px; }
.searchbox input { border: none; background: none; outline: none; font-family: var(--font-ui); font-size: 13.5px; color: var(--ink); width: 100%; }
.tb-btn { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--hair); background: var(--paper); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.tb-btn:hover { background: var(--cream-2); }

.content { flex: 1; overflow: auto; padding: 22px 26px 40px; }

/* ---- Stat tiles ---- */
.stat-grid { display: grid; gap: 14px; }
.stat { background: var(--paper); border: 1px solid var(--hair); border-radius: 16px; padding: 16px 18px; }
.stat .label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.stat .value { font-family: var(--font-display); font-weight: 700; font-size: 30px; margin-top: 8px; letter-spacing: -.02em; line-height: 1; }
.stat .delta { font-size: 12px; font-weight: 600; margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }
.stat .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }

/* ---- Panels ---- */
.panel { background: var(--paper); border: 1px solid var(--hair); border-radius: 16px; overflow: hidden; }
.panel-head { display: flex; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--hair-2); }
.panel-head h3 { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin: 0; }
.panel-head .tools { margin-left: auto; display: flex; gap: 8px; }

/* ---- Tables ---- */
table.dd { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.dd th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); padding: 11px 18px; border-bottom: 1px solid var(--hair-2); background: var(--cream); position: sticky; top: 0; }
table.dd td { padding: 13px 18px; border-bottom: 1px solid var(--hair-2); vertical-align: middle; }
table.dd tbody tr:hover { background: var(--cream); }
table.dd tr:last-child td { border-bottom: none; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.pill .d { width: 7px; height: 7px; border-radius: 50%; }
.pill.green { background: #E2F0E8; color: #1E6B43; } .pill.green .d { background: #2E7D52; }
.pill.amber { background: #F8ECCF; color: #946008; } .pill.amber .d { background: #C98A12; }
.pill.red { background: var(--terra-100); color: #9A331E; } .pill.red .d { background: var(--terra); }
.pill.gray { background: var(--cream-2); color: var(--ink-2); } .pill.gray .d { background: var(--ink-3); }
.pill.teal { background: var(--teal-100); color: #0A554F; } .pill.teal .d { background: var(--teal); }

.avatar-cell { display: flex; align-items: center; gap: 11px; }
.avatar-cell .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0; }
.avatar-cell .nm { font-weight: 600; white-space: nowrap; } .avatar-cell .sb { font-size: 11.5px; color: var(--ink-3); }

.bar { height: 7px; border-radius: 99px; background: var(--cream-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--gold); }

.mini-btn { font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 9px; border: 1px solid var(--hair); background: var(--paper); color: var(--ink); cursor: pointer; }
.mini-btn:hover { background: var(--cream-2); }
.mini-btn.solid { background: var(--ink); color: var(--cream); border-color: var(--ink); }
