:root {
  --navy: #2f3e4f;
  --navy-deep: #1d2731;
  --teal: #566779;
  --teal-soft: #eef1f4;
  --sky: #a7b2bc;
  --sand: #f2f4f6;
  --ink: #1f2933;
  --muted: #6b7785;
  --white: #ffffff;
  --border: rgba(20, 39, 61, 0.10);
  --shadow: 0 18px 40px rgba(15, 29, 46, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(167, 178, 188, 0.12), transparent 30%),
    linear-gradient(180deg, #f3f4f6 0%, #f6f7f8 45%, #eceff2 100%);
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-shell {
  width: min(100%, 460px);
}

.login-card {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 32px 30px;
}

.login-brand {
  color: var(--navy);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.login-card h1 {
  margin: 12px 0 8px;
  color: var(--navy-deep);
}

.login-card p,
.login-note {
  color: var(--muted);
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 16px;
  margin: 18px 0;
}

a {
  color: var(--navy);
  text-decoration: none;
}

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

.sidebar {
  background: linear-gradient(180deg, #11181f 0%, #1b252f 40%, #26333f 100%);
  color: var(--white);
  padding: 28px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 30px;
}

.brand-logo {
  width: 62px;
  height: 62px;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
}

.brand-tag {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
}

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

.nav-link {
  padding: 14px 16px;
  color: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  transition: 0.18s ease;
}

.nav-link:hover,
.nav-link.active {
  transform: translateX(4px);
  color: var(--white);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(86, 103, 121, 0.32));
  border-color: rgba(255, 255, 255, 0.14);
}

.sidebar-note {
  margin-top: 26px;
  padding: 18px;
  font-size: 0.93rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 18px;
}

.user-card {
  margin-top: 20px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
}

.user-name {
  font-weight: 700;
  margin-bottom: 4px;
}

.user-role {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
}

.logout-link {
  display: inline-block;
  margin-top: 10px;
  color: #ffffff;
  font-weight: 700;
}

.main-panel {
  padding: 26px 28px 36px;
}

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

.topbar h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  color: var(--navy-deep);
}

.topbar p,
.topbar-meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.quick-search-shell {
  margin-top: 16px;
  max-width: 460px;
  position: relative;
}

.quick-search-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.quick-search-shell input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(20, 39, 61, 0.14);
  border-radius: 14px;
  font: inherit;
  background: rgba(255, 255, 255, 0.96);
}

.quick-search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(20, 39, 61, 0.10);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.quick-search-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(239, 243, 247, 0.92);
  color: var(--navy-deep);
}

.quick-search-kind {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quick-search-empty {
  padding: 8px 10px;
  color: var(--muted);
}

.flash {
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(86, 103, 121, 0.10), rgba(167, 178, 188, 0.10));
  color: var(--navy-deep);
  border: 1px solid rgba(76, 111, 143, 0.16);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.stat-card,
.panel {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -18px -18px auto;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 178, 188, 0.14), transparent 72%);
}

.stat-label {
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 8px;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  padding: 28px;
  margin-bottom: 22px;
  background:
    radial-gradient(circle at top right, rgba(167, 178, 188, 0.18), transparent 35%),
    linear-gradient(135deg, #f7f8fa 0%, #edf2f6 100%);
}

.dashboard-hero h2 {
  margin: 8px 0;
  color: var(--navy-deep);
  font-size: 2rem;
}

.dashboard-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
  line-height: 1.6;
}

.dashboard-filter-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 14px;
  align-items: end;
}

.executive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.executive-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 247, 249, 0.98) 100%);
  box-shadow: var(--shadow);
}

.executive-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -30px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 178, 188, 0.18), transparent 70%);
}

.executive-card.up::before,
.executive-card.down::before,
.executive-card.neutral::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 24px 0 0 24px;
}

.executive-card.up::before {
  background: linear-gradient(180deg, #4f8c73 0%, #74ad92 100%);
}

.executive-card.down::before {
  background: linear-gradient(180deg, #c27c4e 0%, #d79b70 100%);
}

.executive-card.neutral::before {
  background: linear-gradient(180deg, #51687d 0%, #7d93a7 100%);
}

.executive-label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.executive-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy-deep);
  margin-bottom: 8px;
}

.executive-caption {
  color: var(--muted);
  line-height: 1.55;
  min-height: 42px;
}

.executive-trend {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
}

.executive-trend.up {
  background: rgba(79, 140, 115, 0.12);
  color: #3f7a61;
}

.executive-trend.down {
  background: rgba(194, 124, 78, 0.12);
  color: #a06034;
}

.executive-trend.neutral {
  background: rgba(81, 104, 125, 0.12);
  color: #51687d;
}

.business-analytics-panel {
  padding: 24px;
}

.finance-pulse-panel {
  margin-bottom: 22px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(93, 130, 109, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(248, 251, 249, 0.98) 0%, rgba(237, 245, 241, 0.98) 100%);
}

.finance-grid {
  margin-bottom: 0;
}

.inventory-alert {
  margin-bottom: 22px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(194, 124, 78, 0.12), rgba(222, 186, 160, 0.12));
  border: 1px solid rgba(194, 124, 78, 0.16);
  color: #8b5731;
  line-height: 1.6;
}

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

.analytics-block {
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(237, 242, 246, 0.98) 100%);
  border: 1px solid rgba(17, 51, 95, 0.08);
}

.analytics-block.hero-block {
  grid-column: span 2;
}

.analytics-title {
  color: var(--navy-deep);
  font-weight: 800;
  margin-bottom: 14px;
}

.executive-meter {
  height: 24px;
  margin-bottom: 16px;
}

.insight-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.insight-strip span {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.9rem;
}

.trend-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  min-height: 250px;
}

.trend-bar-group {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.trend-bar-stack {
  width: 100%;
  min-height: 150px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 6px;
}

.trend-bar {
  width: 18px;
  min-height: 8px;
  border-radius: 999px 999px 6px 6px;
}

.trend-bar.created {
  background: linear-gradient(180deg, #6a8198 0%, #8ea2b4 100%);
}

.trend-bar.delivered {
  background: linear-gradient(180deg, #4d8d71 0%, #76ad93 100%);
}

.trend-cash,
.trend-label,
.trend-caption {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.compact .progress-card {
  padding: 16px 18px;
}

.mini-table {
  min-width: 0;
}

.snapshot-grid {
  display: grid;
  gap: 12px;
}

.shipment-snapshot-card,
.order-activity-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 51, 95, 0.08);
  color: var(--ink);
  line-height: 1.6;
}

.shipment-snapshot-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy-deep);
}

.stat-caption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.panel {
  padding: 22px;
}

.sales-subsection-nav,
.sales-subsection {
  margin-bottom: 22px;
}

.subsection-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.subsection-meta {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.history-highlight-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

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

.panel-head {
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0 0 6px;
  color: var(--navy);
}

.panel-head p,
.note-box {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.table-wrap {
  overflow: auto;
}

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

th,
td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(17, 51, 95, 0.08);
  vertical-align: top;
}

th {
  background: linear-gradient(180deg, #344454 0%, #425467 100%);
  color: var(--white);
  font-size: 0.9rem;
  position: sticky;
  top: 0;
}

tbody tr:nth-child(even) {
  background: rgba(242, 244, 246, 0.92);
}

.empty {
  text-align: center;
  color: var(--muted);
}

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

.form-grid.compact {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 12px 14px;
  border: 1px solid rgba(47, 62, 79, 0.14);
  border-radius: 14px;
  background: #fbfcfd;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--ink);
}

.checkbox-option input {
  width: auto;
  margin: 0;
}

label {
  display: grid;
  gap: 8px;
  color: var(--navy-deep);
  font-size: 0.94rem;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(47, 62, 79, 0.14);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fbfcfd;
  color: var(--ink);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.primary-btn {
  align-self: end;
  border: none;
  border-radius: 16px;
  padding: 13px 18px;
  background: linear-gradient(135deg, #4a5c6d 0%, #2f3e4f 100%);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(20, 39, 61, 0.16);
}

.secondary-btn,
.primary-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 14px;
  padding: 11px 16px;
  background: rgba(31, 59, 90, 0.08);
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}

.primary-link-btn {
  background: linear-gradient(135deg, #4a5c6d 0%, #2f3e4f 100%);
  color: var(--white);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-form {
  display: inline;
}

.primary-btn:hover {
  filter: brightness(1.02);
}

.status-chip {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(86, 103, 121, 0.10);
  color: var(--navy);
  border: 1px solid rgba(86, 103, 121, 0.14);
  font-size: 0.84rem;
}

.fulfillment-analytics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.fulfillment-chart-card {
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fbfcfd 0%, #eef2f6 100%);
  border: 1px solid rgba(17, 51, 95, 0.08);
}

.fulfillment-chart-label {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 14px;
}

.fulfillment-bar-graph {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
  min-height: 230px;
}

.fulfillment-bar-card {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.fulfillment-bar-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy-deep);
}

.fulfillment-bar-track {
  height: 170px;
  width: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 0 12px;
}

.fulfillment-bar {
  width: 100%;
  max-width: 72px;
  min-height: 16px;
  border-radius: 18px 18px 8px 8px;
}

.fulfillment-bar.created {
  background: linear-gradient(180deg, #6a8198 0%, #8ea2b4 100%);
}

.fulfillment-bar.partial {
  background: linear-gradient(180deg, #c27c4e 0%, #d79b70 100%);
}

.fulfillment-bar.delivered {
  background: linear-gradient(180deg, #4d8d71 0%, #76ad93 100%);
}

.fulfillment-bar-label {
  font-weight: 700;
  color: var(--navy);
}

.fulfillment-bar-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.stacked-meter {
  display: flex;
  height: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(47, 62, 79, 0.10);
  margin-bottom: 14px;
}

.stacked-meter span {
  display: block;
  height: 100%;
}

.meter-created {
  background: linear-gradient(90deg, #d08b3f 0%, #e2ae67 100%);
}

.meter-partial {
  background: linear-gradient(90deg, #4d7394 0%, #6f8da8 100%);
}

.meter-delivered {
  background: linear-gradient(90deg, #3d7a5f 0%, #5c9a7d 100%);
}

.stacked-legend {
  display: grid;
  gap: 10px;
}

.stacked-legend span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 0.92rem;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.legend-swatch.created {
  background: #d08b3f;
}

.legend-swatch.partial {
  background: #4d7394;
}

.legend-swatch.delivered {
  background: #3d7a5f;
}

.mini-progress {
  margin-bottom: 14px;
}

.mini-progress:last-child {
  margin-bottom: 0;
}

.mini-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--ink);
}

.mini-progress-head strong {
  color: var(--navy-deep);
}

.mini-progress-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(47, 62, 79, 0.10);
}

.mini-progress-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.mini-progress.teal .mini-progress-track span {
  background: linear-gradient(90deg, #577795 0%, #7897b2 100%);
}

.mini-progress.delivered .mini-progress-track span {
  background: linear-gradient(90deg, #3d7a5f 0%, #5c9a7d 100%);
}

.mini-progress.created .mini-progress-track span {
  background: linear-gradient(90deg, #d08b3f 0%, #e2ae67 100%);
}

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

.progress-card {
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(17, 51, 95, 0.08);
}

.progress-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.progress-card-head strong {
  display: block;
  color: var(--navy-deep);
  margin-bottom: 4px;
}

.progress-card-head span {
  color: var(--muted);
  line-height: 1.5;
}

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

.progress-dates {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.progress-metrics {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer {
  margin-top: 18px;
  padding: 14px 4px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.note-box {
  margin-top: 16px;
  padding: 16px;
  background: var(--teal-soft);
  border-radius: 16px;
}

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

.admin-user-card .form-grid {
  margin-top: 14px;
}

.print-body {
  background: #eef2f5;
  padding: 22px;
}

.document {
  max-width: 1080px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.print-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 24px 0;
}

.print-actions button {
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  background: linear-gradient(135deg, #395776 0%, var(--navy) 100%);
  color: var(--white);
  cursor: pointer;
  font-weight: 700;
}

.invoice-doc .doc-hero {
  height: 14px;
  background: linear-gradient(90deg, #b3bcc4 0%, #6c7b89 50%, #2f3e4f 100%);
}

.document-head,
.delivery-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px 18px;
}

.brand-lockup {
  display: flex;
  gap: 16px;
  align-items: center;
}

.brand-lockup img {
  width: 92px;
  height: 92px;
  object-fit: contain;
}

.document-company {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy-deep);
}

.document-muted {
  color: var(--muted);
  line-height: 1.5;
}

.document-title-card {
  min-width: 250px;
  padding: 18px 20px;
  border-radius: 20px;
  color: var(--white);
  background: linear-gradient(135deg, #2f3e4f 0%, #556677 100%);
}

.document-title-card h1 {
  margin: 4px 0 10px;
  letter-spacing: 0.08em;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.85;
  font-size: 0.8rem;
}

.doc-number {
  font-size: 1.12rem;
  font-weight: 700;
}

.document-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  padding: 0 28px 18px;
}

.doc-card {
  padding: 18px;
  border-radius: 20px;
  background: #f7f8fa;
  border: 1px solid rgba(17, 51, 95, 0.08);
  line-height: 1.7;
}

.doc-card-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #5f7082;
  margin-bottom: 8px;
}

.doc-strong {
  font-weight: 700;
  color: var(--navy-deep);
}

.document-table {
  width: calc(100% - 56px);
  margin: 0 28px 18px;
  min-width: 0;
}

.document-table th {
  position: static;
}

.doc-summary {
  padding: 12px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
  border: 1px solid rgba(17, 51, 95, 0.08);
}

.doc-summary div {
  display: flex;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px dashed rgba(17, 51, 95, 0.12);
}

.doc-summary div:last-child {
  border-bottom: none;
}

.invoice-summary-table {
  padding: 16px;
}

.summary-table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 2px solid #6baed6;
  border-radius: 14px;
  background: #ffffff;
}

.summary-table th,
.summary-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(47, 62, 79, 0.10);
  font-size: 0.95rem;
}

.summary-table th {
  width: 45%;
  background: #f7fafc;
  color: var(--navy-deep);
  text-align: left;
  position: static;
}

.summary-table td {
  text-align: right;
  color: var(--ink);
  font-weight: 700;
  background: #ffffff;
}

.summary-table tr:last-child th,
.summary-table tr:last-child td {
  border-bottom: none;
}

.summary-total th,
.summary-total td,
.summary-balance th,
.summary-balance td {
  font-weight: 800;
}

.summary-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.terms-card ol {
  margin: 10px 0 0 18px;
  padding: 0;
}

.terms-card li {
  margin-bottom: 8px;
}

.document-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 28px 28px;
  color: var(--muted);
}

.delivery-pill {
  align-self: flex-start;
  padding: 14px 24px;
  border-radius: 999px;
  border: 2px solid rgba(86, 103, 121, 0.24);
  color: #566779;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.delivery-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 0 28px 18px;
}

.delivery-banner {
  margin: 0 28px 18px;
  padding: 16px 22px;
  border-radius: 18px;
  font-size: 1.2rem;
  color: var(--navy);
  background: linear-gradient(90deg, rgba(167, 178, 188, 0.18), rgba(86, 103, 121, 0.08));
}

.delivery-summary-bar {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  margin: 0 28px 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
  border: 1px solid rgba(17, 51, 95, 0.08);
  color: var(--navy-deep);
}

.notes-cell {
  color: var(--muted);
  min-height: 120px;
}

.process-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

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

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

.history-card {
  padding: 16px 18px;
  border: 1px solid rgba(17, 51, 95, 0.08);
  border-radius: 18px;
  background: rgba(242, 244, 246, 0.92);
}

.history-card-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-deep);
}

.history-card-meta {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.payroll-print-doc .document-table {
  margin-top: 24px;
}

.preview-card {
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
  border: 1px solid rgba(17, 51, 95, 0.08);
}

.preview-label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.preview-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-deep);
  margin-bottom: 8px;
}

.preview-caption {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

.process-step {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
  border: 1px solid rgba(17, 51, 95, 0.08);
  color: var(--ink);
}

.process-step strong {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
}

.delivery-check {
  margin: 0 28px 18px;
  color: var(--ink);
  font-size: 1.02rem;
}

.signatures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 24px;
  padding: 0 28px 30px;
  color: var(--ink);
}

.filled-signatures div {
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
  border: 1px solid rgba(17, 51, 95, 0.08);
}

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

  .sidebar {
    position: static;
    height: auto;
  }

  .stats-grid,
  .executive-grid,
  .content-grid,
  .fulfillment-analytics,
  .business-analytics-grid,
  .history-highlight-row,
  .progress-bars,
  .document-grid,
  .delivery-top,
  .signatures,
  .process-flow {
    grid-template-columns: 1fr;
  }

  .dashboard-hero,
  .progress-card-head,
  .progress-dates,
  .shipment-snapshot-top {
    flex-direction: column;
  }

  .dashboard-filter-form,
  .trend-chart {
    grid-template-columns: 1fr;
  }

  .analytics-block.hero-block {
    grid-column: auto;
  }

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

  .topbar,
  .footer,
  .document-head,
  .delivery-head {
    flex-direction: column;
  }
}

@media print {
  body,
  .print-body {
    background: #fff;
    padding: 0;
    font-size: 11px;
  }

  .print-actions {
    display: none;
  }

  .document {
    box-shadow: none;
    border-radius: 0;
    margin: 0;
    padding: 14px 16px;
    width: 100%;
    max-width: none;
  }

  .document-head,
  .delivery-head,
  .document-grid,
  .delivery-top,
  .signatures,
  .process-flow {
    gap: 10px;
  }

  .document-company,
  .delivery-pill,
  .doc-number,
  .document h1 {
    font-size: 1rem;
  }

  .doc-card,
  .terms-card,
  .summary-note,
  .filled-signatures div,
  .process-step {
    padding: 10px 12px;
  }

  .document-table th,
  .document-table td,
  .summary-table th,
  .summary-table td {
    padding: 6px 8px;
    font-size: 0.8rem;
  }

  .document-footer,
  .delivery-check,
  .document-muted {
    font-size: 0.75rem;
  }

  .doc-hero,
  .delivery-banner {
    min-height: 0;
    padding: 8px 12px;
    margin-bottom: 10px;
  }

  .document-grid,
  .doc-card,
  .doc-summary,
  .document-table,
  .signatures,
  .process-flow {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
