@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/roboto-latin.woff2") format("woff2");
}

:root {
  --blue: #1b5aa6;
  --blue-dark: #154985;
  --blue-soft: #eaf1fa;
  --orange: #ee6b1f;
  --orange-soft: #fdf0e7;
  --ink: #1d2733;
  --ink-2: #4a5665;
  --muted: #7a8594;
  --line: #e2e6eb;
  --line-2: #eef1f4;
  --bg: #f4f6f8;
  --card: #ffffff;
  --green: #1e7f4f;
  --green-soft: #e6f4ec;
  --red: #c0392b;
  --red-soft: #fbeceb;
  --amber: #a86400;
  --amber-soft: #fdf3e1;
  --radius: 6px;
  --side: 248px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Roboto", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; color: var(--ink); }
.ic { flex: none; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 500; }
.text-red { color: var(--red); }
.text-green { color: var(--green); }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--side);
  flex: none;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: block; padding: 18px 18px 14px; border-bottom: 1px solid var(--line-2); }
.brand:hover { text-decoration: none; }
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: .4px; line-height: 1.1; }
.brand-name .o { color: var(--orange); }
.brand-name .b { color: var(--blue); }
.brand-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.nav { flex: 1; overflow-y: auto; padding: 8px 10px 16px; }
.nav-group {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--muted);
  padding: 16px 10px 6px;
}
.nav-group.is-cleaning { color: var(--orange); }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: 13.5px;
}
.nav-link:hover { background: var(--line-2); color: var(--ink); text-decoration: none; }
.nav-link.active { background: var(--blue-soft); color: var(--blue); font-weight: 500; }
.nav-link .ic { color: #8b95a3; }
.nav-link.active .ic { color: var(--blue); }
.sidebar-foot { padding: 10px 18px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line-2); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.top-search {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  color: var(--muted);
}
.top-search input { border: 0; background: transparent; height: 36px; flex: 1; font: inherit; color: var(--ink); outline: none; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.top-date { color: var(--muted); font-size: 13px; }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 10px; border: 0; background: none; cursor: pointer; font: inherit; color: var(--ink); padding: 4px; }
.user-name { display: flex; flex-direction: column; text-align: left; line-height: 1.2; font-size: 13px; font-weight: 500; }
.user-name small { color: var(--muted); font-weight: 400; font-size: 11.5px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500;
}
.dropdown {
  display: none; position: absolute; right: 0; top: 44px; min-width: 190px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(20, 30, 45, .08); padding: 6px; z-index: 30;
}
.dropdown.open { display: block; }
.dropdown a { display: flex; gap: 8px; align-items: center; padding: 8px 10px; color: var(--ink-2); border-radius: 4px; }
.dropdown a:hover { background: var(--line-2); text-decoration: none; }
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-2); }
.only-mobile { display: none; }
.scrim { display: none; }

.content { padding: 22px 24px 40px; max-width: 1480px; width: 100%; }

/* ---------- page head ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; }
.page-sub { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--ink);
  font: inherit; font-weight: 500; font-size: 13.5px;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--line-2); text-decoration: none; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-accent { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-accent:hover { background: #d85e15; }
.btn-danger-ghost { color: var(--red); }
.btn-danger-ghost:hover { background: var(--red-soft); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-link { border: 0; background: none; color: var(--blue); cursor: pointer; font: inherit; padding: 0; }
form.inline { display: inline; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 15px; }
.card-head .muted { font-size: 12.5px; }
.card-body { padding: 16px; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi-label { color: var(--muted); font-size: 12.5px; }
.kpi-value { font-size: 22px; font-weight: 500; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-foot { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.kpi.accent { border-top: 3px solid var(--blue); }
.kpi.accent-o { border-top: 3px solid var(--orange); }
.bar { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.bar > span { display: block; height: 100%; background: var(--blue); }
.bar.o > span { background: var(--orange); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-weight: 500; font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .4px;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap;
}
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tbody tr:hover td { background: #fafbfd; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.empty { text-align: center; color: var(--muted); padding: 28px; }
.tbl tfoot td { font-weight: 500; background: #fafbfc; border-top: 1px solid var(--line); }
.tbl .sub { display: block; color: var(--muted); font-size: 12.5px; }
.tbl.compact td, .tbl.compact th { padding: 7px 12px; }
.row-link { color: var(--ink); font-weight: 500; }

/* Excel-like sheet */
.sheet-wrap { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.sheet { border-collapse: collapse; width: 100%; font-size: 13px; }
.sheet th, .sheet td { border: 1px solid #e4e7eb; padding: 6px 9px; white-space: nowrap; }
.sheet thead th { position: sticky; top: 0; background: #f1f4f7; font-weight: 500; color: var(--ink-2); z-index: 1; text-align: left; }
.sheet td.rn, .sheet th.rn { background: #f6f7f9; color: var(--muted); text-align: center; width: 38px; }
.sheet tbody tr:nth-child(even) td:not(.rn) { background: #fcfcfd; }
.sheet tbody tr:hover td:not(.rn) { background: #f2f7fd; }
.sheet tfoot td { position: sticky; bottom: 0; background: #eef3f9; font-weight: 500; }
.sheet .scope { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- badges & chips ---------- */
.badge { display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-gray { background: #eef0f3; color: #5d6875; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink-2); margin: 0 6px 6px 0; background: #fff; }
.chip:hover { text-decoration: none; background: var(--line-2); }
.chip-wa { color: #1a7f45; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; }
.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: 1 / -1; }
.form-section { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .6px; color: var(--blue); padding-top: 8px; border-top: 1px solid var(--line-2); margin-top: 4px; }
.form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; font-weight: 500; }
.req { color: var(--red); font-style: normal; }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=tel], input[type=password], input[type=search], input[type=month], input[type=time], input[type=file], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  border: 1px solid #d3d9e0; border-radius: var(--radius);
  padding: 7px 10px; background: #fff; min-height: 36px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27, 90, 166, .12); }
.input-affix { display: flex; }
.input-affix span { border: 1px solid #d3d9e0; border-right: 0; border-radius: var(--radius) 0 0 var(--radius); padding: 0 10px; display: flex; align-items: center; background: #f6f7f9; color: var(--muted); font-size: 12.5px; }
.input-affix input { border-radius: 0 var(--radius) var(--radius) 0; }
.help { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 400 !important; margin-top: 26px; cursor: pointer; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 16px; border-top: 1px solid var(--line-2); background: #fbfbfc; border-radius: 0 0 var(--radius) var(--radius); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.filters .f { display: flex; flex-direction: column; gap: 4px; }
.filters label { font-size: 12px; color: var(--muted); }
.filters input, .filters select { min-width: 150px; }
.filters .grow { flex: 1; min-width: 200px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { color: var(--blue); border-color: var(--blue); font-weight: 500; }
.tabs .count { font-size: 11.5px; background: var(--line-2); border-radius: 10px; padding: 0 7px; margin-left: 4px; color: var(--muted); }

/* ---------- detail lists ---------- */
dl.details { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 0; }
dl.details dt { color: var(--muted); font-size: 13px; }
dl.details dd { margin: 0; }
.profile-head { display: flex; gap: 16px; align-items: center; }
.profile-head .avatar { width: 52px; height: 52px; font-size: 17px; }
.profile-head h2 { font-size: 19px; }
.stat-row { display: flex; gap: 0; border-top: 1px solid var(--line-2); }
.stat-row > div { flex: 1; padding: 12px 16px; border-right: 1px solid var(--line-2); }
.stat-row > div:last-child { border-right: 0; }
.stat-row .l { font-size: 12px; color: var(--muted); }
.stat-row .v { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* list rows on dashboard */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); align-items: center; }
.list li:last-child { border-bottom: 0; }
.list .t { font-weight: 500; }
.list .s { color: var(--muted); font-size: 12.5px; }

/* bar chart */
.cols { display: flex; align-items: flex-end; gap: 14px; height: 170px; padding: 10px 6px 0; }
.cols .c { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.cols .pair { display: flex; gap: 3px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.cols .b1, .cols .b2 { width: 40%; max-width: 22px; border-radius: 3px 3px 0 0; min-height: 2px; }
.cols .b1 { background: #c9d8ec; }
.cols .b2 { background: var(--blue); }
.cols .lbl { font-size: 11.5px; color: var(--muted); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* alerts */
.alert { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid; }
.alert-ok { background: var(--green-soft); border-color: #bfe0cc; color: #165c39; }
.alert-error { background: var(--red-soft); border-color: #f0c7c2; color: #8e2a1f; }
.alert-info { background: var(--blue-soft); border-color: #c8d9ee; color: var(--blue-dark); }
.alert-warn { background: var(--amber-soft); border-color: #f1d9ad; color: #7a4a00; }
.notice { padding: 12px 16px; background: var(--amber-soft); border-bottom: 1px solid #f1d9ad; color: #7a4a00; font-size: 13px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-2); }
.empty-state h2 { margin-bottom: 6px; }

.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 13px; }
.pager div { display: flex; gap: 6px; }

/* dialogs */
dialog { border: 0; border-radius: 8px; padding: 0; width: min(560px, 94vw); box-shadow: 0 20px 50px rgba(15, 25, 40, .25); }
dialog::backdrop { background: rgba(20, 28, 40, .45); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.dlg-head h3 { font-size: 16px; }
.dlg-body { padding: 18px; }
.dlg-close { border: 0; background: none; cursor: pointer; color: var(--muted); }

/* day board */
.day-nav { display: flex; align-items: center; gap: 8px; }
.job-card { display: grid; grid-template-columns: 92px 1fr 170px; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.job-card:last-child { border-bottom: 0; }
.job-time { font-weight: 500; font-variant-numeric: tabular-nums; }
.job-time small { display: block; color: var(--muted); font-weight: 400; }
.job-main .t { font-weight: 500; font-size: 14.5px; }
.job-main .scope { color: var(--ink-2); margin: 4px 0 6px; white-space: pre-line; }
.job-side { text-align: right; }
.job-side .amt { font-weight: 500; font-size: 15px; }

/* login */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.login-left { background: var(--blue); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-left h2 { color: #fff; font-size: 26px; font-weight: 400; line-height: 1.35; max-width: 420px; }
.login-left ul { padding-left: 18px; color: #d7e3f3; line-height: 1.9; }
.login-left .foot { color: #b9cde6; font-size: 12.5px; }
.login-right { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-box { width: 100%; max-width: 360px; }
.login-box h1 { font-size: 22px; margin: 26px 0 4px; }
.login-box .field { margin-top: 14px; }
.login-box .btn { width: 100%; justify-content: center; margin-top: 20px; height: 40px; }
.demo-box { margin-top: 24px; font-size: 12.5px; color: var(--ink-2); }
.demo-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; margin-bottom: 8px; }
.demo-head strong { font-size: 13px; color: var(--ink); font-weight: 500; }
.demo-list { display: grid; gap: 8px; }
.demo-acc { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: 0 1px 2px rgba(16, 24, 40, .05); font: inherit; color: inherit; text-align: left; cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s; }
.demo-acc:hover { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 2px 6px rgba(27, 90, 166, .12); }
.demo-acc:active { transform: translateY(1px); }
.demo-acc:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.demo-av { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-weight: 500; font-size: 12px; }
.demo-txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.demo-role { font-weight: 500; font-size: 13.5px; color: var(--ink); }
.demo-cred { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; }
.demo-go { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 500; }
.demo-acc.is-active { border-color: var(--blue); background: var(--blue-soft); }
.demo-acc.is-active .demo-av { background: var(--blue); color: #fff; }
.demo-acc.is-active .demo-go { background: var(--green); }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .g-3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .3); z-index: 40; }
  .only-mobile { display: inline-flex; }
  .top-date, .user-name { display: none; }
  .content { padding: 16px 14px 40px; }
  .g-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-3 { grid-column: 1 / -1; }
  .job-card { grid-template-columns: 1fr; }
  .job-side { text-align: left; }
  .login-page { grid-template-columns: 1fr; }
  .login-left { display: none; }
  dl.details { grid-template-columns: 120px 1fr; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: 1 / -1; }
}
.grid > .card + .card, .grid > div > .card:first-child { margin-top: 0; }
.grid > div > .card + .card { margin-top: 16px; }
dl.details .sub { display: block; font-size: 12.5px; }
.top-search input[type=search] { border: 0; background: transparent; box-shadow: none; padding: 0; min-height: 0; height: 36px; }
@media (max-width: 520px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 10px 12px; }
  .kpi-value { font-size: 17px; }
  .page-head h1 { font-size: 18px; }
}
@media (max-width: 420px) {
  .demo-acc { gap: 10px; padding: 9px 8px 9px 10px; }
  .demo-av { width: 26px; height: 26px; }
  .demo-go { padding: 4px 8px; }
}
