:root {
  --ink: #17202a;
  --muted: #667085;
  --line: #dbe3ea;
  --soft: #f4f7f8;
  --white: #ffffff;
  --navy: #173b57;
  --teal: #087f8c;
  --green: #198754;
  --amber: #d78a1f;
  --red: #c6534b;
  --shadow: 0 24px 70px rgba(23, 32, 42, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 5vw;
  border-bottom: 1px solid rgba(219, 227, 234, 0.8);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand,
.main-nav,
.hero-actions,
.document-strip,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  color: var(--navy);
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: var(--teal);
}

.main-nav {
  gap: 24px;
  color: #394553;
  font-size: 14px;
  font-weight: 650;
}

.main-nav a:hover,
.header-action:hover {
  color: var(--teal);
}

.header-action {
  font-size: 14px;
  font-weight: 750;
  color: var(--navy);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(520px, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(44px, 7vw, 86px) 5vw 54px;
  background:
    linear-gradient(110deg, #f7fbfa 0%, #ffffff 54%, #eef5f2 100%);
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: 0;
  color: #102334;
}

h2 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.2;
}

.lead,
.section-text,
.demo-copy p,
.pricing-grid p,
.feature-grid p,
.steps p {
  color: var(--muted);
}

.lead {
  max-width: 58ch;
  margin: 24px 0;
  font-size: 18px;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  color: var(--white);
  background: var(--teal);
}

.button.secondary {
  color: var(--navy);
  border-color: var(--line);
  background: var(--white);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button.danger {
  color: #ffffff;
  border-color: #c0392b;
  background: #c0392b;
}

.button.danger:hover {
  background: #a93226;
}

.danger-zone {
  border-color: rgba(192, 57, 43, 0.35) !important;
}

.danger-zone h2 {
  color: #c0392b;
}

.reset-confirm-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  font-size: 13px;
  font-weight: 600;
  color: #c0392b;
}

.reset-confirm-toggle input {
  width: 16px;
  height: 16px;
}

.danger-zone .button.danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.local-folder-status {
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-secondary, #6b7a86);
}

.local-folder-status a {
  color: var(--teal);
  font-weight: 700;
}

.local-folder-unsupported {
  margin: 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(192, 57, 43, 0.08);
  color: #8a3a32;
  font-size: 13px;
}

.local-upload-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.local-upload-grid-inline {
  display: contents;
}

.custom-upload-btn-wrap {
  position: relative;
  display: inline-flex;
}

.custom-upload-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: #8a3a32;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.custom-upload-remove:hover {
  background: rgba(192, 57, 43, 0.1);
  border-color: rgba(192, 57, 43, 0.4);
}

.local-upload-custom-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.local-upload-custom-add input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}

.local-upload-log {
  display: grid;
  gap: 6px;
}

.local-upload-log-row {
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--soft);
  font-size: 12px;
  color: var(--text-secondary, #6b7a86);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
}

.hero-metrics div {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.hero-metrics dt {
  font-size: 28px;
  font-weight: 850;
  color: var(--navy);
}

.hero-metrics dd {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.product-frame {
  width: 100%;
  max-width: 820px;
  padding: 12px;
  border: 1px solid rgba(219, 227, 234, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.app-shell {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
}

.app-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  color: #cbd6dc;
  background: #173b57;
}

.workspace-dot {
  width: 38px;
  height: 38px;
  margin-bottom: 8px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--teal), #79b552);
}

.create-btn,
.app-sidebar a {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  text-align: left;
  font-size: 13px;
}

.create-btn {
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.create-btn:hover,
.create-btn:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
}

.create-btn:active {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.5);
}

.create-btn.active {
  background: var(--teal) !important;
  border-color: var(--teal) !important;
  color: var(--white);
}

.app-sidebar a {
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.app-sidebar .active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

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

.app-topbar,
.panel-head,
.doc-toolbar,
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-topbar {
  gap: 16px;
  margin-bottom: 18px;
}

.app-topbar strong {
  display: block;
  font-size: 22px;
  color: var(--navy);
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.status {
  padding: 7px 10px;
  border-radius: 999px;
  color: #0a6846;
  background: #dff4e8;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.shipment-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(230px, 1fr);
  gap: 16px;
}

.master-file,
.document-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.master-file {
  padding: 16px;
}

.panel-head {
  margin-bottom: 18px;
  color: var(--navy);
  font-weight: 800;
}

.field-row {
  gap: 12px;
  min-height: 46px;
  border-bottom: 1px solid #eef2f4;
  font-size: 13px;
}

.field-row span {
  color: var(--muted);
}

.field-row b {
  color: #243342;
  text-align: right;
}

.document-preview {
  padding: 12px;
}

.doc-toolbar {
  justify-content: flex-start;
  gap: 6px;
  height: 28px;
}

.doc-toolbar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d5dde2;
}

.doc-paper {
  position: relative;
  min-height: 335px;
  padding: 24px;
  border: 1px solid #e4e9ed;
  border-radius: 6px;
  background: #ffffff;
}

.doc-title {
  margin-bottom: 28px;
  color: var(--navy);
  font-weight: 850;
}

.doc-line {
  width: 62%;
  height: 10px;
  margin-bottom: 10px;
  border-radius: 3px;
  background: #eaf0f2;
}

.doc-line.wide {
  width: 100%;
}

.doc-table {
  display: grid;
  grid-template-columns: 1fr 0.7fr 0.45fr;
  gap: 8px;
  margin-top: 26px;
}

.doc-table span {
  height: 28px;
  border-radius: 4px;
  background: #f0f5f4;
}

.stamp {
  position: absolute;
  right: 22px;
  bottom: 24px;
  padding: 9px 12px;
  border: 2px solid var(--red);
  border-radius: 6px;
  color: var(--red);
  font-size: 12px;
  font-weight: 850;
  transform: rotate(-6deg);
}

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

.document-strip span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #344252;
  background: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.section {
  padding: clamp(64px, 8vw, 104px) 5vw;
}

.band {
  background: var(--soft);
}

.advantages {
  padding-top: clamp(40px, 5vw, 64px);
  padding-bottom: clamp(40px, 5vw, 64px);
}

.advantage-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.advantage-card {
  padding: 32px 22px;
  border: 1px solid rgba(8, 127, 140, 0.45);
  border-radius: 10px;
  background: rgba(8, 127, 140, 0.05);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.advantage-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(23, 32, 42, 0.1);
  border-color: rgba(8, 127, 140, 0.7);
}

.advantage-icon {
  display: inline-flex;
  margin-bottom: 16px;
  font-size: 40px;
  line-height: 1;
}

.advantage-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 850;
  color: var(--navy);
  line-height: 1.3;
}

.advantage-card p {
  margin: 0;
  color: var(--text-secondary, #6b7a86);
  font-size: 14px;
  line-height: 1.5;
}

.section-heading {
  margin-bottom: 34px;
}

.feature-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.feature-grid article,
.pricing-grid article,
.steps li {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.icon-box {
  display: inline-grid;
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: var(--navy);
  font-size: 12px;
  font-weight: 850;
}

.icon-box.green {
  background: var(--green);
}

.icon-box.amber {
  background: var(--amber);
}

.icon-box.red {
  background: var(--red);
}

.icon-box.teal {
  background: var(--teal);
}

.split,
.industries,
.demo-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
}

.section-text {
  max-width: 56ch;
  font-size: 17px;
}

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

.document-list button {
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #233342;
  background: #ffffff;
  text-align: left;
  font-weight: 800;
}

.document-list button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.doc-settle {
  animation: doc-settle-in 0.7s cubic-bezier(0.25, 0.8, 0.35, 1) both;
  animation-delay: var(--delay, 0s);
}

@keyframes doc-settle-in {
  0% {
    transform: translate(var(--from-x, 0), var(--from-y, 0)) scale(0.92);
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .doc-settle {
    animation: none;
  }
}

.document-list button.selected {
  border-color: var(--teal);
  color: var(--navy);
  background: #eaf8f6;
}

.demo-form button:disabled {
  cursor: default;
  background: var(--green);
}

.form-message {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #cdebd9;
  border-radius: 8px;
  color: #0a6846;
  background: #eef9f2;
  font-size: 14px;
  font-weight: 750;
}

.workflow {
  background: #173b57;
  color: var(--white);
}

.workflow .eyebrow,
.workflow .steps span {
  color: #8fd0c7;
}

.workflow .steps p {
  color: #cbd8de;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.steps span {
  display: block;
  margin-bottom: 18px;
  font-weight: 900;
}

.industry-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.industry-board span {
  min-height: 88px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, #ffffff, #f5faf8);
  font-weight: 850;
}

.pricing {
  background: var(--soft);
}

.pricing-grid {
  grid-template-columns: repeat(4, 1fr);
}

.pricing-grid article {
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.pricing-grid article:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(23, 32, 42, 0.12);
  border-color: rgba(8, 127, 140, 0.4);
}

.pricing-grid .highlight {
  animation: pricing-pulse 2.6s ease-in-out infinite;
}

.pricing-grid .highlight:hover {
  animation-play-state: paused;
  transform: translateY(-10px) scale(1.02);
}

@keyframes pricing-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(8, 127, 140, 0.28);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(8, 127, 140, 0);
  }
}

.pricing-grid .button {
  margin-top: auto;
  transition: transform 0.2s ease;
}

.pricing-grid article:hover .button {
  transform: translateY(-2px);
}

.pricing-founder-note {
  margin-top: 8px;
  font-weight: 800;
  color: var(--teal);
}

.billing-toggle {
  display: inline-flex;
  gap: 4px;
  margin: 20px 0 28px;
  padding: 4px;
  border-radius: 999px;
  background: #eef2f4;
}

.billing-toggle-btn {
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted, #6b7a86);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.billing-toggle-btn.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 4px 12px rgba(23, 32, 42, 0.12);
}

.billing-save {
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(8, 127, 140, 0.14);
  color: var(--teal);
  font-size: 11px;
  font-weight: 850;
}

.price-period {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

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

.trust-grid article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.trust-grid h3 {
  margin: 14px 0 8px;
  font-size: 17px;
}

.trust-grid p {
  margin: 0;
  color: var(--text-secondary, #6b7a86);
  font-size: 14px;
}

.trust-note {
  margin-top: 18px;
  color: var(--text-secondary, #6b7a86);
  font-size: 14px;
}

.trust-note a {
  color: var(--teal);
  font-weight: 800;
}

.demo-free-note {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(8, 127, 140, 0.1);
  color: var(--teal);
  font-weight: 800;
  font-size: 14px;
}

.plan-features {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.plan-features li {
  padding-left: 20px;
  position: relative;
  color: var(--text-secondary, #6b7a86);
}

.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 900;
}

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

.pain-grid article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.pain-grid h3 {
  margin: 14px 0 8px;
  font-size: 17px;
}

.pain-grid p {
  margin: 0;
  color: var(--text-secondary, #6b7a86);
  font-size: 14px;
}

.highlight {
  border-color: rgba(8, 127, 140, 0.48) !important;
  box-shadow: 0 20px 55px rgba(8, 127, 140, 0.13);
}

.price {
  margin: 8px 0 14px;
  color: var(--navy) !important;
  font-size: 38px;
  font-weight: 900;
}

.price span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.demo-section {
  padding: clamp(64px, 8vw, 104px) 5vw;
  background: #f9fbfb;
}

.demo-copy {
  max-width: 560px;
}

.demo-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 52px rgba(23, 32, 42, 0.1);
}

.demo-form .form-wide,
.demo-form button {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: #354555;
  font-size: 14px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--white);
}

textarea {
  resize: vertical;
}

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px 5vw;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-footer-top span:first-child {
  color: var(--navy);
  font-weight: 850;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer-links a {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.site-footer-links a:hover {
  color: var(--teal);
}

.site-footer-copyright {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.dashboard-body {
  min-height: 100vh;
  background: #eef3f4;
}

/* Hides protected pages until the async Supabase session check in script.js resolves —
   without this, an unauthenticated visitor would briefly see the real page content before
   the guard redirects them to login.html. */
body.auth-pending {
  visibility: hidden;
}

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

.dashboard-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 22px;
  color: #d5e1e7;
  background: #173b57;
}

.dashboard-brand {
  color: var(--white);
  margin-bottom: 22px;
}

.dashboard-create {
  justify-content: center;
  min-height: 44px;
  margin-bottom: 10px;
  font-weight: 850;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.dashboard-create:hover,
.dashboard-create:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.45);
}

.dashboard-create:active {
  background: rgba(255, 255, 255, 0.16);
}

.dashboard-create.secondary {
  margin-bottom: 8px;
}

.dashboard-create:last-of-type {
  margin-bottom: 22px;
}

.dashboard-nav {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.dashboard-nav-secondary {
  margin-bottom: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.dashboard-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.dashboard-nav a:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
}

.dashboard-nav .active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

.sidebar-account {
  display: grid;
  gap: 3px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.sidebar-account span {
  color: var(--white);
  font-weight: 850;
}

.sidebar-account small {
  color: #b9cbd4;
}

.sidebar-logout {
  margin-top: 8px;
  color: #b9cbd4;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
}

.login-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--navy);
}

.login-card {
  display: grid;
  gap: 12px;
  width: min(380px, 100%);
  padding: 32px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.login-card h1 {
  margin: 8px 0 0;
  font-size: 22px;
}

.login-card > p {
  margin: 0 0 8px;
  color: var(--text-secondary, #6b7a86);
  font-size: 14px;
}

.login-card form {
  display: grid;
  gap: 14px;
}

.login-consent {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-secondary, #6b7a86);
}

.login-consent input {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin: 0;
  position: relative;
  top: 2px;
}

.login-consent a,
.login-card > p a {
  color: var(--teal);
  font-weight: 800;
  text-decoration: underline;
}

.login-error {
  margin: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fdecec;
  color: #c0392b;
  font-size: 13px;
}

.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  line-height: 1.7;
}

.legal-page h1 {
  margin-bottom: 4px;
}

.legal-page h2 {
  margin-top: 28px;
}

.dashboard-main {
  min-width: 0;
  padding: 28px;
}

.demo-banner {
  margin-bottom: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(8, 127, 140, 0.25);
  border-radius: 8px;
  background: rgba(8, 127, 140, 0.08);
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

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

.dashboard-top h1 {
  max-width: none;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1;
}

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

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.metric-row article,
.panel-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.metric-row article {
  display: grid;
  gap: 4px;
  padding: 18px;
}

.metric-row span,
.metric-row small,
.card-head p,
.master-fields span,
.invoice-paper small,
.invoice-paper span,
.shipment-table td span {
  color: var(--muted);
}

.metric-row strong {
  color: var(--navy);
  font-size: 34px;
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.dashboard-grid.single-column {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-grid .span-2 {
  grid-column: 1 / -1;
}

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

.logo-preview-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.logo-preview-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.logo-preview-item span {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted, #6b7a86);
  text-transform: uppercase;
}

.logo-preview-item img {
  max-width: 160px;
  max-height: 64px;
  object-fit: contain;
}

.shipment-item-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shipment-item-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.6fr) minmax(90px, 0.7fr) minmax(110px, 0.9fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.item-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.item-field span {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted, #6b7a86);
  text-transform: uppercase;
}

.shipment-item-row select,
.shipment-item-row input {
  min-height: 40px;
  width: 100%;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.shipment-item-row .icon-button {
  width: 40px;
  height: 40px;
}

@media (max-width: 640px) {
  .shipment-item-row {
    grid-template-columns: 1fr;
  }

  .shipment-item-row .icon-button {
    justify-self: end;
  }
}

.panel-card {
  padding: 20px;
}

.shipment-table,
.invoice-preview {
  grid-column: span 1;
}

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

.card-head.compact {
  margin-bottom: 14px;
}

.card-head h2 {
  max-width: none;
  font-size: 22px;
  line-height: 1.15;
}

.card-head p {
  margin: 5px 0 0;
  font-size: 14px;
}

.card-head a {
  color: var(--teal);
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-wrap td .button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  margin-right: 6px;
}

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

th,
td {
  padding: 14px 10px;
  border-bottom: 1px solid #edf1f3;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td strong,
td span {
  display: block;
}

.shipment-table tbody tr {
  cursor: pointer;
}

.shipment-table tbody tr:hover td,
.shipment-table tbody tr.selected-shipment td {
  background: #eef8f6;
}

mark {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

mark.ok {
  color: #0a6846;
  background: #dff4e8;
}

mark.warn {
  color: #8a5a00;
  background: #fff0cc;
}

mark.hold {
  color: #8b3831;
  background: #ffe0dd;
}

mark.quote {
  color: #1f5fa8;
  background: #dfeaff;
}

/* docs/05-DOMAIN-RULES.md RULE-CUSTOMER-CODE-001: short, unique customer code shown next
   to the company name in the customer list. */
.customer-code-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #1f5fa8;
  background: #dfeaff;
}

.customer-phone-whatsapp {
  color: #128c7e;
  text-decoration: none;
}

.customer-phone-whatsapp:hover {
  text-decoration: underline;
}

/* docs/05-DOMAIN-RULES.md RULE-LC-WARNING-001: LC warning must stay visibly
   high-priority wherever it appears (list rows, master panel, shipment form). */
.lc-warning-badge {
  margin-left: 6px;
}

.lc-warning-text {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  color: #8b3831;
  background: #ffe0dd;
  font-size: 13px;
  font-weight: 600;
}

.lc-warning-box {
  margin-top: 4px;
}

.lc-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}

/* docs/05-DOMAIN-RULES.md RULE-REVISION-001 */
.revision-lock-actions {
  padding-top: 8px;
}

.revision-status-badge {
  margin-left: 6px;
}

/* docs/05-DOMAIN-RULES.md RULE-NUMBER-AUDIT-001 */
.audit-log-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audit-log-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f6f7f9;
  font-size: 13px;
}

.audit-log-entry .audit-field {
  font-weight: 700;
}

.audit-log-entry .audit-change {
  grid-column: 1 / -1;
  color: #4a5568;
}

.audit-log-entry .audit-meta {
  grid-column: 1 / -1;
  font-size: 12px;
  color: #8a94a6;
}

tr.new-row td {
  background: #f2fbf9;
}

.doc-checklist {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-checklist li {
  display: block;
}

.doc-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #edf1f3;
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
  font-size: 14px;
  text-align: left;
}

.doc-option:hover,
.doc-option.active {
  border-color: rgba(8, 127, 140, 0.42);
  background: #eef8f6;
}

.doc-option b {
  color: var(--teal);
  font-size: 12px;
  white-space: nowrap;
}

.score {
  color: var(--teal);
  font-size: 24px;
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef0;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.master-fields {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.master-fields span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.master-fields b {
  color: var(--ink);
  text-align: right;
}

.rank-chart {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.note-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.note-filter-btn {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted, #6b7a86);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.note-filter-btn.active {
  border-color: var(--teal);
  background: rgba(8, 127, 140, 0.1);
  color: var(--teal);
}

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

.note-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.note-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

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

.note-card p {
  margin: 0 0 10px;
  color: var(--text-secondary, #6b7a86);
  font-size: 13px;
  white-space: pre-wrap;
}

.note-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-secondary, #6b7a86);
}

.note-card-meta a {
  color: var(--teal);
  font-weight: 700;
}

.note-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.note-tag-arastirma {
  color: #1f5fa8;
  background: #dfeaff;
}

.note-tag-musteri {
  color: #0a6846;
  background: #dff4e8;
}

.note-tag-bekleyen {
  color: #8a5a00;
  background: #fff0cc;
}

.rank-chart-empty {
  font-size: 13px;
  color: var(--text-secondary, #6b7a86);
}

.rank-row {
  display: grid;
  gap: 4px;
}

.rank-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.rank-row-name {
  color: var(--ink);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row-value {
  color: var(--text-secondary, #6b7a86);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.upcoming-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.upcoming-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border, rgba(15, 42, 58, 0.08));
  border-radius: 10px;
}

.upcoming-row-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.upcoming-row-code {
  font-weight: 800;
  color: var(--navy);
}

.upcoming-row-buyer {
  color: var(--ink);
  font-weight: 600;
}

.upcoming-row-route {
  color: var(--text-secondary, #6b7a86);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upcoming-row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  white-space: nowrap;
}

.upcoming-row-date {
  font-size: 13px;
  color: var(--ink);
}

.upcoming-row-days {
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
}

.month-product-list {
  display: grid;
  gap: 20px;
  margin-top: 16px;
}

.month-product-group h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--navy);
}

.month-product-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border, rgba(15, 42, 58, 0.08));
  font-size: 13px;
}

.month-product-row:last-child {
  border-bottom: none;
}

.month-product-name {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.month-product-detail {
  color: var(--text-secondary, #6b7a86);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

.rank-row-track {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: rgba(8, 127, 140, 0.12);
  overflow: hidden;
}

.rank-row-fill {
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: 4px;
  background: var(--teal);
  transition: width 0.5s ease;
}

.invoice-preview {
  grid-column: 1 / -1;
}

.invoice-paper {
  position: relative;
  max-width: 780px;
  padding: 24px;
  border: 1px solid #e2e8ec;
  border-radius: 8px;
  background: #fbfdfd;
  font-size: 13px;
}

.invoice-top,
.invoice-parties,
.invoice-total {
  display: flex;
  justify-content: space-between;
  gap: 22px;
}

.invoice-top {
  align-items: flex-start;
  margin-bottom: 18px;
}

.invoice-top strong {
  display: block;
  color: var(--navy);
  font-size: 18px;
}

.invoice-top span {
  font-size: 12px;
}

.invoice-logo {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: var(--teal);
  font-weight: 900;
}

.print-logo {
  max-width: 160px;
  max-height: 64px;
  object-fit: contain;
}

.invoice-parties {
  margin-bottom: 16px;
}

.invoice-parties div {
  display: grid;
  gap: 3px;
  width: 50%;
  padding: 10px 12px;
  border: 1px solid #e7ecef;
  border-radius: 8px;
  background: var(--white);
  font-size: 12px;
}

.invoice-parties b {
  font-size: 13px;
}

.doc-meta-list {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid #e7ecef;
  border-radius: 8px;
  background: var(--white);
}

/* Real-world exporter letterhead layout: centered logo, exporter address
   (left) + contact label:value column (right), centered document title,
   single BUYER block. Used by Commercial Invoice and Packing List, which
   mirror an actual exporter's document templates rather than the earlier
   generic two-box (İhracatçı/Alıcı) layout still used by Proforma. */
.doc-letterhead {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.doc-header-grid {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e7ecef;
  font-size: 11px;
}

.doc-header-address {
  display: grid;
  gap: 2px;
}

.doc-header-address b {
  font-size: 13px;
}

.doc-header-contact {
  display: grid;
  gap: 2px;
  text-align: right;
}

.doc-header-contact div {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.doc-header-contact span {
  color: var(--text-secondary, #6b7a86);
}

.doc-title-centered {
  margin: 0 0 16px;
  font-size: 20px;
  text-align: center;
  color: var(--navy);
  font-style: italic;
}

.doc-buyer-block {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid #e7ecef;
  border-radius: 8px;
  background: var(--white);
  font-size: 12px;
}

.doc-buyer-block small {
  color: var(--text-secondary, #6b7a86);
  font-weight: 800;
}

.doc-meta-list-inline {
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: column;
  column-gap: 24px;
}

.doc-meta-list-inline .doc-meta-row {
  justify-content: flex-start;
  gap: 8px;
}

.doc-meta-list-inline .doc-meta-row span {
  flex: 0 0 auto;
}

.doc-meta-list-inline .doc-meta-row b {
  flex: 1 1 auto;
  text-align: left;
}

.packing-list-table,
.commercial-invoice-table {
  display: grid;
  overflow: hidden;
  border: 1px solid #e7ecef;
  border-radius: 8px;
  margin-bottom: 12px;
}

.packing-list-table {
  grid-template-columns: 0.4fr 1.4fr 0.9fr 0.7fr 0.7fr 0.75fr 0.75fr;
}

.commercial-invoice-table {
  grid-template-columns: 0.4fr 1.8fr 0.7fr 0.7fr 0.7fr;
}

.packing-list-table span,
.packing-list-table b,
.commercial-invoice-table span,
.commercial-invoice-table b {
  padding: 8px 6px;
  border-bottom: 1px solid #e7ecef;
  font-size: 10px;
  line-height: 1.3;
}

.packing-list-table span,
.commercial-invoice-table span {
  background: #eef5f2;
  font-weight: 850;
}

.packing-list-table b,
.commercial-invoice-table b {
  background: var(--white);
  font-weight: 600;
}

.packing-total-label {
  font-weight: 850 !important;
}

.doc-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  padding: 2px 0;
}

.doc-meta-row span {
  color: var(--text-secondary, #6b7a86);
}

.doc-meta-row b {
  font-size: 13px;
  text-align: right;
  overflow-wrap: anywhere;
}

.doc-notes {
  padding: 10px 14px;
  margin-bottom: 16px;
  border: 1px solid #e7ecef;
  border-radius: 8px;
  background: var(--white);
  font-size: 12px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.doc-notes span {
  font-weight: 800;
  color: var(--text-secondary, #6b7a86);
  margin-right: 4px;
}

.invoice-lines {
  display: grid;
  grid-template-columns: 1.6fr 0.5fr 0.75fr 0.75fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid #e7ecef;
  border-radius: 8px;
}

.invoice-lines.invoice-lines-3col {
  grid-template-columns: 1.6fr 0.6fr 0.85fr;
}

.invoice-lines.invoice-lines-6col-packing {
  grid-template-columns: 1.2fr 0.45fr 0.65fr 0.65fr 0.7fr 0.7fr;
}

.invoice-lines.invoice-lines-6col-packing span,
.invoice-lines.invoice-lines-6col-packing b {
  padding: 8px 4px;
  font-size: 10px;
}

.invoice-lines span,
.invoice-lines b {
  padding: 8px 6px;
  border-bottom: 1px solid #e7ecef;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-lines span {
  background: #eef5f2;
  font-size: 10px;
  font-weight: 850;
}

.invoice-lines b {
  background: var(--white);
  font-size: 11px;
  font-weight: 600;
}

.invoice-total {
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e7ecef;
}

.invoice-total span {
  font-size: 12px;
  color: var(--text-secondary, #6b7a86);
}

.invoice-total strong {
  color: var(--navy);
  font-size: 18px;
}

.certificate-block {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid #e7ecef;
  border-radius: 8px;
  background: var(--white);
  font-size: 12px;
}

.invoice-signature {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin-top: 16px;
}

.invoice-signature .print-signature {
  max-width: 140px;
  max-height: 70px;
  object-fit: contain;
}

.invoice-signature span {
  font-size: 12px;
  color: var(--text-secondary, #6b7a86);
}

.certificate-block p {
  margin: 0 0 6px;
  color: var(--ink);
}

.certificate-block span {
  display: flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  background: #f3f7f8;
  color: #344252;
  font-weight: 750;
}

.pdf-export-sheet {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 760px;
  padding: 38px;
  color: #17202a;
  background: #ffffff;
  font-family: Arial, sans-serif;
}

.pdf-export-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  border-bottom: 2px solid #173b57;
  padding-bottom: 16px;
}

.pdf-export-head strong,
.pdf-export-head span,
.pdf-export-grid small,
.pdf-export-grid b,
.pdf-export-grid span {
  display: block;
}

.pdf-export-head h1 {
  margin: 0;
  max-width: none;
  color: #173b57;
  font-size: 24px;
  line-height: 1.1;
}

.pdf-export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.pdf-export-grid div,
.pdf-export-meta,
.pdf-export-signature {
  border: 1px solid #dbe3ea;
  border-radius: 6px;
  padding: 12px;
}

.pdf-export-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.pdf-export-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  margin-bottom: 18px;
}

.pdf-export-table th,
.pdf-export-table td {
  border: 1px solid #dbe3ea;
  padding: 10px;
  font-size: 13px;
}

.pdf-export-table th {
  background: #eef5f2;
}

.pdf-export-total {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin-bottom: 28px;
  font-size: 18px;
}

.pdf-export-signature {
  width: 180px;
  min-height: 70px;
  margin-left: auto;
  color: #667085;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 35, 52, 0.56);
}

.modal-backdrop[hidden] {
  display: none;
}

.shipment-modal {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.customers-modal {
  width: min(860px, 100%);
  max-height: min(860px, calc(100vh - 40px));
}

.customers-table-wrap {
  margin: 0 24px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 220px;
  overflow: auto;
}

.customer-form,
.product-form {
  border-top: 1px solid var(--line);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 24px 10px;
}

.modal-head h2 {
  max-width: none;
  font-size: 30px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: var(--white);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

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

.form-wide,
.modal-actions {
  grid-column: 1 / -1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .product-frame {
    max-width: none;
  }

  .feature-grid,
  .steps,
  .metric-row,
  .dashboard-grid,
  .pricing-grid,
  .trust-grid,
  .advantage-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .invoice-preview {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: auto;
    padding: 14px 18px;
  }

  .main-nav {
    display: none;
  }

  .hero,
  .section,
  .demo-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  h1 {
    max-width: 10ch;
    font-size: 43px;
  }

  .hero-metrics,
  .feature-grid,
  .steps,
  .pricing-grid,
  .split,
  .industries,
  .demo-section,
  .dashboard-shell,
  .metric-row,
  .dashboard-grid,
  .pain-grid,
  .trust-grid,
  .advantage-grid,
  .demo-form {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
    min-height: auto;
  }

  .dashboard-main {
    padding: 18px;
  }

  .dashboard-top,
  .invoice-top,
  .invoice-parties,
  .invoice-total {
    flex-direction: column;
  }

  .dashboard-actions {
    justify-content: flex-start;
  }

  .month-product-row {
    flex-direction: column;
    gap: 4px;
  }

  .month-product-detail {
    text-align: left;
    white-space: normal;
  }

  .upcoming-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .upcoming-row-meta {
    align-items: flex-start;
  }

  .invoice-preview {
    grid-column: span 1;
  }

  .invoice-parties div {
    width: 100%;
  }

  .invoice-lines {
    grid-template-columns: 1fr;
  }

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

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .button {
    width: 100%;
  }

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

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

  .workspace-dot {
    display: none;
  }

  .shipment-grid,
  .document-list,
  .industry-board {
    grid-template-columns: 1fr;
  }

  .app-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .doc-paper {
    min-height: 285px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .product-frame {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .app-main,
  .app-sidebar,
  .demo-form,
  .feature-grid article,
  .pricing-grid article,
  .steps li {
    padding: 16px;
  }
}

/* PDF export now opens a separate, minimal print window (see
   printPreviewAsPdf in script.js) containing only the document markup —
   no dashboard chrome exists in that window's DOM, so there's nothing to
   accidentally print. That window builds its own inline print styles, so
   no @media print block is needed here. */
