﻿:root {
      --bg: #f3f5f1;
      --panel: #ffffff;
      --panel-soft: #eef2ec;
      --ink: #202425;
      --muted: #65706b;
      --line: #d9dfd7;
      --field: #f8faf7;
      --green: #217a58;
      --yellow: #f2c94c;
      --red: #bd3f31;
      --cobalt: #255c99;
      --teal: #168e88;
      --shadow: 0 18px 42px rgba(32, 36, 37, .11);
      --radius: 8px;
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      min-height: 100vh;
      font-family: Inter, "Segoe UI", Arial, sans-serif;
      color: var(--ink);
      background:
        linear-gradient(135deg, rgba(37, 92, 153, .08), transparent 36%),
        linear-gradient(315deg, rgba(33, 122, 88, .08), transparent 36%),
        var(--bg);
      letter-spacing: 0;
    }

    button,
    input,
    select,
    textarea {
      font: inherit;
    }

    button {
      border: 0;
      cursor: pointer;
    }

    .app {
      display: grid;
      grid-template-columns: 252px 1fr;
      min-height: 100vh;
    }

    .sidebar {
      position: sticky;
      top: 0;
      height: 100vh;
      padding: 22px 16px;
      background: #222725;
      color: #f7faf6;
      display: flex;
      flex-direction: column;
      gap: 22px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .brand-mark {
      width: 42px;
      height: 42px;
      border-radius: 8px;
      display: grid;
      place-items: center;
      background: linear-gradient(135deg, var(--yellow), #fff4b8 48%, var(--green) 49%);
      color: #16201c;
      font-weight: 900;
      box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6);
    }

    .brand strong {
      display: block;
      font-size: 15px;
      line-height: 1.1;
    }

    .brand span {
      display: block;
      margin-top: 2px;
      color: #bcc9c3;
      font-size: 12px;
    }

    .nav {
      display: grid;
      gap: 6px;
    }

    .nav a {
      color: #dce6e0;
      text-decoration: none;
      padding: 10px 11px;
      border-radius: 8px;
      display: flex;
      gap: 10px;
      align-items: center;
      font-size: 14px;
    }

    .nav a:hover,
    .nav a.active {
      background: rgba(255, 255, 255, .1);
      color: #ffffff;
    }

    .nav-icon {
      width: 22px;
      height: 22px;
      border-radius: 6px;
      display: grid;
      place-items: center;
      background: rgba(255, 255, 255, .1);
      color: var(--yellow);
      font-size: 11px;
      font-weight: 800;
      flex: 0 0 auto;
    }

    .duty-card {
      margin-top: auto;
      padding: 14px;
      border: 1px solid rgba(255, 255, 255, .12);
      border-radius: 8px;
      background: rgba(255, 255, 255, .06);
    }

    .duty-card span {
      color: #bcc9c3;
      font-size: 12px;
    }

    .duty-card strong {
      display: block;
      margin-top: 6px;
      font-size: 20px;
    }

    .main {
      min-width: 0;
    }

    .topbar {
      position: sticky;
      top: 0;
      z-index: 10;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      min-height: 76px;
      padding: 14px 28px;
      border-bottom: 1px solid var(--line);
      background: rgba(243, 245, 241, .9);
      backdrop-filter: blur(12px);
    }

    .topbar h1 {
      margin: 0;
      font-size: clamp(20px, 2vw, 28px);
      line-height: 1.1;
      letter-spacing: 0;
    }

    .topbar p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 13px;
    }

    .topbar-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .status-pill,
    .user-pill {
      height: 38px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 0 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      color: var(--ink);
      font-size: 13px;
      white-space: nowrap;
    }

    .dot {
      width: 9px;
      height: 9px;
      border-radius: 999px;
      background: var(--green);
      box-shadow: 0 0 0 4px rgba(33, 122, 88, .12);
      flex: 0 0 auto;
    }

    .user-avatar {
      width: 24px;
      height: 24px;
      border-radius: 6px;
      display: grid;
      place-items: center;
      background: #5865f2;
      color: #ffffff;
      font-weight: 800;
      font-size: 12px;
    }

    .user-avatar-img {
      width: 24px;
      height: 24px;
      border-radius: 6px;
      object-fit: cover;
      flex: 0 0 auto;
    }

    .content {
      padding: 24px 28px 44px;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 24px;
    }

    .section {
      min-width: 0;
      scroll-margin-top: 96px;
    }

    .page-hidden {
      display: none !important;
    }

    .section-title {
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 12px;
    }

    .section-title h2 {
      margin: 0;
      font-size: 18px;
      letter-spacing: 0;
    }

    .section-title p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 13px;
    }

    .grid {
      display: grid;
      min-width: 0;
      gap: 14px;
    }

    .grid.metrics {
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .metric {
      min-height: 112px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      box-shadow: 0 8px 20px rgba(32, 36, 37, .05);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .metric span {
      color: var(--muted);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: .04em;
    }

    .metric strong {
      font-size: 32px;
      line-height: 1;
    }

    .metric small {
      color: var(--muted);
      line-height: 1.35;
    }

    .ops-layout {
      display: grid;
      grid-template-columns: minmax(280px, 1.1fr) minmax(320px, .9fr);
      gap: 14px;
      align-items: stretch;
      min-width: 0;
    }

    .panel {
      min-width: 0;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      box-shadow: 0 8px 20px rgba(32, 36, 37, .05);
    }

    .panel-header {
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .panel-header h3 {
      margin: 0;
      font-size: 15px;
    }

    .panel-body {
      padding: 16px;
    }

    .map {
      position: relative;
      min-height: 390px;
      overflow: hidden;
      border-radius: 8px;
      background:
        linear-gradient(90deg, rgba(255, 255, 255, .45) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, .45) 1px, transparent 1px),
        linear-gradient(135deg, #dce9dd, #edf3e9);
      background-size: 46px 46px, 46px 46px, 100% 100%;
      touch-action: none;
      user-select: none;
    }

    .map-toolbar {
      position: absolute;
      z-index: 6;
      top: 12px;
      right: 12px;
      display: flex;
      gap: 6px;
      padding: 6px;
      border-radius: 8px;
      background: rgba(255, 255, 255, .88);
      border: 1px solid rgba(32, 36, 37, .12);
      box-shadow: 0 10px 22px rgba(32, 36, 37, .13);
    }

    .map-point-tools {
      position: absolute;
      z-index: 6;
      left: 12px;
      top: 12px;
      display: grid;
      grid-template-columns: minmax(180px, 1fr) auto auto;
      gap: 6px;
      width: min(520px, calc(100% - 96px));
      padding: 6px;
      border-radius: 8px;
      background: rgba(255, 255, 255, .9);
      border: 1px solid rgba(32, 36, 37, .12);
      box-shadow: 0 10px 22px rgba(32, 36, 37, .13);
    }

    .map-point-tools .field {
      min-height: 34px;
      padding: 0 10px;
    }

    .map-stage {
      position: absolute;
      inset: 0;
      overflow: hidden;
      cursor: grab;
    }

    .map-stage.dragging {
      cursor: grabbing;
    }

    .map-layer {
      position: absolute;
      inset: 0;
      transform-origin: 50% 50%;
      transition: transform .08s ease-out;
    }

    .map-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    pointer-events: none;
      filter: saturate(.94) contrast(1.03);
    }

    .map-point-layer {
      position: absolute;
      inset: 0;
      pointer-events: none;
    }

    .map-point {
      position: absolute;
      min-width: 34px;
      height: 34px;
      display: inline-grid;
      place-items: center;
      border: 3px solid #fff;
      border-radius: 999px;
      background: var(--cobalt);
      color: #fff;
      font-size: 11px;
      font-weight: 900;
      box-shadow: 0 12px 22px rgba(0, 0, 0, .3);
      transform: translate(-50%, -50%);
      pointer-events: auto;
      cursor: pointer;
    }

    .map-point::after {
      content: "";
      position: absolute;
      left: 50%;
      bottom: -10px;
      width: 12px;
      height: 12px;
      background: inherit;
      border-right: 3px solid #fff;
      border-bottom: 3px solid #fff;
      transform: translateX(-50%) rotate(45deg);
      z-index: -1;
    }

    .map-point.red {
      background: var(--red);
    }

    .map-point.yellow {
      background: var(--yellow);
      color: #2d2410;
    }

    .map-point.green {
      background: var(--green);
    }

    .map-point.gray {
      background: #77827c;
    }

    .pcs-duty-panel {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      border-bottom: 1px solid var(--line);
    }

    .pcs-duty-panel strong,
    .pcs-duty-panel span {
      display: block;
    }

    .pcs-duty-panel span {
      margin-top: 3px;
      color: var(--muted);
      font-size: 13px;
    }

    .pcs-duty-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      justify-content: flex-end;
    }

    .map-fallback {
      position: absolute;
      inset: 0;
      display: none;
      place-items: center;
      padding: 32px;
      text-align: center;
      color: var(--muted);
      background:
        linear-gradient(90deg, rgba(255, 255, 255, .45) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, .45) 1px, transparent 1px),
        linear-gradient(135deg, #dce9dd, #edf3e9);
      background-size: 46px 46px, 46px 46px, 100% 100%;
      font-weight: 800;
    }

    .map.map-missing .map-image {
      display: none;
    }

    .map.map-missing .map-fallback {
      display: grid;
    }

    .road {
      position: absolute;
      height: 16px;
      border-radius: 999px;
      background: #39413d;
      box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12);
    }

    .road::after {
      content: "";
      position: absolute;
      left: 12px;
      right: 12px;
      top: 7px;
      height: 2px;
      background: repeating-linear-gradient(90deg, var(--yellow) 0 16px, transparent 16px 28px);
      opacity: .9;
    }

    .road-a1 {
      width: 68%;
      left: -7%;
      top: 34%;
      transform: rotate(18deg);
    }

    .road-a3 {
      width: 72%;
      right: -14%;
      top: 58%;
      transform: rotate(-15deg);
    }

    .road-n104 {
      width: 86%;
      left: 8%;
      top: 76%;
      transform: rotate(4deg);
    }

    .road-periph {
      width: 48%;
      left: 23%;
      top: 43%;
      height: 120px;
      border: 14px solid #39413d;
      background: transparent;
      border-radius: 50%;
      transform: rotate(-9deg);
    }

    .road-periph::after {
      display: none;
    }

    .map-label {
      position: absolute;
      padding: 5px 8px;
      border-radius: 6px;
      background: rgba(255, 255, 255, .86);
      border: 1px solid rgba(32, 36, 37, .12);
      color: #26302b;
      font-size: 11px;
      font-weight: 800;
    }

    .marker {
      position: absolute;
      width: 26px;
      height: 26px;
      border-radius: 999px 999px 999px 2px;
      border: 3px solid #ffffff;
      transform: rotate(-45deg);
      box-shadow: 0 10px 18px rgba(0, 0, 0, .24);
    }

    .marker::after {
      content: "";
      position: absolute;
      width: 8px;
      height: 8px;
      border-radius: 999px;
      background: #ffffff;
      left: 6px;
      top: 6px;
    }

    .marker.green {
      background: var(--green);
    }

    .marker.yellow {
      background: var(--yellow);
    }

    .marker.red {
      background: var(--red);
    }

    .marker.cobalt {
      background: var(--cobalt);
    }

    .map-legend {
      position: absolute;
      left: 14px;
      bottom: 14px;
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      max-width: calc(100% - 28px);
    }

    .legend-item {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 7px 9px;
      border-radius: 8px;
      background: rgba(255, 255, 255, .9);
      border: 1px solid rgba(32, 36, 37, .12);
      font-size: 12px;
      font-weight: 700;
    }

    .legend-dot {
      width: 9px;
      height: 9px;
      border-radius: 999px;
    }

    .stack {
      display: grid;
      gap: 10px;
    }

    .callout {
      padding: 13px;
      border: 1px solid var(--line);
      border-left: 5px solid var(--green);
      border-radius: 8px;
      background: var(--field);
      display: grid;
      gap: 6px;
    }

    .callout.warn {
      border-left-color: var(--yellow);
    }

    .callout.danger {
      border-left-color: var(--red);
    }

    .callout strong {
      font-size: 14px;
    }

    .callout span,
    .callout small {
      color: var(--muted);
      line-height: 1.35;
    }

    .toolbar {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
    }

    .btn {
      min-height: 38px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 0 12px;
      border-radius: 8px;
      background: #28312d;
      color: #ffffff;
      font-weight: 800;
      font-size: 13px;
    }

    .btn.secondary {
      border: 1px solid var(--line);
      background: var(--panel);
      color: var(--ink);
    }

    .btn.warning {
      background: #7a5a05;
    }

    .btn.danger {
      background: var(--red);
    }

    .btn:disabled,
    .icon-btn:disabled {
      cursor: not-allowed;
      opacity: .48;
    }

    .btn:focus,
    .field:focus {
      outline: 3px solid rgba(37, 92, 153, .22);
      outline-offset: 2px;
    }

    .filters,
    .form-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
      gap: 10px;
      align-items: end;
    }

    label {
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: .04em;
    }

    .field {
      width: 100%;
      min-height: 40px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--field);
      color: var(--ink);
      padding: 9px 10px;
      text-transform: none;
      letter-spacing: 0;
    }

    textarea.field {
      min-height: 84px;
      resize: vertical;
      line-height: 1.4;
    }

    .form-grid .wide {
      grid-column: span 2;
    }

    .form-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
    }

    .permission-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
      gap: 8px;
    }

    .check-card {
      min-height: 46px;
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 9px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--field);
      color: var(--ink);
      text-transform: none;
      letter-spacing: 0;
      line-height: 1.25;
    }

    .check-card input {
      width: 16px;
      height: 16px;
      flex: 0 0 auto;
    }

    .role-rule-card {
      display: grid;
      gap: 8px;
    }

    .table-wrap {
      min-width: 0;
      overflow-x: auto;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
    }

    table {
      width: 100%;
      min-width: 760px;
      border-collapse: collapse;
    }

    th,
    td {
      padding: 12px 13px;
      border-bottom: 1px solid var(--line);
      text-align: left;
      vertical-align: top;
      font-size: 13px;
    }

    th {
      color: var(--muted);
      background: #f7f9f6;
      text-transform: uppercase;
      letter-spacing: .04em;
      font-size: 11px;
    }

    tr:last-child td {
      border-bottom: 0;
    }

    .tag {
      display: inline-flex;
      align-items: center;
      min-height: 24px;
      padding: 4px 8px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }

    .tag.green {
      color: #145039;
      background: rgba(33, 122, 88, .14);
    }

    .tag.yellow {
      color: #6d5205;
      background: rgba(242, 201, 76, .22);
    }

    .tag.red {
      color: #7a241b;
      background: rgba(189, 63, 49, .13);
    }

    .tag.cobalt {
      color: #183d66;
      background: rgba(37, 92, 153, .13);
    }

    .tag.gray {
      color: #4c5551;
      background: #e7ece7;
    }

    .row-actions {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }

    .status-line {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 5px;
    }

    .assignment-row {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      align-items: center;
      margin-top: 8px;
    }

    .assignment-row .field {
      width: min(220px, 100%);
      min-height: 34px;
      padding: 0 10px;
    }

    .icon-btn {
      min-width: 34px;
      height: 34px;
      border-radius: 8px;
      display: inline-grid;
      place-items: center;
      border: 1px solid var(--line);
      background: var(--panel);
      color: var(--ink);
      font-weight: 900;
      padding: 0 9px;
    }

    .icon-btn.danger {
      border-color: rgba(189, 63, 49, .25);
      color: var(--red);
      background: rgba(189, 63, 49, .08);
    }

    .cards {
      display: grid;
      grid-template-columns: repeat(3, minmax(220px, 1fr));
      min-width: 0;
      gap: 14px;
    }

    .team-card,
    .work-card,
    .convoy-card {
      min-height: 184px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      box-shadow: 0 8px 20px rgba(32, 36, 37, .05);
      padding: 15px;
      display: grid;
      gap: 12px;
    }

    .card-head {
      display: flex;
      align-items: start;
      justify-content: space-between;
      gap: 10px;
    }

    .card-head h3 {
      margin: 0;
      font-size: 16px;
    }

    .meta-list {
      display: grid;
      gap: 7px;
      color: var(--muted);
      font-size: 13px;
    }

    .highlight-list {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .highlight-item {
      min-height: 42px;
      padding: 9px 10px;
      border: 1px solid rgba(242, 201, 76, .58);
      border-radius: 8px;
      background: rgba(242, 201, 76, .22);
      color: var(--ink);
      display: grid;
      gap: 3px;
    }

    .highlight-item span {
      color: #6d5b13;
      font-size: 11px;
      font-weight: 800;
      text-transform: uppercase;
    }

    .highlight-item strong {
      font-size: 14px;
      line-height: 1.2;
    }

    .person-row {
      min-height: 58px;
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 10px;
      align-items: center;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--field);
    }

    .person-avatar,
    .person-avatar-img {
      width: 38px;
      height: 38px;
      border-radius: 8px;
      display: grid;
      place-items: center;
      background: #dfe8dd;
      color: var(--green);
      font-size: 12px;
      font-weight: 900;
      object-fit: cover;
      overflow: hidden;
    }

    .person-row strong,
    .person-row span {
      display: block;
    }

    .person-row span {
      color: var(--muted);
      font-size: 12px;
      margin-top: 2px;
    }

    .role-rule-card.person-row {
      grid-template-columns: minmax(0, 1fr) auto;
    }

    .capacity {
      height: 8px;
      border-radius: 999px;
      background: #e5eae4;
      overflow: hidden;
    }

    .capacity span {
      display: block;
      height: 100%;
      width: var(--value);
      border-radius: inherit;
      background: linear-gradient(90deg, var(--green), var(--yellow));
    }

    .split {
      display: grid;
      grid-template-columns: minmax(300px, .95fr) minmax(320px, 1.05fr);
      gap: 14px;
      align-items: start;
      min-width: 0;
    }

    .timeline {
      position: relative;
      display: grid;
      gap: 12px;
    }

    .timeline::before {
      content: "";
      position: absolute;
      left: 10px;
      top: 4px;
      bottom: 4px;
      width: 2px;
      background: var(--line);
    }

    .log {
      position: relative;
      padding-left: 34px;
      display: grid;
      gap: 3px;
    }

    .log::before {
      content: "";
      position: absolute;
      left: 3px;
      top: 3px;
      width: 16px;
      height: 16px;
      border-radius: 999px;
      border: 3px solid var(--panel);
      background: var(--cobalt);
      box-shadow: 0 0 0 1px var(--line);
    }

    .log strong {
      font-size: 13px;
    }

    .log span {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.35;
    }

    .login-screen {
      position: fixed;
      inset: 0;
      z-index: 50;
      display: grid;
      place-items: center;
      padding: 20px;
      background:
        linear-gradient(135deg, rgba(34, 39, 37, .92), rgba(34, 39, 37, .78)),
        radial-gradient(circle at 18% 22%, rgba(242, 201, 76, .22), transparent 25%),
        radial-gradient(circle at 82% 78%, rgba(33, 122, 88, .22), transparent 25%);
    }

    .login-card {
      width: min(480px, 100%);
      padding: 26px;
      border-radius: 8px;
      background: var(--panel);
      color: var(--ink);
      box-shadow: var(--shadow);
      display: grid;
      gap: 18px;
    }

    .login-card h2 {
      margin: 0;
      font-size: 26px;
      letter-spacing: 0;
    }

    .login-card p {
      margin: 0;
      color: var(--muted);
      line-height: 1.5;
    }

    .discord-btn {
      min-height: 46px;
      border-radius: 8px;
      background: #5865f2;
      color: #ffffff;
      font-weight: 900;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
    }

    .role-select {
      display: grid;
      gap: 8px;
      padding: 13px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--field);
    }

    .auth-notice {
      padding: 12px;
      border: 1px solid rgba(189, 63, 49, .2);
      border-left: 5px solid var(--red);
      border-radius: 8px;
      background: rgba(189, 63, 49, .08);
      color: #7a241b;
      line-height: 1.4;
      font-size: 13px;
    }

    .auth-notice.info {
      border-color: rgba(37, 92, 153, .2);
      border-left-color: var(--cobalt);
      background: rgba(37, 92, 153, .08);
      color: #183d66;
    }

    .hidden {
      display: none !important;
    }

    .mobile-menu {
      display: none;
    }

    @media (max-width: 1160px) {
      .grid.metrics,
      .cards {
        grid-template-columns: repeat(2, minmax(190px, 1fr));
      }

      .ops-layout,
      .split {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 820px) {
      .app {
        grid-template-columns: 1fr;
      }

      .sidebar {
        position: static;
        height: auto;
        padding: 14px;
      }

      .nav {
        grid-template-columns: repeat(3, 1fr);
      }

      .duty-card {
        display: none;
      }

      .topbar {
        position: static;
        align-items: start;
        flex-direction: column;
        padding: 18px;
      }

      .topbar-actions {
        justify-content: start;
      }

      .content {
        padding: 18px;
      }

      .filters,
      .form-grid,
      .grid.metrics,
      .cards,
      .highlight-list {
        grid-template-columns: 1fr;
      }

      .form-grid .wide {
        grid-column: auto;
      }

      .map {
        min-height: 320px;
      }

      .map-point-tools {
        top: 58px;
        width: calc(100% - 24px);
        grid-template-columns: 1fr;
      }

      .pcs-duty-panel {
        grid-template-columns: 1fr;
      }

      .pcs-duty-actions {
        justify-content: start;
      }

      .person-row {
        grid-template-columns: auto 1fr;
      }

      .person-row > .row-actions,
      .person-row > .btn {
        grid-column: 1 / -1;
      }
    }

    @media (max-width: 540px) {
      .nav {
        grid-template-columns: 1fr 1fr;
      }

      .nav a {
        padding: 9px;
        font-size: 13px;
      }

      .brand {
        align-items: start;
      }

      .panel-header,
      .section-title {
        align-items: start;
        flex-direction: column;
      }

      .status-pill,
      .user-pill {
        white-space: normal;
        height: auto;
        min-height: 38px;
      }
    }

