.eyebrow { color: var(--brand); font-size: .76rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }
.panel, .card, .metric, .job-card, .customer-card, .material-card, .capacity-day, .capability-card, dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel { padding: 22px; margin-bottom: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; }
.card, .job-card, .customer-card, .material-card, .capacity-day, .capability-card { padding: 18px; }
.card h2, .job-card h3, .customer-card h3, .material-card h3, .capability-card h3 { margin-top: 0; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.toolbar .grow { flex: 1 1 260px; }
.field { display: grid; gap: 6px; min-width: 150px; }
.field > span, label > span { font-size: .82rem; font-weight: 760; color: var(--muted); }
input, select, textarea { width: 100%; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 11px; padding: 10px 12px; background: #fff; color: var(--ink); }
textarea { min-height: 100px; resize: vertical; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; }
.checkbox input { width: 18px; min-height: 18px; }
.btn { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--brand); border-radius: 11px; padding: 9px 14px; background: var(--brand); color: #fff; font-weight: 780; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.outline, .btn.ghost { background: #fff; color: var(--brand); }
.btn.outline:hover, .btn.ghost:hover { background: var(--surface-2); }
.btn.danger { border-color: var(--danger); background: var(--danger); }
.btn.compact { min-height: 34px; padding: 6px 10px; font-size: .84rem; }
.btn:disabled { opacity: .52; cursor: not-allowed; }
.admin-topbar .btn.ghost { border-color: #776889; background: transparent; color: #fff; }
.admin-topbar .btn.ghost:hover { background: #342943; }
.nav-toggle { display: none; }
@media (max-width: 980px) { .nav-toggle { display: inline-flex; margin-left: auto; } }
.actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.metric { padding: 16px; box-shadow: none; }
.metric span { display: block; color: var(--muted); font-size: .8rem; font-weight: 750; }
.metric strong { display: block; margin-top: 4px; font-size: 1.65rem; line-height: 1.1; }
a.metric { color: inherit; text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
a.metric:hover { transform: translateY(-2px); border-color: var(--brand); }
.status { display: inline-flex; align-items: center; width: fit-content; min-height: 27px; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .76rem; font-weight: 820; }
.status.ok { color: var(--ok); background: var(--ok-bg); }
.status.warn { color: var(--warn); background: var(--warn-bg); }
.status.danger { color: var(--danger); background: var(--danger-bg); }
.status.info { color: var(--info); background: var(--info-bg); }
.notice { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.notice.success { color: var(--ok); border-color: #b7ddc8; background: var(--ok-bg); }
.notice.warn { color: var(--warn); border-color: #efd297; background: var(--warn-bg); }
.notice.error { color: var(--danger); border-color: #ecc0c5; background: var(--danger-bg); }
.empty-state { padding: 42px 20px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--muted); }
.empty-state h3 { margin: 0 0 5px; color: var(--ink); }
.card-grid, .job-grid, .customer-grid, .materials-grid, .capacity-grid, .capability-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); gap: 14px; }
.card dl, .job-card dl, .customer-card dl { display: grid; grid-template-columns: minmax(90px, .7fr) 1fr; gap: 7px 12px; margin: 15px 0; }
dt { color: var(--muted); font-size: .82rem; font-weight: 720; }
dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.admin-table { width: 100%; min-width: 850px; border-collapse: collapse; background: #fff; }
.admin-table th, .admin-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table th { position: sticky; top: 0; background: #f5f1f7; color: var(--muted); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: var(--surface-soft); }
.record-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.record-head h2, .record-head h3 { margin: 6px 0; }
.record-total { font-size: 1.5rem; white-space: nowrap; }
.record-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.record-fields > div { padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fcfbfd; }
.record-list { display: grid; gap: 9px; }
.record-list section { padding: 10px; border-left: 3px solid var(--line); }
.detail-section { margin: 22px 0; }
.timeline { display: grid; gap: 10px; }
.timeline article { padding: 12px 0 12px 15px; border-left: 3px solid var(--line); }
.file-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.dialog { width: min(920px, calc(100% - 24px)); max-height: calc(100vh - 36px); padding: 0; overflow: auto; box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(25,17,31,.58); }
.dialog-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.dialog-head h2 { margin: 0; }
.dialog-body { padding: 20px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.toast-host { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 9px; width: min(390px, calc(100% - 36px)); }
.toast { padding: 13px 15px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow); }
.toast.error { background: var(--danger); }
.loading-line { height: 4px; overflow: hidden; background: var(--surface-2); }
.loading-line::after { content: ""; display: block; width: 35%; height: 100%; background: var(--brand); animation: loading 1s infinite ease-in-out; }
@keyframes loading { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
@media (max-width: 700px) {
  .panel { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .record-head { display: grid; }
  .file-row { align-items: flex-start; flex-direction: column; }
}
