/* Jnwecom operational UI refinement. Shared tokens and role-specific layouts. */
:root {
  --text: #172b24; --muted: #52675e; --soft: #63766d;
  --bg: #f5f7f6; --line: #dfe7e3; --line-strong: #c7d4cd;
  --amber: #95600c; --purple: #655294; --red: #b83238;
  --radius: 12px; --shadow: 0 3px 12px rgba(23,43,36,.035);
  --type-caption: .75rem; --type-body: .875rem; --type-section: 1.125rem;
}
body { font-size: var(--type-body); line-height: 1.65; }
body.modal-open { overflow: hidden; }
.modal-dialog:focus { outline: none; }
::selection { background: #c9e9dc; color: #123e30; }
input, textarea { caret-color: var(--primary2); }
input::placeholder, textarea::placeholder { color: #66786e; opacity: 1; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:is(button,a,input,select,textarea,summary):focus-visible { outline: 2px solid var(--primary2); outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .55; }
.icon { width: 19px; height: 19px; flex: 0 0 19px; vertical-align: middle; }
.icon::before { content: none; }
.btn { font-size: var(--type-body); font-weight: 600; border-radius: 9px; }
.btn-primary { background: var(--primary2); box-shadow: none; }
.btn-primary:hover { background: #005d49; }
a, .text-button, .badge-teal, .badge-green { color: var(--primary2); }
.btn-secondary { background: #fff; }
.text-button { min-height: 44px; font-size: 13px; }
.badge { font-size: 12px; white-space: nowrap; }
.eyebrow, .record-meta { font-size: 12px; line-height: 1.7; letter-spacing: 0; color: var(--muted); }
.page-header h1, .detail-heading h1, .customer-greeting h1 { font-size: 28px; letter-spacing: -.025em; margin: 0 0 8px; }
.page-header p, .detail-heading p, .delivery-toolbar p { font-size: 14px; line-height: 1.75; }
.panel-heading h3, .section-toolbar h3 { margin: 0; font-size: var(--type-section); }
.sidebar { width: 232px; padding: 22px 14px 16px; }
.main-content { margin-left: 232px; width: calc(100% - 232px); }
.brand { padding-bottom: 20px; }
.brand strong { font-size: 16px; }
.brand small, .company-switch span, .profile span { font-size: 12px; }
.company-switch strong, .profile strong { font-size: 13px; }
.nav-list { gap: 5px; margin-top: 12px; }
.nav-item { min-height: 46px; font-size: 14px; font-weight: 500; }
.nav-item.active { font-weight: 700; }
.nav-item.active::before { display: none; }
.topbar { height: 68px; background: #fff; backdrop-filter: none; }
.breadcrumbs { font-size: 13px; }
.search-button { height: 40px; font-size: 12px; }
.customer-preview { height: 40px; }
.page-body { max-width: 1512px; padding: 24px 32px 64px; }
.project-selector { font-size: 13px; margin-bottom: 24px; }
.project-selector select { font-size: 14px; }
.page-header { margin-bottom: 22px; }
.page-heading-meta { font-size: 13px; color: var(--muted); margin-top: 7px; }
.dashboard-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-project { background: #fff; color: var(--text); border: 1px solid var(--line); box-shadow: none; border-radius: 12px; grid-template-columns: minmax(0,1.8fr) minmax(260px,1fr); min-height: 0; }
.hero-main { padding: 24px; }
.hero-title-row { margin-top: 0; align-items: flex-start; gap: 18px; }
.hero-title-row h2 { font-size: 22px; }
.hero-title-row p { color: var(--muted); font-size: 13px; margin-top: 8px; }
.hero-title-row .text-button { color: var(--primary2); margin-top: 0; flex-shrink: 0; }
.hero-progress { margin-top: 24px; }
.progress-label { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.hero-project .progress-label strong { color: var(--primary2); font-size: 18px; }
.hero-project .progress-track { background: #e9efec; height: 6px; }
.hero-project .progress-track span { background: var(--primary); }
.hero-meta { gap: 20px; font-size: 12px; color: var(--muted); }
.hero-meta b { color: var(--text); font-weight: 600; }
.hero-side { background: #eff7f3; padding: 24px; border-left: 1px solid var(--line); }
.hero-side strong { font-size: 16px; margin-top: 8px; }
.side-label, .side-date, .side-note { font-size: 12px; color: #496658; letter-spacing: 0; line-height: 1.7; }
.risk-indicator { margin-top: 16px; color: var(--text); }
.risk-indicator > span { color: var(--muted); font-size: 12px; }
.risk-indicator b { color: var(--text); font-size: 13px; }
.risk-indicator i { display: none; }
.hero-side .side-note { margin-top: 5px; }
.stat-grid { gap: 0; border: 1px solid var(--line); background: #fff; border-radius: 12px; overflow: hidden; margin-bottom: 24px; }
.stat-card { border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 18px 22px; min-height: 130px; }
.stat-card:last-child { border-right: 0; }
.stat-icon { display: none; }
.stat-card span { font-size: 13px; }
.stat-card strong { font-family: inherit; font-variant-numeric: tabular-nums; font-size: 26px; margin-top: 4px; }
.stat-card strong small, .stat-card em { font-size: 12px; line-height: 1.65; }
.quick-strip { display: block; background: #fff; border: 1px solid var(--line); padding: 22px 24px; margin: 0 0 24px; }
.quick-title { width: auto; display: flex; align-items: baseline; gap: 18px; margin: 0 0 12px; }
.quick-title h3 { font-size: 18px; margin: 0; white-space: nowrap; }
.quick-title p { font-size: 12px; margin: 0; }
.quick-items { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 28px; }
.attention-item { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; min-height: 78px; padding: 12px 0; gap: 12px; text-align: left; }
.attention-item:hover { background: var(--surface-2); border-color: var(--line); }
.attention-item b { font-size: 14px; font-weight: 600; }
.attention-item small { font-size: 12px; line-height: 1.6; color: var(--muted); }
.attention-icon { width: 34px; height: 34px; border-radius: 9px; flex: 0 0 34px; }
.dashboard-grid { grid-template-columns: minmax(0,1.35fr) minmax(300px,1fr); gap: 24px; }
.schedule-copy strong, .activity-top strong { font-size: 14px; }
.schedule-copy span, .schedule-date, .activity-copy p, .activity-bottom, .activity-top span { font-size: 12px; line-height: 1.75; }
.schedule-row { min-height: 68px; }
.check { min-width: 36px; min-height: 36px; border-radius: 8px; }
.phase-node span:last-child { font-size: 12px; }
.phase-track { overflow-x: auto; padding: 8px 0 10px; margin: 16px 0; }
.phase-node { min-width: 64px; }
.phase-track::before { top: 18px; }
.delivery-toolbar h2 { font-size: 24px; }
.filter-pills button { min-height: 44px; font-size: 13px; }
.filter-pills button.active { font-weight: 700; }
.inspection-capture-meta { color: var(--primary2); font-size: 12px; }
.inspection-card-head p, .material-details dt, .info-grid dt { font-size: 13px; }
.inspection-card > p { max-width: 70ch; }
.inspection-results li { padding: 13px 0; font-size: 14px; }
.inspection-results b { font-size: 13px; }
.delivery-empty { border-style: solid; padding: 42px 24px; }
.delivery-empty h3 { font-size: 18px; }
.delivery-empty p { font-size: 14px; }
.delivery-empty > span .icon { width: 30px; height: 30px; }
.customer-hero, .customer-hero.no-photo { background: #145743; box-shadow: none; }
.customer-hero h2 { font-size: 28px; }
.customer-hero p { font-size: 14px; color: #d4e9df; }
.customer-nav button { font-size: 14px; }
.customer-update p { font-size: 14px; line-height: 1.9; }
.customer-update .update-by, .customer-pending-row small, .client-payment { font-size: 13px; }
.customer-side { gap: 18px; }
.customer-action-card, .customer-timeline, .customer-help-card { box-shadow: none; }
.customer-group-tabs button { min-height: 44px; font-size: 13px; padding: 8px 14px; }
.worker-welcome h1 { font-size: 26px; }
.worker-actions .btn:first-child { min-height: 64px; }
.worker-header, .worker-bottom, .mobile-nav, .customer-topbar { background: #fff; backdrop-filter: none; }
.mobile-nav button, .worker-bottom button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.modal-dialog { border-radius: 14px; }
.modal-header h2 { font-size: 22px; margin: 0; }
.modal-form label { color: var(--text); font-size: 14px; }
.modal-form .form-hint { font-size: 13px; line-height: 1.8; }
.modal-actions { border-top: 1px solid var(--line); padding-top: 16px; gap: 12px; }
.capture-field { background: #f4f9f6; border: 1px solid #b8d4c5; padding: 18px; }
.capture-field legend { font-size: 15px; }
.capture-field p { font-size: 13px; line-height: 1.8; }
.camera-actions { padding: 4px 0 14px; }
.camera-actions .btn { min-height: 52px; }
.camera-preview { margin-bottom: 14px; }
.camera-controls { padding: 12px; }
.camera-controls .btn { flex: 1; }
.camera-status { margin: 0!important; }
.inspection-check label { min-height: 44px; font-size: 13px!important; }
.upload-preview { width: 112px; }
.upload-preview img, .pdf-preview { width: 112px; height: 90px; }
.upload-preview button { width: 44px; height: 44px; }
.upload-preview small { font-size: 12px; }
.toast { max-width: calc(100vw - 32px); width: max-content; font-size: 14px; }
@media (max-width: 1200px) {
  .topbar .search-button { width: 40px; min-width: 40px; padding: 0; justify-content: center; }
  .breadcrumbs, .customer-preview { white-space: nowrap; }
  .sidebar { width: 208px; }
  .main-content { margin-left: 208px; width: calc(100% - 208px); }
  .page-body { padding: 24px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat-card:nth-child(2) { border-right: 0; }
  .stat-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .hero-project { grid-template-columns: minmax(0,1fr); }
  .hero-side { border-left: 0; border-top: 1px solid var(--line); }
}
@media (min-width: 761px) and (max-width: 1000px) {
  .topbar { padding: 0 20px; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .dashboard-actions { width: 100%; }
}
@media (max-width: 760px) {
  .main-content { width: 100%; margin: 0; }
  .page-body { padding: 20px 16px 112px; }
  .page-header h1, .detail-heading h1, .customer-greeting h1 { font-size: 24px; }
  .page-header { gap: 16px; }
  .dashboard-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .dashboard-actions .btn { padding: 10px 8px; font-size: 13px; }
  .hero-main, .hero-side { padding: 20px; }
  .hero-title-row h2 { font-size: 20px; }
  .hero-title-row { display: block; }
  .hero-title-row .text-button { margin-top: 8px; }
  .hero-meta { gap: 8px 16px; }
  .hero-side { min-height: 0; }
  .stat-card { padding: 16px; min-height: 136px; }
  .stat-card strong { font-size: 24px; }
  .quick-strip { padding: 18px; }
  .quick-title { display: block; }
  .quick-title p { margin-top: 7px; }
  .quick-items { grid-template-columns: minmax(0,1fr); }
  .attention-item { min-height: 80px; }
  .schedule-row { min-height: 76px; }
  .schedule-copy strong { white-space: normal; }
  .check { min-width: 44px; min-height: 44px; }
  .modal-dialog { max-height: calc(100dvh - 20px); padding: 20px 16px; }
  .modal-header h2 { font-size: 20px; }
  .modal-actions .btn { flex: 1; min-height: 48px; }
  .capture-field { padding: 14px; }
  .camera-actions .btn { width: 100%; }
  .customer-grid { display: flex; flex-direction: column; }
  .customer-grid > section, .customer-grid > aside { width: 100%; min-width: 0; }
  .customer-side { display: grid; grid-template-columns: minmax(0,1fr); }
  .customer-nav button { font-size: 13px; }
  .customer-section-heading { gap: 12px; flex-wrap: wrap; }
  .customer-hero h2 { font-size: 26px; }
  .toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; } }
