/* CrewDesk — neutral UI */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --text: #111827;
  --text-2: #4b5563;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff4ff;
  --accent-text: #ffffff;
  --warn: #b45309;
  --warn-soft: #fff7e6;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --ok: #15803d;
  --ok-soft: #ecfdf3;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .06);
  --focus: 0 0 0 3px rgba(37, 99, 235, .25);
  --h: 38px;
  --container: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1 { font-size: 22px; line-height: 1.3; margin: 0; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0 0 14px; font-weight: 650; }
h3 { font-size: 13px; margin: 14px 0 8px; font-weight: 600; color: var(--text-2); }
p { margin: 0 0 10px; }
code { font: 11px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; color: var(--text-2); }
.icon { flex: none; display: inline-block; vertical-align: middle; }
:focus-visible { outline: none; box-shadow: var(--focus); }

/* ------------------------------------------------------------------ top bar */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: var(--container); margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 700;
}
.nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.nav-link { padding: 7px 12px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; white-space: nowrap; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }
.topbar .nav-toggle { display: none; }
.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 999px; cursor: pointer; color: var(--text-2); }
.user-chip:hover { background: var(--surface-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #e0e7ff; color: #3730a3; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.user-chip-text { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip-text b { font-weight: 600; color: var(--text); font-size: 13px; }
.user-chip-text small { color: var(--muted); font-size: 11px; }

/* ------------------------------------------------------------------ dropdown menus */
details.menu { position: relative; }
details.menu > summary { list-style: none; user-select: none; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu[open] > summary .icon:last-child { transform: rotate(180deg); }
.menu-panel {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; padding: 6px; z-index: 40;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.menu-right .menu-panel { left: auto; right: 0; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; height: auto;
}
.menu-item:hover { background: var(--surface-2); color: var(--text); }
.menu-item.active { color: var(--accent); font-weight: 600; }
.menu-danger, .menu-danger:hover { color: var(--danger); }
.menu-panel form { margin: 0; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.lang-code { width: 26px; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .03em; }
.menu-item.active .lang-code { color: var(--accent); }
.menu-check { margin-left: auto; display: flex; }

/* ------------------------------------------------------------------ layout */
.page { max-width: var(--container); margin: 0 auto; padding: 28px 20px 48px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-header .subtitle { color: var(--muted); margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.back-link:hover { color: var(--text); }
.count { color: var(--muted); font-weight: 500; font-size: 15px; margin-left: 6px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 760px; }
.card.flush > .card-head { padding: 16px 20px 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.table-wrap { overflow-x: auto; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-bottom: 16px; align-items: start; }
.grid2 > .card { margin-bottom: 0; }
.stack > * + * { margin-top: 12px; }

/* ------------------------------------------------------------------ buttons */
button, .btn, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: var(--h); padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: 500 14px/1 inherit; font-family: inherit;
  cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
}
button:hover, .btn:hover, .button:hover { background: var(--surface-2); border-color: #9ca3af; color: var(--text); }
button:active, .btn:active { transform: translateY(1px); }
button.primary, .btn.primary, .button.primary, .btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
button.primary:hover, .btn.primary:hover, .button.primary:hover, .btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn-icon { width: var(--h); padding: 0; }
.btn-block { width: 100%; }
button.danger, .btn.danger { color: var(--danger); border-color: #fecaca; }
button.danger:hover, .btn.danger:hover { background: var(--danger-soft); border-color: #fca5a5; color: var(--danger); }
button.link { height: auto; padding: 0; border: 0; background: none; color: var(--accent); font-weight: 500; }
button.link:hover { background: none; color: var(--accent-hover); text-decoration: underline; }
button.link.danger { color: var(--danger); }
form.inline { display: inline; margin: 0; }

/* ------------------------------------------------------------------ forms */
label { display: block; margin-bottom: 14px; font-weight: 500; font-size: 13px; color: var(--text-2); }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 0 11px; height: var(--h);
  transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; padding: 9px 11px; resize: vertical; }
select { padding-right: 30px; appearance: none; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
input:hover, select:hover, textarea:hover { border-color: #9ca3af; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
input::placeholder, textarea::placeholder { color: #9ca3af; }
label > input, label > select, label > textarea, label > .input-wrap { display: flex; width: 100%; margin-top: 6px; }
input[type="checkbox"] { width: 16px; height: 16px; padding: 0; accent-color: var(--accent); cursor: pointer; }
label.check { display: flex; align-items: center; gap: 9px; font-weight: 400; color: var(--text); font-size: 14px; margin-bottom: 10px; cursor: pointer; }
label.check > input { margin: 0; width: 16px; display: inline-block; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.row label { margin: 0; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > input { width: 100%; }
.input-wrap > .icon:first-child { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.input-wrap > .icon:first-child + input { padding-left: 34px; }
.input-wrap .input-btn { position: absolute; right: 4px; height: 30px; width: 30px; padding: 0; border: 0; background: none; color: var(--muted); }
.input-wrap .input-btn:hover { color: var(--text); background: var(--surface-2); }
.input-wrap .input-btn[aria-pressed="true"] { color: var(--accent); }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 14px; }
.toolbar .search { flex: 1 1 220px; }
.toolbar select { flex: 0 1 200px; }

/* ------------------------------------------------------------------ tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-weight: 600; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); white-space: nowrap; }
.table tbody tr:hover td { background: #fafbfc; }
.table tr:last-child td { border-bottom: 0; }
.card:not(.flush) .table th { background: none; }
.card:not(.flush) .table th:first-child, .card:not(.flush) .table td:first-child { padding-left: 0; }
.card:not(.flush) .table th:last-child, .card:not(.flush) .table td:last-child { padding-right: 0; }
.table a { font-weight: 500; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.small, .table.small { font-size: 12px; }
.muted, tr.muted td { color: var(--muted); }
.warn { color: var(--warn); font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 32px 16px !important; }

.alert { display: flex; gap: 8px; align-items: flex-start; background: var(--danger-soft); color: #991b1b; border: 1px solid #fecaca; padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 13.5px; }

/* ------------------------------------------------------------------ badges, tabs, misc */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #f1f2f4; color: var(--text-2); font-weight: 500; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.s-submitted { background: #f1f2f4; color: #4b5563; }
.s-matched { background: var(--accent-soft); color: var(--accent); }
.s-disputed { background: var(--warn-soft); color: var(--warn); }
.s-approved, .s-paid { background: var(--ok-soft); color: var(--ok); }
.badge.off { background: #f1f2f4; color: var(--muted); }
.badge.on { background: var(--ok-soft); color: var(--ok); }

.tabs { display: inline-flex; gap: 2px; padding: 3px; background: #eceef1; border-radius: var(--radius-sm); margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 5px; color: var(--text-2); font-weight: 500; font-size: 13px; }
.tabs a:hover { color: var(--text); }
.tabs a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photos a { display: block; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.photos img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .2s; }
.photos a:hover img { transform: scale(1.04); }
.photo-gone { aspect-ratio: 1; display: grid; place-items: center; text-align: center; padding: 8px; background: var(--surface-2); color: var(--muted); border-radius: var(--radius-sm); font-size: 12px; border: 1px dashed var(--line-strong); }

.comment { padding: 12px 0; border-bottom: 1px solid var(--line); }
.comment:first-child { padding-top: 0; }
.comment p { margin: 4px 0 0; white-space: pre-wrap; }
.comment-form { margin-top: 14px; }
.comment-form textarea { width: 100%; margin-bottom: 8px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; margin-bottom: 6px; }
.stat b { font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat.warn-stat b { color: var(--warn); }

.pager { display: flex; gap: 8px; justify-content: center; align-items: center; padding: 14px; color: var(--muted); }
details.disclosure { margin-top: 14px; }
details.disclosure > summary { cursor: pointer; color: var(--accent); font-weight: 500; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::before { content: "▸"; transition: transform .15s; }
details.disclosure[open] > summary::before { transform: rotate(90deg); }
details.disclosure[open] > summary { margin-bottom: 12px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 8px; }

/* ------------------------------------------------------------------ auth pages */
body.auth { background: radial-gradient(1200px 600px at 50% -10%, #e8eefc 0%, var(--bg) 60%); }
.auth-page { min-height: 100vh; display: flex; flex-direction: column; padding: 20px; }
.auth-top { display: flex; justify-content: flex-end; max-width: 1100px; width: 100%; margin: 0 auto; }
.auth-center { flex: 1; display: grid; place-items: center; padding: 24px 0 64px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 32px; box-shadow: var(--shadow-lg); }
.auth-brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 22px; font-size: 18px; font-weight: 700; }
.auth-brand .brand-mark { width: 38px; height: 38px; border-radius: 10px; font-size: 18px; }
.auth-card h1 { text-align: center; font-size: 20px; }
.auth-sub { text-align: center; color: var(--muted); margin: 6px 0 24px; }
.auth-card .btn-block { height: 42px; font-size: 15px; margin-top: 6px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 22px 0 16px; text-transform: uppercase; letter-spacing: .05em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tg-login { display: flex; justify-content: center; min-height: 40px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 18px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .user-chip-text { display: none; }
  .topbar-inner { gap: 12px; }
}
@media (max-width: 760px) {
  .topbar .nav-toggle { display: inline-flex; }
  .topbar-inner { padding: 0 12px; }
  .nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 12px 12px; box-shadow: var(--shadow-lg);
  }
  .topbar.nav-open .nav { display: flex; }
  .nav-link { padding: 11px 12px; }
  .page { padding: 20px 14px 40px; }
  .card { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .toolbar > * { flex: 1 1 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat b { font-size: 20px; }
  .auth-card { padding: 24px 20px; }
  h1 { font-size: 20px; }
}

/* ------------------------------------------------------------------ earnings */
.segmented { display: inline-flex; padding: 3px; background: #eceef1; border-radius: var(--radius-sm); gap: 2px; }
.segmented a { padding: 7px 14px; border-radius: 5px; color: var(--text-2); font-weight: 500; white-space: nowrap; }
.segmented a:hover { color: var(--text); }
.segmented a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.segmented a.on.seg-company { color: var(--ok); }

.earn-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.earn-side > .card { margin-bottom: 16px; }
.earn-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.month-nav { display: flex; align-items: center; gap: 10px; }
.month-nav h2 { margin: 0; font-size: 20px; min-width: 170px; text-align: center; }
.month-nav .btn-icon { font-size: 18px; }
.earn-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.earn-filters select { max-width: 200px; }

.period-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.period-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.period-card.active { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.period-card small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.period-card b { display: block; font-size: 24px; font-weight: 650; letter-spacing: -.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.period-card span { color: var(--muted); font-size: 12.5px; }
.view-company .period-card b, .view-company .cal-sum { color: var(--ok); }

.cal-card { padding: 14px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 0 6px; }
.cal-day {
  min-height: 74px; border-radius: 8px; padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--surface-2); color: var(--text); border: 1px solid transparent; transition: border-color .12s, transform .12s;
}
.cal-day:hover { border-color: var(--line-strong); color: var(--text); }
.cal-day.out { opacity: .45; }
.cal-num { font-weight: 600; font-size: 13px; }
.cal-count { min-width: 22px; padding: 0 6px; border-radius: 6px; background: var(--surface); font-size: 12px; font-weight: 700; text-align: center; color: var(--accent); box-shadow: var(--shadow); }
.cal-sum { font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cal-day.has-jobs { background: #eef3fe; }
.cal-day.heat-1 { background: #e3ecfd; }
.cal-day.heat-2 { background: #cddcfb; }
.cal-day.heat-3 { background: #afc6f8; }
.cal-day.heat-4 { background: #8eaef4; }
.view-company .cal-day.has-jobs { background: #ecf8f0; }
.view-company .cal-day.heat-1 { background: #dcf3e4; }
.view-company .cal-day.heat-2 { background: #bfe8cd; }
.view-company .cal-day.heat-3 { background: #98d9ae; }
.view-company .cal-day.heat-4 { background: #6fc78e; }
.cal-day.today .cal-num { color: var(--accent); }
.cal-day.today .cal-num::after { content: ""; display: block; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); margin: 1px auto 0; }
.cal .cal-day.selected, .view-company .cal .cal-day.selected { background: var(--text); color: #fff; border-color: var(--text); }
.cal-day.selected .cal-sum { color: #e5e7eb; }
.cal-day.selected .cal-count { background: rgba(255,255,255,.15); color: #fff; box-shadow: none; }
.table .total-row td { font-weight: 700; border-top: 1px solid var(--line-strong); }
.table td .muted { font-size: 11.5px; }

@media (max-width: 1000px) {
  .earn-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .period-cards { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .period-card { padding: 10px; }
  .period-card b { font-size: 16px; }
  .cal { gap: 3px; }
  .cal-day { min-height: 54px; padding: 4px 2px; }
  .cal-sum { display: none; }
  .month-nav h2 { min-width: 0; font-size: 17px; }
  .segmented { width: 100%; }
  .segmented a { flex: 1; text-align: center; padding: 7px 6px; }
}

/* ------------------------------------------------------------------ jobs list: week / day groups */
.table tr.week-row td { background: #eef1f5; border-top: 2px solid var(--line-strong); padding-top: 9px; padding-bottom: 9px; }
.table tr.day-row td { background: var(--surface-2); padding-top: 7px; padding-bottom: 7px; }
.table tbody.week-group tr.week-row:hover td { background: #eef1f5; }
.table tbody.week-group tr.day-row:hover td { background: var(--surface-2); }
.table tbody.week-group:first-of-type tr.week-row td { border-top: 0; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.week-row .group-head b { font-size: 13.5px; }
.day-row .group-head b { font-size: 13px; color: var(--text-2); font-weight: 600; padding-left: 10px; border-left: 3px solid var(--accent); }
.group-totals { display: inline-flex; gap: 14px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.week-row .group-totals { color: var(--text-2); font-weight: 600; }

/* ------------------------------------------------------------------ breakdowns */
.hint.pad { padding: 0 18px; margin-top: 0; }
.item-actions { margin-top: 6px; gap: 6px; flex-wrap: wrap; }
.item-actions select { max-width: 260px; }
.upload-results { margin-top: 12px; }
button[disabled] { opacity: .5; cursor: not-allowed; }
.match-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-menu { margin-left: auto; }
.row-menu summary { padding: 0 8px; min-height: 26px; }
.row-menu .menu-panel form { display: block; }
.row-menu .menu-panel button { width: 100%; justify-content: flex-start; }
.card.recon { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 12px 16px; }
.notice { background: var(--ok-soft); color: var(--ok); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 14px; font-weight: 500; }
.sheet-preview { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; font-size: 13px; background: #fff; }
.sp-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.sp-company { font-size: 15px; }

/* ------------------------------------------------------------------ tutorial */
.help { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: start; }
.help-toc { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; padding: 14px; }
.help-toc b { margin-bottom: 6px; }
.help-toc a { padding: 5px 8px; border-radius: 6px; color: var(--text-2); font-size: 13.5px; }
.help-toc a:hover { background: #f1f2f4; color: var(--text); }
.help-body section { scroll-margin-top: 76px; }
.help-body h2 { margin-top: 0; }
.help-body li { margin: 4px 0; line-height: 1.55; }
.help-body p { line-height: 1.6; }
.callout { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 10px 14px; margin: 12px 0; line-height: 1.55; }
.callout.warn-callout { background: var(--warn-soft); }
.faq dt { font-weight: 600; margin-top: 12px; }
.faq dd { margin: 4px 0 0; color: var(--text-2); line-height: 1.55; }
.status-table td:first-child { width: 150px; }
@media (max-width: 860px) { .help { grid-template-columns: 1fr; } .help-toc { position: static; } }

/* ------------------------------------------------------------------ confirm dialog */
.confirm-dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px 16px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(0,0,0,.18); color: var(--text); background: var(--surface); }
.confirm-dialog::backdrop { background: rgba(17, 24, 39, .35); }
.confirm-dialog p { margin: 0 0 16px; font-size: 15px; line-height: 1.5; }
.confirm-dialog .form-actions { justify-content: flex-end; margin: 0; }
.toolbar .pay-form { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.pay-check { display: inline-flex; margin-left: 8px; vertical-align: middle; }
details.claim { margin-top: 6px; }
details.claim > summary { list-style: none; display: inline-flex; cursor: pointer; }
details.claim > summary::-webkit-details-marker { display: none; }
.codes-table input[type=text], .codes-table input:not([type]) { min-width: 0; }
.help-list li { margin: 4px 0; line-height: 1.55; }
.logo-current { display: flex; align-items: center; gap: 14px; margin: -4px 0 12px; }
.logo-current img { max-height: 48px; max-width: 220px; border: 1px solid var(--line); border-radius: 6px; padding: 4px; background: #fff; }
.sp-logo { display: block; max-height: 44px; max-width: 200px; margin-bottom: 6px; }
