@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800&family=Barlow:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ==========================================================================
   AZA Chartering — theme
   Palette drawn from nautical chart cartography: hull navy, sea mist,
   chart magenta (the colour real charts reserve for navigation marks),
   soundings teal, and port/starboard lights for status.
   ========================================================================== */

:root {
  --hull:        #0a1d2b;
  --hull-rise:   #143142;
  --hull-line:   #22485c;
  --hull-text:   #cddbe3;

  --mist:        #e7edf0;
  --paper:       #ffffff;
  --line:        #d3dde3;
  --line-soft:   #e6edf1;

  --ink:         #0c1a22;
  --ink-soft:    #5d707b;
  --ink-faint:   #8b9aa3;

  --chart:       #c4005c;
  --chart-deep:  #9d0049;
  --chart-tint:  #fdeef4;
  --sounding:    #12708a;
  --sounding-tint:#e6f2f5;

  --starboard:   #1e8e4e;
  --port:        #c0392b;
  --beacon:      #b3730c;

  --font-display: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Barlow', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'Courier New', monospace;

  --r-sm: 3px;
  --r:    5px;
  --r-lg: 8px;

  --shadow-sm: 0 1px 2px rgba(10, 29, 43, .06);
  --shadow-lg: 0 18px 48px rgba(10, 29, 43, .18);

  --sidebar-w: 264px;
  --topbar-h:  64px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -.01em;
}

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

:focus-visible {
  outline: 2px solid var(--chart);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* --------------------------------------------------------------- type bits */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num  { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
.muted { color: var(--ink-soft); }

/* Secondary line under a primary value. Used in tables and in the
   dashboard side panels, so it must not be scoped to either. */
.sub-cell { display: block; font-size: 12px; color: var(--ink-faint); }
.nowrap { white-space: nowrap; }

/* ============================================================== app shell */

.layout { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--hull);
  color: var(--hull-text);
  display: flex;
  flex-direction: column;
  z-index: 60;
  transform: translateX(-100%);
  transition: transform .22s ease;
}
.is-nav-open .sidebar { transform: translateX(0); }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--hull-line);
}
.brand-mark {
  width: 55px; height: 38px;
  flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--chart);
  border-radius: var(--r-sm);
  background: rgba(196, 0, 92, .14);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .04em;
  color: #fff;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #fff;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7d97a5;
}

.nav { flex: 1; overflow-y: auto; padding: 14px 12px 24px; }
.nav-group + .nav-group { margin-top: 22px; }
.nav-group-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #6b8493;
  padding: 0 10px 8px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: var(--r);
  color: var(--hull-text);
  font-size: 14.5px;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: background .15s ease, color .15s ease;
}
.nav-link:hover { background: var(--hull-rise); color: #fff; text-decoration: none; }
.nav-link svg { width: 17px; height: 17px; flex: none; opacity: .8; }
.nav-link.is-current {
  background: var(--hull-rise);
  color: #fff;
  border-left-color: var(--chart);
}
.nav-link.is-current svg { opacity: 1; color: var(--chart); }
.nav-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #8ba5b3;
}

.sidebar-foot {
  border-top: 1px solid var(--hull-line);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.avatar {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--hull-rise);
  border: 1px solid var(--hull-line);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}
.sidebar-foot .who { min-width: 0; line-height: 1.25; }
.sidebar-foot .who strong { display: block; font-size: 13.5px; color: #fff; font-weight: 600; }
.sidebar-foot .who span { font-size: 11px; color: #7d97a5; }
.signout {
  margin-left: auto;
  color: #8ba5b3;
  display: grid; place-items: center;
  padding: 6px;
  border-radius: var(--r-sm);
}
.signout:hover { color: #fff; background: var(--hull-rise); }

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 29, 43, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 50;
}
.is-nav-open .backdrop { opacity: 1; pointer-events: auto; }

/* ------------------------------------------------------------------ topbar */

.main { display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-toggle {
  width: 40px; height: 40px;
  flex: none;
  display: grid; place-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--ink-faint); }
.topbar-title { min-width: 0; }
.topbar-title h1 {
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.clock {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.content { padding: 22px 18px 56px; flex: 1; }
.content > * + * { margin-top: 20px; }

.page-foot {
  padding: 16px 18px 26px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

/* ================================================================== cards */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.card-head h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; }
.card-head .card-head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.card-body { padding: 18px; }
.card-body > * + * { margin-top: 14px; }
.card-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.grid { display: grid; gap: 16px; }
.grid-kpi { grid-template-columns: repeat(auto-fit, minmax(184px, 1fr)); }
.grid-2   { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* ------------------------------------------------------------------- stats */

.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 17px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--sounding);
}
.stat--chart::after { background: var(--chart); }
.stat--good::after  { background: var(--starboard); }
.stat--warn::after  { background: var(--beacon); }
.stat-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.05;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.stat-value small { font-size: 15px; font-weight: 600; color: var(--ink-soft); margin-right: 3px; }
.stat-note { font-size: 12.5px; color: var(--ink-soft); margin-top: 5px; }

/* ================================================================ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { border-color: var(--ink-faint); text-decoration: none; }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn-primary {
  background: var(--chart);
  border-color: var(--chart);
  color: #fff;
}
.btn-primary:hover { background: var(--chart-deep); border-color: var(--chart-deep); }

.btn-dark { background: var(--hull); border-color: var(--hull); color: #fff; }
.btn-dark:hover { background: var(--hull-rise); border-color: var(--hull-rise); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--mist); color: var(--ink); }

.btn-danger { color: var(--port); border-color: #eccac6; background: #fdf3f2; }
.btn-danger:hover { background: var(--port); border-color: var(--port); color: #fff; }

.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

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

/* ================================================================== forms */

.form-grid {
  display: grid;
  gap: 15px 16px;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}
.field { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }

.field > label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field > label .req { color: var(--chart); margin-left: 2px; }

.input, .select, .textarea {
  width: 100%;
  padding: 9px 11px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.input:hover, .select:hover, .textarea:hover { border-color: #b9c7d0; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--chart);
  box-shadow: 0 0 0 3px var(--chart-tint);
}
.input[readonly] { background: var(--mist); color: var(--ink-soft); cursor: default; }
.textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%235d707b' stroke-width='1.6' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 32px;
}
.input.is-mono, .field-money .input { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.field-hint { font-size: 12px; color: var(--ink-faint); }
.field-error { font-size: 12.5px; color: var(--port); font-weight: 500; }
.has-error .input, .has-error .select, .has-error .textarea { border-color: var(--port); background: #fdf6f5; }

.input-group { display: flex; }
.input-group .prefix {
  display: grid; place-items: center;
  padding: 0 11px;
  background: var(--mist);
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: var(--r) 0 0 var(--r);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}
.input-group .input { border-radius: 0 var(--r) var(--r) 0; }

fieldset.group { border: 0; padding: 0; margin: 0; }
fieldset.group + fieldset.group { margin-top: 24px; }
.group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}
.group-title span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sounding);
}

/* filter bar above lists */
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.toolbar .field { flex: 1 1 165px; }
.toolbar .field-search { flex: 2 1 240px; }
.toolbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: flex-end; }

/* ================================================================= tables */

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

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data th {
  text-align: left;
  padding: 10px 14px;
  background: #f6f9fa;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}
table.data th a { color: inherit; display: inline-flex; gap: 5px; align-items: center; }
table.data th a:hover { color: var(--chart); text-decoration: none; }
table.data th .arrow { color: var(--chart); }
table.data td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
table.data tbody tr:hover { background: #fafcfd; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
table.data td.actions, table.data th.actions { text-align: right; white-space: nowrap; }
table.data .primary-cell { font-weight: 600; }
table.data tfoot td {
  padding: 11px 14px;
  border-top: 2px solid var(--line);
  background: #f6f9fa;
  font-weight: 600;
  font-family: var(--font-mono);
}

.row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
.icon-btn {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--r-sm);
  color: var(--ink-soft);
  cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink-faint); text-decoration: none; }
.icon-btn.danger:hover { color: #fff; background: var(--port); border-color: var(--port); }
.icon-btn svg { width: 15px; height: 15px; }

/* --------------------------------------------------------------- pills */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  border: 1px solid;
}
.pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.is-draft     { color: var(--ink-soft);  border-color: var(--line); background: #f4f7f8; }
.pill.is-fixed     { color: var(--sounding);  border-color: #b9dde5; background: var(--sounding-tint); }
.pill.is-onhire    { color: var(--starboard); border-color: #bfe3cd; background: #eef8f2; }
.pill.is-done      { color: var(--hull);      border-color: #c6d3da; background: #eef2f4; }
.pill.is-cancelled { color: var(--port);      border-color: #eccac6; background: #fdf3f2; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  background: var(--mist);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
}

/* ====================================================== voyage rail (signature) */

.voyage {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}
.voyage-end { min-width: 0; }
.voyage-end--to { text-align: right; }
.voyage-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.voyage-place {
  display: block;
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.voyage-line {
  flex: 1 1 40px;
  min-width: 46px;
  position: relative;
  height: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.voyage-line::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 1px;
  background: repeating-linear-gradient(to right, var(--line) 0 5px, transparent 5px 9px);
}
.voyage-line::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  transform: translateY(-50%);
  height: 7px;
  background:
    radial-gradient(circle 3.5px at left center, var(--sounding) 98%, transparent 100%),
    radial-gradient(circle 3.5px at right center, var(--chart) 98%, transparent 100%);
  background-repeat: no-repeat;
}
.voyage-days {
  position: relative;
  z-index: 1;
  background: var(--paper);
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink);
  white-space: nowrap;
}

/* ============================================================ flash + empty */

.flash {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 15px;
  border-radius: var(--r);
  border: 1px solid;
  font-size: 14.5px;
}
.flash svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.flash-ok    { background: #eef8f2; border-color: #bfe3cd; color: #14603a; }
.flash-error { background: #fdf3f2; border-color: #eccac6; color: #8f2b20; }
.flash-info  { background: var(--sounding-tint); border-color: #b9dde5; color: #0c5568; }

.empty {
  padding: 46px 20px;
  text-align: center;
}
.empty-mark {
  width: 46px; height: 46px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  border: 1px dashed var(--line);
  border-radius: 50%;
  color: var(--ink-faint);
}
.empty h3 { font-size: 16px; text-transform: uppercase; letter-spacing: .04em; }
.empty p { color: var(--ink-soft); margin: 7px auto 16px; max-width: 42ch; }

/* --------------------------------------------------------------- pagination */

.pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pager .count { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); letter-spacing: .05em; }
.pager-links { margin-left: auto; display: flex; gap: 5px; }
.pager-links a, .pager-links span {
  min-width: 32px;
  padding: 5px 8px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  background: var(--paper);
}
.pager-links a:hover { border-color: var(--ink-faint); color: var(--ink); text-decoration: none; }
.pager-links .is-current { background: var(--hull); border-color: var(--hull); color: #fff; }

/* ------------------------------------------------------------ fleet mix bars */

.mixlist { display: flex; flex-direction: column; gap: 12px; }
.mix-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: baseline; }
.mix-name { font-size: 14px; font-weight: 500; }
.mix-val { font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); }
.mix-bar { grid-column: 1 / -1; height: 5px; background: var(--mist); border-radius: 999px; overflow: hidden; }
.mix-bar i { display: block; height: 100%; background: var(--sounding); border-radius: 999px; }
.mix-row:nth-child(2n) .mix-bar i { background: var(--chart); }

/* =================================================================== login */

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--mist);
}
.auth-chart {
  position: relative;
  overflow: hidden;
  background: var(--hull);
  color: #fff;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.auth-chart svg.contours {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .3;
  pointer-events: none;
}
.auth-chart > * { position: relative; z-index: 1; }
.auth-lede { margin-top: auto; max-width: 34ch; }
.auth-lede h2 {
  font-size: clamp(26px, 4vw, 40px);
  text-transform: uppercase;
  letter-spacing: -.015em;
  line-height: 1.05;
}
.auth-lede p { color: #a8bec9; margin: 12px 0 0; font-size: 15px; }
.auth-facts {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  border-top: 1px solid var(--hull-line);
  padding-top: 18px;
}
.auth-facts div span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7d97a5;
}
.auth-facts div strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 34px 20px 48px;
}
.auth-box { width: 100%; max-width: 372px; }
.auth-box h1 {
  font-size: 25px;
  text-transform: uppercase;
  letter-spacing: -.01em;
  margin-top: 8px;
}
.auth-box .auth-sub { color: var(--ink-soft); margin: 8px 0 24px; }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-meta {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
}
.auth-meta code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 1px 5px;
}

/* ============================================================== breakpoints */

@media (min-width: 620px) {
  .content { padding: 26px 26px 60px; }
  .topbar { padding: 0 26px; }
  .card-body { padding: 22px; }
  .card-head { padding: 16px 22px; }
  .card-foot { padding: 14px 22px; }
  .page-foot { padding: 18px 26px 30px; }
}

@media (min-width: 900px) {
  .auth { grid-template-columns: 1.05fr 1fr; }
  .auth-chart { padding: 42px 40px; }
  .auth-panel { padding: 40px; }
}

/* Below the desktop breakpoint the sidebar slides over the page, so it
   needs a shadow to separate it from the content underneath. */
@media (max-width: 999px) {
  .is-nav-open .sidebar { box-shadow: var(--shadow-lg); }
}

@media (min-width: 1000px) {
  .sidebar { transform: none; }
  .backdrop { display: none; }
  .main { margin-left: var(--sidebar-w); }
  .nav-toggle { display: none; }
  .content { padding: 28px 30px 64px; }
  .topbar { padding: 0 30px; }
}

@media (min-width: 1280px) {
  .grid-dash { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
}

/* Tables become stacked records on small screens. Each cell keeps its
   heading through the data-label attribute set in the markup. */
@media (max-width: 780px) {
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr {
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 4px 0;
    margin-bottom: 10px;
    background: var(--paper);
  }
  table.data tbody tr:hover { background: var(--paper); }
  table.data td {
    display: flex;
    gap: 14px;
    align-items: baseline;
    justify-content: space-between;
    padding: 7px 13px;
    border-bottom: 1px dashed var(--line-soft);
    text-align: left !important;
  }
  table.data td:last-child { border-bottom: 0; }
  table.data td::before {
    content: attr(data-label);
    flex: none;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-faint);
  }
  table.data td.actions { justify-content: flex-end; }
  table.data td.actions::before { margin-right: auto; }
  table.data tfoot { display: block; }
  table.data tfoot tr { border: 0; }
  table.data tfoot td { display: flex; }
  .voyage { min-width: 0; width: 100%; }
  .voyage-place { max-width: 96px; }
  .toolbar-actions { margin-left: 0; width: 100%; }
  .toolbar-actions .btn { flex: 1; }
}

@media (max-width: 460px) {
  .stat-value { font-size: 26px; }
  .voyage-days { font-size: 9.5px; padding: 1px 5px; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .sidebar, .topbar, .backdrop, .toolbar, .row-actions, .pager-links, .card-foot { display: none !important; }
  body { background: #fff; }
  .main { margin-left: 0; }
  .card { border: 1px solid #999; box-shadow: none; break-inside: avoid; }
}


/* ---- demo pages only ---- */
.demo-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--chart);
  border-radius: 2px;
  padding: 2px 5px;
  margin-left: 6px;
  vertical-align: 2px;
}
.demo-note {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  background: #fbfcfd;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.demo-note svg { width: 16px; height: 16px; flex: none; color: var(--chart); }
table.data th[data-sort] { cursor: pointer; user-select: none; }
table.data th[data-sort]:hover { color: var(--chart); }


