:root {
  --blue-900: #043262;
  --blue-800: #064279;
  --blue-700: #07589d;
  --steel-950: #17212b;
  --steel-700: #465564;
  --steel-500: #71808f;
  --line: #d7dee6;
  --page: #eef3f8;
  --panel: #ffffff;
  --accent: #ed6b06;
  --ok: #17835b;
  --warn: #b46a00;
  --shadow: 0 16px 40px rgba(18, 37, 59, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--steel-950);
  background:
    linear-gradient(135deg, rgba(4, 50, 98, 0.1), rgba(237, 107, 6, 0.05)),
    repeating-linear-gradient(90deg, rgba(4, 50, 98, 0.04) 0 1px, transparent 1px 80px),
    var(--page);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

html,
body {
  width: 100%;
}

img,
svg,
canvas,
video {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  min-width: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

[hidden] {
  display: none !important;
}

.auth-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  display: grid;
  gap: 16px;
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-panel h1 {
  margin: 0;
  color: var(--blue-900);
}

.auth-panel label {
  display: grid;
  gap: 6px;
  color: var(--steel-700);
  font-size: 13px;
  font-weight: 700;
}

.auth-panel input,
.totp-enrollment textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  background: #fff;
}

.password-control {
  position: relative;
  display: block;
  width: 100%;
}

.password-control input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 38px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--blue-900);
  background: transparent;
  font-size: 17px;
  line-height: 1;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: rgba(4, 50, 98, 0.08);
  outline: none;
}

.totp-enrollment {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(237, 107, 6, 0.35);
  border-radius: 6px;
  background: rgba(237, 107, 6, 0.06);
}

.totp-enrollment code {
  overflow-wrap: anywhere;
  color: var(--blue-900);
  font-weight: 700;
}

.totp-enrollment textarea {
  min-height: 80px;
  resize: vertical;
}

.totp-open-link {
  display: block;
  text-align: center;
  text-decoration: none;
}

.auth-status {
  min-height: 20px;
  margin: 0;
  color: var(--warn);
  font-size: 13px;
  font-weight: 700;
}

.app-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  color: #fff;
  background: linear-gradient(180deg, var(--blue-900), var(--blue-700));
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.45) transparent;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 6px 24px;
}

.brand-icon-frame {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  position: relative;
  width: 50px;
  height: 50px;
  overflow: visible;
  background: transparent;
}

.brand-icon-frame::before {
  content: "T";
  color: var(--accent);
  font-size: 28px;
  font-weight: 900;
}

.brand-icon-frame.has-image::before {
  display: none;
}

.brand-icon {
  display: block;
  width: 50px;
  max-width: none;
  height: 50px;
  object-fit: contain;
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
}

.brand-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.brand span {
  display: block;
}

.brand-word-frame {
  display: grid;
  align-items: center;
  width: 164px;
  min-height: 26px;
  padding: 0;
  background: transparent;
}

.brand-word-frame::before {
  content: "TRALLERO";
  display: block;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.brand-word-frame.has-image::before {
  display: none;
}

.brand-word {
  display: block;
  width: 164px;
  height: auto;
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
}

.brand span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding-bottom: 12px;
}

.nav-group {
  display: grid;
  gap: 5px;
}

.nav-item {
  border: 0;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  padding: 13px 14px;
  text-align: left;
  border-radius: 4px 0 0 4px;
}

.nav-item.active {
  background: #fff;
  color: var(--blue-900);
  font-weight: 700;
  box-shadow: -6px 0 0 var(--accent);
}

.nav-parent {
  position: relative;
  width: 100%;
}

.nav-parent::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  font-size: 11px;
}

.nav-parent.is-open::after {
  transform: translateY(-50%) rotate(0deg);
}

.nav-submenu {
  display: none;
  gap: 5px;
  padding-left: 10px;
}

.nav-submenu.is-open {
  display: grid;
}

.nav-subitem {
  border: 0;
  border-left: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: 4px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.nav-subitem:hover,
.nav-subitem.active {
  border-left-color: var(--accent);
  background: #fff;
  color: var(--blue-900);
}

.main {
  position: relative;
  padding: 0 24px 24px;
  overflow: hidden;
  min-width: 0;
}

.main::after {
  content: "";
  position: fixed;
  right: 4vw;
  bottom: 4vh;
  z-index: -1;
  width: clamp(280px, 60vw, 860px);
  height: clamp(56px, 10vw, 160px);
  background: rgba(4, 50, 98, 0.055);
  -webkit-mask-image: url("./trallero-word-transparent.png?v=20260909-1301");
  mask-image: url("./trallero-word-transparent.png?v=20260909-1301");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.topbar,
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-width: 0;
}

.topbar {
  margin: 18px 0 14px;
}

.workspace-tabs {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 48px;
  margin: 0 -24px 0;
  padding: 10px 24px 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(8px);
  -webkit-overflow-scrolling: touch;
}

.workspace-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  max-width: 220px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  padding: 10px 12px;
  color: var(--steel-700);
  background: #f7f9fc;
  font-size: 13px;
  font-weight: 800;
}

.workspace-tab span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-tab.active {
  color: var(--blue-900);
  background: #fff;
  box-shadow: inset 0 3px 0 var(--accent);
}

.workspace-tab-close {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: var(--steel-500);
  background: rgba(15, 23, 42, 0.06);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 46px);
}

h2 {
  margin-bottom: 5px;
  font-size: 24px;
}

h3 {
  margin-bottom: 14px;
}

.section-head p {
  color: var(--steel-700);
  margin-bottom: 0;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: min(620px, 100%);
  max-width: 100%;
}

.user-menu {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.section-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sync-status {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--steel-700);
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
  text-align: center;
  overflow-wrap: anywhere;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 11px;
  background: #fff;
  color: var(--steel-950);
}

#global-search {
  width: min(36vw, 380px);
}

.role-selector {
  width: 150px;
  min-height: 42px;
  font-weight: 800;
}

.primary-btn,
.icon-btn,
.secondary-btn,
.danger-btn {
  border: 0;
  border-radius: 4px;
  padding: 10px 14px;
  font-weight: 800;
  min-height: 42px;
  white-space: nowrap;
  max-width: 100%;
}

.primary-btn {
  background: var(--accent);
  color: #fff;
}

.ghost-btn {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--blue-900);
  font-weight: 800;
}

.icon-btn {
  background: var(--blue-900);
  color: #fff;
}

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

.danger-btn {
  background: #9b1c1c;
  color: #fff;
}

.app-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  max-width: min(360px, calc(100vw - 32px));
  border-radius: 6px;
  padding: 12px 14px;
  background: #123f68;
  color: #fff;
  box-shadow: 0 16px 30px rgba(15, 35, 52, 0.2);
  font-size: 13px;
  font-weight: 800;
}

.app-toast[hidden] {
  display: none;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.metrics article,
.panel,
.table-wrap,
.status-card,
.storage-card,
.suite-card {
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metrics article {
  min-width: 0;
  padding: 18px;
}

.metrics span {
  display: block;
  color: var(--steel-700);
  font-size: 13px;
}

.metrics strong {
  font-size: 34px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.module-card {
  position: relative;
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  text-align: left;
  box-shadow: var(--shadow);
  min-width: 0;
  cursor: pointer;
  appearance: none;
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease,
    background-color 220ms ease;
  will-change: transform, box-shadow;
}

#dashboard .module-grid .module-card:hover,
#dashboard .module-grid .module-card:focus-visible,
#dashboard .module-grid .module-card.is-hovered {
  border-color: rgba(237, 107, 6, 0.58);
  background:
    linear-gradient(180deg, rgba(237, 107, 6, 0.045), rgba(255, 255, 255, 0) 42%),
    #fff;
  box-shadow:
    0 24px 58px rgba(18, 37, 59, 0.24),
    0 0 0 3px rgba(237, 107, 6, 0.1);
  cursor: pointer;
  transform: translateY(-4px);
}

.module-card:focus-visible {
  outline: 3px solid rgba(237, 107, 6, 0.28);
  outline-offset: 2px;
}

.module-card:active {
  transform: translateY(0);
  box-shadow: 0 12px 30px rgba(18, 37, 59, 0.14);
}

.module-card span {
  color: var(--accent);
  font-weight: 900;
}

.module-card strong,
.module-card small {
  display: block;
}

.module-card strong {
  margin: 28px 0 8px;
  font-size: 20px;
}

.module-card small {
  color: var(--steel-700);
  line-height: 1.4;
}

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

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

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

th {
  color: var(--blue-900);
  font-size: 12px;
  text-transform: uppercase;
  background: #f7f9fc;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 18px;
  min-width: 0;
}

.record-list,
.status-board,
.storage-grid,
.route-list,
.route-advice,
.checklist,
.suite-grid,
.timeline-board {
  display: grid;
  gap: 12px;
}

.suite-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 18px;
}

.suite-card {
  border-left: 5px solid var(--blue-700);
  padding: 16px;
}

.suite-card[data-alert="low"] {
  border-left-color: var(--accent);
}

.suite-card[data-alert="ok"] {
  border-left-color: var(--ok);
}

.suite-card p {
  margin-bottom: 8px;
  color: var(--steel-700);
}

.webhook-panel {
  margin-top: 18px;
}

.webhook-panel pre {
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  background: #f7f9fc;
  color: var(--steel-950);
  font-size: 13px;
  line-height: 1.45;
}

.suite-card small {
  color: var(--steel-500);
}

.kpi-number {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 32px;
  font-weight: 900;
}

.timeline-board {
  margin-top: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue-700);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.timeline-item[data-kind="Mudanza"] {
  border-left-color: var(--accent);
}

.timeline-item[data-kind="Salida guardamuebles"] {
  border-left-color: var(--warn);
}

.timeline-date {
  display: grid;
  align-content: start;
  gap: 4px;
  color: var(--blue-900);
  font-weight: 900;
}

.timeline-date span {
  color: var(--steel-700);
  font-size: 13px;
}

.portal-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.portal-steps span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--steel-700);
  background: #f7f9fc;
  font-size: 12px;
  font-weight: 800;
}

.portal-steps .done {
  border-color: rgba(23, 131, 91, 0.28);
  color: var(--ok);
  background: #eaf7f1;
}

.record {
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue-700);
  border-radius: 6px;
  padding: 14px;
  background: #fff;
}

.record-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  background: #e9f2fb;
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 800;
}

.quote-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 6px;
  background: #f7f9fc;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.day {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px;
  background: #fff;
  font-size: 12px;
}

.day strong {
  display: block;
  color: var(--blue-900);
  margin-bottom: 6px;
}

.status-board {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 18px;
}

.status-card,
.storage-card {
  padding: 16px;
}

.status-card[data-status="Cobrada"] {
  border-top: 5px solid var(--ok);
}

.status-card[data-status="Pendiente"] {
  border-top: 5px solid var(--warn);
}

.status-card[data-status="Vencida"] {
  border-top: 5px solid var(--accent);
}

.storage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 18px;
}

.storage-card {
  border-left: 5px solid var(--blue-700);
}

.storage-list-item {
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue-700);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.storage-list-table {
  display: grid;
  gap: 8px;
}

.storage-list-head {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) minmax(160px, 1fr) minmax(150px, 0.95fr) minmax(115px, 0.7fr) minmax(95px, auto);
  gap: 12px;
  padding: 0 14px 2px;
  color: var(--steel-500);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.storage-list-item[data-payment="Pagado"] {
  border-left-color: var(--ok);
}

.storage-list-item[data-payment="Pendiente"] {
  border-left-color: var(--warn);
}

.storage-list-item[data-payment="Vencido"],
.storage-list-item[data-risk="block"] {
  border-left-color: var(--accent);
}

.storage-list-row {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) minmax(160px, 1fr) minmax(150px, 0.95fr) minmax(115px, 0.7fr) minmax(95px, auto);
  gap: 12px;
  align-items: center;
  border: 0;
  padding: 12px 14px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.storage-list-row:hover,
.storage-list-row[aria-expanded="true"] {
  background: #f7f9fc;
}

.storage-list-row[aria-expanded="true"] {
  box-shadow: inset 0 -3px 0 rgba(237, 107, 6, 0.2);
}

.storage-list-row > span,
.storage-list-status {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.storage-list-row strong {
  color: var(--blue-900);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.storage-list-row small {
  color: var(--steel-700);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.storage-list-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-list-status {
  justify-items: end;
}

.storage-list-detail {
  border-top: 1px solid var(--line);
  padding: 14px;
  background: #fff;
}

.storage-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.storage-detail-grid p {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #f7f9fc;
}

.storage-detail-grid small {
  display: block;
  color: var(--steel-500);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.storage-detail-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--blue-900);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.storage-doc-folder {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(237, 107, 6, 0.24);
  border-radius: 8px;
  padding: 14px;
  margin-top: 12px;
  background: #fffaf4;
}

.storage-doc-folder .record-head {
  align-items: flex-start;
}

.storage-doc-folder .record-head small {
  display: block;
  margin-top: 4px;
  color: var(--steel-700);
  font-weight: 800;
}

.storage-upload-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(170px, 0.7fr) minmax(160px, 0.6fr) minmax(160px, 0.6fr) minmax(180px, 0.7fr) minmax(150px, 0.55fr);
  gap: 12px;
  align-items: stretch;
  border: 1px solid rgba(237, 107, 6, 0.22);
  border-radius: 8px;
  padding: 14px;
  background: #fffaf4;
}

.storage-upload-panel > div:first-child,
.storage-upload-panel label,
.storage-dropzone {
  min-width: 0;
}

.storage-upload-panel strong,
.storage-upload-panel small {
  display: block;
}

.storage-upload-panel strong {
  color: var(--blue-900);
  font-size: 16px;
}

.storage-upload-panel small {
  margin-top: 4px;
  color: var(--steel-700);
  font-size: 12px;
  font-weight: 800;
}

.storage-upload-panel label {
  display: grid;
  gap: 6px;
  color: var(--steel-700);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.storage-upload-panel select,
.storage-upload-panel input[type="text"],
.storage-upload-panel input[type="search"],
.storage-upload-panel textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  color: var(--blue-900);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.storage-upload-context {
  grid-column: 1 / -1;
}

.storage-upload-panel textarea {
  min-height: 74px;
  resize: vertical;
  text-transform: none;
}

.storage-dropzone {
  position: relative;
  place-items: center;
  border: 1px dashed rgba(237, 107, 6, 0.5);
  border-radius: 7px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
  text-align: center;
}

.storage-dropzone.is-dragging {
  border-color: var(--accent);
  background: #fff4e8;
  box-shadow: 0 0 0 3px rgba(237, 107, 6, 0.14);
}

.storage-dropzone input {
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
}

.storage-dropzone span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  text-transform: none;
}

.storage-upload-result {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.storage-upload-error {
  border: 1px solid rgba(187, 45, 45, 0.28);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff0f0;
  color: #8f1f1f;
  font-size: 12px;
  font-weight: 900;
}

.storage-upload-result span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border-radius: 999px;
  padding: 6px 9px;
  background: #fff;
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 800;
}

.storage-upload-result .storage-upload-ok {
  background: #e8f7ee;
  color: #10633d;
  border: 1px solid rgba(16, 99, 61, 0.18);
}

.storage-upload-result button {
  border: 0;
  border-radius: 999px;
  padding: 4px 7px;
  background: #fff0ef;
  color: #8d251d;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.storage-upload-result button[data-storage-inbox-create] {
  background: var(--blue-900);
  color: #fff;
}

.storage-create-client-btn,
.storage-delete-entry-btn {
  border: 0;
  border-radius: 7px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.storage-create-client-btn {
  align-self: stretch;
  background: var(--blue-900);
  color: #fff;
}

.storage-delete-entry-btn {
  background: #fff0ef;
  color: #8d251d;
}

.storage-detail-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.storage-client-dashboard {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(11, 61, 101, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.storage-client-dashboard header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.storage-client-dashboard h4 {
  margin: 2px 0 4px;
  color: var(--blue-900);
  font-size: 20px;
}

.storage-client-dashboard p {
  margin: 0;
  color: var(--steel-700);
  font-weight: 800;
}

.storage-client-dashboard header > strong {
  border-radius: 999px;
  padding: 7px 10px;
  background: #e9f8f1;
  color: #10633d;
  white-space: nowrap;
  font-size: 12px;
}

.storage-client-dashboard header > strong[data-state="pending"],
.storage-client-dashboard header > strong[data-state="exit"] {
  background: #fff5dd;
  color: #8a5200;
}

.storage-client-dashboard header > strong[data-state="closed"] {
  background: #eef1f5;
  color: var(--steel-700);
}

.storage-client-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
}

.storage-client-kpis article {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #f9fbfd;
}

.storage-client-kpis span {
  display: block;
  color: var(--steel-700);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.storage-client-kpis strong {
  display: block;
  margin-top: 4px;
  color: var(--blue-900);
  font-size: 14px;
}

.storage-client-contact {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 8px;
  align-items: stretch;
}

.storage-client-contact article {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fff;
}

.storage-client-contact span {
  display: block;
  color: var(--steel-700);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.storage-client-contact strong {
  display: block;
  margin-top: 4px;
  color: var(--blue-900);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.storage-client-contact small {
  grid-column: 1 / -1;
  color: var(--steel-600);
  font-weight: 800;
}

.storage-flow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.storage-flow-block,
.storage-notes-detail,
.storage-docs-collapsed {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.storage-flow-block > summary,
.storage-notes-detail > summary,
.storage-docs-collapsed > summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px;
  cursor: pointer;
  color: var(--blue-900);
  font-weight: 900;
}

.storage-flow-block > summary span {
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef4f8;
  color: var(--steel-700);
  font-size: 12px;
}

.storage-flow-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, max-content));
  align-items: start;
  gap: 7px;
  padding: 0 12px 12px;
}

.storage-flow-summary span {
  display: grid;
  gap: 2px;
  width: 118px;
  border-radius: 7px;
  padding: 4px 7px;
  background: #fff5dd;
  color: #8a5200;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
}

.storage-flow-summary span b {
  font: inherit;
}

.storage-flow-summary span small {
  color: inherit;
  font-size: 9px;
  font-weight: 800;
  opacity: 0.82;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-flow-summary .storage-flow-doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 320px;
  white-space: normal;
}

.storage-flow-doc-links button,
.storage-flow-doc-links em {
  max-width: 180px;
  border: 1px solid rgba(16, 99, 61, 0.26);
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.72);
  color: #10633d;
  font: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-flow-doc-links button {
  cursor: pointer;
  text-decoration: underline;
}

.storage-flow-doc-links button[data-storage-doc-missing="true"] {
  border-color: rgba(158, 91, 0, 0.35);
  color: #7a4a00;
  background: rgba(255, 248, 228, 0.9);
  text-decoration: none;
}

.storage-flow-doc-links button:disabled {
  opacity: 0.58;
  text-decoration: none;
}

.storage-flow-summary span[data-ready="true"] {
  background: #e9f8f1;
  color: #10633d;
  width: auto;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
}

.storage-flow-summary span[data-ready="true"] small {
  font-size: 10px;
  max-width: 230px;
}

.storage-flow-detail {
  padding: 0 12px 12px;
}

.storage-entry-pending {
  display: grid;
  gap: 8px;
}

.storage-entry-pending > strong {
  color: var(--blue-900);
  font-size: 13px;
}

.storage-entry-pending article {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--warn);
  border-radius: 7px;
  padding: 8px 10px;
  background: #fffaf0;
}

.storage-entry-pending article[data-state="missing"] {
  border-left-color: var(--accent);
  background: #fff5f4;
}

.storage-entry-pending article span {
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 900;
}

.storage-entry-pending article small,
.storage-entry-pending article em,
.storage-entry-pending > small {
  color: var(--steel-700);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.storage-comments-box {
  display: grid;
  gap: 7px;
  margin: 10px 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
}

.storage-comments-box label {
  font-weight: 900;
  color: var(--ink);
}

.storage-comments-box textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.storage-comments-box small {
  color: var(--muted);
}

.storage-compact-list {
  display: grid;
  gap: 8px;
}

.storage-compact-list article,
.storage-exit-box {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #f9fbfd;
}

.storage-compact-list span,
.storage-exit-box span {
  display: block;
  margin-top: 4px;
  color: var(--steel-700);
  font-size: 12px;
  font-weight: 800;
}

.storage-exit-box[data-ready="false"] {
  border-color: rgba(237, 107, 6, 0.35);
  background: #fffaf4;
}

.storage-detail-grid-compact {
  margin-top: 0;
}

.storage-notes-detail p {
  margin: 0;
  padding: 0 12px 12px;
  color: var(--steel-700);
  font-weight: 800;
}

.module-doc-panel,
.convention-expense-dropzone {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 0.8fr);
  gap: 12px;
  align-items: stretch;
  border: 1px solid rgba(11, 61, 101, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.module-doc-panel {
  margin-bottom: 14px;
}

.module-doc-panel strong,
.module-doc-panel small,
.convention-expense-dropzone span,
.convention-expense-dropzone small {
  display: block;
}

.module-doc-panel strong {
  color: var(--blue-900);
}

.module-doc-panel small,
.convention-expense-dropzone small {
  margin-top: 4px;
  color: var(--steel-700);
  font-size: 12px;
  font-weight: 800;
}

.module-doc-dropzone,
.convention-expense-dropzone {
  cursor: pointer;
}

.module-doc-dropzone {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(11, 61, 101, 0.3);
  border-radius: 7px;
  padding: 12px;
  background: #f9fbfd;
  text-align: center;
}

.convention-expense-dropzone {
  grid-template-columns: 1fr;
  margin: 12px 0;
  border-style: dashed;
  border-color: rgba(237, 107, 6, 0.45);
  text-align: center;
}

.module-doc-dropzone.is-dragging,
.convention-expense-dropzone.is-dragging {
  border-color: var(--accent);
  background: #fff4e8;
  box-shadow: 0 0 0 3px rgba(237, 107, 6, 0.14);
}

.module-doc-dropzone input,
.convention-expense-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.module-doc-dropzone span,
.convention-expense-dropzone span {
  color: var(--blue-900);
  font-size: 13px;
  font-weight: 900;
}

.module-doc-list {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.module-doc-list span,
.module-doc-list em {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border-radius: 999px;
  padding: 6px 9px;
  background: #f2f6f9;
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 800;
}

.module-doc-list em {
  color: var(--steel-700);
  font-style: normal;
}

.module-doc-list button {
  border: 0;
  border-radius: 999px;
  padding: 4px 7px;
  background: #eaf2f8;
  color: var(--blue-900);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.module-doc-list button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.module-doc-employee-select {
  max-width: 190px;
  border: 1px solid rgba(11, 61, 101, 0.18);
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
  color: var(--blue-900);
  font-size: 11px;
  font-weight: 800;
}

.doc-upload-btn {
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  border-radius: 4px;
  padding: 9px 12px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.doc-upload-btn input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.storage-doc-warning {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(237, 107, 6, 0.28);
  border-radius: 6px;
  padding: 10px;
  background: #fff4e8;
}

.storage-doc-warning strong {
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
}

.storage-doc-warning span {
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 800;
}

.storage-doc-types,
.storage-doc-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.storage-doc-types span {
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--steel-700);
  font-size: 12px;
  font-weight: 900;
}

.storage-doc-types span[data-ready="true"] {
  border-style: solid;
  border-color: rgba(23, 131, 91, 0.32);
  background: #eaf7f1;
  color: var(--ok);
}

.storage-doc-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.storage-doc-checklist section {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fff;
}

.storage-doc-checklist section[data-complete="false"] {
  border-color: rgba(237, 107, 6, 0.35);
  background: #fffaf4;
}

.storage-doc-checklist header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.storage-doc-checklist header strong {
  color: var(--blue-900);
  font-size: 13px;
}

.storage-doc-checklist header span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.storage-doc-checklist section[data-complete="true"] header span {
  color: var(--ok);
}

.storage-doc-checklist div {
  display: grid;
  gap: 5px;
}

.storage-doc-checklist div span {
  border-radius: 5px;
  padding: 6px 7px;
  background: #fff1e4;
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 800;
}

.storage-doc-checklist div span[data-ready="true"] {
  background: #eaf7f1;
  color: var(--ok);
}

.storage-missing-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  border: 1px solid rgba(237, 107, 6, 0.28);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff4e8;
}

.storage-missing-docs strong {
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
}

.storage-missing-docs span {
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff;
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 800;
}

.storage-doc-list span {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
}

.storage-doc-list strong,
.storage-doc-list small {
  display: block;
}

.storage-doc-list strong {
  color: var(--blue-900);
  font-size: 13px;
}

.storage-doc-list small {
  margin-top: 3px;
  color: var(--steel-500);
  font-size: 12px;
  font-weight: 800;
}

.storage-folder-status {
  display: grid;
  grid-template-columns: minmax(210px, 0.35fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.storage-folder-status button {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--ok);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  text-align: left;
}

.storage-folder-status[data-state="review"] button {
  border-left-color: var(--warn);
}

.storage-folder-status[data-state="incomplete"] button {
  border-left-color: var(--accent);
}

.storage-folder-status strong {
  color: var(--blue-900);
  font-size: 16px;
}

.storage-folder-status button span {
  color: var(--steel-700);
  font-size: 12px;
  font-weight: 800;
}

.storage-folder-status > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-content: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.storage-folder-status > div span {
  border-radius: 999px;
  padding: 6px 9px;
  background: #eaf7f1;
  color: var(--ok);
  font-size: 12px;
  font-weight: 900;
}

.storage-folder-status > div span[data-level="missing"] {
  background: #fff0ef;
  color: #8d251d;
}

.storage-folder-status > div span[data-level="review"] {
  background: #fff7ea;
  color: #744400;
}

.storage-doc-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.storage-doc-categories article,
.storage-document-list article,
.storage-version-board,
.storage-document-audit {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.storage-doc-categories article {
  border-top: 4px solid var(--steel-500);
}

.storage-doc-categories article[data-state="complete"],
.storage-document-list article[data-state="complete"] {
  border-top-color: var(--ok);
}

.storage-doc-categories article[data-state="review"],
.storage-document-list article[data-state="review"] {
  border-top-color: var(--warn);
}

.storage-doc-categories article[data-state="incomplete"],
.storage-document-list article[data-state="incomplete"] {
  border-top-color: var(--accent);
}

.storage-doc-categories header {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-start;
}

.storage-doc-categories strong,
.storage-document-list strong,
.storage-version-board strong,
.storage-document-audit strong {
  color: var(--blue-900);
  font-size: 13px;
}

.storage-doc-categories header span {
  border-radius: 999px;
  padding: 4px 7px;
  background: #f0f4f8;
  color: var(--steel-700);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.storage-doc-categories article[data-state="complete"] header span {
  background: #eaf7f1;
  color: var(--ok);
}

.storage-doc-categories article[data-state="review"] header span {
  background: #fff7ea;
  color: #744400;
}

.storage-doc-categories article[data-state="incomplete"] header span {
  background: #fff0ef;
  color: #8d251d;
}

.storage-doc-categories small,
.storage-document-list small,
.storage-document-audit small {
  display: block;
  margin-top: 5px;
  color: var(--steel-500);
  font-size: 12px;
  font-weight: 800;
}

.storage-doc-categories div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.storage-doc-categories em {
  border-radius: 999px;
  padding: 4px 7px;
  background: #f7f9fc;
  color: var(--steel-700);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.storage-doc-categories p {
  margin: 9px 0 0;
  color: #8d251d;
  font-size: 12px;
  font-weight: 800;
}

.storage-document-list {
  display: grid;
  gap: 10px;
}

.storage-document-list article {
  display: grid;
  gap: 10px;
  border-top: 4px solid var(--steel-500);
}

.storage-document-list dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 8px;
  margin: 0;
}

.storage-document-list dl div {
  border-radius: 6px;
  padding: 8px;
  background: #f7f9fc;
}

.storage-document-list dt {
  color: var(--steel-500);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.storage-document-list dd {
  margin: 3px 0 0;
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 900;
}

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

.storage-document-actions button {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  background: #eef3f8;
  color: var(--steel-700);
  font-size: 12px;
  font-weight: 900;
}

.storage-document-actions .danger-btn {
  border-color: rgba(141, 37, 29, 0.28);
  background: #fff0ef;
  color: #8d251d;
}

.storage-document-actions span {
  color: var(--steel-500);
  font-size: 12px;
  font-weight: 800;
}

.storage-version-board,
.storage-document-audit {
  display: grid;
  gap: 10px;
}

.storage-version-board section {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.storage-version-board section div,
.storage-document-audit {
  display: grid;
  gap: 7px;
}

.storage-version-board span,
.storage-document-audit > span {
  border-radius: 6px;
  padding: 8px 10px;
  background: #f7f9fc;
  color: var(--steel-700);
  font-size: 12px;
  font-weight: 800;
}

.storage-version-board span[data-current="true"] {
  background: #eaf7f1;
  color: var(--ok);
}

.storage-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.storage-metrics article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.storage-metrics span {
  display: block;
  color: var(--steel-700);
  font-size: 13px;
  font-weight: 700;
}

.storage-metrics strong {
  display: block;
  margin-top: 8px;
  color: var(--blue-900);
  font-size: 26px;
}

.storage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.36fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

#storage[data-storage-view="documents"] .storage-layout {
  display: none;
}

#storage[data-storage-view="files"] .storage-files-panel,
#storage[data-storage-view="billing"] .storage-billing-panel,
#storage[data-storage-view="audit"] .storage-audit-intake-panel,
#storage[data-storage-view="monthly"] .storage-monthly-panel {
  grid-column: 1 / -1;
}

#storage[data-storage-view="files"] .storage-audit-intake-panel,
#storage[data-storage-view="files"] .storage-location-panel,
#storage[data-storage-view="files"] .storage-billing-panel,
#storage[data-storage-view="files"] .storage-monthly-panel,
#storage[data-storage-view="files"] .storage-side,
#storage[data-storage-view="audit"] .storage-files-panel,
#storage[data-storage-view="audit"] .storage-location-panel,
#storage[data-storage-view="audit"] .storage-billing-panel,
#storage[data-storage-view="audit"] .storage-monthly-panel,
#storage[data-storage-view="audit"] .storage-side,
#storage[data-storage-view="locations"] .storage-files-panel,
#storage[data-storage-view="locations"] .storage-audit-intake-panel,
#storage[data-storage-view="locations"] .storage-billing-panel,
#storage[data-storage-view="locations"] .storage-monthly-panel,
#storage[data-storage-view="monthly"] .storage-files-panel,
#storage[data-storage-view="monthly"] .storage-audit-intake-panel,
#storage[data-storage-view="monthly"] .storage-location-panel,
#storage[data-storage-view="monthly"] .storage-billing-panel,
#storage[data-storage-view="billing"] .storage-files-panel,
#storage[data-storage-view="billing"] .storage-audit-intake-panel,
#storage[data-storage-view="billing"] .storage-location-panel,
#storage[data-storage-view="billing"] .storage-monthly-panel,
#storage[data-storage-view="billing"] .storage-side,
#storage[data-storage-view="documents"] .storage-files-panel,
#storage[data-storage-view="documents"] .storage-audit-intake-panel,
#storage[data-storage-view="documents"] .storage-location-panel,
#storage[data-storage-view="documents"] .storage-billing-panel,
#storage[data-storage-view="documents"] .storage-monthly-panel,
#storage[data-storage-view="documents"] .storage-side,
#storage[data-storage-view="monthly"] .storage-side {
  display: none !important;
}

.storage-view-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px;
  background: #fff;
  box-shadow: var(--shadow);
}

.storage-warehouse-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.storage-warehouse-tabs button {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: var(--steel-700);
  box-shadow: var(--shadow);
  min-width: 0;
}

.storage-warehouse-tabs button.active {
  border-color: var(--blue-900);
  background: var(--blue-900);
  color: #fff;
}

.storage-warehouse-tabs strong {
  font-size: 15px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.storage-warehouse-tabs span {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e9f2fb;
  color: var(--blue-900);
  font-size: 13px;
  font-weight: 900;
}

.storage-warehouse-tabs button.active span {
  background: #fff;
}

.storage-filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) minmax(130px, auto);
  gap: 10px;
  align-items: end;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.storage-filter-bar .icon-btn {
  width: 100%;
}

.storage-view-switch button {
  border: 0;
  border-radius: 4px;
  padding: 9px 13px;
  background: transparent;
  color: var(--steel-700);
  font-weight: 900;
}

.storage-view-switch button.active {
  background: var(--blue-900);
  color: #fff;
}

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

.storage-location-panel {
  min-width: 0;
}

.storage-billing-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.storage-billing-controls label {
  color: var(--steel-700);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.storage-billing-controls input {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
}

.storage-billing-board {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.storage-billing-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.storage-billing-totals article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fbff;
}

.storage-billing-totals span,
.storage-billing-row small {
  display: block;
  color: var(--steel-700);
  font-size: 12px;
  font-weight: 800;
}

.storage-billing-totals strong {
  display: block;
  margin-top: 6px;
  color: var(--blue-900);
  font-size: 22px;
}

.storage-billing-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.storage-billing-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(160px, 1.2fr) minmax(130px, 1fr) repeat(4, minmax(105px, 0.7fr));
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.storage-billing-row:first-child {
  border-top: 0;
}

.storage-billing-head {
  background: var(--blue-900);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.storage-location-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.storage-location-board {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.storage-line {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(4, 50, 98, 0.04) 0 1px, transparent 1px 48px),
    #f7f9fc;
}

.storage-location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  gap: 9px;
}

.storage-location-grid button {
  min-height: 110px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
  color: var(--steel-700);
  text-align: left;
  min-width: 0;
}

.storage-location-grid button.active {
  border-color: var(--blue-900);
  box-shadow: inset 0 0 0 2px rgba(4, 50, 98, 0.16);
}

.storage-location-grid button[data-risk="ok"] {
  border-left-color: var(--ok);
}

.storage-location-grid button[data-risk="warn"] {
  border-left-color: var(--warn);
}

.storage-location-grid button[data-risk="block"] {
  border-left-color: var(--accent);
}

.storage-location-grid button strong {
  color: var(--blue-900);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.storage-location-grid button span {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.storage-location-grid button em {
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.storage-location-grid button small {
  color: var(--steel-500);
  font-size: 11px;
  font-weight: 900;
}

.storage-location-detail {
  margin-top: 16px;
}

.location-detail-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue-700);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.location-detail-card[data-risk="ok"] {
  border-left-color: var(--ok);
}

.location-detail-card[data-risk="warn"] {
  border-left-color: var(--warn);
}

.location-detail-card[data-risk="block"] {
  border-left-color: var(--accent);
}

.location-detail-card p {
  margin-bottom: 8px;
  color: var(--steel-700);
}

.storage-side {
  display: grid;
  gap: 12px;
}

.storage-payment-board,
.storage-alerts {
  display: grid;
  gap: 10px;
}

.payment-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #fff;
}

.payment-card[data-payment="Pagado"] {
  border-left: 5px solid var(--ok);
}

.payment-card[data-payment="Pendiente"] {
  border-left: 5px solid var(--warn);
}

.payment-card[data-payment="Vencido"] {
  border-left: 5px solid var(--accent);
}

.payment-card p {
  margin-bottom: 0;
  color: var(--blue-900);
  font-weight: 900;
}

.storage-monthly-board {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.storage-month-card {
  display: grid;
  gap: 12px;
  padding: 0;
  overflow: hidden;
}

.storage-month-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  gap: 10px;
  align-items: center;
  border: 0;
  padding: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.storage-month-toggle span {
  display: grid;
  gap: 3px;
}

.storage-month-toggle strong {
  color: var(--blue-900);
}

.storage-month-toggle small {
  color: var(--steel-700);
  font-size: 12px;
  font-weight: 800;
}

.storage-month-toggle b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e9f1fb;
  color: var(--blue-900);
  font-size: 18px;
  line-height: 1;
}

.storage-month-details {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.storage-location-summary {
  padding: 0;
  overflow: hidden;
}

.storage-location-summary-toggle,
.storage-alerts-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  gap: 10px;
  align-items: center;
  border: 0;
  padding: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.storage-alerts-toggle {
  grid-template-columns: minmax(0, 1fr) 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.storage-location-summary-toggle span,
.storage-alerts-toggle span {
  display: grid;
  gap: 3px;
}

.storage-location-summary-toggle strong,
.storage-alerts-toggle strong {
  color: var(--blue-900);
}

.storage-location-summary-toggle small,
.storage-alerts-toggle small {
  color: var(--steel-700);
  font-size: 12px;
  font-weight: 800;
}

.storage-location-summary-toggle b,
.storage-alerts-toggle b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e9f1fb;
  color: var(--blue-900);
  font-size: 18px;
  line-height: 1;
}

.storage-alerts-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.storage-month-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.storage-month-stats p {
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  font-size: 12px;
}

.storage-month-stats small {
  display: block;
  color: var(--steel-600);
  font-weight: 850;
}

.storage-month-stats strong {
  display: block;
  margin-top: 3px;
  color: var(--blue-900);
  font-size: 15px;
}

.storage-month-pending {
  display: grid;
  gap: 6px;
}

.storage-month-pending span {
  padding: 7px 8px;
  border-radius: 6px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 850;
}

.storage-card[data-payment="Pagado"] {
  border-left-color: var(--ok);
}

.storage-card[data-payment="Pendiente"] {
  border-left-color: var(--warn);
}

.storage-card[data-payment="Vencido"] {
  border-left-color: var(--accent);
}

.storage-card[data-risk="block"] {
  border-top: 5px solid var(--accent);
}

.storage-card[data-risk="warn"] {
  border-top: 5px solid var(--warn);
}

.storage-card[data-risk="ok"] {
  border-top: 5px solid var(--ok);
}

.storage-card p {
  margin-bottom: 7px;
  color: var(--steel-700);
}

.storage-card small {
  color: var(--steel-500);
}

.storage-unit {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 10px;
  background: #f7f9fc;
}

.storage-unit span {
  color: var(--blue-900);
  font-size: 18px;
  font-weight: 900;
}

.storage-unit strong {
  color: var(--steel-700);
  font-size: 12px;
  text-transform: uppercase;
}

.storage-alert {
  border-left: 4px solid var(--warn);
  border-radius: 6px;
  padding: 10px;
  background: #fff7ea;
  color: var(--steel-700);
  font-size: 13px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.panel-head h3 {
  margin-bottom: 0;
}

.panel-summary {
  color: var(--steel-700);
  font-size: 13px;
  font-weight: 800;
}

.storage-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.storage-pill {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: #f7f9fc;
}

.storage-pill small {
  color: var(--steel-500);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.storage-pill strong {
  color: var(--blue-900);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.storage-risk-list {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}

.storage-risk-list span,
.storage-clear {
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
}

.storage-risk-list span[data-level="block"] {
  border-left: 4px solid var(--accent);
  background: #fff0ef;
  color: #8d251d;
}

.storage-risk-list span[data-level="warn"] {
  border-left: 4px solid var(--warn);
  background: #fff7ea;
  color: #744400;
}

.storage-clear {
  margin: 12px 0;
  background: #eaf7f1;
  color: var(--ok);
}

.storage-map,
.storage-audit-board {
  display: grid;
  gap: 10px;
}

.storage-audit-intake-panel {
  grid-column: 1 / -1;
}

.storage-audit-hero,
.storage-audit-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.storage-audit-hero article,
.storage-audit-metrics article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.storage-audit-hero span,
.storage-audit-metrics span {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.storage-audit-hero strong,
.storage-audit-metrics strong {
  display: block;
  margin-top: 5px;
  color: var(--blue-900);
  font-size: 20px;
}

.storage-audit-hero p {
  margin: 6px 0 0;
  color: var(--steel-700);
  font-size: 13px;
}

.storage-audit-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.storage-audit-flow span {
  display: grid;
  gap: 5px;
  border: 1px dashed rgba(9, 94, 158, 0.25);
  border-radius: 7px;
  padding: 10px;
  background: #f7fbff;
  color: var(--steel-700);
  font-size: 12px;
  font-weight: 800;
}

.storage-audit-flow strong {
  color: var(--blue-900);
  font-size: 13px;
}

.storage-audit-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: 14px;
  margin-top: 12px;
}

.storage-audit-columns section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.storage-audit-columns h4 {
  margin: 0;
  color: var(--blue-900);
}

.storage-intake-list,
.storage-doc-taxonomy,
.storage-review-rules {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.storage-intake-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.85fr) minmax(170px, 0.9fr) minmax(120px, auto);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 4px solid var(--ok);
  border-radius: 7px;
  padding: 10px;
  background: #fff;
}

.storage-intake-row[data-review="true"] {
  border-left-color: var(--warn);
  background: #fffaf4;
}

.storage-intake-row strong,
.storage-intake-row small {
  display: block;
}

.storage-intake-row strong {
  color: var(--blue-900);
  font-size: 13px;
}

.storage-intake-row small,
.storage-intake-row span {
  color: var(--steel-700);
  font-size: 12px;
  font-weight: 800;
}

.storage-intake-row em {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 8px;
  background: #eaf7f1;
  color: var(--ok);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.storage-intake-row[data-review="true"] em {
  background: #fff1e4;
  color: var(--accent);
}

.storage-doc-taxonomy span,
.storage-review-rules span {
  border-radius: 6px;
  padding: 8px 10px;
  background: #f7f9fc;
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 800;
}

.storage-review-rules {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.storage-review-rules strong {
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
}

.storage-zone {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #fff;
}

.storage-zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 7px;
}

.storage-zone-grid span {
  min-height: 62px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px;
  background: #f7f9fc;
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.storage-zone-grid strong,
.storage-zone-grid small,
.storage-zone-grid em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-zone-grid small {
  color: var(--steel-700);
  font-size: 11px;
}

.storage-zone-grid em {
  color: var(--steel-500);
  font-size: 11px;
  font-style: normal;
}

.storage-zone-grid span[data-status="Ocupado"] {
  border-color: rgba(23, 131, 91, 0.35);
  background: #eaf7f1;
}

.storage-zone-grid span[data-status="Pendiente de salida"] {
  border-color: rgba(180, 106, 0, 0.35);
  background: #fff7ea;
}

.storage-zone-grid span[data-status="Bloqueado por incidencia"] {
  border-color: rgba(237, 107, 6, 0.35);
  background: #fff0ef;
  color: #8d251d;
}

.storage-zone-grid span[data-status="Libre"] {
  border-style: dashed;
  color: var(--steel-500);
}

.audit-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
  color: var(--steel-700);
  font-size: 13px;
  font-weight: 800;
}

.audit-row strong {
  color: var(--blue-900);
}

.route-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.route-planner,
.route-advisor {
  padding: 18px;
  min-width: 0;
}

.route-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(150px, 0.7fr) minmax(120px, 0.42fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.route-toolbar .primary-btn {
  width: 100%;
  min-width: 0;
  white-space: normal;
}

.route-map-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 16px;
}

.route-map {
  width: 100%;
  height: 360px;
  background:
    linear-gradient(115deg, rgba(23, 131, 91, 0.18), transparent 38%),
    linear-gradient(35deg, rgba(7, 88, 157, 0.18), transparent 45%),
    #e7edf3;
}

.map-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  color: var(--steel-700);
  font-size: 13px;
  font-weight: 700;
  flex-wrap: wrap;
}

.map-actions span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.map-pin span,
.static-pin {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(23, 33, 43, 0.22);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.map-pin span::after,
.static-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  transform: translateX(-50%) rotate(45deg);
}

.static-map {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(0deg, rgba(255, 255, 255, 0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.45) 1px, transparent 1px),
    linear-gradient(135deg, rgba(237, 107, 6, 0.18), transparent 42%),
    #dce8ef;
  background-size: 38px 38px, 38px 38px, auto, auto;
}

.static-map::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 2px dashed rgba(4, 50, 98, 0.22);
  border-radius: 55% 42% 48% 50%;
}

.static-route-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.static-route-line polyline {
  fill: none;
  stroke: rgba(237, 107, 6, 0.88);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.static-label {
  position: absolute;
  max-width: 180px;
  transform: translate(16px, -50%);
  border: 1px solid rgba(4, 50, 98, 0.12);
  border-radius: 6px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--steel-700);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 8px 18px rgba(23, 33, 43, 0.12);
  pointer-events: none;
}

.static-pin {
  position: absolute;
  z-index: 2;
  border: 3px solid #fff;
  transform: translate(-50%, -50%);
}

.route-stop {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(88px, auto);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 6px;
  padding: 14px;
  background: #fff;
}

.route-stop p {
  margin-bottom: 6px;
  color: var(--steel-700);
  overflow-wrap: anywhere;
}

.route-stop small {
  color: var(--steel-500);
}

.route-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--blue-900);
  color: #fff;
  font-weight: 900;
}

.route-score {
  min-width: 88px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--blue-900);
  background: #f7f9fc;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.route-advice p {
  margin-bottom: 8px;
}

.checklist span,
.route-warning {
  display: block;
  border-radius: 6px;
  padding: 10px;
  background: #f7f9fc;
  color: var(--steel-700);
  font-size: 13px;
}

.route-warning {
  border-left: 4px solid var(--warn);
  background: #fff7ea;
}

dialog {
  width: min(860px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  max-width: calc(100vw - 28px);
}

dialog::backdrop {
  background: rgba(5, 20, 36, 0.55);
}

.modal-form {
  padding: 20px;
  max-height: min(86vh, 760px);
  overflow-y: auto;
}

.modal-form header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.modal-form header button {
  border: 0;
  background: #eef3f8;
  border-radius: 4px;
  padding: 8px 10px;
}

.support-viewer {
  display: grid;
  gap: 12px;
  padding: 18px;
  max-height: min(88vh, 820px);
  background: #fff;
}

.support-viewer header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.support-viewer header h3 {
  margin: 0;
}

.support-viewer header div {
  display: flex;
  gap: 8px;
  align-items: center;
}

.support-viewer header button {
  border: 0;
  background: #eef3f8;
  border-radius: 4px;
  padding: 8px 10px;
}

.support-viewer-body {
  display: grid;
  place-items: center;
  min-height: min(70vh, 640px);
  overflow: auto;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.support-viewer-body img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.support-viewer-body iframe,
.support-viewer-body object {
  width: min(100%, 920px);
  height: min(72vh, 680px);
  border: 0;
  background: #fff;
}

.support-link {
  border: 1px solid rgba(0, 85, 184, 0.22);
  border-radius: 999px;
  background: #fff;
  color: var(--blue-700);
  padding: 4px 8px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.support-link:hover {
  background: rgba(0, 85, 184, 0.08);
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--steel-700);
  font-size: 13px;
  font-weight: 700;
}

.empty {
  color: var(--steel-500);
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 6px;
}

.pipeline-board {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.pipeline-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.36fr);
  gap: 18px;
  align-items: start;
}

.pipeline-main,
.pipeline-side {
  min-width: 0;
}

.pipeline-stages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}

.pipeline-stages article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f7f9fc;
}

.pipeline-stages strong {
  display: block;
  color: var(--accent);
  font-size: 26px;
}

.pipeline-stages span {
  color: var(--steel-700);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pipeline-items {
  display: grid;
  gap: 12px;
}

.pipeline-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.pipeline-card p {
  margin-bottom: 10px;
  color: var(--steel-700);
}

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

.pipeline-meta span,
.pipeline-checks span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #f7f9fc;
}

.pipeline-meta small {
  display: block;
  color: var(--steel-500);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.pipeline-meta strong {
  display: block;
  margin-top: 3px;
  color: var(--blue-900);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.pipeline-side p {
  color: var(--steel-700);
}

.pipeline-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.pipeline-checks span {
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 900;
}

.marketing-layout {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

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

.module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 16px;
}

.module-tab {
  min-width: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff;
  color: var(--steel-700);
  font-weight: 900;
}

.module-tab.active {
  border-color: var(--blue-900);
  background: var(--blue-900);
  color: #fff;
}

.resource-tabs {
  margin-top: 0;
}

.resource-panel {
  min-width: 0;
}

.compact-head {
  margin-top: 4px;
}

.folder-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.folder-tabs button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  background: #f7f9fc;
  color: var(--steel-700);
  font-size: 13px;
  font-weight: 900;
}

.folder-tabs button.active {
  border-color: var(--accent);
  background: rgba(237, 107, 6, 0.1);
  color: var(--blue-900);
}

.marketing-card,
.marketing-content-card {
  display: grid;
  gap: 12px;
}

.convention-card {
  display: grid;
  gap: 12px;
}

.convention-dashboard {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.convention-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.folder-section-tabs {
  margin-top: -6px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.folder-section-tabs button {
  background: #fff;
}

.convention-kpis span,
.convention-breakdown section {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fc;
  padding: 10px 12px;
}

.convention-kpis span.has-warning,
.convention-breakdown section.has-warning,
.convention-card.has-warning {
  border-color: #f59e0b;
  background: #fff7ed;
}

.convention-kpis small,
.convention-breakdown h4 {
  color: var(--steel-500);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.convention-kpis strong {
  display: block;
  margin-top: 4px;
  color: var(--blue-900);
  font-size: 24px;
}

.convention-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.convention-breakdown section {
  display: grid;
  gap: 8px;
}

.convention-breakdown h4 {
  margin: 0;
}

.convention-breakdown p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  color: var(--steel-700);
  font-size: 13px;
}

.convention-breakdown p strong,
.convention-breakdown p span {
  overflow-wrap: anywhere;
}

.convention-conflict-pill strong {
  color: #9a3412;
}

.convention-conflict-box {
  border-color: #f59e0b;
  background: #fff7ed;
}

.convention-expense-folder {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.convention-expense-folder > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.convention-expense-actions label {
  display: grid;
  gap: 4px;
  color: var(--steel-500);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.convention-expense-actions select {
  min-width: 150px;
}

.convention-expense-folder h4,
.convention-expense-folder h5 {
  margin: 0;
  color: var(--blue-900);
}

.convention-expense-folder header p {
  margin: 4px 0 0;
  color: var(--steel-500);
  font-size: 12px;
  font-weight: 800;
}

.convention-expense-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.convention-expense-grid article {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #f7f9fc;
}

.convention-expense-total-card {
  background: #eef5ff;
  border-color: rgba(11, 64, 112, 0.25);
}

.convention-expense-summary {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
}

.convention-expense-summary-head,
.convention-expense-summary p {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 90px 140px;
  gap: 10px;
  align-items: center;
  margin: 0;
}

.convention-expense-summary-head {
  color: var(--steel-500);
  font-size: 11px;
  text-transform: uppercase;
}

.convention-expense-grid p,
.convention-expense-list .convention-expense-row {
  display: grid;
  grid-template-columns: minmax(105px, 1fr) minmax(95px, 0.8fr) minmax(125px, 1fr) minmax(110px, auto) minmax(110px, auto);
  gap: 10px;
  align-items: center;
  margin: 0;
}

.convention-expense-support-line {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(110px, auto) minmax(110px, auto) minmax(150px, 1fr);
  gap: 10px;
  align-items: center;
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.convention-expense-support-line > small {
  grid-column: 1 / -1;
}

.convention-expense-payment-breakdown {
  display: grid;
  gap: 6px;
  grid-column: 1 / -1;
  margin: 6px 0 8px;
  padding: 10px;
  border: 1px solid rgba(0, 85, 184, 0.14);
  border-radius: 6px;
  background: #f7f9fc;
}

.convention-expense-payment-breakdown > strong {
  color: var(--blue-900);
  font-size: 12px;
  text-transform: uppercase;
}

.convention-expense-payment-breakdown p {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(130px, auto);
  gap: 10px;
  align-items: center;
  margin: 0;
  color: var(--steel-700);
  font-size: 12px;
  font-weight: 800;
}

.convention-expense-payment-breakdown b {
  color: var(--blue-900);
  text-align: right;
}

.convention-expense-list {
  display: grid;
  gap: 8px;
}

.convention-expense-list .convention-expense-row {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.convention-expense-list .convention-expense-row > small {
  grid-column: 1 / -1;
  color: var(--steel-700);
}

.convention-expense-list small {
  display: block;
  margin-top: 2px;
  color: var(--steel-500);
  font-size: 11px;
  font-weight: 800;
}

.convention-expense-supports {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(0, 85, 184, 0.12);
  border-radius: 6px;
  background: #f8fbff;
}

.convention-expense-supports > strong {
  flex: 0 0 auto;
  color: var(--blue-900);
  font-size: 11px;
  text-transform: uppercase;
}

.support-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.support-empty,
.support-missing {
  color: var(--steel-500);
  font-weight: 800;
}

.convention-day-group {
  display: grid;
  gap: 10px;
}

.convention-day-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.convention-day-group h3 {
  margin: 0;
  color: var(--blue-900);
  font-size: 16px;
}

.convention-day-group > header span {
  color: var(--steel-500);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.convention-summary {
  display: grid;
  grid-template-columns: minmax(105px, 0.7fr) minmax(80px, 0.45fr) minmax(78px, 0.42fr) minmax(140px, 0.9fr) minmax(170px, 1.15fr) minmax(150px, 1fr);
  gap: 10px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.convention-summary::-webkit-details-marker {
  display: none;
}

.convention-summary span {
  min-width: 0;
}

.convention-summary small {
  display: block;
  color: var(--steel-500);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.convention-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--blue-900);
  overflow-wrap: anywhere;
}

.convention-attendee-initials strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(247, 104, 0, 0.35);
  border-radius: 999px;
  background: rgba(247, 104, 0, 0.08);
  color: var(--orange-700);
  font-size: 12px;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.convention-agenda-row .convention-summary {
  cursor: default;
}

.convention-agenda-row {
  border-left: 3px solid var(--line);
}

.convention-card[open] .convention-summary {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.convention-detail {
  display: grid;
  gap: 12px;
}

.convention-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.convention-fields span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #f7f9fc;
}

.convention-fields small {
  display: block;
  color: var(--steel-500);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.convention-fields strong {
  display: block;
  margin-top: 3px;
  color: var(--blue-900);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.transcript-details {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.transcript-details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  color: var(--blue-900);
}

.convention-images {
  display: grid;
  gap: 8px;
}

.convention-images > small {
  color: var(--steel-500);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.convention-images > div {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.convention-images a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
}

.convention-images img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.convention-folder-report-actions {
  margin-bottom: 12px;
}

.convention-scroll-top-wrap {
  display: flex;
  justify-content: flex-end;
  margin: 18px 0 4px;
}

.convention-scroll-top {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(247, 104, 0, 0.45);
  border-radius: 7px;
  background: var(--orange-600);
  color: white;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(247, 104, 0, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.convention-scroll-top:hover,
.convention-scroll-top:focus-visible {
  background: var(--orange-700);
  box-shadow: 0 12px 26px rgba(247, 104, 0, 0.24);
  transform: translateY(-1px);
}

.report-actions button {
  border: 1px solid var(--blue-900);
  border-radius: 6px;
  padding: 9px 12px;
  background: #fff;
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 900;
}

.report-actions button:first-child {
  background: var(--blue-900);
  color: #fff;
}

.report-actions .danger-btn {
  border-color: #9b1c1c;
  background: #9b1c1c;
  color: #fff;
}

.connector-board {
  display: grid;
  gap: 10px;
}

.connector-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.85fr) minmax(220px, 1.2fr) minmax(130px, 0.7fr) minmax(120px, 0.6fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-left: 5px solid var(--warn);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.connector-row[data-status="connected"] {
  border-left-color: var(--ok);
}

.connector-row strong,
.connector-row small,
.connector-row span,
.connector-row em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.connector-row small {
  color: var(--steel-500);
}

.connector-row em {
  color: var(--blue-900);
  font-style: normal;
  font-weight: 900;
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    padding: 12px;
    max-width: 100vw;
    overflow: hidden;
  }

  .brand {
    padding: 4px 4px 12px;
  }

  .brand-icon-frame {
    width: 48px;
    height: 48px;
  }

  .brand-icon {
    width: 48px;
    height: 48px;
  }

  .brand-word-frame {
    width: 160px;
  }

  .brand-word {
    width: 160px;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 2px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .nav-item {
    flex: 0 0 auto;
    min-width: max-content;
    border-radius: 4px;
    padding: 11px 13px;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .nav-item.active {
    box-shadow: inset 0 -4px 0 var(--accent);
  }

  .metrics,
  .storage-metrics,
  .storage-warehouse-tabs,
  .module-grid,
  .split-layout,
  .route-layout,
  .storage-layout,
  .route-toolbar,
  .storage-filter-bar,
  .pipeline-layout,
  .connector-row,
  .status-board,
  .storage-grid,
  .convention-kpis,
  .convention-breakdown,
  .suite-grid {
    grid-template-columns: 1fr;
  }

  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main {
    padding: 20px;
    overflow: visible;
  }

  .topbar,
  .section-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .top-actions {
    min-width: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .top-actions > * {
    flex: 1 1 180px;
  }

  .user-menu {
    flex: 1 1 260px;
  }

  #global-search {
    width: auto;
    flex-basis: min(100%, 360px);
  }

  .route-map {
    height: 340px;
  }

  .storage-grid,
  .storage-list-row,
  .storage-list-head,
  .storage-detail-grid,
  .storage-folder-status,
  .storage-upload-panel,
  .storage-audit-columns,
  .storage-intake-row {
    grid-template-columns: 1fr;
  }

  .storage-list-head {
    display: none;
  }

  .storage-list-status {
    justify-items: start;
  }

  .storage-intake-row em {
    justify-self: stretch;
    text-align: center;
  }

  .storage-list-row small {
    white-space: normal;
  }

  .storage-filter-bar,
  .route-toolbar {
    align-items: stretch;
  }

  .suite-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body {
    background: var(--page);
  }

  .main {
    padding: 14px;
    overflow: visible;
  }

  .main::after {
    display: none;
  }

  .sidebar {
    padding: 10px 10px 8px;
  }

  .brand {
    padding-bottom: 10px;
  }

  .brand span {
    font-size: 12px;
  }

  .brand-word-frame {
    width: 156px;
  }

  .brand-word {
    width: 156px;
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 22px;
  }

  .topbar,
  .section-head,
  .top-actions,
  .section-actions,
  .map-actions,
  .record-head,
  .panel-head,
  .storage-doc-folder .record-head,
  .storage-doc-checklist header {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar > *,
  .section-head > *,
  .top-actions,
  .section-actions {
    min-width: 0;
    width: 100%;
  }

  .route-stop {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 12px;
  }

  .route-score {
    grid-column: 2;
    width: max-content;
  }

  .section-actions > button,
  .section-actions > a,
  .top-actions > button,
  .top-actions > select,
  .top-actions > input,
  .user-menu,
  .user-menu > *,
  .sync-status {
    width: 100%;
  }

  .top-actions > *,
  .user-menu {
    flex-basis: auto;
  }

  .primary-btn,
  .icon-btn {
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }

  #global-search {
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .metrics,
  .storage-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .metrics article,
  .storage-metrics article,
  .panel,
  .storage-card,
  .status-card,
  .suite-card,
  .timeline-item {
    box-shadow: 0 10px 24px rgba(18, 37, 59, 0.1);
  }

  .module-grid,
  .storage-grid,
  .suite-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .timeline-date {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .module-card {
    min-height: 126px;
    padding: 15px;
  }

  .module-card strong {
    margin: 16px 0 7px;
  }

  .table-wrap {
    width: 100%;
    margin-left: 0;
  }

  table {
    min-width: 760px;
  }

  th,
  td {
    padding: 10px;
  }

  .route-toolbar {
    gap: 10px;
  }

  .storage-view-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .storage-warehouse-tabs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .storage-warehouse-tabs button {
    flex: 0 0 min(78vw, 260px);
  }

  .storage-filter-bar {
    padding: 10px;
  }

  .storage-location-toolbar {
    grid-template-columns: 1fr;
  }

  .storage-control-grid,
  .pipeline-meta,
  .convention-summary,
  .convention-kpis,
  .convention-breakdown,
  .convention-expense-grid,
  .convention-expense-summary-head,
  .convention-expense-summary p,
  .convention-expense-list .convention-expense-row,
  .storage-doc-checklist,
  .storage-doc-types,
  .storage-doc-list,
  .storage-document-list dl {
    grid-template-columns: 1fr;
  }

  .route-map {
    height: min(62vh, 390px);
    min-height: 300px;
  }

  .static-label {
    display: none;
  }

  .map-actions .icon-btn {
    width: 100%;
  }

  .route-number {
    width: 34px;
    height: 34px;
  }

  .record-head {
    gap: 8px;
  }

  .badge {
    width: max-content;
    max-width: 100%;
  }

  dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    margin: auto;
  }

  .modal-form {
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    padding: 16px;
  }

  .modal-form header {
    align-items: flex-start;
    gap: 12px;
  }

  .modal-form header button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .main {
    padding: 10px;
  }

  .topbar {
    margin-bottom: 18px;
  }

  .panel {
    padding: 14px;
  }

  .metrics,
  .storage-metrics {
    grid-template-columns: 1fr;
  }

  .brand-icon-frame,
  .brand-icon {
    width: 42px;
    height: 42px;
  }

  .brand-word-frame,
  .brand-word {
    width: 132px;
  }

  .nav-item {
    padding: 10px 11px;
    font-size: 13px;
  }

  .route-map {
    height: 300px;
  }

  .map-pin span,
  .static-pin {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .table-wrap {
    width: 100%;
  }
}

@media print {
  .sidebar,
  .top-actions,
  .primary-btn,
  dialog {
    display: none;
  }

  .app-shell {
    display: block;
  }

  .main {
    padding: 0;
  }
}

.storage-list-head-expedients,
.storage-list-row-expedients {
  grid-template-columns: 0.9fr 1fr 0.85fr 0.8fr 0.9fr 0.9fr 0.95fr 0.85fr;
}

@media (max-width: 980px) {
  .storage-list-head-expedients { display: none; }
  .storage-list-row-expedients { grid-template-columns: 1fr; }
}

.storage-map-panel.is-hidden {
  display: none;
}

.employee-master {
  display: grid;
  gap: 16px;
}

.employee-master-metrics,
.employee-master-guidance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.employee-master-metrics article,
.employee-master-guidance article,
.employee-master-card,
.employee-panel,
.employee-confidential-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.employee-master-metrics article {
  padding: 14px;
  border-left: 5px solid var(--blue-700);
}

.employee-master-metrics span,
.employee-master-guidance p,
.employee-panel dt,
.employee-history-list small,
.employee-list-grid small {
  color: var(--steel-500);
}

.employee-master-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--blue-900);
  font-size: 24px;
}

.employee-master-guidance article {
  padding: 14px;
  border-left: 4px solid var(--orange-600);
}

.employee-master-guidance strong {
  color: var(--blue-900);
}

.employee-master-guidance p {
  margin: 6px 0 0;
}

.employee-master-list {
  display: grid;
  gap: 10px;
}

.employee-master-card {
  overflow: hidden;
}

.employee-collapsible > summary {
  cursor: pointer;
  list-style: none;
}

.employee-collapsible > summary::-webkit-details-marker {
  display: none;
}

.employee-collapsible > summary::after {
  justify-self: end;
  align-self: center;
  content: "+";
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-900);
  background: #fff;
  font-weight: 900;
}

.employee-collapsible[open] > summary::after {
  content: "-";
}

.employee-summary-card {
  display: grid;
  grid-template-columns: auto minmax(190px, 1fr) minmax(360px, 1.4fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: linear-gradient(90deg, #f8fbff, #fff);
  border-bottom: 0;
}

.employee-collapsible[open] > .employee-summary-card {
  border-bottom: 1px solid var(--line);
}

.employee-photo {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: var(--blue-900);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.vehicle-photo {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: #1f4f46;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.vehicle-master-card .employee-summary-card {
  background: linear-gradient(90deg, #f4fbf8, #fff);
}

.vehicle-master-card .employee-panel {
  border-left-color: #1f7668;
}

.employee-summary-main span,
.employee-section-tabs button,
.employee-panel header span,
.employee-confidential-box header span {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--steel-500);
}

.employee-summary-main h3 {
  margin: 2px 0 3px;
  color: var(--blue-900);
  font-size: 24px;
}

.employee-summary-main p {
  margin: 0;
  color: var(--steel-700);
  font-weight: 800;
}

.employee-summary-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.employee-summary-fields span,
.employee-restricted-grid span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.employee-summary-fields small,
.employee-restricted-grid small {
  color: var(--steel-500);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.employee-summary-fields strong,
.employee-restricted-grid strong {
  color: var(--blue-900);
  overflow-wrap: anywhere;
}

.employee-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
}

.employee-section-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: var(--blue-900);
  cursor: pointer;
  font-family: inherit;
}

.employee-section-tabs button.active {
  border-color: var(--blue-900);
  background: var(--blue-900);
  color: #fff;
}

.employee-active-section {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.employee-privacy-placeholder,
.employee-alert-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  padding: 14px 16px 0;
}

.employee-privacy-placeholder {
  padding: 0;
}

.employee-privacy-placeholder article,
.employee-alert-row article {
  border: 1px solid var(--line);
  border-left: 5px solid var(--warn);
  border-radius: 8px;
  padding: 12px;
  background: #fffaf0;
}

.employee-privacy-placeholder article[data-state="complete"],
.employee-alert-row article[data-state="complete"] {
  border-left-color: var(--ok);
  background: #f0fdf7;
}

.employee-privacy-placeholder article[data-state="missing"],
.employee-alert-row article[data-state="missing"] {
  border-left-color: var(--accent);
  background: #fff5f2;
}

.employee-privacy-placeholder p,
.employee-alert-row p {
  margin: 6px 0 0;
  color: var(--steel-700);
}

.employee-section-grid,
.employee-wide-grid {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.employee-section-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.employee-wide-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  padding-top: 0;
}

.employee-panel,
.employee-confidential-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-left: 5px solid var(--blue-700);
}

.employee-panel > summary,
.employee-confidential-box > summary {
  cursor: pointer;
  list-style: none;
}

.employee-panel > summary::-webkit-details-marker,
.employee-confidential-box > summary::-webkit-details-marker {
  display: none;
}

.employee-panel > summary header::after,
.employee-confidential-box > summary header::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue-900);
  font-weight: 900;
}

.employee-panel[open] > summary header::after,
.employee-confidential-box[open] > summary header::after {
  content: "-";
}

.employee-panel.wide,
.employee-confidential-box {
  grid-column: 1 / -1;
}

.employee-panel header,
.employee-confidential-box header,
.employee-doc-grid article header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.employee-panel h4,
.employee-confidential-box h4 {
  margin: 0;
  color: var(--blue-900);
}

.employee-panel dl,
.employee-doc-grid dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 0;
}

.employee-panel dl div,
.employee-doc-grid dl div {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fc;
}

.employee-panel dt,
.employee-doc-grid dt {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.employee-panel dd,
.employee-doc-grid dd {
  margin: 3px 0 0;
  color: var(--steel-950);
  font-weight: 800;
  overflow-wrap: break-word;
  word-break: normal;
}

.employee-panel dd.value-email,
.employee-doc-grid dd.value-email {
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: normal;
}

.employee-doc-grid,
.employee-list-grid,
.employee-permission-grid,
.employee-history-list,
.employee-restricted-grid,
.employee-rule-list {
  display: grid;
  gap: 10px;
}

.employee-doc-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.employee-doc-upload {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  border: 1px dashed rgba(11, 61, 101, 0.28);
  border-radius: 8px;
  padding: 12px;
  background: #f7f9fc;
  cursor: pointer;
}

.employee-doc-upload.is-dragging {
  border-color: var(--blue-700);
  background: #eef6ff;
}

.employee-doc-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.employee-doc-upload strong {
  color: var(--blue-900);
}

.employee-doc-upload small {
  color: var(--steel-700);
  font-weight: 800;
}

.employee-doc-grid article,
.employee-doc-grid details,
.employee-list-grid article,
.employee-permission-grid article,
.employee-history-list article {
  border: 1px solid var(--line);
  border-left: 4px solid var(--warn);
  border-radius: 8px;
  background: #fff;
}

.employee-doc-grid article,
.employee-list-grid article,
.employee-permission-grid article,
.employee-history-list article {
  padding: 12px;
}

.employee-doc-grid details[data-state="complete"],
.employee-doc-grid article[data-state="complete"] {
  border-left-color: var(--ok);
}

.employee-doc-grid details[data-state="missing"],
.employee-doc-grid article[data-state="missing"] {
  border-left-color: var(--accent);
}

.employee-doc-grid details summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.employee-doc-grid details summary::-webkit-details-marker {
  display: none;
}

.employee-doc-grid details summary::after {
  content: "+";
  color: var(--blue-700);
  font-weight: 900;
}

.employee-doc-grid details[open] summary::after {
  content: "-";
}

.employee-doc-sensitive-body {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

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

.employee-doc-actions button {
  width: fit-content;
  margin-top: 8px;
  border: 1px solid #d7b6b6;
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff5f5;
  color: #8b1e1e;
  font-size: 12px;
  font-weight: 900;
}

.employee-doc-grid article > p,
.employee-list-grid p,
.employee-permission-grid p,
.employee-history-list p,
.employee-confidential-box p {
  margin: 6px 0 0;
  color: var(--steel-700);
}

.employee-doc-grid .doc-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--blue-700);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.employee-list-grid,
.employee-permission-grid,
.employee-restricted-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.employee-list-grid article {
  display: grid;
  gap: 4px;
}

.employee-list-grid span,
.employee-doc-grid header span {
  justify-self: start;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef4fb;
  color: var(--blue-900);
  font-size: 11px;
  font-weight: 900;
}

.employee-permission-grid small,
.employee-history-list small,
.employee-rule-list span {
  display: block;
  color: var(--steel-700);
}

.employee-confidential-box {
  border-left-color: #9b1c1c;
  background: #fff7f7;
}

.employee-rule-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #f7f9fc;
  font-size: 12px;
  font-weight: 800;
}

.logs-master,
.security-board {
  display: grid;
  gap: 14px;
}

.logs-metrics,
.security-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.logs-metrics article,
.security-metrics article,
.security-policy-grid article,
.security-audit-note {
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue-700);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.logs-metrics span,
.security-metrics span,
.security-policy-grid span {
  color: var(--steel-500);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.logs-metrics strong,
.security-metrics strong,
.security-policy-grid strong,
.security-audit-note strong {
  display: block;
  margin-top: 5px;
  color: var(--blue-900);
  font-size: 20px;
  overflow-wrap: anywhere;
}

.security-policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.security-policy-grid article,
.security-audit-note {
  border-left-color: #9b1c1c;
}

.security-policy-grid strong,
.security-audit-note strong {
  margin-top: 0;
  font-size: 15px;
}

.security-policy-grid span {
  display: block;
  margin-top: 6px;
  text-transform: none;
}

.security-audit-note p {
  margin: 6px 0 0;
  color: var(--steel-700);
  font-weight: 800;
}

.security-users-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue-700);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.security-users-panel header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.security-users-panel h3 {
  margin: 3px 0 4px;
  color: var(--blue-900);
}

.security-users-panel p {
  margin: 0;
  color: var(--steel-700);
  font-weight: 700;
}

.security-user-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  align-items: end;
}

.security-user-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.security-user-form label span,
.security-user-row small {
  color: var(--steel-500);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.security-user-form input,
.security-user-form select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #f7f9fc;
  font: inherit;
}

.security-user-form button {
  min-height: 40px;
}

.password-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.password-field-row .ghost-btn {
  padding: 0 12px;
  white-space: nowrap;
}

.security-user-help,
.security-user-status {
  padding: 10px 12px;
  border-radius: 6px;
  background: #f7f9fc;
}

.security-user-status:empty {
  display: none;
}

.security-users-list {
  display: grid;
  gap: 8px;
}

.security-permission-matrix {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.security-permission-matrix header h3 {
  margin: 3px 0 4px;
  color: var(--blue-900);
}

.security-permission-table {
  display: grid;
  gap: 6px;
  overflow-x: auto;
}

.security-permission-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(6, minmax(120px, 1fr));
  gap: 6px;
  min-width: 980px;
  align-items: center;
}

.security-permission-row > span {
  min-height: 42px;
  display: grid;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #f8fafc;
  color: var(--blue-950);
  font-weight: 900;
}

.security-permission-head > span {
  min-height: 34px;
  background: #eef4fa;
  color: var(--steel-700);
  font-size: 11px;
  text-transform: uppercase;
}

.security-permission-row small {
  display: block;
  margin-top: 3px;
  color: var(--steel-600);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.permission-pill {
  text-align: center;
}

.permission-pill[data-state="full"],
.permission-pill[data-state="write"] {
  border-color: #9fd1b1;
  background: #ecf8f0;
  color: #14532d;
}

.permission-pill[data-state="read"] {
  border-color: #b8cce5;
  background: #edf5ff;
  color: #17456f;
}

.permission-pill[data-state="blocked"] {
  border-color: #ead0d0;
  background: #fff5f5;
  color: #8b1e1e;
}

.security-user-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, 1fr));
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.security-user-row strong,
.security-user-row b {
  display: block;
  color: var(--blue-950);
  overflow-wrap: anywhere;
}

.security-user-row span {
  display: block;
  margin-top: 3px;
  color: var(--steel-600);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .security-users-panel header,
  .security-user-row {
    grid-template-columns: 1fr;
  }

  .security-users-panel header {
    display: grid;
  }
}

.logs-filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.logs-filter-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 900;
}

.logs-timeline {
  display: grid;
  gap: 10px;
}

.logs-timeline article {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue-700);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.logs-timeline article[data-level="secure"] {
  border-left-color: #9b1c1c;
}

.logs-timeline article[data-level="warning"] {
  border-left-color: var(--warn);
}

.logs-timeline article[data-level="danger"] {
  border-left-color: var(--accent);
}

.log-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--blue-700);
}

.logs-timeline article[data-level="secure"] .log-dot {
  background: #9b1c1c;
}

.logs-timeline article[data-level="warning"] .log-dot {
  background: var(--warn);
}

.logs-timeline article[data-level="danger"] .log-dot {
  background: var(--accent);
}

.logs-timeline header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.logs-timeline strong {
  color: var(--blue-900);
}

.logs-timeline header span,
.logs-timeline small {
  color: var(--steel-500);
  font-size: 12px;
  font-weight: 800;
}

.log-audit-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
  margin: 8px 0;
}

.log-audit-meta span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #f8fafc;
}

.log-audit-meta small {
  display: block;
  margin-bottom: 3px;
  color: var(--steel-500);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.log-audit-meta strong {
  display: block;
  color: var(--blue-900);
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.logs-timeline p {
  margin: 6px 0;
  color: var(--steel-700);
}

.backup-board {
  display: grid;
  gap: 14px;
}

.backup-metrics,
.backup-policy,
.backup-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.backup-metrics article,
.backup-policy article,
.backup-timeline article {
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue-700);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.backup-metrics span {
  color: var(--steel-500);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.backup-metrics strong,
.backup-policy strong,
.backup-timeline strong {
  display: block;
  margin-top: 4px;
  color: var(--blue-900);
  overflow-wrap: anywhere;
}

.backup-policy article {
  border-left-color: var(--orange-600);
}

.backup-policy p,
.backup-timeline span {
  margin: 6px 0 0;
  color: var(--steel-700);
}

.backup-timeline article[data-state="ok"] {
  border-left-color: var(--ok);
}

@media (max-width: 980px) {
  .employee-summary-card {
    grid-template-columns: 1fr;
  }

  .employee-summary-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .employee-summary-fields,
  .employee-section-grid,
  .employee-wide-grid,
  .employee-doc-grid,
  .employee-list-grid,
  .employee-permission-grid,
  .employee-restricted-grid {
    grid-template-columns: 1fr;
  }

  .employee-photo,
  .vehicle-photo {
    width: 58px;
    height: 58px;
    font-size: 20px;
  }
}

.employee-admin-panel {
  display: grid;
  gap: 18px;
}

.compact-head {
  margin-bottom: 0;
}

.employee-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  align-items: start;
}

.employee-form input,
.employee-form select {
  width: 100%;
}

.employee-form .password-control {
  width: 100%;
}

.employee-active {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  font-weight: 800;
}

.employee-active input {
  width: auto;
}

.zones-picker-label {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.zone-permissions {
  display: grid;
  gap: 8px;
}

.zone-permission-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.3fr) repeat(3, minmax(92px, 0.75fr));
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
}

.zone-permission-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  min-height: 32px;
}

.zone-permission-row input {
  width: auto;
}

.employee-list {
  display: grid;
  gap: 10px;
}

@media (max-width: 920px) {
  .storage-client-dashboard header {
    display: grid;
  }

  .storage-client-kpis,
  .storage-client-contact,
  .storage-flow-grid {
    grid-template-columns: 1fr;
  }

  .employee-form {
    grid-template-columns: 1fr;
  }

  .zone-permission-row {
    grid-template-columns: 1fr;
  }
}
