@charset "UTF-8";

/* Phase 2 is a screen skin; the verified worksheet print layout stays in styles.css. */
@media screen {
  :root {
    --green: #24583e;
    --green-dark: #143b2b;
    --green-light: #edf4e9;
    --ink: #293b30;
    --muted: #738073;
    --line: #e1e7dc;
    --canvas: #f5f6f1;
    --radius: 13px;
    --shadow: 0 3px 13px #2a3e2410;
  }

  .sidebar { padding-top: 30px; background: #153e2d; }
  .brand { margin-bottom: 26px; font-weight: 760; letter-spacing: 2px; }
  .sidebar .brand-caption { letter-spacing: 1.8px; color: #a9c0a9; }
  .sidebar .workspace-label { margin-top: 0; margin-bottom: 17px; color: #a4bba2; }
  .nav-group-label { padding: 21px 14px 6px; color: #91ac93; font-size: 9px; font-weight: 650; letter-spacing: 1.45px; line-height: 1.5; text-transform: uppercase; }
  .nav-group-label:first-child { padding-top: 3px; }
  .nav-item { padding: 10px 13px; margin: 3px 0; color: #c0d0c0; font-size: 12px; border-radius: 6px; }
  .nav-item.active { background: #ffffff14; box-shadow: inset 3px 0 #d4e3aa; font-weight: 650; }
  .nav-item:hover { background: #ffffff0e; }
  .sidebar-bottom { padding-top: 24px; }
  .workspace-note { padding-bottom: 10px; }
  .user-card { padding-top: 16px; }

  .topbar { min-height: 73px; background: #fffffff2; }
  .page-content { max-width: 1640px; padding-top: 29px; }
  h1 { font-weight: 680; font-size: clamp(26px, 2.1vw, 33px); letter-spacing: -.95px; }
  .page-heading { margin-bottom: 22px; }
  .eyebrow, .section-kicker { color: #7b8b6b; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; line-height: 1.6; text-transform: uppercase; }
  .section-kicker { display: block; margin-bottom: 7px; }
  .subtitle { max-width: 840px; color: #7b8478; font-size: 12px; line-height: 1.7; }
  .demo-strip { margin-bottom: 20px; padding: 9px 13px; background: #eef1e6; border-color: #e1e6d6; font-size: 10px; }
  .stat-grid { gap: 16px; margin-bottom: 22px; }
  .stat-card { min-height: 126px; padding: 20px; box-shadow: 0 2px 8px #324a2710; }
  .stat-label { font-size: 11px; color: #75816e; padding-right: 27px; }
  .stat-value { font-size: 32px; margin: 12px 0 8px; color: #2d4932; font-weight: 660; letter-spacing: -.9px; }
  .stat-foot { line-height: 1.6; color: #87927d; }
  .stat-icon { background: #eef3e7; color: #81966d; top: 17px; right: 17px; }
  .panel { border-color: #e0e6da; }
  .panel-heading { min-height: 65px; padding: 17px 21px; }
  .panel-heading h2, .panel-heading h3 { color: #384c34; font-size: 14px; font-weight: 650; }
  .panel-body { padding: 21px; }
  .panel-footer { padding: 12px 21px; font-size: 10px; line-height: 1.6; }
  .btn-primary { background: #2b613f; border-color: #2b613f; box-shadow: 0 2px 3px #1f422716; }
  .btn-secondary { border-color: #d9e1d1; }
  .btn:focus-visible, .nav-item:focus-visible, .planning-card:focus-visible { outline: 3px solid #8aab56; outline-offset: 3px; }
  .badge { padding: 4px 8px; font-size: 10px; }
  .badge-success { background: #eaf2e0; color: #577440; }
  .badge-warning { background: #fcf2df; color: #9c7731; }
  .data-table th { background: #f8faf4; color: #829076; letter-spacing: .6px; font-size: 9px; }
  .data-table td { height: 67px; }
  .data-table tbody tr:hover { background: #f9fbf6; }

  /* The terrain remains the dominant object on the leader's overview. */
  .operations-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(255px, 1fr); gap: 20px; align-items: start; margin-bottom: 22px; }
  .operations-grid > *, .dashboard-aside > *, .planning-grid > * { min-width: 0; }
  .operations-grid > .panel, .operations-grid > .terrain-panel { margin-bottom: 0; }
  .terrain-panel { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
  .terrain-panel .panel-heading { gap: 10px; }
  .terrain-toolbar { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #fff; }
  .terrain-toolbar > div { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
  .terrain-toolbar .btn, .terrain-toolbar button { min-height: 32px; }
  .terrain-toolbar .btn.active, .terrain-toolbar [aria-pressed="true"] { background: var(--green-light); border-color: #cad9bd; color: var(--green-dark); }
  .terrain-toolbar small { color: #829275; font-size: 10px; }
  .terrain-host { position: relative; width: 100%; height: 460px; min-width: 0; overflow: hidden; background: #ecf0e4; isolation: isolate; }
  .terrain-host > canvas { display: block; width: 100%; height: 100%; }
  .terrain-host .empty-state { min-height: 100%; }
  .terrain-panel .panel-footer { align-items: flex-start; background: #fbfcf8; }
  .dashboard-aside { display: grid; gap: 18px; }
  .dashboard-aside > .panel { margin-bottom: 0; }
  .dashboard-aside .panel-heading { min-height: 61px; padding: 17px 19px; }
  .dashboard-aside .panel-body { padding: 19px; }
  .dashboard-aside .progress-bar { max-width: none; height: 7px; margin-top: 13px; }
  .dashboard-aside .progress-fill { background: #8eac60; }
  .dashboard-todo { display: flex; align-items: flex-start; gap: 11px; width: 100%; padding: 15px 0; border: 0; border-bottom: 1px solid #ecf0e5; border-radius: 0; background: transparent; text-align: left; text-decoration: none; }
  .dashboard-todo:first-child { padding-top: 0; }
  .dashboard-todo:last-child { padding-bottom: 0; border-bottom: 0; }
  .dashboard-todo > svg { width: 19px; height: 19px; color: #8c9a76; margin-top: 2px; }
  .dashboard-todo > div { flex: 1; min-width: 0; }
  .dashboard-todo strong { display: block; color: #4d633e; font-size: 12px; font-weight: 600; line-height: 1.5; }
  .dashboard-todo p, .dashboard-todo small { display: block; margin: 4px 0 0; color: #89957d; font-size: 10px; line-height: 1.65; }
  .dashboard-todo .attention-number { min-width: 34px; height: 34px; font-size: 16px; }
  button.dashboard-todo:hover strong, a.dashboard-todo:hover strong { color: var(--green); text-decoration: underline; }
  .active-work-table .machine-icon { width: 40px; height: 40px; background: #eff3e8; color: #7f906c; }
  .active-work-table .row-primary { font-size: 12px; }
  .active-work-table .row-secondary { font-size: 10px; }
  .active-work-table td { padding-top: 14px; padding-bottom: 14px; }
  .active-work-table td:last-child { color: #809074; font-size: 11px; }

  /* Shared field inspector and the office's work assignments. */
  .field-detail { padding: 20px 21px; background: #fff; border-top: 1px solid var(--line); }
  .field-detail h2, .field-detail h3 { margin-bottom: 6px; font-size: 17px; color: #354f31; }
  .field-detail p { color: #7f8e73; font-size: 12px; line-height: 1.7; }
  .field-detail .detail-grid { gap: 16px; margin-top: 17px; margin-bottom: 0; }
  .field-detail .detail-item strong { color: #4c663f; }
  .field-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 14px; margin-top: 18px; }
  .field-catalog > button, .field-catalog > article, .field-catalog > .panel { padding: 19px; margin: 0; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 11px; }
  .field-catalog > button:hover, .field-catalog > button[aria-pressed="true"] { background: #f5f8ef; border-color: #aabd93; }
  .field-catalog strong { display: block; color: #456039; font-size: 13px; }
  .field-catalog small { display: block; color: #849575; font-size: 11px; margin-top: 5px; }
  .planning-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(310px, 100%), 1fr)); align-items: start; gap: 16px; }
  .planning-card { display: block; position: relative; min-width: 0; padding: 21px; border: 1px solid var(--line); border-top: 3px solid #9eaf80; border-radius: 12px; background: #fff; box-shadow: var(--shadow); text-align: left; }
  .planning-card h3 { color: #375c34; font-size: 16px; line-height: 1.45; margin: 8px 0; }
  .planning-card p { color: #7a8b6c; font-size: 12px; line-height: 1.7; margin-bottom: 12px; }
  .planning-card .badge { margin-bottom: 8px; }
  .planning-card .work-meta { gap: 10px; }
  .planning-card .btn { margin-top: 14px; }
  .planning-card .summary-list { margin-top: 12px; }
  .planning-card .summary-row { padding: 9px 0; font-size: 11px; }
  .planning-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
  .planning-toolbar h2 { color: #3a5432; font-size: 19px; margin-bottom: 6px; }
  .planning-toolbar p { margin: 0; font-size: 12px; line-height: 1.7; }
  .planning-toolbar .actions { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
  .planning-toolbar .field { margin: 0; font-size: 11px; }
  .planning-toolbar .field input { min-height: 39px; padding: 8px 10px; }
  .planning-summary { display: flex; flex-wrap: wrap; gap: 12px 30px; padding: 17px 20px; margin-bottom: 15px; background: #eaf0e1; border: 1px solid #dce5d1; border-radius: 11px; }
  .planning-summary > span { color: #768768; font-size: 11px; }
  .planning-summary strong { margin-right: 5px; color: #3e6335; font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
  .planning-view > .helper { margin-bottom: 21px; }
  .planning-empty { min-height: 290px; background: #fff; border: 1px dashed #cad8bc; border-radius: 13px; }
  .planning-empty > svg { color: #98ac7f; width: 36px; height: 36px; }
  .planning-grid > .planning-card.assignment-card { margin-bottom: 0; height: 100%; }
  .assignment-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
  .assignment-head .badge { margin-bottom: 0; }
  .assignment-head > .muted { font-size: 10px; line-height: 1.5; font-variant-numeric: tabular-nums; }
  .planning-card .assignment-field { display: flex; align-items: flex-start; gap: 7px; margin-bottom: 17px; color: #708b58; font-size: 12px; }
  .assignment-field svg { margin-top: 2px; }
  .assignment-details { display: grid; gap: 9px; padding: 14px 0; border-top: 1px solid #e8edde; border-bottom: 1px solid #e8edde; }
  .assignment-details > span { display: flex; align-items: flex-start; gap: 9px; color: #627b50; font-size: 11px; line-height: 1.6; }
  .assignment-details svg { color: #98a883; margin-top: 1px; }
  .assignment-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 17px; }
  .assignment-metrics > div { min-width: 0; }
  .assignment-metrics span { display: block; color: #8d9a7e; font-size: 9px; line-height: 1.6; }
  .assignment-metrics strong { display: block; margin-top: 5px; color: #4b683d; font-size: 13px; font-weight: 600; }
  .assignment-card .assignment-note { padding: 10px 12px; margin-top: 17px; background: #f6f8f1; border-radius: 7px; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
  .assignment-card > .helper { margin-top: 15px; font-size: 10px; }
  .assignment-card .assignment-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
  .assignment-card .assignment-actions .btn { width: auto; margin-top: 0; min-height: 37px; font-size: 11px; }
  .assignment-implements { display: grid; gap: 1px; max-height: 235px; padding: 10px 12px; margin: 8px 0 20px; border: 1px solid #dce5d2; border-radius: 9px; overflow-y: auto; }
  .assignment-implements legend { padding: 0 6px; color: #6c815a; font-size: 12px; font-weight: 550; }
  .assignment-implements .check-label { display: flex; align-items: center; gap: 9px; min-height: 35px; padding: 5px 4px; border-radius: 5px; font-size: 11px; color: #718464; }
  .assignment-implements .check-label:hover { background: #f4f7ef; }
  .assignment-implements input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--green); }
  .driver-assignments { margin: 20px 0; }
  .driver-assignments .section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
  .driver-assignments .section-heading h2 { margin: 0; font-size: 17px; color: #476439; }
  .driver-assignments .section-heading > .muted { font-size: 10px; }
  .driver-assignments > .empty-state { min-height: 130px; padding: 24px 20px; background: #fff; border: 1px dashed #d9e3cc; border-radius: 11px; }
  .driver-assignments .assignment-actions .btn { width: 100%; min-height: 52px; font-size: 13px; }

  /* Phone work is deliberately simple: status, running time, location, actions. */
  .driver-shell { background: #f5f6f0; box-shadow: 0 0 75px #253c2110; }
  .driver-header { min-height: 83px; padding: 20px 24px; background: #285737; border-color: #285737; color: #fff; }
  .driver-header .brand { color: #fff; font-size: 19px; }
  .driver-header .brand small, .driver-header .brand-caption { color: #c0d3af; }
  .driver-header .brand-mark { background: #d8e5b3; color: #315438; }
  .driver-header .btn, .driver-header .btn-icon { color: #e0ebd8; }
  .driver-header .avatar { color: #eff4e8; background: #416b46; }
  .driver-main { padding-top: 23px; }
  .driver-main h1 { color: #2e4f2e; font-size: 27px; font-weight: 700; letter-spacing: -.8px; }
  .driver-main .page-heading { margin-bottom: 18px; }
  .driver-main .panel { border-color: #dfe6d6; box-shadow: 0 2px 8px #233b2110; }
  .driver-main .btn-primary { min-height: 53px; font-size: 14px; font-weight: 650; }
  .driver-main .btn-secondary { min-height: 48px; color: #587345; }
  .driver-main .sync-state { color: #748961; font-size: 11px; }
  .driver-main .sync-state.offline, .driver-main .sync-state.pending, .driver-main .sync-state.has-pending { color: #987231; }
  .driver-main .alert-warning { border-color: #e8d6a9; background: #fff6df; color: #92712e; }
  .driver-demo { color: #7f896f; line-height: 1.6; margin-bottom: 17px; }
  .shift-card { padding: 15px 18px; background: #fdfefb; margin-bottom: 16px; }
  .shift-time { font-size: 25px; }
  .current-work, .driver-work-hero { padding: 22px; border: 1px solid #dce4d0; border-top: 3px solid #4e7948; border-radius: 13px; background: #fff; box-shadow: 0 3px 12px #203d2110; margin-bottom: 18px; }
  .driver-work-hero .section-kicker { margin-bottom: 9px; }
  .driver-work-hero h2 { font-size: 25px; line-height: 1.25; color: #2d552d; margin-bottom: 7px; font-weight: 700; letter-spacing: -.6px; }
  .driver-work-hero h3 { font-size: 18px; color: #3d6233; }
  .driver-work-hero > p { font-size: 13px; line-height: 1.7; color: #7a8e68; }
  .driver-work-hero .work-machine { border-bottom-color: #e6ecdd; margin-bottom: 17px; padding-bottom: 17px; }
  .driver-work-hero .work-machine h2 { font-size: 21px; }
  .driver-work-hero .work-meta { gap: 12px; }
  .driver-work-hero .work-meta strong { color: #547245; }
  .driver-work-hero .badge-success { padding: 5px 9px; }
  .work-timer { margin: 23px 0 19px; color: #345d31; font-size: clamp(44px, 11vw, 60px); line-height: 1.1; font-weight: 650; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
  .work-timer small { display: block; margin-top: 9px; color: #899975; font-size: 11px; line-height: 1.6; font-weight: 450; letter-spacing: 0; }
  .work-timer > span { font-variant-numeric: tabular-nums; }
  .driver-map { position: relative; min-width: 0; height: 180px; overflow: hidden; border: 1px solid #dfe6d5; border-radius: 10px; background: #eaf0de; margin: 17px 0; }
  .driver-map .terrain-host { height: 100%; }
  .driver-map > canvas, .driver-map > svg { display: block; width: 100%; height: 100%; }
  .driver-map .empty-state { min-height: 100%; padding: 20px; }
  .driver-map .empty-state p { margin: 7px 0 0; font-size: 11px; }
  .driver-map .empty-state h3 { margin: 8px 0 0; font-size: 13px; }
  .driver-map .empty-icon { width: 30px; height: 30px; }
  .work-actions { margin-top: 18px; gap: 10px; }
  .work-actions .btn { white-space: normal; }
  .work-actions .btn-primary { margin-top: 3px; }
  .driver-work-hero .engine-line { margin-top: 16px; margin-bottom: 0; font-size: 10px; }
  .assignment-card { display: block; padding: 21px; margin-bottom: 17px; border: 1px solid #dbe4ce; border-radius: 12px; background: #fff; box-shadow: 0 3px 10px #2945210c; }
  .assignment-card .section-kicker { color: #6d8558; }
  .assignment-card h2, .assignment-card h3 { margin: 8px 0; color: #375d30; font-size: 20px; line-height: 1.35; }
  .assignment-card p { margin: 6px 0 12px; font-size: 12px; line-height: 1.7; color: #7f916e; }
  .assignment-card .work-machine { margin: 17px 0; }
  .assignment-card .work-machine h2 { font-size: 18px; }
  .assignment-card .btn { width: 100%; margin-top: 13px; }
  .driver-bottom { box-shadow: 0 -3px 20px #3e552a08; background: #fffffff8; border-top-color: #dce5d1; }
  .driver-bottom .active { color: #3e7135; }
  .driver-bottom .active svg { stroke-width: 2.1; }
  .driver-timeline .timeline-item::before { background: #a2b57e; }
  .driver-main .history-card { border-color: #dfe7d4; }
}

@media screen and (min-width: 1550px) {
  .page-content { padding-top: 33px; }
  .stat-card { min-height: 137px; padding: 22px; }
  .stat-value { font-size: 35px; }
  .terrain-host { height: 490px; }
}

@media screen and (max-width: 1180px) {
  .page-content { padding: 25px; }
  .operations-grid { gap: 16px; grid-template-columns: minmax(0, 1.8fr) minmax(240px, 1fr); }
  .stat-card { padding: 18px 15px; min-height: 123px; }
  .stat-label { padding-right: 24px; font-size: 10px; }
  .stat-value { font-size: 29px; }
  .stat-icon { right: 13px; width: 26px; height: 26px; }
  .panel-heading, .panel-body { padding: 18px; }
  .terrain-toolbar { padding: 10px 14px; }
}

@media screen and (max-width: 1120px) {
  .operations-grid { grid-template-columns: 1fr; }
  .dashboard-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .dashboard-aside > :only-child { grid-column: 1 / -1; }
  .terrain-host { height: 430px; }
}

@media screen and (max-width: 900px) {
  .topbar { min-height: 69px; }
  .page-content { padding: 26px 22px; }
  .sidebar { width: 238px; }
  .nav-item { min-height: 44px; }
  .nav-group-label { padding-top: 18px; }
  .stat-grid { gap: 12px; }
  .stat-value { font-size: 28px; }
}

@media screen and (max-width: 600px) {
  .topbar { min-height: 67px; }
  .page-content { padding: 23px 16px 35px; }
  h1 { font-size: 27px; }
  .page-heading { margin-bottom: 18px; }
  .heading-actions { gap: 8px; }
  .stat-grid { gap: 10px; margin-bottom: 17px; }
  .stat-card { padding: 17px 14px; min-height: 125px; }
  .stat-value { font-size: 29px; margin-top: 14px; }
  .stat-icon { top: 12px; right: 10px; width: 24px; height: 24px; }
  .stat-label { font-size: 10px; padding-right: 22px; }
  .operations-grid { gap: 16px; margin-bottom: 18px; }
  .dashboard-aside { grid-template-columns: 1fr; gap: 15px; }
  .terrain-host { height: 300px; }
  .terrain-toolbar { padding: 10px 12px; }
  .terrain-toolbar .btn, .terrain-toolbar button { min-height: 44px; }
  .terrain-panel .panel-heading { padding: 16px; }
  .terrain-panel .panel-footer { flex-wrap: wrap; padding: 11px 16px; }
  .panel-heading, .panel-body { padding: 17px; }
  .panel-heading { min-height: 65px; }
  .field-detail { padding: 18px; }
  .field-detail .detail-grid { gap: 15px; }
  .planning-grid { grid-template-columns: 1fr; }
  .planning-card { padding: 19px; }
  .planning-toolbar { flex-direction: column; gap: 16px; }
  .planning-toolbar .actions { width: 100%; justify-content: space-between; gap: 10px; }
  .planning-toolbar .field { flex: 1; min-width: 130px; }
  .planning-toolbar .field input { min-height: 48px; font-size: 16px; }
  .planning-toolbar .actions > .btn { flex: 1; }
  .planning-summary { gap: 9px 19px; padding: 15px 17px; }
  .planning-summary strong { font-size: 20px; }
  .assignment-implements { max-height: 260px; }
  .assignment-implements .check-label { min-height: 44px; }
  .assignment-card .assignment-actions .btn { min-height: 46px; }
  .field-catalog { gap: 11px; }
  .driver-header { min-height: 79px; padding: 18px 20px; }
  .driver-main { padding: 22px 17px 113px; }
  .driver-main h1 { font-size: 26px; }
  .current-work, .driver-work-hero { padding: 20px; }
  .driver-work-hero h2 { font-size: 24px; }
  .driver-work-hero .work-machine h2 { font-size: 20px; }
  .driver-map { height: 174px; margin-top: 18px; }
  .assignment-card { padding: 20px; }
  .work-timer { font-size: 52px; }
}

@media screen and (max-width: 360px) {
  .driver-main { padding-left: 13px; padding-right: 13px; }
  .driver-header { padding-left: 16px; padding-right: 16px; }
  .current-work, .driver-work-hero, .assignment-card { padding: 17px; }
  .work-timer { font-size: 46px; }
  .work-actions { gap: 8px; }
  .driver-main .work-actions .btn { font-size: 12px; padding-left: 9px; padding-right: 9px; }
}
