/* ═══════════════════════════════════════════════════════
   CARGARIA — Design System
   ═══════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  --navy:        #0B4F6C;
  --teal-dark:   #0B4F6C;
  --teal-mid:    #0E6D94;
  --teal-light:  #E0F2F7;
  --amber:       #F59E0B;
  --amber-lt:    #FFFBEB;
  --bg:          #F4F8FA;
  --card:        #fff;
  --text:        #0F2832;
  --text2:       #4A6572;
  --text3:       #8AA4AF;
  --border:      #D5E5EC;
  --red:         #DC2626;
  --green:       #059669;
  --green-lt:    #ECFDF5;
  --orange:      #D97706;
  --gray:        #6B7280;
  --radius:      10px;
  --sidebar-w:   220px;
  --shadow:      0 2px 8px rgba(11,79,108,.10);
  --shadow-md:   0 4px 16px rgba(11,79,108,.14);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--teal-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea {
  font-family: inherit;
  font-size: 14px;
}

/* ── Auth Screen ── */
#auth-screen {
  display: flex;
  min-height: 100vh;
  background: #fff;
}

/* Left branding panel */
.auth-panel-left {
  flex: 1;
  background: linear-gradient(150deg, #0B4F6C 0%, #0E6D94 60%, #1A8FA8 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 56px;
  position: relative;
  overflow: hidden;
}

.auth-panel-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='600' height='600' viewBox='0 0 600 600' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.2' opacity='0.07'%3E%3Ccircle cx='300' cy='300' r='200'/%3E%3Ccircle cx='300' cy='300' r='280'/%3E%3Ccircle cx='300' cy='300' r='120'/%3E%3Cline x1='100' y1='300' x2='500' y2='300'/%3E%3Cline x1='300' y1='100' x2='300' y2='500'/%3E%3Cline x1='159' y1='159' x2='441' y2='441'/%3E%3Cline x1='441' y1='159' x2='159' y2='441'/%3E%3C/g%3E%3C/svg%3E") center/cover no-repeat;
  pointer-events: none;
}

.auth-brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 56px;
  position: relative;
}

.auth-brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
}

.auth-brand-name-text {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.3px;
}

.auth-left-headline {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.5px;
  line-height: 1.2;
  margin-bottom: 20px;
  position: relative;
}

.auth-left-sub {
  font-size: 15px;
  color: rgba(255,255,255,.75);
  line-height: 1.7;
  max-width: 340px;
  margin-bottom: 48px;
  position: relative;
}

.auth-left-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-feature-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.auth-feature-text {
  font-size: 13.5px;
  color: rgba(255,255,255,.85);
  font-weight: 500;
}

/* Right form panel */
.auth-panel-right {
  width: 440px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 48px;
  background: #fff;
}

.auth-card {
  width: 100%;
}

.auth-brand {
  margin-bottom: 28px;
}

.auth-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.3px;
  margin-bottom: 4px;
}

.auth-tagline {
  font-size: 13px;
  color: var(--text2);
}

.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  transition: color .15s, border-color .15s;
}

.auth-tab.active {
  color: var(--teal-dark);
  border-bottom-color: var(--teal-dark);
}

.auth-tab-content { display: none; }
.auth-tab-content.active { display: block; }

.auth-submit {
  width: 100%;
  justify-content: center;
  padding: 11px;
  font-size: 15px;
  margin-top: 4px;
}

/* Mobile: stack vertically, hide left panel */
@media (max-width: 768px) {
  #auth-screen { flex-direction: column; }
  .auth-panel-left { display: none; }
  .auth-panel-right {
    width: 100%;
    padding: 40px 24px;
    min-height: 100vh;
    align-items: flex-start;
    padding-top: 60px;
  }
}

/* ── Form Elements ── */
.form-group {
  margin-bottom: 14px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--teal-mid);
  box-shadow: 0 0 0 3px rgba(14,109,148,.12);
}

.form-group textarea { resize: vertical; min-height: 72px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  transition: background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg);
  border-color: var(--teal-mid);
}

.btn-cta {
  background: #FF4500;
  color: #fff;
  border-color: #FF4500;
}

.btn-cta:hover {
  background: #FF5E1A;
  border-color: #FF5E1A;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-danger {
  color: var(--red);
  border-color: #FECACA;
}

.btn-danger:hover {
  background: #FEF2F2;
  border-color: var(--red);
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 11px;
  font-size: 15px;
}

/* ── Onboarding ── */
#onboarding-screen {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #0B4F6C 0%, #0E6D94 100%);
  padding: 20px;
}

#onboarding-screen.visible {
  display: flex;
}

.ob-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.ob-step { display: none; }
.ob-step.active { display: block; }

.ob-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.ob-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background .3s;
}

.ob-dot.done { background: var(--teal-dark); }

.btype-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.btype-card {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.btype-card.selected {
  border-color: var(--teal-dark);
  background: var(--teal-light);
}

.btype-icon { font-size: 28px; margin-bottom: 8px; }
.btype-label { font-size: 13px; font-weight: 600; color: var(--text); }

/* ── Main App Shell ── */
#app {
  display: none;
  height: 100vh;
  overflow: hidden;
}

#app.visible {
  display: flex;
}

/* ── Sidebar ── */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.sidebar-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.2px;
}

.sidebar-brand-sub {
  font-size: 10px;
  color: rgba(255,255,255,.5);
}


/* sidebar HTML uses these class names */
.sidebar-logo { display: flex; align-items: center; flex-shrink: 0; }
.sidebar-name { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -.2px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: rgba(255,255,255,.85); font-size: 13px; }
.sidebar-user-avatar { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; }
.sidebar-user-name { font-weight: 600; color: #fff; }
.sidebar-user-role { font-size: 11px; color: rgba(255,255,255,.6); }

.sidebar-nav {
  flex: 1;
  padding: 10px 8px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  padding: 12px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: rgba(255,255,255,.85);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .15s, color .15s;
  margin-bottom: 1px;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}

.nav-item.active {
  background: rgba(255,255,255,.22);
  color: #fff;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #FF4500;
}

.nav-icon { font-size: 15px; flex-shrink: 0; display: flex; align-items: center; opacity: 0.75; }
.nav-item.active .nav-icon, .nav-item:hover .nav-icon { opacity: 1; }

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid rgba(255,255,255,.1);
}

.nav-item.upgrade {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
  font-weight: 600;
  margin-top: 4px;
}

.nav-item.upgrade:hover {
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
}

/* ── Main Content Area ── */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

#topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

#page-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.2px;
}

#topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ── Cards ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text2);
  margin-bottom: 14px;
}

/* ── KPI Grid ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.kpi.navy  { border-left: 3px solid var(--navy); }
.kpi.teal  { border-left: 3px solid var(--teal-mid); }
.kpi.amber { border-left: 3px solid var(--amber); }
.kpi.green { border-left: 3px solid var(--green); }
.kpi.red   { border-left: 3px solid var(--red); }

.kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text2);
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.kpi-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 4px;
}

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text2);
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

thead th.num { text-align: right; }

tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

tbody td.num, tbody td.amt { text-align: right; white-space: nowrap; }

tbody tr:last-child td { border-bottom: none; }

tbody tr.clickable {
  cursor: pointer;
  transition: background .1s;
}

tbody tr.clickable:hover {
  background: var(--teal-light);
}

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

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.badge-open     { background: #DBEAFE; color: #1E40AF; }
.badge-shipped  { background: #D1FAE5; color: #065F46; }
.badge-arrived  { background: #FEF3C7; color: #92400E; }
.badge-closed   { background: var(--border); color: var(--text2); }
.badge-no-buyer { background: #FFF3E0; color: #E65100; }
.badge-red      { background: #FEE2E2; color: #991B1B; }
.badge-teal     { background: var(--teal-light); color: var(--teal-dark); }

/* ── Detail Rows ── */
.detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

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

.detail-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text2);
  flex-shrink: 0;
  min-width: 110px;
}

.detail-val {
  font-size: 13px;
  color: var(--text);
  text-align: right;
}

/* ── Modals ── */
#modal-root {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.45);
  overflow-y: auto;
  padding: 24px;
}

#modal-root.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 760px;
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
  margin: auto;
  overflow: hidden;
}

.modal.modal-lg { max-width: 980px; }
.modal.modal-sm { max-width: 480px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.modal-body {
  padding: 22px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.close-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text2);
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .15s;
}

.close-btn:hover { background: var(--border); }

/* ── Section Divider ── */
.section-divider {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text2);
  padding: 14px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

/* ── Alert Banners ── */
.alert {
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-warning {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  color: #92400E;
}

.alert-danger {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

.alert-success {
  background: var(--green-lt);
  border: 1px solid #A7F3D0;
  color: #065F46;
}

.alert-info {
  background: var(--teal-light);
  border: 1px solid var(--border);
  color: var(--navy);
}

/* ── Upload Area ── */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--teal-mid);
  background: var(--teal-light);
}

/* ── Checklist ── */
.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .1s;
}

.checklist-item:hover { background: var(--bg); }

.checklist-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--teal-dark);
}

/* ── Tabs ── */
.tab-bar {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  gap: 2px;
}

.tab-btn {
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  transition: color .15s, border-color .15s;
}

.tab-btn.active {
  color: var(--teal-dark);
  border-bottom-color: var(--teal-dark);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Filters / Chips ── */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-chip {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text2);
  transition: background .15s, border-color .15s, color .15s;
}

.filter-chip:hover {
  border-color: var(--teal-mid);
  color: var(--teal-dark);
}

.filter-chip.active {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #fff;
}

/* ── Print Styles ── */
@media print {
  /* Hide everything except the modal */
  #app-shell, #auth-screen, #onboarding-screen { display: none !important; }
  body { background: #fff !important; color: #000 !important; margin: 0; padding: 0; }

  /* Flatten modal into a normal block — no overlay, no scrollbox */
  #modal-root {
    display: block !important;
    position: static !important;
    background: none !important;
    padding: 0 !important;
    overflow: visible !important;
    inset: auto !important;
    z-index: auto !important;
  }
  .modal {
    box-shadow: none !important;
    border-radius: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  /* KEY: remove the scrollable body constraint */
  .modal-body {
    max-height: none !important;
    overflow: visible !important;
    padding: 16px !important;
  }
  .modal-header {
    background: #fff !important;
    border-bottom: 1px solid #ccc !important;
  }
  .modal-footer {
    background: #fff !important;
    border-top: 1px solid #ccc !important;
  }

  .no-print, .btn, .close-btn { display: none !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
  table { font-size: 11px; width: 100%; }
  .kpi-grid { grid-template-columns: repeat(5, 1fr) !important; }
}

.print-header {
  display: none;
}

@media print {
  .print-header { display: flex !important; margin-bottom: 20px; }
  .print-header h2 { font-size: 18px; color: #000; }
  .print-header p { font-size: 11px; color: #555; }
}

/* ── Utility ── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mt-16 { margin-top: 16px; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-red { color: var(--red); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
.hidden { display: none !important; }
.capitalize { text-transform: capitalize; }

/* ── Responsive Mobile ── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  #sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    width: 260px;
    z-index: 100;
    transition: left .25s;
  }

  #sidebar.open {
    left: 0;
    box-shadow: 4px 0 24px rgba(0,0,0,.3);
  }

  #content { padding: 16px; }

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

  .modal {
    max-width: 100%;
    margin: 0;
    border-radius: 14px 14px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }

  #modal-root {
    align-items: flex-end;
    padding: 0;
  }

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

/* ── Print: contract detail ── */
@page {
  size: A4 landscape;
  margin: 15mm 12mm;
}
@media print {
  #contract-print-header {
    display: block !important;
    padding: 0 0 12px 0;
    border-bottom: 2px solid #0B4F6C;
    margin-bottom: 16px;
  }
}
