/* Durand Automotive — Tekmetric-faithful clone. Customizable design tokens up top. */
:root {
  --nav-bg: #12161f;
  --nav-fg: #e7ebf0;
  --brand: #1565d8;
  --brand-600: #1257bd;
  --orange: #f26722;
  --bg: #eceef1;
  --card: #ffffff;
  --line: #e3e6ea;
  --text: #1b2029;
  --muted: #6b7280;
  --green: #1f9d57;
  --red: #d64541;
  --pill: #4b5563;
  --radius: 10px;
  --sidebar-w: 236px;
  --nav-h: 56px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.06);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- top nav ---------- */
.topnav {
  height: var(--nav-h); background: var(--nav-bg); color: var(--nav-fg);
  display: flex; align-items: center; gap: 16px; padding: 0 18px; position: sticky; top: 0; z-index: 30;
}
.topnav .hamburger { background: none; border: 0; color: var(--nav-fg); font-size: 20px; line-height: 1; padding: 6px; border-radius: 6px; }
.topnav .hamburger:hover { background: rgba(255,255,255,.08); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; letter-spacing: -.5px; }
.brand .cog { color: var(--orange); font-size: 20px; }
.brand .thin { font-weight: 400; }
.search { flex: 0 1 420px; display: flex; align-items: center; gap: 8px; background: #232937; border-radius: 8px; padding: 8px 12px; color: #9aa4b2; }
.search input { flex: 1; background: none; border: 0; color: #d6dbe3; outline: none; font-size: 14px; }
.topnav .spacer { flex: 1; }
.topnav .nav-icons { display: flex; align-items: center; gap: 18px; color: #c3cad4; }
.topnav .nav-icons .item { position: relative; cursor: pointer; font-size: 16px; }
.shop-switch { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; cursor: pointer; }
.badge { position: absolute; top: -6px; right: -8px; background: var(--red); color: #fff; font-size: 10px; border-radius: 10px; padding: 0 5px; line-height: 15px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #8a93a3; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; position: relative; }
.avatar::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; background: var(--green); border: 2px solid var(--nav-bg); border-radius: 50%; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: calc(100vh - var(--nav-h)); }
.sidebar { width: var(--sidebar-w); background: var(--card); border-right: 1px solid var(--line); padding: 10px 0; flex-shrink: 0; }
.sidebar .grp { color: #9aa1ac; font-size: 11px; letter-spacing: .08em; font-weight: 700; padding: 14px 20px 6px; }
.navlink { display: flex; align-items: center; gap: 12px; padding: 10px 20px; color: #2b313c; font-size: 14px; font-weight: 500; border-left: 3px solid transparent; }
.navlink .ic { width: 18px; text-align: center; color: #6b7280; }
.navlink:hover { background: #f4f6f8; }
.navlink.active { background: #eaf1fd; color: var(--brand); border-left-color: var(--brand); font-weight: 600; }
.navlink.active .ic { color: var(--brand); }
.content { flex: 1; padding: 22px 26px; overflow: auto; }
.page-title { font-size: 26px; font-weight: 700; margin: 0 0 18px; }

/* tabs */
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { padding: 10px 0; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* toolbar */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.btn { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; font-size: 13px; color: #2b313c; font-weight: 600; }
.btn:hover { background: #f7f8fa; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-600); }
.input { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; color: var(--muted); }
.input input { border: 0; outline: none; font-size: 13px; min-width: 200px; }

/* KPI cards */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
.kpi { padding: 18px 20px; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.kpi .k { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.kpi .v { font-size: 22px; font-weight: 700; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .card-h { padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 600; }
.card .card-b { padding: 16px 18px; }

/* table */
table.grid { width: 100%; border-collapse: collapse; background: #fff; }
table.grid th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 14px 16px; border-bottom: 1px solid var(--line); }
table.grid td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--line); }
table.grid tr:hover td { background: #f7f9fb; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 12px 16px; color: var(--muted); font-size: 13px; }
.pagination button { background: #fff; border: 1px solid var(--line); border-radius: 6px; width: 30px; height: 30px; }

/* kanban */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.col { border-right: 1px solid var(--line); min-height: 60vh; background: #fafbfc; }
.col:last-child { border-right: 0; }
.col-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px; background: #fff; }
.col-h .sort { color: var(--muted); font-size: 12px; font-weight: 500; }
.col-b { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.ro-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; box-shadow: var(--shadow); }
.ro-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pill { background: var(--pill); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 14px; display: inline-flex; gap: 6px; align-items: center; }
.ro-cust { font-weight: 600; font-size: 14px; }
.ro-veh { color: var(--muted); font-size: 13px; margin: 4px 0 10px; }
.ro-foot { display: flex; align-items: center; justify-content: space-between; }
.mini-av { width: 24px; height: 24px; border-radius: 50%; background: #8a93a3; color: #fff; font-size: 10px; font-weight: 700; display: inline-grid; place-items: center; }
.empty { display: grid; place-items: center; gap: 8px; color: var(--muted); padding: 60px 20px; text-align: center; font-size: 14px; }

.fab { position: fixed; right: 26px; bottom: 26px; width: 52px; height: 52px; border-radius: 50%; background: var(--orange); color: #fff; border: 0; font-size: 26px; box-shadow: 0 4px 12px rgba(242,103,34,.5); z-index: 20; }

.banner { display: flex; align-items: center; gap: 12px; background: #fff4e5; border: 1px solid #f6c98a; color: #8a5a12; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.banner code { background: #f3e2c6; padding: 2px 6px; border-radius: 4px; }
.spinner { border: 3px solid #dfe3e8; border-top-color: var(--brand); border-radius: 50%; width: 26px; height: 26px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { display: grid; place-items: center; padding: 60px; }
.tag { font-size: 12px; color: var(--muted); }
.link { color: var(--brand); font-weight: 600; }

/* svg icon alignment + new bits */
.navlink .ic { display: inline-flex; }
.navlink .ic svg, .nav-icons svg, .btn svg, .input svg, .shop-switch svg, .search svg { display: block; }
.nav-icons svg { color: #c3cad4; }
.brand .brandmark { flex-shrink: 0; }
.btn.icon { padding: 8px; }
.pen { opacity: .7; display: inline-flex; }
.src-pill { display: inline-block; background: #eef2f7; color: #5b6472; border: 1px solid var(--line); font-size: 12px; padding: 4px 10px; border-radius: 12px; margin: 0 0 14px; }
.empty svg { opacity: .4; }
.fab { display: grid; place-items: center; }
.hamburger { display: inline-flex; align-items: center; }
