:root {
  --graphite: #283142;
  --sidebar: #172233;
  --sidebar-deep: #111a28;
  --cobalt: #0057b8;
  --cobalt-active: #0867d8;
  --white: #ffffff;
  --page: #f3f6fa;
  --panel: #f8fafc;
  --border: #dde3ea;
  --text: #111827;
  --muted: #667085;
  --success: #16a34a;
  --warning: #f59e0b;
  --critical: #dc2626;
  --shadow: 0 24px 70px rgba(17, 24, 39, 0.08);
  --soft-shadow: 0 10px 30px rgba(17, 24, 39, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--page);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body.auth-loading .app-shell,
body.auth-loading .bottom-nav,
body:not(.is-authenticated) .app-shell,
body:not(.is-authenticated) .bottom-nav {
  display: none;
}

body.is-authenticated .auth-screen {
  display: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-screen {
  min-height: 100vh;
  padding: 42px;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 520px);
  gap: 42px;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(23, 35, 52, 0.98) 0%, rgba(23, 35, 52, 0.92) 42%, rgba(243, 246, 250, 0.92) 42%, rgba(243, 246, 250, 1) 100%),
    var(--page);
}

.auth-brand {
  min-height: calc(100vh - 84px);
  padding: 42px 46px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--white);
  background:
    radial-gradient(circle at 88% 16%, rgba(8, 103, 216, 0.28), transparent 30%),
    linear-gradient(180deg, #172334, #111a28);
  box-shadow: var(--shadow);
}

.auth-brand .brand-logo {
  width: 220px;
}

.auth-brand p,
.auth-copy p,
.auth-pending p {
  margin: 0;
}

.auth-brand h1 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 620;
}

.auth-brand p {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
}

.auth-brand span {
  max-width: 520px;
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.55;
}

.auth-card {
  padding: 28px;
  border: 1px solid rgba(221, 227, 234, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.auth-tabs {
  height: 42px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--panel);
}

.auth-tabs button {
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 620;
}

.auth-tabs button.active {
  color: var(--white);
  background: linear-gradient(135deg, var(--cobalt), var(--cobalt-active));
  box-shadow: 0 10px 24px rgba(0, 87, 184, 0.18);
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form .primary-button {
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
}

.auth-copy {
  margin-bottom: 2px;
}

.auth-copy p {
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 700;
}

.auth-copy h2,
.auth-pending h2 {
  margin: 6px 0 0;
  font-size: 24px;
  line-height: 1.14;
  font-weight: 620;
}

.auth-message {
  min-height: 18px;
  margin-top: 16px;
  color: var(--critical);
  font-size: 13px;
  font-weight: 560;
}

.auth-message.success {
  color: var(--success);
}

.auth-pending {
  padding: 22px 0 8px;
  text-align: center;
}

.auth-pending-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--success);
  font-size: 24px;
  font-weight: 800;
}

.auth-pending p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

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

.sidebar {
  min-height: 100vh;
  padding: 40px 20px 28px;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 18%, rgba(8, 103, 216, 0.22), transparent 28%),
    linear-gradient(180deg, #172334, var(--sidebar-deep));
  display: flex;
  flex-direction: column;
  gap: 38px;
}

.brand,
.mobile-brand,
.manager-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 204px;
  height: auto;
  display: block;
}

.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: var(--white);
  font-weight: 800;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.08);
}

.brand-name {
  font-size: 29px;
  font-weight: 800;
  line-height: 1;
}

.brand-caption {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 14px;
}

.nav-item {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.86);
  background: transparent;
  font-size: 16px;
  font-weight: 480;
}

.nav-item.active {
  color: var(--white);
  background: linear-gradient(135deg, var(--cobalt), var(--cobalt-active));
  box-shadow: 0 12px 32px rgba(0, 87, 184, 0.34);
}

.nav-icon,
.stage-node svg,
.metric svg,
.summary-item svg,
.doc-action svg,
.cost-icon svg,
.small-copy svg {
  width: 22px;
  height: 22px;
  display: block;
}

.nav-icon svg,
.stage-node svg,
.metric svg,
.summary-item svg,
.doc-action svg,
.cost-icon svg,
.small-copy svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-icon {
  width: 22px;
  height: 22px;
  display: block;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.sidebar-footer {
  margin-top: auto;
  display: none;
  gap: 22px;
}

.client-card,
.company-chip,
.role-field,
.topbar-actions label.manager-only {
  display: none !important;
}

.client-card {
  min-height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
}

.client-card > .muted {
  display: none;
}

.client-card small,
.manager-line span,
.muted {
  color: var(--muted);
}

.client-card .muted,
.manager-line span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #edf6ff, #b8d7ff);
  color: var(--graphite);
  font-weight: 800;
}

.avatar-photo {
  object-fit: cover;
  overflow: hidden;
}

.workspace {
  min-width: 0;
  height: 100vh;
  padding: 32px 38px 28px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

.workspace::before,
.workspace::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 104px;
  pointer-events: none;
}

.workspace::before {
  background:
    linear-gradient(90deg, rgba(243, 246, 250, 0) 0%, rgba(248, 250, 253, 0.82) 18%, rgba(248, 250, 253, 0.74) 72%, rgba(243, 246, 250, 0) 100%);
}

.workspace::after {
  background-image: url("/assets/pantera-header-wave.svg");
  background-repeat: no-repeat;
  background-position: 40px 0;
  background-size: 900px 104px;
  opacity: 1;
}

.topbar,
.hero-panel,
.content-grid,
.overview-page,
.containers-page,
.empty-page {
  position: relative;
  z-index: 1;
}

.topbar {
  min-height: 54px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.mobile-brand {
  display: none;
}

.title-block p,
.panel-head p,
.dialog-head p {
  margin: 0 0 6px;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 700;
}

.title-block p {
  display: none;
}

.title-block h1,
.panel-head h2,
.dialog-head h2 {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0;
}

.title-block h1 {
  font-size: 28px;
  line-height: 1.08;
  font-weight: 620;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.role-field,
.topbar-actions > .manager-only {
  display: none !important;
}

.company-chip {
  min-height: 44px;
  padding: 0 14px;
  border-left: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
}

.company-chip strong {
  font-weight: 520;
  letter-spacing: 0;
}

.company-chip::after {
  content: "⌄";
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  margin-left: 4px;
}

.company-chip .nav-icon,
.top-icon .nav-icon {
  color: var(--graphite);
}

.top-icon {
  width: 42px;
  height: 42px;
  border: 0;
  border-left: 1px solid var(--border);
  background: transparent;
  display: grid;
  place-items: center;
}

.top-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--graphite);
  font-weight: 800;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.field input,
.field select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: var(--white);
  outline: 0;
}

.field input:focus,
.field select:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 4px rgba(0, 87, 184, 0.1);
}

.field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 520;
}

.field.compact {
  min-width: 158px;
}

.icon-button,
.primary-button,
.text-button {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 0 16px;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.08);
  font-weight: 620;
}

.icon-button {
  width: 42px;
  padding: 0;
  font-size: 22px;
}

.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--cobalt), var(--cobalt-active));
}

.text-button {
  background: transparent;
}

.documents-panel .text-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
}

.documents-panel .text-button::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.text-button.danger {
  color: var(--critical);
}

.detail-toolbar {
  min-height: 42px;
  margin: -4px 0 12px;
  display: flex;
  align-items: center;
}

.back-button {
  min-height: 38px;
  border: 1px solid rgba(221, 227, 234, 0.9);
  border-radius: 8px;
  padding: 0 14px 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--graphite);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.04);
  font-size: 13px;
  font-weight: 560;
}

.back-button:hover {
  color: var(--cobalt);
  border-color: rgba(0, 87, 184, 0.22);
  background: var(--white);
}

.back-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--cobalt);
  font-size: 24px;
  line-height: 1;
}

.hero-panel,
.panel {
  border: 1px solid rgba(221, 227, 234, 0.86);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.hero-panel {
  height: 369px;
  padding: 22px 26px 22px;
  margin-bottom: 16px;
}

.hero-top {
  display: grid;
  grid-template-columns: 390px 224px 154px 222px;
  gap: 18px;
  align-items: start;
  margin-bottom: 26px;
}

.container-kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.container-title {
  margin: 6px 0 8px;
  font-size: 38px;
  line-height: 1;
  white-space: nowrap;
  font-weight: 510;
}

.small-copy {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 8px;
  color: var(--muted);
}

.small-copy svg {
  width: 16px;
  height: 16px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: var(--muted);
  font-size: 13px;
}

.mobile-client-line {
  display: none;
}

.meta-line strong {
  color: var(--text);
}

.status-line {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cobalt);
}

.status-text {
  color: var(--cobalt);
  font-size: 25px;
  font-weight: 590;
}

.status-caption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.metric {
  min-height: 70px;
  padding-left: 22px;
  border-left: 1px solid var(--border);
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 11px;
  align-items: start;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
  line-height: 1.15;
}

.metric-label {
  white-space: nowrap;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 17px;
  font-weight: 520;
  line-height: 1.15;
}

.metric svg,
.metric .svg-icon {
  grid-row: span 3;
  margin-top: 18px;
  color: var(--graphite);
}

.metric:last-child strong {
  white-space: nowrap;
}

.risk-low {
  color: var(--success);
}

.risk-medium {
  color: var(--warning);
}

.risk-high {
  color: var(--critical);
}

.route {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
}

.route-stage {
  position: relative;
  min-width: 0;
  text-align: center;
}

.route-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 26px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: #d9dfe7;
}

.route-stage:first-child::before {
  display: none;
}

.route-stage.done::before,
.route-stage.current::before {
  background: #0a5fbe;
}

.stage-node {
  position: relative;
  z-index: 2;
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 2px solid #d9dfe7;
  display: grid;
  place-items: center;
  color: #687386;
  background: var(--white);
  font-weight: 800;
}

.stage-node svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
}

.stage-node .svg-icon {
  width: 25px;
  height: 25px;
}

.route-stage.done .stage-node::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cobalt);
  border: 2px solid var(--white);
  box-shadow: 0 3px 8px rgba(0, 87, 184, 0.2);
}

.route-stage.done .stage-node::before {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  z-index: 2;
  width: 5px;
  height: 3px;
  border-left: 1.5px solid var(--white);
  border-bottom: 1.5px solid var(--white);
  transform: rotate(-45deg);
}

.route-stage.current .stage-node::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cobalt);
  transform: translateX(-50%);
}

.route-stage.done .stage-node,
.route-stage.current .stage-node {
  border-color: #0a5fbe;
  color: #0a5fbe;
  box-shadow: 0 8px 22px rgba(0, 87, 184, 0.16);
}

.route-stage.current .stage-node {
  background: var(--white);
}

.route-stage.is-future .stage-node {
  color: #687386;
  border-color: #d9dfe7;
  box-shadow: none;
}

.route-stage strong {
  display: block;
  font-size: 14px;
  font-weight: 520;
}

.route-stage span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.panel {
  min-width: 0;
  height: 396px;
  min-height: 396px;
  padding: 16px 20px 14px;
}

.list-panel,
.access-panel {
  display: none;
}

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

.panel-head h2 {
  font-size: 16px;
  font-weight: 520;
}

.panel-head p:empty {
  display: none;
}

.count-pill,
.badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(0, 87, 184, 0.08);
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 750;
}

.container-list {
  display: grid;
}

.container-row {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--border);
  padding: 15px 0;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, 0.8fr) minmax(112px, 0.7fr) 34px;
  gap: 12px;
  text-align: left;
  color: var(--text);
  background: transparent;
}

.container-row.active {
  color: var(--cobalt);
}

.container-row strong,
.line-item strong,
.doc-row strong {
  display: block;
  font-weight: 560;
}

.container-row span,
.line-item span,
.doc-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.row-arrow {
  align-self: center;
  justify-self: end;
  color: var(--muted);
}

.segmented {
  min-width: 164px;
  height: 30px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--panel);
}

.segmented button {
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 560;
}

.segmented button.active {
  color: var(--white);
  background: var(--cobalt);
}

.size-segmented {
  min-width: 108px;
  width: 108px;
  grid-template-columns: repeat(2, 1fr);
}

.size-segmented button {
  font-size: 12px;
}

.total-line {
  margin: 4px 0 16px;
}

.total-line span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.total-line strong {
  display: block;
  margin-top: 8px;
  font-size: 36px;
  letter-spacing: 0;
}

.cost-table {
  display: grid;
}

.cost-head,
.line-item,
.doc-row {
  min-height: 40px;
  border-top: 1px solid var(--border);
  display: grid;
  align-items: center;
  gap: 12px;
}

.cost-head {
  min-height: 34px;
  grid-template-columns: minmax(220px, 1fr) 90px 90px 100px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.line-item {
  grid-template-columns: minmax(220px, 1fr) 90px 90px 100px;
}

.cost-table .line-item {
  min-height: 39px;
}

.cost-table .line-item strong {
  font-size: 14px;
  font-weight: 450;
}

.cost-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cost-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  background: transparent;
}

.cost-icon.blue {
  background: transparent;
}

.cost-icon.neutral {
  background: transparent;
}

.cost-tile-img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

.total-row {
  min-height: 42px;
  background: var(--panel);
  padding: 0 10px;
  border-radius: 0 0 8px 8px;
  font-weight: 540;
}

.doc-row {
  min-height: 54px;
  grid-template-columns: 42px minmax(0, 1fr) 100px 38px 38px;
  gap: 14px;
}

.doc-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.08);
  font-size: 11px;
  font-weight: 800;
}

.doc-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.doc-icon .svg-icon {
  width: 22px;
  height: 22px;
}

.doc-picto {
  width: 25px;
  height: 25px;
  display: block;
}

.doc-icon.pdf {
  color: #ef3f3f;
  background: rgba(239, 68, 68, 0.08);
}

.doc-icon.sheet {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.1);
}

.doc-icon.doc {
  color: #0b66d8;
  background: rgba(11, 102, 216, 0.1);
}

.doc-meta strong,
.doc-meta span {
  display: block;
  font-size: 12px;
}

.doc-meta strong {
  color: var(--muted);
  font-weight: 520;
}

.doc-action {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--cobalt);
  background: var(--white);
}

.doc-action svg {
  width: 16px;
  height: 16px;
}

.doc-action .svg-icon {
  width: 16px;
  height: 16px;
}

.doc-action.disabled {
  color: #aeb6c2;
  background: #f1f3f6;
}

.doc-status {
  font-size: 13px;
  font-weight: 520;
}

.doc-row strong {
  font-size: 14px;
  font-weight: 500;
}

.doc-row span {
  font-size: 12px;
}

.access-panel {
  grid-column: 2;
}

.access-group + .access-group {
  margin-top: 18px;
}

.access-group h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.access-row {
  min-height: 54px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.access-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.access-status {
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.dashboard-page {
  display: grid;
  gap: 8px;
}

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

.dashboard-kpi {
  min-height: 108px;
  border: 1px solid rgba(221, 227, 234, 0.9);
  border-radius: 12px;
  padding: 14px 18px 12px;
  display: grid;
  grid-template-columns: 46px 1fr;
  column-gap: 14px;
  align-items: start;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--soft-shadow);
}

.dashboard-kpi-icon {
  width: 38px;
  height: 38px;
  grid-row: span 3;
  object-fit: contain;
}

.dashboard-kpi span {
  min-height: 32px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.24;
  font-weight: 560;
}

.dashboard-kpi strong {
  display: block;
  margin-top: 2px;
  font-size: 28px;
  line-height: 1;
  font-weight: 590;
}

.dashboard-kpi small {
  display: block;
  margin-top: 6px;
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 520;
}

.dashboard-kpi.green small {
  color: var(--success);
}

.dashboard-route-panel {
  height: 108px;
  min-height: 108px;
  padding: 13px 20px 11px;
}

.dashboard-panel-head {
  margin-bottom: 10px;
}

.dashboard-panel-head h2 {
  font-size: 16px;
  line-height: 1.15;
  font-weight: 560;
}

.dashboard-panel-head h2 span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.dashboard-updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.dashboard-updated .summary-refresh-img {
  width: 16px;
  height: 16px;
}

.dashboard-route {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
}

.dashboard-route-stage {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 12px;
  align-items: center;
}

.dashboard-route-stage::before {
  content: "";
  position: absolute;
  top: 31px;
  right: 19px;
  width: 18px;
  height: 18px;
  border-top: 1.5px solid #9aa5b5;
  border-right: 1.5px solid #9aa5b5;
  transform: rotate(45deg);
  opacity: 0.76;
}

.dashboard-route-stage::after {
  display: none;
}

.dashboard-route-stage.last::before {
  display: none;
}

.dashboard-route-node {
  width: 38px;
  height: 38px;
  grid-row: span 3;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--cobalt);
  background: linear-gradient(180deg, #eff6ff, #dfeeff);
}

.dashboard-route-stage.cyan .dashboard-route-node {
  color: #087fa3;
  background: linear-gradient(180deg, #eefbff, #d9f5fb);
}

.dashboard-route-stage.amber .dashboard-route-node {
  color: var(--cobalt);
  background: linear-gradient(180deg, #eff6ff, #e3efff);
}

.dashboard-route-stage.gray .dashboard-route-node {
  color: #7b8797;
  background: linear-gradient(180deg, #f6f8fb, #edf1f6);
}

.dashboard-route-node .svg-icon {
  width: 27px;
  height: 27px;
  margin: 0;
  color: inherit;
  background: currentColor;
}

.dashboard-route-stage strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 560;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dashboard-route-stage b {
  display: block;
  margin-top: 3px;
  font-size: 22px;
  line-height: 1;
  font-weight: 620;
}

.dashboard-route-stage span {
  display: block;
  margin: 3px 0 11px;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: 8px 12px;
}

.dashboard-grid .panel {
  height: auto;
  min-height: 0;
  padding: 16px 20px 14px;
}

.dashboard-chart-panel,
.dashboard-rates-panel {
  min-height: 262px !important;
}

.dashboard-trend-panel,
.dashboard-savings-panel {
  min-height: 202px !important;
}

.dashboard-trend-panel {
  position: relative;
}

.dashboard-select {
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--graphite);
  background: rgba(248, 250, 252, 0.82);
  font-size: 12px;
  font-weight: 520;
}

.dashboard-select::after {
  content: "⌄";
  margin-left: 8px;
  color: var(--muted);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chart-legend i {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
}

.legend-plan,
.legend-pantera {
  background: var(--cobalt);
}

.legend-fact {
  background: #9fc8ff;
}

.legend-market {
  background: #9aa5b5;
}

.shipment-chart {
  height: 174px;
  margin-top: 10px;
  padding: 12px 4px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.shipment-month {
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr 22px;
  text-align: center;
}

.bars {
  height: 128px;
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 10px;
}

.bars i {
  position: relative;
  width: 22px;
  min-height: 4px;
  border-radius: 2px 2px 0 0;
  display: block;
}

.bars .plan {
  background: var(--cobalt);
}

.bars .fact {
  background: #9fc8ff;
}

.bars span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px);
  transform: translateX(-50%);
  color: var(--text);
  font-size: 11px;
  font-weight: 540;
}

.shipment-month strong {
  color: var(--graphite);
  font-size: 12px;
  font-weight: 520;
}

.rate-table {
  display: grid;
  margin-top: 6px;
}

.rate-head,
.rate-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.18fr) 94px 94px 82px;
  gap: 12px;
  align-items: center;
}

.rate-head {
  min-height: 38px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 560;
}

.rate-head small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 520;
}

.rate-row {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-bottom: 1px solid rgba(221, 227, 234, 0.82);
  padding: 0;
  text-align: left;
  color: var(--text);
  background: transparent;
}

.rate-row span {
  overflow: hidden;
  color: var(--graphite);
  font-size: 12px;
  font-weight: 540;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rate-row strong {
  font-size: 12px;
  font-weight: 520;
}

.rate-row .pantera-rate {
  color: var(--cobalt);
  font-weight: 650;
}

.rate-row .saving-rate {
  color: var(--success);
  font-weight: 650;
}

.trend-chart {
  position: relative;
  height: 124px;
  margin: 12px 110px 0 0;
  border: 0;
}

.trend-svg {
  width: 100%;
  height: 124px;
  display: block;
  overflow: visible;
}

.trend-grid-line {
  stroke: rgba(221, 227, 234, 0.8);
  stroke-width: 1;
}

.trend-line {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-line.market {
  stroke: #9aa5b5;
}

.trend-line.pantera {
  stroke: var(--cobalt);
}

.trend-circle {
  stroke: var(--white);
  stroke-width: 2;
}

.trend-circle.market {
  fill: #9aa5b5;
}

.trend-circle.pantera {
  fill: var(--cobalt);
}

.trend-label,
.trend-month-label {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 520;
  text-anchor: middle;
}

.trend-label.market {
  fill: var(--muted);
}

.trend-label.pantera {
  fill: var(--cobalt);
}

.trend-month-label {
  fill: var(--muted);
}

.trend-summary {
  position: absolute;
  right: 20px;
  bottom: 18px;
  width: 90px;
  min-height: 98px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  align-content: start;
  gap: 6px;
  background: rgba(248, 250, 252, 0.86);
}

.trend-summary span,
.trend-summary small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 520;
}

.trend-summary strong {
  color: var(--cobalt);
  font-size: 20px;
  line-height: 1;
  font-weight: 560;
}

.trend-summary b {
  color: var(--success);
  font-size: 13px;
  font-weight: 540;
}

.dashboard-savings-panel {
  position: relative;
}

.savings-table {
  padding-right: 150px;
}

.savings-head,
.saving-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 96px 62px 30px;
  gap: 10px;
  align-items: center;
}

.savings-head {
  min-height: 28px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 560;
}

.saving-row {
  min-height: 28px;
  border-bottom: 1px solid rgba(221, 227, 234, 0.76);
  font-size: 12px;
}

.saving-row span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.saving-row strong {
  font-weight: 560;
}

.saving-row b {
  color: var(--graphite);
  font-weight: 520;
}

.saving-bar {
  height: 7px;
  border-radius: 99px;
  background: #ecf3f0;
  overflow: hidden;
}

.saving-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #24b26b;
}

.total-saving {
  position: absolute;
  top: 56px;
  right: 20px;
  width: 124px;
  min-height: 116px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 12px;
  display: grid;
  align-content: start;
  gap: 10px;
  background: rgba(248, 250, 252, 0.9);
}

.total-saving span {
  color: var(--graphite);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 560;
}

.total-saving strong {
  color: var(--cobalt);
  font-size: 21px;
  line-height: 1.05;
  font-weight: 590;
  white-space: nowrap;
}

.total-saving small {
  color: var(--success);
  font-size: 13px;
  font-weight: 520;
}

.dashboard-summary-strip {
  height: 68px;
  min-height: 68px;
  border: 1px solid rgba(221, 227, 234, 0.86);
  border-radius: 12px;
  padding: 7px 18px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.dashboard-summary-strip .summary-item {
  min-height: 40px;
  grid-template-columns: 32px 1fr;
  column-gap: 12px;
}

.dashboard-summary-strip .summary-item:last-child {
  border-right: 0;
}

.dashboard-summary-strip .summary-item strong {
  font-size: 15px;
  line-height: 1.12;
}

.containers-page {
  display: grid;
  gap: 16px;
}

.containers-hero {
  min-height: 158px;
  height: auto;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(520px, 1.35fr);
  gap: 28px;
  align-items: center;
}

.containers-hero-copy p,
.register-toolbar p {
  margin: 0 0 6px;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 700;
}

.containers-hero-copy h2,
.register-toolbar h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  font-weight: 620;
  letter-spacing: 0;
}

.containers-hero-copy span,
.register-toolbar span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.containers-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  min-height: 88px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.76);
  overflow: hidden;
}

.register-stat {
  min-width: 0;
  padding: 15px 16px;
  border-right: 1px solid var(--border);
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 12px;
  align-items: center;
}

.register-stat:last-child {
  border-right: 0;
}

.register-stat .svg-icon,
.register-stat .metric-icon-img {
  width: 28px;
  height: 28px;
  grid-row: span 2;
  color: var(--graphite);
}

.register-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.register-stat strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
  font-weight: 560;
  line-height: 1.15;
}

.containers-register {
  min-height: 608px;
  height: auto;
  padding: 18px 20px 14px;
}

.register-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.register-toolbar h2 {
  font-size: 21px;
}

.register-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-field {
  width: 238px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  background: var(--white);
}

.search-field .nav-icon,
.search-field .nav-icon svg {
  width: 18px;
  height: 18px;
}

.search-field input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 13px;
}

.register-segmented {
  min-width: 218px;
  height: 42px;
}

.register-table {
  display: grid;
}

.register-head,
.register-row {
  display: grid;
  grid-template-columns: minmax(64px, 0.34fr) minmax(148px, 1.13fr) minmax(154px, 1.04fr) minmax(104px, 0.74fr) minmax(128px, 0.86fr) minmax(112px, 0.72fr) minmax(92px, 0.58fr) 24px;
  gap: 12px;
  align-items: center;
}

.register-head {
  min-height: 36px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.register-row {
  width: 100%;
  min-height: 88px;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 11px 0;
  text-align: left;
  color: var(--text);
  background: transparent;
}

.register-row:hover {
  background: linear-gradient(90deg, rgba(0, 87, 184, 0.055), rgba(255, 255, 255, 0));
}

.register-row:hover .register-container-cell strong {
  color: var(--cobalt);
}

.register-deal-cell strong {
  color: var(--graphite);
  font-size: 17px;
  font-weight: 560;
}

.register-row strong {
  display: block;
  font-size: 14px;
  font-weight: 560;
  line-height: 1.2;
}

.register-row span,
.register-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.register-container-cell strong {
  font-size: 18px;
  font-weight: 560;
  white-space: nowrap;
}

.status-pill {
  width: fit-content;
  min-height: 24px;
  margin: 0 0 8px !important;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--cobalt) !important;
  background: rgba(0, 87, 184, 0.08);
  font-size: 12px !important;
  font-weight: 620;
}

.mini-route {
  width: min(154px, 100%);
  height: 18px;
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: center;
  gap: 5px;
}

.mini-route span {
  height: 6px;
  margin: 0;
  border-radius: 99px;
  background: #d9dfe7;
}

.mini-route span.done,
.mini-route span.current {
  background: var(--cobalt);
}

.mini-route span.current {
  box-shadow: 0 0 0 4px rgba(0, 87, 184, 0.12);
}

.register-empty {
  min-height: 220px;
  border-top: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.shipment-plan-page {
  position: relative;
  z-index: 1;
}

.shipment-plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 12px;
  align-items: start;
}

.shipment-plan-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.shipment-plan-stats {
  height: 102px;
  min-height: 102px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.shipment-stat {
  min-width: 0;
  padding: 19px 24px;
  border-right: 1px solid var(--border);
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  align-content: center;
}

.shipment-stat:last-child {
  border-right: 0;
}

.shipment-stat-icon {
  width: 38px;
  height: 38px;
  grid-row: span 2;
  align-self: center;
  object-fit: contain;
}

.shipment-stat span {
  color: var(--graphite);
  font-size: 13px;
  font-weight: 540;
  line-height: 1.22;
}

.shipment-stat strong {
  margin-top: 4px;
  font-size: 27px;
  line-height: 1;
  font-weight: 590;
}

.shipment-plan-register {
  height: auto;
  min-height: 702px;
  padding: 14px 0 0;
  overflow: hidden;
}

.shipment-filters {
  padding: 0 14px 10px;
  border-bottom: 1px solid rgba(221, 227, 234, 0.72);
}

.shipment-filter-grid {
  display: grid;
  grid-template-columns: 136px 104px 104px 126px minmax(210px, 1fr);
  gap: 10px;
  align-items: end;
}

.shipment-filter {
  gap: 6px;
}

.shipment-filter span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
}

.shipment-filter input,
.shipment-filter select {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.shipment-status-filter {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.shipment-status-filter button {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 8px;
  color: var(--graphite);
  background: rgba(248, 250, 252, 0.82);
  font-size: 11px;
  font-weight: 560;
  white-space: nowrap;
}

.shipment-status-filter button.active {
  color: var(--white);
  border-color: var(--cobalt);
  background: var(--cobalt);
  box-shadow: 0 8px 20px rgba(0, 87, 184, 0.16);
}

.shipment-search-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) 38px auto;
  gap: 10px;
  align-items: center;
}

.shipment-search {
  width: 100%;
  height: 36px;
  border-radius: 8px;
}

.shipment-filter-button {
  width: 36px;
  height: 36px;
}

.shipment-filter-button .svg-icon {
  width: 16px;
  height: 16px;
}

.shipment-new-button {
  min-height: 36px;
  padding: 0 16px;
  font-size: 12px;
  white-space: nowrap;
}

.shipment-table {
  display: grid;
}

.shipment-table-head,
.shipment-table-row {
  display: grid;
  grid-template-columns: 32px 58px minmax(128px, 1fr) 88px minmax(104px, 0.82fr) 48px 82px 90px;
  gap: 8px;
  align-items: center;
}

.shipment-table-head {
  min-height: 43px;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  color: var(--graphite);
  font-size: 12px;
  font-weight: 620;
}

.shipment-table-row {
  position: relative;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-bottom: 1px solid rgba(221, 227, 234, 0.78);
  padding: 0 16px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.shipment-table-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
}

.shipment-table-row:hover,
.shipment-table-row.active {
  background: linear-gradient(90deg, rgba(0, 87, 184, 0.08), rgba(255, 255, 255, 0));
}

.shipment-table-row.active::before {
  background: var(--cobalt);
}

.shipment-table-row span,
.shipment-table-row strong {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
}

.shipment-table-row strong {
  color: var(--cobalt);
  font-weight: 580;
}

.shipment-table-row .row-index {
  color: var(--cobalt);
  font-weight: 520;
}

.plan-status-pill {
  width: fit-content;
  min-height: 22px;
  border-radius: 6px;
  padding: 4px 8px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.08);
  font-size: 11px !important;
  font-weight: 650;
  white-space: nowrap;
}

.plan-status-pill.amber {
  color: #d97706;
  background: rgba(245, 158, 11, 0.12);
}

.plan-status-pill.gray {
  color: #606b7b;
  background: #eef1f5;
}

.shipment-table-footer {
  min-height: 58px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.shipment-pages {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shipment-pages button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  color: var(--graphite);
  background: transparent;
  font-size: 12px;
  font-weight: 560;
}

.shipment-pages button.active {
  color: var(--white);
  background: var(--cobalt);
  box-shadow: 0 8px 20px rgba(0, 87, 184, 0.18);
}

.shipment-table-footer label {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.shipment-table-footer select {
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--graphite);
  background: var(--white);
}

.shipment-detail {
  height: auto;
  min-height: 812px;
  padding: 0;
  overflow: hidden;
}

.plan-detail-head {
  min-height: 56px;
  padding: 18px 16px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-detail-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 620;
}

.plan-detail-actions {
  padding: 0 16px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px 36px;
  gap: 8px;
}

.plan-detail-actions .primary-button {
  min-height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
}

.button-icon {
  width: 16px;
  height: 16px;
  color: currentColor;
}

.edit-action svg {
  width: 16px;
  height: 16px;
}

.plan-detail-section {
  border-top: 1px solid var(--border);
  padding: 13px 16px;
}

.plan-detail-section h3 {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--graphite);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 620;
}

.plan-detail-section h3 svg,
.plan-detail-section h3 .svg-icon {
  width: 17px;
  height: 17px;
  color: var(--graphite);
}

.plan-definition-grid,
.plan-finance-grid {
  margin: 0;
  display: grid;
  gap: 10px 14px;
}

.plan-definition-grid {
  grid-template-columns: 1fr 1fr;
}

.plan-finance-grid {
  grid-template-columns: 1fr 1fr;
}

.plan-definition-grid div,
.plan-finance-grid div {
  min-width: 0;
}

.plan-definition-grid dt,
.plan-finance-grid dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 520;
}

.plan-definition-grid dd,
.plan-finance-grid dd {
  margin: 0;
  overflow: hidden;
  color: var(--graphite);
  font-size: 12px;
  line-height: 1.24;
  font-weight: 560;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.plan-route {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.plan-route::before {
  content: "";
  position: absolute;
  left: 33px;
  right: 33px;
  top: 19px;
  height: 2px;
  background: var(--cobalt);
}

.plan-route div {
  position: relative;
  min-width: 0;
  display: grid;
  justify-items: center;
  text-align: center;
}

.plan-route div::before {
  content: "";
  width: 38px;
  height: 38px;
  border: 1px solid rgba(0, 87, 184, 0.38);
  border-radius: 50%;
  background: var(--white);
  grid-row: 1;
  grid-column: 1;
}

.plan-route .svg-icon {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  margin-top: 9px;
  color: var(--cobalt);
  grid-row: 1;
  grid-column: 1;
}

.plan-route strong {
  margin-top: 7px;
  max-width: 88px;
  overflow: hidden;
  color: var(--graphite);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 620;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.plan-route span {
  margin-top: 3px;
  max-width: 94px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.plan-doc {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
}

.plan-doc .doc-icon {
  width: 28px;
  height: 28px;
  grid-row: span 3;
}

.plan-doc .doc-picto {
  width: 19px;
  height: 19px;
}

.plan-doc strong,
.plan-doc span,
.plan-doc small {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.plan-doc strong {
  color: var(--graphite);
  font-size: 10px;
  font-weight: 620;
}

.plan-doc span {
  color: var(--muted);
  font-size: 10px;
}

.plan-doc small {
  color: var(--success);
  font-size: 10px;
}

.plan-doc.pending small {
  color: var(--warning);
}

.plan-doc.missing small {
  color: var(--muted);
}

.plan-date-list {
  display: grid;
  gap: 0;
}

.plan-date-item {
  position: relative;
  min-height: 28px;
  padding-left: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.plan-date-item::before {
  content: "";
  position: absolute;
  top: 13px;
  bottom: -13px;
  left: 6px;
  width: 1px;
  background: rgba(0, 87, 184, 0.42);
}

.plan-date-item:last-child::before {
  display: none;
}

.plan-date-item i {
  position: absolute;
  left: 2px;
  top: 7px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--cobalt);
  border-radius: 50%;
  background: var(--white);
}

.plan-date-item span {
  color: var(--graphite);
  font-size: 11px;
  line-height: 1.2;
}

.plan-date-item strong {
  color: var(--graphite);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 520;
  white-space: nowrap;
}

.plan-date-item.muted-date i {
  border-color: #b9c2cf;
}

.plan-date-item.muted-date::before {
  background: #d8dee7;
}

.plan-date-item.muted-date span,
.plan-date-item.muted-date strong {
  color: var(--muted);
}

.plan-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: center;
}

.plan-note span {
  min-width: 0;
  overflow: hidden;
  color: var(--graphite);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ready {
  color: var(--success);
}

.pending {
  color: var(--cobalt);
}

.missing {
  color: var(--muted);
}

.summary-strip-panel {
  margin-top: 14px;
  height: 85px;
  min-height: 85px;
  border: 1px solid rgba(221, 227, 234, 0.86);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
  padding: 10px 20px;
  display: grid;
  grid-template-columns: repeat(5, 1fr) 34px;
  align-items: center;
  gap: 18px;
}

.summary-item {
  min-width: 0;
  min-height: 48px;
  border-right: 1px solid var(--border);
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 18px;
  align-items: center;
}

.summary-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.summary-item strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  grid-column: 2;
  font-weight: 500;
}

.summary-item svg,
.summary-item .svg-icon,
.metric-icon-img {
  grid-row: span 2;
  align-self: center;
  justify-self: start;
  color: var(--graphite);
}

.metric-icon-img {
  width: 30px;
  height: 30px;
  display: block;
  object-fit: contain;
}

.summary-refresh {
  color: var(--muted);
  display: grid;
  place-items: center;
}

.summary-refresh svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.summary-refresh .svg-icon {
  width: 20px;
  height: 20px;
}

.summary-refresh-img {
  width: 22px;
  height: 22px;
  display: block;
}

.manager-tools {
  margin-top: 22px;
  display: flex;
  gap: 10px;
}

.finance-page {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.finance-calculation-page {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.finance-hero {
  height: auto;
  min-height: 156px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(560px, 1.42fr);
  gap: 28px;
  align-items: center;
}

.finance-hero-copy p,
.finance-detail-head p,
.finance-entry-toolbar p {
  margin: 0 0 6px;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 700;
}

.finance-hero-copy h2,
.finance-detail-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  font-weight: 620;
  letter-spacing: 0;
}

.finance-hero-copy span,
.finance-detail-head span,
.finance-empty-detail span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.finance-hero-stats {
  min-height: 88px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: rgba(248, 250, 252, 0.76);
  overflow: hidden;
}

.finance-stat {
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid var(--border);
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 4px 9px;
  align-items: center;
}

.finance-stat:last-child {
  border-right: 0;
}

.finance-stat-icon {
  width: 28px;
  height: 28px;
  grid-row: span 2;
  object-fit: contain;
}

.finance-stat span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 520;
  overflow-wrap: anywhere;
}

.finance-stat strong {
  min-width: 0;
  display: block;
  grid-column: 1 / -1;
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.15;
  font-weight: 580;
  white-space: nowrap;
}

.finance-stat.green strong,
.finance-positive {
  color: var(--success);
}

.finance-stat.red strong,
.finance-negative {
  color: var(--critical);
}

.finance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.finance-register {
  height: auto;
  min-height: 0;
  padding: 18px 20px 16px;
}

.finance-toolbar {
  margin-bottom: 14px;
}

.finance-register-controls {
  grid-template-columns: minmax(240px, 1fr) auto;
}

.finance-search {
  width: 280px;
}

.finance-new-button {
  min-height: 42px;
  padding: 0 16px;
  white-space: nowrap;
}

.finance-register-table {
  display: grid;
  overflow-x: auto;
}

.finance-register-head {
  min-width: 1040px;
  display: grid;
  grid-template-columns: 104px minmax(142px, 0.72fr) minmax(230px, 1.15fr) minmax(150px, 0.74fr) 108px 108px 108px 78px;
  gap: 10px;
  align-items: center;
}

.finance-register-head {
  min-height: 38px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.finance-register-row {
  min-width: 1040px;
  width: 100%;
  min-height: 82px;
  border: 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 10px;
  align-items: center;
  color: var(--text);
  background: transparent;
}

.finance-row-select {
  min-width: 0;
  min-height: 82px;
  border: 0;
  padding: 12px 0;
  display: grid;
  grid-template-columns: 104px minmax(142px, 0.72fr) minmax(230px, 1.15fr) minmax(150px, 0.74fr) 108px 108px 108px;
  gap: 10px;
  align-items: center;
  color: inherit;
  background: transparent;
  text-align: left;
}

.finance-register-row:hover,
.finance-register-row.active {
  background: linear-gradient(90deg, rgba(0, 87, 184, 0.06), rgba(255, 255, 255, 0));
}

.finance-register-row.active {
  color: var(--cobalt);
}

.finance-row-select strong,
.finance-entry-row strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 560;
}

.finance-row-select span,
.finance-entry-row span,
.finance-entry-row small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.finance-route-cell strong,
.finance-route-cell span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.finance-register-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.finance-register-actions .doc-action {
  width: 32px;
  height: 32px;
}

.finance-detail {
  height: auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.finance-detail-toolbar {
  margin: -4px 0 0;
}

.finance-calculation-hero {
  min-height: 138px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(520px, 1.08fr);
  gap: 28px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.86));
}

.finance-calculation-hero p {
  margin: 0 0 7px;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 700;
}

.finance-calculation-hero h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
  font-weight: 620;
  letter-spacing: 0;
}

.finance-calculation-hero span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.finance-calculation-kpis {
  min-height: 86px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.finance-calculation-kpis article {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  display: grid;
  align-content: center;
}

.finance-calculation-kpis article:last-child {
  border-right: 0;
}

.finance-calculation-kpis span,
.finance-calculation-kpis small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.finance-calculation-kpis strong {
  display: block;
  margin: 6px 0;
  font-size: 22px;
  line-height: 1.08;
  font-weight: 590;
  white-space: nowrap;
}

.finance-detail-head {
  min-height: 92px;
  padding: 18px 18px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.finance-detail-head h2 {
  font-size: 22px;
}

.finance-detail-actions {
  padding: 0 18px 16px;
  display: grid;
  grid-template-columns: 156px 156px 38px 38px;
  gap: 8px;
}

.finance-detail-actions .primary-button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 12px;
}

.finance-detail-actions .primary-button.expense {
  color: var(--graphite);
  background: rgba(40, 49, 66, 0.1);
}

.finance-cargo-summary {
  margin: 0 18px 18px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.finance-cargo-summary-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.finance-cargo-summary-head p,
.finance-cargo-head p,
.directory-hero p {
  margin: 0 0 4px;
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 700;
}

.finance-cargo-summary-head h3,
.finance-cargo-head h3,
.directory-hero h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.14;
  font-weight: 620;
  letter-spacing: 0;
}

.finance-cargo-summary-list {
  display: grid;
}

.finance-cargo-summary-row {
  min-height: 58px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(156px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.finance-cargo-summary-row strong,
.directory-item-row strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 560;
}

.finance-cargo-summary-row span,
.directory-item-row span,
.directory-hero span,
.directory-counter span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.finance-cargo-form {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.finance-cargo-head {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.finance-cargo-rows {
  display: grid;
  gap: 10px;
}

.finance-cargo-row {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 96px minmax(128px, 0.86fr) minmax(128px, 0.86fr) minmax(128px, 0.86fr) 38px;
  gap: 10px;
  align-items: end;
  background: var(--panel);
}

.finance-cargo-row .doc-action {
  width: 38px;
  height: 42px;
}

.directory-page {
  display: grid;
  gap: 16px;
}

.directory-hero {
  min-height: 142px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.directory-hero h2 {
  font-size: 28px;
}

.directory-hero span {
  max-width: 620px;
  font-size: 13px;
}

.directory-tabs {
  width: fit-content;
  margin-top: 16px;
}

.directory-tabs button {
  min-width: 112px;
}

.directory-counter {
  min-width: 142px;
  min-height: 86px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(248, 250, 252, 0.86);
}

.directory-counter strong {
  color: var(--cobalt);
  font-size: 30px;
  line-height: 1;
  font-weight: 620;
}

.directory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.directory-list,
.directory-editor {
  padding: 18px;
}

.directory-item-list {
  display: grid;
}

.directory-item-row {
  min-height: 68px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.56fr) 38px;
  gap: 16px;
  align-items: center;
}

.directory-item-row:first-child {
  border-top: 0;
}

.directory-item-form {
  display: grid;
  gap: 14px;
}

.admin-page {
  display: grid;
  gap: 16px;
}

.admin-hero {
  min-height: 144px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.admin-hero p {
  margin: 0 0 4px;
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 700;
}

.admin-hero h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.14;
  font-weight: 620;
}

.admin-hero span {
  max-width: 680px;
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.admin-stats {
  min-width: 390px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  background: rgba(248, 250, 252, 0.86);
}

.admin-stat {
  min-height: 82px;
  padding: 14px;
  border-right: 1px solid var(--border);
  display: grid;
  align-content: center;
}

.admin-stat:last-child {
  border-right: 0;
}

.admin-stat span,
.admin-user-meta span,
.admin-user-sections span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.admin-stat strong {
  margin-top: 6px;
  color: var(--text);
  font-size: 25px;
  line-height: 1;
  font-weight: 620;
}

.admin-users {
  padding: 18px;
}

.admin-user-list {
  display: grid;
}

.admin-user-row {
  min-height: 116px;
  border-top: 1px solid var(--border);
  padding: 16px 0;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(230px, 1fr) minmax(280px, 1.2fr) minmax(168px, 0.58fr);
  gap: 16px;
  align-items: start;
}

.admin-user-row:first-child {
  border-top: 0;
}

.admin-user-meta {
  min-width: 0;
}

.admin-user-meta strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 620;
}

.admin-user-meta span {
  display: block;
  margin-top: 5px;
}

.admin-user-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-user-status .field {
  gap: 5px;
}

.admin-user-status .field select {
  min-height: 38px;
}

.admin-user-sections {
  display: grid;
  gap: 8px;
}

.admin-section-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.section-check {
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--graphite);
  background: var(--white);
  font-size: 12px;
  font-weight: 560;
}

.section-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--cobalt);
}

.admin-user-actions {
  display: grid;
  gap: 8px;
}

.admin-user-actions .primary-button,
.admin-user-actions .text-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.status-chip {
  width: fit-content;
  min-height: 26px;
  margin-top: 9px;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--graphite);
  background: rgba(40, 49, 66, 0.08);
  font-size: 12px;
  font-weight: 650;
}

.status-chip.active {
  color: var(--success);
  background: rgba(22, 163, 74, 0.1);
}

.status-chip.pending {
  color: var(--warning);
  background: rgba(245, 158, 11, 0.12);
}

.status-chip.blocked {
  color: var(--critical);
  background: rgba(220, 38, 38, 0.1);
}

.finance-definition-grid {
  margin: 0;
  border-top: 1px solid var(--border);
  padding: 14px 18px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px 16px;
}

.finance-definition-grid dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 520;
}

.finance-definition-grid dd {
  margin: 0;
  overflow: hidden;
  color: var(--graphite);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 560;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.finance-summary-grid {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: rgba(248, 250, 252, 0.84);
}

.finance-summary-grid div {
  min-width: 0;
  min-height: 68px;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.finance-summary-grid div:last-child {
  border-right: 0;
}

.finance-summary-grid div {
  border-bottom: 0;
}

.finance-summary-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 520;
}

.finance-summary-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 580;
  white-space: nowrap;
}

.finance-entry-toolbar {
  min-height: 58px;
  padding: 14px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.finance-entry-toolbar h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 560;
}

.finance-entry-filter {
  min-width: 198px;
}

.finance-entry-table {
  display: grid;
}

.finance-entry-head,
.finance-entry-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) 132px minmax(160px, 0.95fr) 90px 118px 78px;
  gap: 12px;
  align-items: center;
}

.finance-entry-head {
  min-height: 34px;
  border-top: 1px solid rgba(221, 227, 234, 0.72);
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.finance-entry-row {
  min-height: 76px;
  border-bottom: 1px solid rgba(221, 227, 234, 0.78);
  padding: 11px 18px;
  align-items: start;
}

.finance-entry-title {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.finance-entry-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--graphite);
  background: #eef1f5;
}

.finance-entry-icon.income {
  color: var(--cobalt);
  background: rgba(0, 87, 184, 0.08);
}

.finance-entry-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.finance-entry-img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

.finance-entry-kind {
  width: fit-content;
  min-height: 22px;
  border-radius: 6px;
  padding: 4px 7px;
  color: var(--cobalt) !important;
  background: rgba(0, 87, 184, 0.08);
  font-size: 11px !important;
  font-weight: 650;
}

.finance-entry-kind.expense {
  color: var(--graphite) !important;
  background: #eef1f5;
}

.finance-entry-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.finance-entry-actions .doc-action {
  width: 32px;
  height: 32px;
}

.doc-action.danger {
  color: var(--critical);
}

.register-empty.compact {
  min-height: 130px;
}

.finance-empty-detail {
  min-height: 420px;
  padding: 22px 18px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.finance-empty-detail p {
  margin: 0;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 700;
}

.finance-empty-detail h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 620;
}

.finance-empty-detail .primary-button {
  width: fit-content;
  margin-top: 4px;
}

.finance-dialog {
  width: min(820px, calc(100vw - 28px));
}

.bottom-nav {
  display: none;
}

.hidden {
  display: none !important;
}

.loading {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.empty-page {
  min-height: calc(100vh - 136px);
}

.empty-page-card {
  min-height: 369px;
  border: 1px solid rgba(221, 227, 234, 0.86);
  border-radius: 12px;
  padding: 22px 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.empty-page-card p {
  margin: 0 0 8px;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 700;
}

.empty-page-card h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  font-weight: 620;
  letter-spacing: 0;
}

.edit-dialog {
  width: min(860px, calc(100vw - 28px));
  border: 0;
  border-radius: 18px;
  padding: 0;
  box-shadow: var(--shadow);
}

#financeShipmentDialog {
  width: min(1180px, calc(100vw - 28px));
}

.edit-dialog::backdrop {
  background: rgba(17, 24, 39, 0.46);
}

.edit-form {
  padding: 24px;
}

.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dialog-head {
  margin-bottom: 20px;
}

.icon-button.subtle {
  color: var(--muted);
  background: var(--panel);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.field.wide {
  grid-column: span 3;
}

.dialog-actions {
  margin-top: 24px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
}

@media (max-width: 1080px) {
  .auth-screen {
    grid-template-columns: 1fr;
    padding: 22px;
    background: var(--page);
  }

  .auth-brand {
    min-height: 280px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    height: auto;
    overflow: visible;
    padding: 0 18px 92px;
  }

  .workspace::before {
    height: 198px;
    background:
      linear-gradient(180deg, var(--graphite), #182231 74%, transparent 74%),
      linear-gradient(168deg, transparent 0 46%, rgba(0, 87, 184, 0.96) 47% 50%, transparent 51% 100%);
  }

  .workspace::after {
    display: none;
  }

  .topbar {
    min-height: 170px;
    padding-top: 22px;
    color: var(--white);
    align-items: flex-start;
  }

  .mobile-brand {
    display: flex;
  }

  .mobile-brand .brand-logo {
    width: 166px;
  }

  .mobile-brand .brand-mark {
    width: 44px;
    height: 44px;
    font-size: 21px;
  }

  .mobile-brand .brand-name {
    font-size: 23px;
  }

  .title-block {
    display: none;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .company-chip,
  .role-field,
  .manager-only.field.compact {
    display: none !important;
  }

  .topbar-actions {
    gap: 10px;
  }

  .top-icon {
    border-left: 0;
  }

  .top-icon .nav-icon,
  .top-avatar {
    color: var(--white);
  }

  .top-avatar {
    background: rgba(255, 255, 255, 0.12);
  }

  .field.compact {
    min-width: 118px;
  }

  .field.compact span {
    color: rgba(255, 255, 255, 0.7);
  }

  .field.compact select {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
  }

  .hero-panel {
    margin-top: -42px;
    padding: 20px;
    border-radius: 16px;
  }

  .overview-page.is-container-card .hero-panel {
    margin-top: 12px;
  }

  .empty-page {
    min-height: calc(100vh - 184px);
    margin-top: -42px;
  }

  .containers-page {
    margin-top: -42px;
  }

  .finance-page {
    margin-top: -42px;
  }

  .finance-calculation-page {
    margin-top: -42px;
  }

  .empty-page-card {
    min-height: 300px;
    border-radius: 16px;
    padding: 20px;
  }

  .hero-top {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }

  .metric {
    min-height: auto;
    padding: 0;
    border-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 14px;
  }

  .route {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .route-stage {
    min-height: 68px;
    display: grid;
    grid-template-columns: 46px 1fr auto;
    align-items: center;
    text-align: left;
    column-gap: 12px;
  }

  .route-stage::before {
    top: -28px;
    left: 22px;
    width: 2px;
    height: 56px;
  }

  .stage-node {
    width: 38px;
    height: 38px;
    margin: 0;
  }

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

  .dashboard-page {
    margin-top: -42px;
  }

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

  .dashboard-kpi:last-child {
    grid-column: span 2;
  }

  .dashboard-route-panel {
    height: auto;
    min-height: 0;
  }

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

  .dashboard-route-stage::after {
    left: 52px;
  }

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

  .dashboard-chart-panel,
  .dashboard-rates-panel,
  .dashboard-trend-panel,
  .dashboard-savings-panel {
    min-height: 0 !important;
  }

  .rate-table {
    overflow-x: auto;
  }

  .size-segmented {
    min-width: 108px;
  }

  .rate-head,
  .rate-row {
    min-width: 540px;
  }

  .trend-chart {
    margin-right: 0;
  }

  .trend-summary,
  .total-saving {
    position: static;
    width: 100%;
    min-height: 0;
    margin-top: 14px;
  }

  .savings-table {
    padding-right: 0;
  }

  .dashboard-summary-strip {
    height: auto;
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-summary-strip .summary-item:nth-child(2n) {
    border-right: 0;
  }

  .containers-hero {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }

  .finance-hero {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }

  .finance-calculation-hero {
    grid-template-columns: 1fr;
    border-radius: 16px 16px 0 0;
  }

  .finance-calculation-kpis {
    grid-template-columns: 1fr;
  }

  .finance-calculation-kpis article {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .finance-calculation-kpis article:last-child {
    border-bottom: 0;
  }

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

  .finance-stat {
    border-bottom: 1px solid var(--border);
  }

  .finance-stat:nth-child(2n) {
    border-right: 0;
  }

  .finance-stat:last-child {
    grid-column: span 2;
    border-bottom: 0;
  }

  .finance-layout {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 16px;
  }

  .admin-stats {
    width: 100%;
    min-width: 0;
  }

  .admin-user-row {
    grid-template-columns: 1fr;
  }

  .finance-register,
  .finance-detail {
    min-height: 0;
    border-radius: 16px;
  }

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

  .register-stat:nth-child(2) {
    border-right: 0;
  }

  .register-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .register-toolbar,
  .register-controls {
    display: grid;
  }

  .register-controls {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .finance-register-controls {
    grid-template-columns: 1fr auto;
  }

  .search-field,
  .register-segmented {
    width: 100%;
    min-width: 0;
  }

  .finance-search {
    width: 100%;
  }

  .register-head {
    display: none;
  }

  .register-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
    padding: 16px 0;
  }

  .list-panel {
    grid-row: auto;
  }

  .access-panel {
    grid-column: auto;
  }

  .summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .bottom-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 14px;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 64px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    overflow: hidden;
  }

  .bottom-nav button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
  }

  .bottom-nav button.active {
    color: var(--cobalt);
  }
}

@media (max-width: 720px) {
  .auth-screen {
    padding: 14px;
  }

  .auth-brand,
  .auth-card {
    border-radius: 12px;
    padding: 22px;
  }

  .auth-brand h1 {
    font-size: 28px;
  }

  .topbar {
    gap: 12px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .container-title {
    font-size: 34px;
  }

  .meta-line {
    display: grid;
    gap: 7px;
  }

  .mobile-client-line {
    display: block;
    margin: 8px 0 8px;
    color: var(--muted);
    font-size: 13px;
  }

  .mobile-client-line strong {
    color: var(--text);
  }

  .content-grid {
    gap: 12px;
  }

  .panel {
    padding: 18px;
  }

  .panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .container-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .containers-hero-copy h2 {
    font-size: 25px;
  }

  .finance-hero-copy h2 {
    font-size: 25px;
  }

  .finance-hero-stats,
  .finance-summary-grid {
    grid-template-columns: 1fr;
  }

  .finance-stat,
  .finance-summary-grid div {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .finance-stat:last-child,
  .finance-summary-grid div:last-child {
    grid-column: auto;
    border-bottom: 0;
  }

  .finance-register-controls {
    grid-template-columns: 1fr;
  }

  .admin-stats,
  .admin-user-status {
    grid-template-columns: 1fr;
  }

  .finance-register-head {
    display: none;
  }

  .finance-register-row {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 0;
  }

  .finance-row-select {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0;
  }

  .finance-register-actions {
    justify-content: flex-start;
  }

  .finance-detail-head,
  .finance-entry-toolbar {
    display: grid;
  }

  .finance-detail-actions {
    grid-template-columns: 1fr 1fr 38px 38px;
  }

  .finance-definition-grid {
    grid-template-columns: 1fr;
  }

  .finance-entry-head {
    display: none;
  }

  .finance-entry-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .finance-entry-row > div:not(.finance-entry-title):not(.finance-entry-actions) {
    padding-left: 44px;
    text-align: left;
  }

  .finance-entry-actions {
    justify-content: flex-start;
    padding-left: 44px;
  }

  .containers-summary {
    grid-template-columns: 1fr;
  }

  .register-stat {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .register-stat:last-child {
    border-bottom: 0;
  }

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

  .register-container-cell strong {
    font-size: 20px;
  }

  .row-arrow {
    display: none;
  }

  .segmented {
    width: 100%;
    min-width: 0;
  }

  .total-line strong {
    font-size: 32px;
  }

  .summary-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-kpis,
  .dashboard-route,
  .dashboard-summary-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-kpi:last-child {
    grid-column: auto;
  }

  .dashboard-route-stage {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .dashboard-route-stage::after {
    left: 52px;
    right: 0;
  }

  .dashboard-route-stage::before {
    right: 8px;
  }

  .shipment-chart {
    gap: 8px;
    padding-left: 0;
    padding-right: 0;
  }

  .bars {
    gap: 5px;
  }

  .bars i {
    width: 15px;
  }

  .savings-head,
  .saving-row {
    grid-template-columns: minmax(0, 1fr) 90px 52px 28px;
    gap: 8px;
  }

  .dashboard-summary-strip .summary-item {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
  }

  .dashboard-summary-strip .summary-item:last-child {
    border-bottom: 0;
  }

  .access-row {
    grid-template-columns: 1fr;
    padding: 12px 0;
  }

  .finance-cargo-row,
  .finance-cargo-summary-row,
  .directory-layout,
  .directory-item-row {
    grid-template-columns: 1fr;
  }

  .finance-cargo-row .doc-action {
    width: 100%;
  }

  .directory-hero {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .dialog-actions {
    grid-template-columns: 1fr 1fr;
  }

  .dialog-actions span {
    display: none;
  }
}
