/* =========================================================================
   ImportExport theme: "clear sky"
   White, sky blue and cool gray. A daytime cargo-ship photo fades in behind
   the app under soft sky glows; content sits on frosted white panels that
   tilt in 3D under the mouse (see site.js, [data-tilt]) with layered shadows
   for depth. Bootstrap variables are overridden so badges, links, forms and
   focus rings follow automatically.
   ========================================================================= */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../lib/inter/inter-latin-wght-normal.woff2") format("woff2-variations"),
       url("../lib/inter/inter-latin-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../lib/inter/sora-latin-wght-normal.woff2") format("woff2-variations"),
       url("../lib/inter/sora-latin-wght-normal.woff2") format("woff2");
}

:root {
  --ink: #0b2540;             /* deep navy: headings, strong text */
  --text: #1f2d3d;
  --text-dim: #64748b;        /* cool gray */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --sky: #0ea5e9;             /* sky blue: highlights, active states */
  --sky-600: #0284c7;         /* primary buttons, links */
  --sky-700: #0369a1;
  --sky-300: #7dd3fc;
  --sky-100: #e0f2fe;
  --sky-50: #f0f9ff;
  --page-bg: #f3f6fa;
  --panel-line: #e4e9f0;
  --surface: rgba(255, 255, 255, .78);     /* frosted white panel */
  --line: rgba(15, 50, 90, .08);           /* hairline borders */
  --line-strong: rgba(15, 50, 90, .14);
  --accent-grad: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 45%, #0369a1 100%);
  --radius: 1.15rem;
  /* Layered shadows: a tight contact shadow plus a wide soft sky-tinted one. */
  --shadow-sm: 0 1px 2px rgba(15, 40, 80, .06), 0 6px 18px -6px rgba(15, 60, 120, .12);
  --shadow-md: 0 2px 4px rgba(15, 40, 80, .06), 0 16px 36px -10px rgba(15, 60, 120, .22);
  --shadow-lg: 0 3px 6px rgba(15, 40, 80, .07), 0 28px 60px -14px rgba(15, 60, 120, .3);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --font-display: "Sora", "Inter", system-ui, sans-serif;

  --bs-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-body-color: var(--text);
  --bs-secondary-color: var(--text-dim);
  --bs-border-color: var(--gray-200);
  --bs-primary: #0284c7;
  --bs-primary-rgb: 2, 132, 199;
  --bs-link-color: #0284c7;
  --bs-link-color-rgb: 2, 132, 199;
  --bs-link-hover-color: #0369a1;
  --bs-link-hover-color-rgb: 3, 105, 161;
  --bs-border-radius: .7rem;
  --bs-border-radius-lg: .9rem;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 15px;
  }
}

/* Sticky footer without absolute positioning, so it never overlaps long pages on mobile. */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  position: relative;
  isolation: isolate;
}

body > .container {
  flex: 1 0 auto;
}

h1, .h1, h2, .h2, h3, .h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}

::selection {
  background: var(--sky-100);
  color: var(--ink);
}

/* ---------- Focus and forms ---------- */
.btn:focus-visible, .form-control:focus, .form-check-input:focus, .form-select:focus {
  box-shadow: 0 0 0 .22rem rgba(14, 165, 233, .2);
}

.form-control, .form-select {
  background-color: rgba(255, 255, 255, .9);
  border-color: var(--gray-300);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control::placeholder {
  color: #94a3b8;
}

.form-control:focus, .form-select:focus {
  border-color: var(--sky);
}

.input-group-text {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: #7a8ba0;
}

.form-check-input:checked {
  background-color: var(--sky-600);
  border-color: var(--sky-600);
}

/* White card headers sit on the frosted panel instead of painting over it. */
.card-header.bg-white {
  background-color: rgba(255, 255, 255, .5) !important;
}

.input-group-text.bg-white {
  background-color: var(--gray-50) !important;
}

/* ---------- Entrance animation ----------
   Cards rise into place once on load, staggered, with a little 3D swing. */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.reveal,
main > .page-header,
main .card,
main .stat-card-wrap,
main .hero-wrap {
  animation: rise-in .7s var(--ease-out) both;
}

main .row > :nth-child(2) > .stat-card-wrap { animation-delay: .06s; }
main .row > :nth-child(3) > .stat-card-wrap { animation-delay: .12s; }
main .row > :nth-child(4) > .stat-card-wrap { animation-delay: .18s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Navbar: floating frosted bar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  padding: .75rem 0 0;
  margin-bottom: 1.75rem;
}

.navbar-brand-bg {
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-md);
  padding: .45rem .6rem;
}

.navbar-brand-bg .navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}

.navbar-brand-bg .nav-link {
  border-radius: 999px;
  padding-inline: .95rem !important;
  color: #475569;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.navbar-brand-bg .nav-link:hover,
.navbar-brand-bg .nav-link.show {
  color: var(--ink);
  background: var(--gray-100);
}

.navbar-brand-bg .nav-link.active {
  color: #fff;
  background: var(--accent-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 16px -4px rgba(2, 132, 199, .5);
}

.navbar-brand-bg .navbar-toggler {
  border-color: var(--gray-200);
}

.navbar-brand-bg .badge {
  font-weight: 600;
  letter-spacing: .02em;
}

.dropdown-menu {
  --bs-dropdown-border-color: var(--line-strong);
  --bs-dropdown-link-hover-bg: var(--sky-50);
  --bs-dropdown-link-active-bg: var(--sky-600);
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  padding: .4rem;
}

.dropdown-item {
  border-radius: .6rem;
}

/* Logo tile: a small glossy 3D cube face. */
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: .9rem;
  background: var(--accent-grad);
  color: #fff;
  font-size: 1.4rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .5),
    inset 0 -3px 0 rgba(0, 0, 0, .15),
    0 8px 18px -4px rgba(2, 132, 199, .55);
}

.brand-mark-sm {
  width: 2rem;
  height: 2rem;
  border-radius: .6rem;
  font-size: 1rem;
}

/* "Smart free-time alerts" tagline chip. */
.badge-smart {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .32rem .8rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--sky-700);
  background: rgba(224, 242, 254, .85);
  border: 1px solid rgba(14, 165, 233, .3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ---------- Buttons: pills everywhere except inside input groups ---------- */
.btn {
  --bs-btn-border-radius: 999px;
  --bs-btn-font-weight: 500;
  position: relative;
  transition: transform .15s var(--ease-out), box-shadow .2s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn-sm {
  --bs-btn-border-radius: 999px;
  --bs-btn-padding-x: .85rem;
}

.input-group > .btn {
  --bs-btn-border-radius: var(--bs-border-radius);
}

.btn-primary,
.btn-cta {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--sky-600);
  --bs-btn-border-color: var(--sky-600);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--sky-700);
  --bs-btn-hover-border-color: var(--sky-700);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #075985;
  --bs-btn-active-border-color: #075985;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--sky-300);
  --bs-btn-disabled-border-color: var(--sky-300);
}

.btn-outline-primary {
  --bs-btn-color: var(--sky-600);
  --bs-btn-border-color: #bae6fd;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--sky-600);
  --bs-btn-hover-border-color: var(--sky-600);
}

.btn-outline-secondary {
  --bs-btn-color: #475569;
  --bs-btn-border-color: var(--gray-300);
  --bs-btn-hover-color: var(--ink);
  --bs-btn-hover-bg: var(--gray-100);
  --bs-btn-hover-border-color: var(--gray-300);
  --bs-btn-active-color: var(--ink);
  --bs-btn-active-bg: var(--gray-200);
}

/* The one action we want people to find first: sky gradient, 3D bevel, and a
   light sweep across it on hover. */
.btn-cta {
  --bs-btn-font-weight: 600;
  --bs-btn-padding-x: 1.4rem;
  --bs-btn-padding-y: .62rem;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-border-color: transparent;
  overflow: hidden;
  background-image: var(--accent-grad);
  background-size: 160% 160%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .4),
    inset 0 -2px 0 rgba(0, 0, 0, .12),
    0 10px 22px -6px rgba(2, 132, 199, .55);
}

.btn-cta::after,
.btn-white::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease-out);
  pointer-events: none;
}

.btn-cta:hover::after,
.btn-white:hover::after {
  transform: translateX(120%);
}

.btn-cta.btn-lg {
  --bs-btn-padding-y: .8rem;
  --bs-btn-font-size: 1rem;
}

.btn-cta:hover {
  transform: translateY(-2px);
  background-position: 100% 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .4),
    inset 0 -2px 0 rgba(0, 0, 0, .12),
    0 16px 30px -8px rgba(2, 132, 199, .65);
}

.btn-cta:active,
.btn-white:active,
.btn-glass:active {
  transform: translateY(0) scale(.98);
}

/* Solid white pill and a frosted pill, for photos and tinted panels. */
.btn-white {
  --bs-btn-color: var(--ink);
  --bs-btn-bg: #fff;
  --bs-btn-border-color: var(--line-strong);
  --bs-btn-hover-color: var(--ink);
  --bs-btn-hover-bg: var(--sky-50);
  --bs-btn-hover-border-color: #bae6fd;
  --bs-btn-active-color: var(--ink);
  --bs-btn-active-bg: var(--sky-100);
  --bs-btn-active-border-color: #bae6fd;
  --bs-btn-font-weight: 600;
  --bs-btn-padding-x: 1.4rem;
  --bs-btn-padding-y: .62rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.btn-glass {
  --bs-btn-color: var(--ink);
  --bs-btn-bg: rgba(255, 255, 255, .6);
  --bs-btn-border-color: rgba(15, 50, 90, .15);
  --bs-btn-hover-color: var(--ink);
  --bs-btn-hover-bg: rgba(255, 255, 255, .9);
  --bs-btn-hover-border-color: rgba(15, 50, 90, .25);
  --bs-btn-active-color: var(--ink);
  --bs-btn-active-bg: #fff;
  --bs-btn-active-border-color: rgba(15, 50, 90, .25);
  --bs-btn-padding-x: 1.4rem;
  --bs-btn-padding-y: .62rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-white.btn-sm,
.btn-glass.btn-sm {
  --bs-btn-padding-x: 1rem;
  --bs-btn-padding-y: .35rem;
}

.btn-white:hover,
.btn-glass:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ---------- Page header ---------- */
.page-header {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.4rem;
}

@media (max-width: 575.98px) {
  .page-header > .btn-cta,
  .page-header > .btn {
    width: 100%;
  }
}

/* ---------- 3D tilt ----------
   site.js sets --rx / --ry (rotation) and --gx / --gy (glare position) on any
   [data-tilt] element while the mouse is over it. The tilt lives on the
   element itself, so entrance animations go on a wrapper (.stat-card-wrap,
   .hero-wrap, .auth-card-wrap) and the two never fight. */
[data-tilt] {
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease-out), box-shadow .3s ease, border-color .3s ease;
}

[data-tilt].is-tilting {
  transition: transform .08s linear, box-shadow .3s ease, border-color .3s ease;
}

[data-tilt] > .tilt-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, .7), transparent 55%);
  opacity: 0;
  transition: opacity .3s ease;
  z-index: 3;
  mix-blend-mode: soft-light;
}

[data-tilt].is-tilting > .tilt-glare {
  opacity: 1;
}

/* ---------- Panels: solid white for legibility ---------- */
.glass,
.card,
.setup-nudge {
  background: #fff;
  border: 1px solid var(--panel-line) !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 6px -2px rgba(16, 24, 40, .06) !important;
}

/* ---------- Dashboard stat cards ---------- */
.stat-card-wrap {
  height: 100%;
}

/* White tile, no backdrop blur: blur would flatten the 3D layers inside. */
.stat-card {
  display: block;
  height: 100%;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #fff 0%, #f8fbff 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 1.15rem 1.2rem;
  color: inherit;
  text-decoration: none;
  position: relative;
}

/* Soft coloured light in the top-right corner behind each number. */
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(9rem 9rem at 100% 0%, var(--stat-bg), transparent 70%);
  transition: opacity .3s ease;
  pointer-events: none;
}

/* Coloured edge along the bottom. */
.stat-card::after {
  content: "";
  position: absolute;
  left: 1.2rem;
  right: 1.2rem;
  bottom: -1px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--stat-color), transparent);
  opacity: .7;
}

a.stat-card:hover {
  color: inherit;
  border-color: color-mix(in srgb, var(--stat-color) 30%, transparent);
  box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: .9rem;
  font-size: 1.3rem;
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--stat-color) 70%, #fff) 0%, var(--stat-color) 55%, color-mix(in srgb, var(--stat-color) 75%, #000) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .5),
    inset 0 -3px 0 rgba(0, 0, 0, .18),
    0 10px 20px -6px color-mix(in srgb, var(--stat-color) 70%, transparent);
  transform: translateZ(40px);
  transition: transform .3s var(--ease-out);
}

a.stat-card:hover .stat-icon {
  transform: translateZ(70px) scale(1.08) rotate(-6deg);
}

.stat-card .stat-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--stat-color, var(--ink));
}

.stat-total   { --stat-color: #0284c7; --stat-bg: #e0f2fe; }
.stat-open    { --stat-color: #0d9488; --stat-bg: #dcf5f2; }
.stat-soon    { --stat-color: #d97706; --stat-bg: #fdf0d8; }
.stat-overdue { --stat-color: #dc2626; --stat-bg: #fde6e4; }

@media (max-width: 575.98px) {
  .stat-card { padding: .9rem; }
  .stat-card .stat-icon { width: 2.3rem; height: 2.3rem; font-size: 1.05rem; }
  .stat-card .stat-value { font-size: 1.7rem; }
}

/* ---------- Cards and tables ---------- */
.card {
  --bs-card-bg: transparent;
  --bs-card-cap-bg: rgba(248, 250, 252, .6);
  --bs-card-border-color: var(--line);
  border-radius: var(--radius);
}

.card > .card-header:first-child {
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  border-bottom-color: var(--line);
  padding-block: .95rem;
}

.card > .card-footer:last-child {
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  border-top-color: var(--line);
}

.table {
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--gray-200);
  --bs-table-hover-bg: var(--sky-50);
}

.table-light,
.table > thead.table-light {
  --bs-table-bg: rgba(241, 245, 249, .8);
  --bs-table-color: var(--text-dim);
  --bs-table-border-color: var(--gray-200);
}

.table > thead th {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  white-space: nowrap;
}

.table > tbody > tr {
  transition: background-color .15s ease, box-shadow .2s ease;
}

.table-hover > tbody > tr:hover > td:first-child {
  box-shadow: inset 3px 0 0 var(--sky);
}

.table > :not(caption) > * > * {
  padding-block: .8rem;
}

/* Badges: soft tints with a coloured rim instead of flat blocks. */
.badge {
  font-weight: 600;
  letter-spacing: .01em;
}

.badge.text-bg-danger {
  color: #b91c1c !important;
  background: #fee2e2 !important;
  box-shadow: inset 0 0 0 1px #fecaca;
}

.badge.text-bg-warning {
  color: #b45309 !important;
  background: #fef3c7 !important;
  box-shadow: inset 0 0 0 1px #fde68a;
}

.badge.text-bg-info {
  color: var(--sky-700) !important;
  background: var(--sky-100) !important;
  box-shadow: inset 0 0 0 1px #bae6fd;
}

.badge.text-bg-success {
  color: #15803d !important;
  background: #dcfce7 !important;
  box-shadow: inset 0 0 0 1px #bbf7d0;
}

.badge.text-bg-light {
  color: #475569 !important;
  background: var(--gray-100) !important;
}

.alert {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.pagination {
  --bs-pagination-color: var(--sky-600);
  --bs-pagination-hover-bg: var(--sky-50);
  --bs-pagination-active-bg: var(--sky-600);
  --bs-pagination-active-border-color: var(--sky-600);
}

/* Row the user just saved, so it is easy to spot on the list. */
@keyframes row-flash {
  from { background-color: #bae6fd; }
  to   { background-color: transparent; }
}

tr.row-highlight > td {
  animation: row-flash 3s ease-out;
  box-shadow: inset 0 0 0 9999px rgba(14, 165, 233, .07);
}

tr.row-highlight > td:first-child {
  border-left: 3px solid var(--sky);
}

/* Mobile container cards (replace the wide table below md). */
.container-card {
  display: block;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  color: inherit;
  transition: background-color .15s ease;
}

.container-card:hover {
  background: var(--sky-50);
}

.container-card:last-child {
  border-bottom: 0;
}

.container-card.is-overdue { border-left: 3px solid #dc2626; }
.container-card.is-soon    { border-left: 3px solid #f59e0b; }
.container-card.row-highlight { background: var(--sky-50); border-left: 3px solid var(--sky); }

.filter-count {
  font-size: .7rem;
  vertical-align: text-top;
}

/* ---------- Forms ---------- */
.form-label {
  font-weight: 500;
  color: #334155;
}

.form-label.required::after {
  content: " *";
  color: var(--bs-danger);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-top: .5rem;
}

@media (max-width: 575.98px) {
  .form-actions > .btn {
    width: 100%;
  }
}

/* A validation summary with nothing in it should not show an empty alert box. */
.validation-summary-valid.alert {
  display: none;
}

/* Alert channel status on the Company page. */
.channel-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .75rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.channel-pill.is-ready { color: #0f6b4f; background: #e3f6ee; border-color: #bfe8d5; }
.channel-pill.is-off   { color: var(--text-dim); background: var(--gray-100); border-color: var(--gray-200); }

/* Nudge on the dashboard when no alert contact is set. */
.setup-nudge {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(254, 243, 199, .8), rgba(255, 255, 255, .85) 55%);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--gray-200) !important;
  background: rgba(255, 255, 255, .6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* =========================================================================
   Login / Register (_AuthLayout, _AuthShowcase)
   Split screen. Left: night-ocean stage with the ship photo, drifting aurora,
   an SVG globe whose trade routes glow while ships travel them, and floating
   preview cards. Right: bright panel with the form. Phones: the stage becomes
   a short banner above the form.
   ========================================================================= */
.auth-body {
  background: #f6f9fc;
  color: var(--text);
  overflow-x: hidden;
}

.auth-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 992px) {
  .auth-split { grid-template-columns: minmax(0, 1fr) clamp(380px, 31vw, 480px); }
  .auth-split.is-wide { grid-template-columns: minmax(0, 1fr) clamp(520px, 44vw, 680px); }
}

/* ---------- Stage (left) ---------- */
.auth-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #e6f1fb;
  background: #06182c;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem 3.75rem;
}

@media (min-width: 992px) {
  .auth-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 2rem 3rem 1.5rem;
  }
}

.stage-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.stage-photo {
  position: absolute;
  inset: -4%;
  background: url("../img/ship-day.jpg") 60% 55% / cover no-repeat;
  opacity: .32;
  filter: saturate(.7) contrast(1.1);
  animation: ken-burns 40s ease-in-out infinite alternate;
}

@keyframes ken-burns {
  from { transform: scale(1); }
  to   { transform: scale(1.1) translate(-1.5%, -1%); }
}

.stage-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(4, 16, 31, .96) 0%, rgba(6, 24, 44, .86) 38%, rgba(8, 40, 72, .55) 70%, rgba(6, 24, 44, .8) 100%),
    linear-gradient(0deg, rgba(4, 16, 31, .9) 0%, rgba(4, 16, 31, 0) 35%);
}

.stage-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  mix-blend-mode: screen;
  z-index: 1;
  animation: aurora 18s ease-in-out infinite alternate;
}
.stage-aurora.a1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -18vmax; background: #0ea5e9; opacity: .28; }
.stage-aurora.a2 { width: 34vmax; height: 34vmax; right: -10vmax; bottom: -10vmax; background: #14b8a6; opacity: .22; animation-duration: 22s; }
.stage-aurora.a3 { width: 22vmax; height: 22vmax; left: 35%; top: 40%; background: #f5a623; opacity: .1; animation-duration: 26s; }

@keyframes aurora {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(4vmax, 3vmax) scale(1.15); }
}

.stage-dots {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: radial-gradient(rgba(186, 230, 253, .16) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at 70% 55%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 55%, #000 0%, transparent 70%);
}

.stage-top { position: relative; z-index: 3; }

.stage-logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  text-decoration: none;
}
.stage-logo:hover { color: #fff; }

.stage-logo-mark {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: .7rem;
  display: grid;
  place-items: center;
  color: #06182c;
  background: linear-gradient(135deg, #fbbf24, #f5a623 55%, #f97316);
  box-shadow: 0 6px 20px -6px rgba(245, 166, 35, .8), inset 0 1px 0 rgba(255, 255, 255, .5);
}

.stage-copy {
  position: relative;
  z-index: 3;
  max-width: 31rem;
  margin-top: 1.25rem;
  animation: fade-up .8s var(--ease-out) both;
}

@media (min-width: 992px) {
  .stage-copy { margin-top: auto; margin-bottom: auto; padding-bottom: 2rem; }
}

.stage-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .85rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  color: #bae6fd;
  background: rgba(14, 165, 233, .12);
  border: 1px solid rgba(125, 211, 252, .28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.live-dot {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: #34d399;
  animation: live 2s ease-out infinite;
}

@keyframes live {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); }
  70% { box-shadow: 0 0 0 .55rem rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.stage-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 3.3vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  color: #fff;
  margin: 1.1rem 0 1rem;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}

.stage-grad {
  background: linear-gradient(90deg, #fde68a 0%, #fbbf24 35%, #f59e0b 65%, #fb923c 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: stage-shimmer 6s ease-in-out infinite alternate;
}

@keyframes stage-shimmer {
  from { background-position: 0% 0; }
  to   { background-position: 100% 0; }
}

.stage-sub {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #a9c3dc;
  margin-bottom: 1.4rem;
}

.stage-chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.stage-chips li {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .38rem .8rem;
  border-radius: 999px;
  font-size: .8rem;
  color: #dbeafe;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  transition: background .2s ease, border-color .2s ease, transform .2s var(--ease-out);
}

.stage-chips li:hover {
  background: rgba(56, 189, 248, .14);
  border-color: rgba(125, 211, 252, .4);
  transform: translateY(-2px);
}

.stage-chips .bi { color: #fbbf24; }

@media (max-width: 991.98px) {
  .stage-sub, .stage-chips { display: none; }
}

/* Globe with routes, on the right of the stage behind the copy. */
.stage-visual {
  position: absolute;
  z-index: 2;
  right: 2%;
  top: 50%;
  width: clamp(280px, calc(100% - 31rem - 9rem), 66vh);
  aspect-ratio: 1;
  transform: translate3d(var(--px, 0px), calc(-50% + var(--py, 0px)), 0);
  transition: transform .9s var(--ease-out);
  pointer-events: none;
}

@media (max-width: 991.98px) {
  .stage-visual { display: none; }
}

@media (min-width: 992px) and (max-width: 1299.98px) {
  .stage-visual { opacity: .45; right: -12%; width: 60vh; }
  .float-card { display: none; }
}

.globe { width: 100%; height: 100%; overflow: visible; animation: globe-in 1.4s var(--ease-out) both; }

@keyframes globe-in {
  from { opacity: 0; transform: scale(.92) rotate(-6deg); }
  to   { opacity: 1; transform: none; }
}

.globe-grid {
  fill: none;
  stroke: rgba(125, 211, 252, .18);
  stroke-width: 1;
}

.routes path {
  stroke-dasharray: 6 8;
  animation: dash 1.6s linear infinite;
  opacity: .9;
}

@keyframes dash { to { stroke-dashoffset: -28; } }

.ships circle {
  fill: #fff;
  filter: drop-shadow(0 0 6px #7dd3fc);
}

.ports circle { fill: #38bdf8; }
.ports .home circle { fill: #f5a623; }
.ports .pulse {
  fill: none;
  stroke: #38bdf8;
  transform-box: fill-box;
  transform-origin: center;
  animation: port-pulse 2.6s ease-out infinite;
}
.ports .home .pulse { stroke: #f5a623; }

@keyframes port-pulse {
  from { transform: scale(1); opacity: .9; stroke-width: 2; }
  to   { transform: scale(4); opacity: 0; stroke-width: .5; }
}

.port-labels text {
  fill: #9cc2e3;
  font: 600 11px "Inter", system-ui, sans-serif;
  letter-spacing: .02em;
}

/* Glass preview cards floating around the globe. */
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 14rem;
  padding: .65rem .85rem;
  border-radius: 1rem;
  color: #fff;
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06));
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .15);
  animation: float 7s ease-in-out infinite, card-in .9s var(--ease-out) both;
}

.fc-1 { left: -4%; top: -3%; animation-delay: 0s, .3s; }
.fc-2 { right: 3%; top: 22%; animation-delay: -2s, .5s; }
.fc-3 { left: -8%; bottom: 14%; animation-delay: -4s, .7s; }
.fc-4 { right: 0; bottom: -5%; animation-delay: -1s, .9s; }

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

.fc-title { font-weight: 600; font-size: .85rem; line-height: 1.25; }
.fc-sub { font-size: .72rem; color: #a9c3dc; }

.fc-icon {
  width: 2.3rem;
  height: 2.3rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: .7rem;
  font-size: 1.05rem;
}
.fc-icon.ok { background: rgba(52, 211, 153, .18); color: #6ee7b7; }
.fc-icon.shield { background: rgba(56, 189, 248, .18); color: #7dd3fc; }
.fc-icon.rate { background: rgba(245, 166, 35, .18); color: #fcd34d; }

/* Countdown ring: --p is the share of free time used. */
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }

.fc-ring {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#f5a623 calc(var(--p) * 360deg), rgba(255, 255, 255, .14) 0);
  animation: ring-fill 2s var(--ease-out) .6s both;
}
.fc-ring span {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .72rem;
  font-weight: 700;
  color: #fcd34d;
  background: #0b2440;
}

@keyframes ring-fill { from { --p: 0; } }

.stage-foot {
  position: relative;
  z-index: 3;
  margin-top: auto;
  font-size: .72rem;
  color: #6f8db0;
}
.stage-foot a { color: #8fb0d3; }

@media (max-width: 991.98px) {
  .stage-foot { display: none; }
}

/* ---------- Panel (right) ---------- */
.auth-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem;
  background:
    radial-gradient(60rem 30rem at 100% 0%, rgba(14, 165, 233, .08), transparent 60%),
    radial-gradient(40rem 30rem at 0% 100%, rgba(245, 166, 35, .06), transparent 60%),
    #f6f9fc;
}

@media (min-width: 576px) { .auth-panel { padding: 1.5rem 2rem; } }
@media (min-width: 992px) { .auth-panel { padding: 1.75rem 2.25rem 1.5rem; } }

.auth-panel-top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .6rem;
  font-size: .85rem;
  color: var(--text-dim);
}

.auth-card-wrap {
  width: 100%;
  max-width: 27rem;
  margin: 1.5rem auto 2rem;
  animation: rise-in .8s var(--ease-out) .1s both;
}

.is-wide .auth-card-wrap { max-width: 40rem; }

@media (min-width: 992px) {
  .auth-card-wrap { margin: auto; padding: 2rem 0; }
}

.auth-card { position: relative; }

/* Below the desktop split the form sits on a white card that overlaps the banner. */
@media (max-width: 991.98px) {
  .auth-panel { padding-top: 0; }
  .auth-panel-top { order: 2; justify-content: center; margin-bottom: 1rem; }
  .auth-card-wrap { order: 1; margin-top: -2.5rem; }
  .auth-foot { order: 3; }
  .auth-card {
    background: #fff;
    border-radius: 1.4rem;
    padding: 1.6rem 1.35rem;
    box-shadow: var(--shadow-lg);
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .auth-card { padding: 2.2rem 2.4rem; }
}

.auth-greeting { margin-bottom: 1.1rem; }

.auth-wave {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  font-size: 1.35rem;
  color: #fff;
  background: var(--accent-grad);
  box-shadow: 0 12px 24px -10px rgba(2, 132, 199, .7), inset 0 1px 0 rgba(255, 255, 255, .4);
}

.auth-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: .35rem;
}

.auth-lead {
  color: var(--text-dim);
  margin-bottom: 1.75rem;
}

.auth-section-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sky-600);
  margin-bottom: .6rem;
}

/* Inputs with a leading icon, roomy and soft. */
.auth-input {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input > .bi {
  position: absolute;
  left: 1rem;
  z-index: 1;
  color: #94a3b8;
  font-size: 1.05rem;
  pointer-events: none;
  transition: color .15s ease;
}

.auth-input > .form-control {
  height: 3.2rem;
  padding-left: 2.75rem;
  padding-right: 3rem;
  border-radius: .9rem;
  border: 1.5px solid var(--gray-200);
  background: #fff;
  font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-input > .form-control:hover { border-color: var(--gray-300); }

.auth-input > .form-control:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, .15);
}

.auth-input:focus-within > .bi { color: var(--sky-600); }

.auth-eye {
  position: absolute;
  right: .5rem;
  width: 2.3rem;
  height: 2.3rem;
  border: 0;
  border-radius: .6rem;
  background: transparent;
  color: #94a3b8;
}
.auth-eye:hover { background: var(--gray-100); color: var(--ink); }

.auth-form .form-label { font-weight: 600; font-size: .88rem; color: var(--ink); }

.auth-form .form-switch .form-check-input { width: 2.4em; height: 1.3em; cursor: pointer; }
.auth-form .form-switch .form-check-input:checked { background-color: var(--sky-600); border-color: var(--sky-600); }
.auth-form .form-switch .form-check-label { margin-left: .35rem; padding-top: .1rem; cursor: pointer; }

.auth-submit { height: 3.3rem; --bs-btn-border-radius: .95rem; }
.auth-submit .bi { display: inline-block; transition: transform .2s var(--ease-out); }
.auth-submit:hover .bi { transform: translateX(4px); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.75rem 0 1rem;
  color: var(--text-dim);
  font-size: .82rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.auth-card .btn-white { --bs-btn-border-radius: .95rem; }

.auth-note {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--text-dim);
  font-size: .85rem;
}

.auth-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .4rem 1rem;
  font-size: .75rem;
  color: var(--text-dim);
}
.auth-foot a { color: #475569; }

@media (prefers-reduced-motion: reduce) {
  .stage-photo, .stage-aurora, .stage-grad, .routes path, .ports .pulse, .float-card,
  .live-dot, .fc-ring, .globe, .stage-copy, .auth-card-wrap { animation: none !important; }
}

/* ---------- Container history timeline ---------- */
.history-timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.25rem;
    border-left: 2px solid var(--bs-border-color);
}
.history-timeline li {
    position: relative;
    padding: 0 0 1rem .75rem;
}
.history-timeline li:last-child { padding-bottom: 0; }
.history-timeline li::before {
    content: "";
    position: absolute;
    left: calc(-1.25rem - 6px);
    top: .35rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bs-secondary-bg);
    border: 2px solid var(--bs-secondary-color);
}
.history-timeline li.is-status::before {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
}
.history-note {
    background: var(--bs-tertiary-bg);
    border-radius: .375rem;
    padding: .35rem .6rem;
    white-space: pre-line;
}

/* ---------- Rate slabs (container form) ---------- */
.rate-slabs > summary {
    cursor: pointer;
    color: var(--bs-primary);
    width: fit-content;
}

/* ---------- Reports: charts (dataviz reference palette, validated for the white card surface) ---------- */
.viz-root {
    --surface-1: #ffffff;
    --text-primary: #0b0b0b;
    --text-secondary: #52514e;
    --text-muted: #6f6d68;
    --gridline: #e1e0d9;
    --baseline: #c3c2b7;
    --series-1: #2a78d6;   /* demurrage  (categorical slot 1, blue) */
    --series-2: #eb6834;   /* detention  (categorical slot 2, orange) */
    --seq-bar: #86b6ef;    /* single-hue magnitude bars (sequential blue, step 250) */
}
.viz-label { font-size: .8rem; color: var(--text-secondary); }
.viz-hero { font-size: 3rem; font-weight: 600; line-height: 1.1; color: var(--text-primary); }
.viz-tile { font-size: 1.5rem; font-weight: 600; color: var(--text-primary); }
.viz-sub { font-size: .8rem; color: var(--text-muted); }
.viz-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: baseline; }
.viz-legend { display: flex; gap: 1rem; color: var(--text-secondary); }
.viz-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

.viz-chart { position: relative; display: flex; gap: .5rem; padding: 1.25rem 0 1.5rem; }
.viz-axis { position: relative; width: 3rem; height: 220px; flex-shrink: 0; }
.viz-tick { position: absolute; right: 0; transform: translateY(50%); font-size: .7rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.viz-plot { position: relative; flex: 1; height: 220px; display: flex; align-items: stretch; }
.viz-grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--gridline); }
.viz-grid.is-base { border-top-color: var(--baseline); }
.viz-col { position: relative; flex: 1; display: flex; justify-content: center; outline: none; cursor: default; }
.viz-col:focus-visible { box-shadow: inset 0 0 0 2px var(--series-1); border-radius: 4px; }
.viz-col.is-hover .viz-seg, .viz-col:focus-visible .viz-seg { filter: brightness(1.12); }
.viz-stack { position: relative; width: min(24px, 60%); height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.viz-seg { width: 100%; min-height: 2px; }
.viz-seg.is-top { border-radius: 4px 4px 0 0; }
.viz-peak { align-self: center; font-size: .7rem; font-weight: 600; line-height: 1; color: var(--text-secondary); white-space: nowrap; }
.viz-x { position: absolute; bottom: -1.4rem; left: 0; right: 0; text-align: center; font-size: .7rem; color: var(--text-muted); white-space: nowrap; }
.viz-tooltip {
    position: absolute; top: 0; z-index: 5; min-width: 9rem; padding: .5rem .65rem;
    background: var(--surface-1); border: 1px solid rgba(11, 11, 11, .12); border-radius: .5rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12); font-size: .8rem; color: var(--text-secondary); pointer-events: none;
}
.viz-tip-head { color: var(--text-primary); font-weight: 600; margin-bottom: .25rem; }
.viz-tip-row strong { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.viz-tip-key { display: inline-block; width: 12px; height: 2px; margin-right: 6px; vertical-align: middle; }
.viz-table td, .viz-table th { font-variant-numeric: tabular-nums; }
.viz-hbar-row { display: flex; align-items: center; gap: .4rem; }
.viz-hbar { display: block; height: 10px; min-width: 2px; background: var(--seq-bar); border-radius: 0 3px 3px 0; }
.viz-hbar-row:has(.viz-hbar[style*="width:0%"]) .viz-hbar { display: none; }
.viz-hbar-val { font-size: .8rem; color: var(--text-primary); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* =========================================================================
   App shell: dark sidebar (grouped menu) + slim top bar + content.
   Sidebar is fixed on lg+ and a slide-in offcanvas below that.
   ========================================================================= */
.app-body {
  --sidebar-w: 248px;
  background: var(--page-bg);
  display: block;
}

.app-sidebar {
  --bs-offcanvas-width: 272px;
  --bs-offcanvas-bg: #08192e;
  --bs-offcanvas-color: #c9d6e6;
  background: linear-gradient(180deg, #0a1f38 0%, #08192e 55%, #071527 100%);
  color: #c9d6e6;
  display: flex;
  flex-direction: column;
}

@media (min-width: 992px) {
  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    z-index: 1030;
    border-right: 1px solid rgba(255, 255, 255, .06);
  }
  .app-main { margin-left: var(--sidebar-w); }
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.1rem .9rem 1.25rem;
}

.sidebar-logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  color: #fff;
  text-decoration: none;
}
.sidebar-logo:hover { color: #fff; }

.sidebar-logo-mark {
  width: 2rem;
  height: 2rem;
  border-radius: .6rem;
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
  color: #06182c;
  background: linear-gradient(135deg, #fbbf24, #f5a623 55%, #f97316);
  box-shadow: 0 6px 16px -6px rgba(245, 166, 35, .8), inset 0 1px 0 rgba(255, 255, 255, .5);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: .25rem .75rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .15) transparent;
}

.side-group {
  margin: 1.15rem .6rem .4rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6f86a3;
}

.side-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem .75rem;
  margin-bottom: 2px;
  border-radius: .65rem;
  font-size: .92rem;
  font-weight: 500;
  color: #c9d6e6;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}

.side-link .bi {
  font-size: 1.05rem;
  width: 1.2rem;
  text-align: center;
  color: #7f97b5;
  transition: color .15s ease;
}

.side-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .06);
}
.side-link:hover .bi { color: #cfe3f7; }

.side-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(14, 165, 233, .28), rgba(14, 165, 233, .08));
  box-shadow: inset 3px 0 0 #38bdf8;
}
.side-link.active .bi { color: #7dd3fc; }

.sidebar-foot {
  padding: .75rem;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.side-user {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .6rem;
  border: 0;
  border-radius: .75rem;
  background: transparent;
  color: #e6eef8;
  text-align: left;
}
.side-user:hover, .side-user[aria-expanded="true"] { background: rgba(255, 255, 255, .06); }
.side-user > .bi { margin-left: auto; color: #6f86a3; }

.side-user-text { display: flex; flex-direction: column; min-width: 0; }
.side-user-name { font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-meta { font-size: .72rem; color: #8aa0bb; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.avatar {
  width: 2.2rem;
  height: 2.2rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent-grad);
}
.avatar-sm { width: 2rem; height: 2rem; font-size: .72rem; }

/* ---------- Top bar ---------- */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1rem;
  background: rgba(243, 246, 250, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--panel-line);
}

@media (min-width: 992px) { .app-topbar { padding: .8rem 2rem; } }

.topbar-logo { text-decoration: none; }

.topbar-search {
  position: relative;
  flex: 1;
  max-width: 34rem;
}
.topbar-search .bi {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #8a9ab0;
  pointer-events: none;
}
.topbar-search .form-control {
  height: 2.5rem;
  padding-left: 2.4rem;
  border-radius: .8rem;
  background: #fff;
  border: 1px solid var(--panel-line);
}

@media (max-width: 575.98px) {
  .topbar-search .form-control::placeholder { color: transparent; }
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.topbar-icon {
  --bs-btn-border-radius: .75rem;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 1.2rem;
  color: #475569;
  background: #fff;
  border: 1px solid var(--panel-line);
}
.topbar-icon:hover { color: var(--ink); background: #fff; border-color: var(--gray-300); }

.topbar-new { --bs-btn-border-radius: .75rem; height: 2.5rem; --bs-btn-padding-x: 1rem; }

.app-content {
  padding: 1.5rem 1rem 1rem;
  max-width: 1400px;
}

@media (min-width: 992px) { .app-content { padding: 1.75rem 2rem 1rem; } }

.app-footer {
  padding: 1rem 1rem 1.5rem;
  font-size: .78rem;
  color: var(--text-dim);
}
@media (min-width: 992px) { .app-footer { padding: 1rem 2rem 1.5rem; } }

/* Text on pages: a touch larger and darker for easy reading. */
.app-body .text-muted { color: #5b6b80 !important; }
.app-body .table > thead th { color: #5b6b80; }

/* =========================================================================
   Dashboard
   ========================================================================= */
.dash-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 1.75rem;
  margin-bottom: 1.5rem;
  border-radius: 1.25rem;
  color: #fff;
  background:
    radial-gradient(40rem 18rem at 100% 0%, rgba(56, 189, 248, .35), transparent 60%),
    radial-gradient(30rem 16rem at 0% 120%, rgba(245, 166, 35, .22), transparent 60%),
    linear-gradient(120deg, #0a1f38 0%, #0c2c4f 60%, #0e3a63 100%);
  box-shadow: 0 18px 40px -22px rgba(8, 25, 46, .8);
}

.dash-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(186, 230, 253, .14) 1px, transparent 1.2px);
  background-size: 20px 20px;
  mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
  pointer-events: none;
}

.dash-hero > * { position: relative; z-index: 1; }
.dash-date { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #8fb3d6; }
.dash-hero h1 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); margin: .25rem 0 .35rem; }
.dash-hero p { color: #b9cde2; margin: 0; max-width: 40rem; }
.dash-hero .status-ok { color: #6ee7b7; font-weight: 600; }
.dash-hero .status-warn { color: #fcd34d; font-weight: 600; }

.dash-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn-hero {
  --bs-btn-color: #fff;
  --bs-btn-bg: rgba(255, 255, 255, .1);
  --bs-btn-border-color: rgba(255, 255, 255, .2);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: rgba(255, 255, 255, .18);
  --bs-btn-hover-border-color: rgba(255, 255, 255, .35);
  --bs-btn-active-bg: rgba(255, 255, 255, .25);
  --bs-btn-active-color: #fff;
  --bs-btn-border-radius: .8rem;
}
.dash-actions .btn { --bs-btn-border-radius: .8rem; --bs-btn-padding-x: 1.1rem; --bs-btn-padding-y: .6rem; --bs-btn-font-size: .92rem; --bs-btn-font-weight: 600; }

/* KPI tiles */
.kpi {
  display: block;
  height: 100%;
  padding: 1.15rem 1.2rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid var(--panel-line);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  color: inherit;
  text-decoration: none;
  transition: transform .2s var(--ease-out), box-shadow .2s ease, border-color .2s ease;
}
.kpi:hover { transform: translateY(-2px); border-color: #cfd8e3; box-shadow: 0 12px 24px -14px rgba(16, 24, 40, .25); color: inherit; }

.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.kpi-label { font-size: .82rem; font-weight: 600; color: #5b6b80; }
.kpi-icon {
  width: 2.3rem;
  height: 2.3rem;
  display: grid;
  place-items: center;
  border-radius: .7rem;
  font-size: 1.1rem;
  color: var(--k, #0284c7);
  background: var(--kb, #e0f2fe);
}
.kpi-value { font-family: var(--font-display); font-size: 1.85rem; font-weight: 700; line-height: 1.1; color: var(--ink); letter-spacing: -.02em; }
.kpi-value small { font-size: .9rem; font-weight: 600; color: #5b6b80; margin-right: .2rem; }
.kpi-foot { margin-top: .35rem; font-size: .8rem; color: #5b6b80; }
.kpi-foot.bad { color: #dc2626; font-weight: 600; }

.k-blue   { --k: #0284c7; --kb: #e0f2fe; }
.k-amber  { --k: #d97706; --kb: #fef3c7; }
.k-red    { --k: #dc2626; --kb: #fee2e2; }
.k-green  { --k: #059669; --kb: #d1fae5; }

/* Panels with a header */
.panel { background: #fff; border: 1px solid var(--panel-line); border-radius: 1rem; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); height: 100%; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem 1.2rem .6rem; }
.panel-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--ink); margin: 0; }
.panel-head a { font-size: .82rem; font-weight: 600; text-decoration: none; }
.panel-body { padding: .25rem 1.2rem 1.1rem; }

/* Needs attention */
.attn { display: flex; flex-direction: column; gap: .5rem; }
.attn-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .7rem .8rem;
  border-radius: .8rem;
  border: 1px solid var(--panel-line);
  color: inherit;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.attn-item:hover { background: #f8fafc; border-color: #cfd8e3; color: inherit; }
.attn-icon { width: 2.2rem; height: 2.2rem; flex-shrink: 0; display: grid; place-items: center; border-radius: .65rem; font-size: 1rem; }
.attn-title { font-weight: 600; font-size: .88rem; color: var(--ink); line-height: 1.3; }
.attn-detail { font-size: .78rem; color: #5b6b80; }
.attn-item > .bi-chevron-right { margin-left: auto; color: #a3b1c2; }
.tone-danger  .attn-icon { color: #dc2626; background: #fee2e2; }
.tone-warning .attn-icon { color: #d97706; background: #fef3c7; }
.tone-info    .attn-icon { color: #0284c7; background: #e0f2fe; }
.tone-success .attn-icon { color: #059669; background: #d1fae5; }

.all-clear { text-align: center; padding: 1.5rem .5rem; color: #5b6b80; }
.all-clear .bi { font-size: 2rem; color: #10b981; display: block; margin-bottom: .4rem; }

/* Deadlines with countdown bars */
.deadline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1rem; padding: .75rem 0; border-bottom: 1px solid #eef2f6; }
.deadline:last-child { border-bottom: 0; }
.deadline a { font-weight: 600; text-decoration: none; color: var(--ink); }
.deadline a:hover { color: var(--sky-700); }
.deadline-meta { font-size: .78rem; color: #5b6b80; }
.deadline-days { text-align: right; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.deadline-bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: #eef2f6; overflow: hidden; }
.deadline-bar span { display: block; height: 100%; border-radius: inherit; background: var(--bar, #38bdf8); }
.d-ok   { --bar: #38bdf8; color: #0369a1; }
.d-soon { --bar: #f59e0b; color: #b45309; }
.d-late { --bar: #ef4444; color: #dc2626; }

/* Container pipeline */
.pipeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
@media (min-width: 768px) { .pipeline { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.pipe-step {
  position: relative;
  padding: .8rem .75rem;
  border-radius: .8rem;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, background-color .15s ease;
}
.pipe-step:hover { background: #f0f9ff; border-color: #bae6fd; color: inherit; }
.pipe-count { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--ink); line-height: 1.1; }
.pipe-step.is-empty .pipe-count { color: #a3b1c2; }
.pipe-label { font-size: .75rem; color: #5b6b80; }
.pipe-step .pipe-fill { position: absolute; left: .75rem; right: .75rem; bottom: .45rem; height: 3px; border-radius: 3px; background: #e2e8f0; overflow: hidden; }
.pipe-step .pipe-fill span { display: block; height: 100%; background: var(--accent-grad); }

/* Recent shipments */
.ship-row { display: flex; align-items: center; gap: .8rem; padding: .65rem 0; border-bottom: 1px solid #eef2f6; text-decoration: none; color: inherit; }
.ship-row:last-child { border-bottom: 0; }
.ship-row:hover .ship-ref { color: var(--sky-700); }
.ship-type { width: 2.1rem; height: 2.1rem; flex-shrink: 0; display: grid; place-items: center; border-radius: .6rem; font-size: .95rem; }
.ship-type.is-export { color: #059669; background: #d1fae5; }
.ship-type.is-import { color: #0284c7; background: #e0f2fe; }
.ship-ref { font-weight: 600; color: var(--ink); font-size: .88rem; }
.ship-meta { font-size: .76rem; color: #5b6b80; }
.ship-value { margin-left: auto; text-align: right; font-size: .82rem; font-weight: 600; white-space: nowrap; }

/* =========================================================================
   Inner pages: one consistent, readable look for every list, form and
   detail page inside the app shell.
   ========================================================================= */

/* ---------- Page header ---------- */
.app-body .page-header { margin-bottom: 1.25rem; align-items: flex-end; }
.app-body .page-header h1,
.app-body main > .row h1.h3,
.app-body main h1.h3 { font-size: 1.65rem; font-weight: 700; letter-spacing: -.02em; }
.app-body .page-header .small.text-muted,
.app-body .page-header .text-muted.small { font-size: .88rem; margin-top: .2rem; }

/* Squarer buttons inside the app: calmer than pills, easier to scan in rows. */
.app-body .btn { --bs-btn-border-radius: .65rem; --bs-btn-font-weight: 500; }
.app-body .btn-sm { --bs-btn-border-radius: .55rem; }
.app-body .btn-lg { --bs-btn-border-radius: .8rem; }
.app-body .btn-cta { --bs-btn-font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 14px -6px rgba(2, 132, 199, .55); }
.app-body .btn-cta:hover { transform: translateY(-1px); }
.app-body .btn-outline-primary { --bs-btn-border-color: #bfdcf2; --bs-btn-bg: #fff; }
.app-body .btn-outline-secondary { --bs-btn-bg: #fff; --bs-btn-border-color: #d5dde7; --bs-btn-color: #334155; }
.app-body .btn-outline-danger { --bs-btn-bg: #fff; --bs-btn-border-color: #f3c4c4; }
.app-body .btn-link { --bs-btn-color: var(--sky-700); text-decoration: none; }

/* ---------- Cards ---------- */
.app-body .card { border-radius: 1rem; overflow: hidden; }
.app-body .card > .card-header,
.app-body .card > .card-header.bg-white {
  background: #fff !important;
  border-bottom: 1px solid #eef2f6;
  padding: .9rem 1.15rem;
  font-family: var(--font-display);
  font-size: .98rem;
  color: var(--ink);
}
.app-body .card > .card-header .bi { color: var(--sky-600) !important; }
.app-body .card > .card-body { padding: 1.15rem; }
.app-body .card > .card-footer { background: #fbfcfe !important; border-top: 1px solid #eef2f6; padding: .75rem 1.15rem; }

/* ---------- Tables ---------- */
.app-body .table { --bs-table-bg: transparent; margin-bottom: 0; }
.app-body .table > thead th,
.app-body .table > thead.table-light th {
  background: #f8fafc !important;
  color: #64748b;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding-top: .7rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid #e8edf3;
  white-space: nowrap;
}
.app-body .table > :not(caption) > * > * { padding: .85rem .9rem; border-color: #eef2f6; }
.app-body .table-sm > :not(caption) > * > * { padding: .55rem .75rem; }
.app-body .table > tbody > tr { transition: background-color .12s ease; }
.app-body .table-hover > tbody > tr:hover > * { --bs-table-bg-state: #f6faff; }
.app-body .table td > a.fw-semibold { color: var(--ink); }
.app-body .table td > a.fw-semibold:hover { color: var(--sky-700); }

/* Urgent rows: a coloured edge and a faint tint instead of a solid colour block. */
.app-body .table > tbody > tr.row-late > *,
.app-body .table > tbody > tr.table-danger > * { --bs-table-bg: #fff8f8; color: inherit; }
.app-body .table > tbody > tr.row-soon > *,
.app-body .table > tbody > tr.table-warning > * { --bs-table-bg: #fffcf2; color: inherit; }
.app-body .table-hover > tbody > tr.row-late:hover > *, .app-body .table-hover > tbody > tr.table-danger:hover > * { --bs-table-bg: #fff1f1; --bs-table-bg-state: transparent; }
.app-body .table-hover > tbody > tr.row-soon:hover > *, .app-body .table-hover > tbody > tr.table-warning:hover > * { --bs-table-bg: #fff7e0; --bs-table-bg-state: transparent; }
.app-body .table > tbody > tr.row-late > :first-child,
.app-body .table > tbody > tr.table-danger > :first-child { box-shadow: inset 4px 0 0 #ef4444; }
.app-body .table > tbody > tr.row-soon > :first-child,
.app-body .table > tbody > tr.table-warning > :first-child { box-shadow: inset 4px 0 0 #f59e0b; }
.app-body .table > tbody > tr.table-success > * { --bs-table-bg: #f3fbf7; }
.app-body .table > tbody > tr.table-success > :first-child { box-shadow: inset 4px 0 0 #10b981; }

/* ---------- Pills ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .28rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--sc);
  background: var(--sb);
}
.status-pill::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.st-booked    { --sc: #475569; --sb: #f1f5f9; }
.st-transit   { --sc: #0369a1; --sb: #e0f2fe; }
.st-arrived   { --sc: #4338ca; --sb: #e0e7ff; }
.st-customs   { --sc: #b45309; --sb: #fef3c7; }
.st-gateout   { --sc: #0f766e; --sb: #ccfbf1; }
.st-delivered { --sc: #047857; --sb: #d1fae5; }
.st-returned  { --sc: #166534; --sb: #dcfce7; }

.days-pill { display: inline-block; padding: .25rem .6rem; border-radius: .5rem; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.days-pill.d-late   { color: #b91c1c; background: #fee2e2; }
.days-pill.d-soon   { color: #b45309; background: #fef3c7; }
.days-pill.d-ok     { color: #0f766e; background: #ecfdf5; }
.days-pill.d-closed { color: #64748b; background: #f1f5f9; font-weight: 600; }

.type-tag { display: inline-block; padding: .08rem .45rem; border-radius: .35rem; font-size: .68rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.type-tag.is-import { color: #0369a1; background: #e0f2fe; }
.type-tag.is-export { color: #047857; background: #d1fae5; }

/* Bootstrap badges: soft tints so they inform without shouting. */
.app-body .badge { font-weight: 600; border-radius: .45rem; padding: .32em .6em; }
.app-body .badge.text-bg-primary { color: #0369a1 !important; background: #e0f2fe !important; }
.app-body .badge.text-bg-success { color: #047857 !important; background: #d1fae5 !important; }
.app-body .badge.text-bg-danger  { color: #b91c1c !important; background: #fee2e2 !important; }
.app-body .badge.text-bg-warning { color: #92400e !important; background: #fef3c7 !important; }
.app-body .badge.text-bg-info    { color: #0e7490 !important; background: #cffafe !important; }
.app-body .badge.text-bg-secondary { color: #334155 !important; background: #e2e8f0 !important; }
.app-body .badge.text-bg-light   { color: #475569 !important; background: #f1f5f9 !important; border-color: #e2e8f0 !important; }

/* ---------- Filter bars ---------- */
.filter-card { border-radius: 1rem; }
.filter-card .form-label { font-size: .72rem !important; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748b !important; }
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding: .25rem 1.15rem 1rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .8rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover { background: #e8eef5; }
.chip .bi { font-size: .85rem; color: #64748b; }
.btn-check:checked + .chip, .chip.active { color: #fff; background: var(--sky-600); border-color: var(--sky-600); }
.btn-check:checked + .chip .bi, .chip.active .bi { color: #fff; }
.chip.active { text-decoration: none; }
.btn-check:checked + .chip-soon { background: #d97706; border-color: #d97706; }
.btn-check:checked + .chip-late { background: #dc2626; border-color: #dc2626; }
.btn-check:focus-visible + .chip { box-shadow: 0 0 0 .2rem rgba(14, 165, 233, .25); }

/* ---------- Forms ---------- */
.app-body .form-label { font-size: .86rem; font-weight: 600; color: #334155; margin-bottom: .35rem; }
.app-body .form-control,
.app-body .form-select {
  border-radius: .65rem;
  border-color: #d5dde7;
  background-color: #fff;
  min-height: 2.6rem;
}
.app-body .form-control-sm, .app-body .form-select-sm { min-height: 2.1rem; border-radius: .5rem; }
.app-body textarea.form-control { min-height: auto; }
.app-body .form-control:hover, .app-body .form-select:hover { border-color: #b8c4d3; }
.app-body .input-group-text { border-color: #d5dde7; background: #f8fafc; }
.app-body .input-group > .form-control, .app-body .input-group > .form-select { min-height: 2.6rem; }
.app-body .form-text { color: #64748b; font-size: .8rem; }

/* Section headings inside forms ("Container", "Shipment", "Route & dates"...). */
.app-body form h2.h6.text-uppercase {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-size: .8rem !important;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--sky-700) !important;
  margin-top: 1.5rem !important;
  margin-bottom: 1rem !important;
}
.app-body form h2.h6.text-uppercase::after { content: ""; flex: 1; height: 1px; background: #e8edf3; }
.app-body form > h2.h6.text-uppercase:first-of-type,
.app-body form .card-body > h2.h6.text-uppercase:first-child { margin-top: 0 !important; }
.app-body form hr { border-color: #e8edf3; opacity: 1; }

.app-body .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #eef2f6;
}

/* ---------- Detail pages: label / value lists ---------- */
.app-body dl.row { row-gap: .55rem; }
.app-body dl.row > dt { font-weight: 500; color: #64748b; }
.app-body dl.row > dd { margin-bottom: 0; color: var(--ink); font-weight: 500; }

/* ---------- Alerts ---------- */
.app-body .alert { border-radius: .8rem; border-width: 1px; }
.app-body .alert-warning { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.app-body .alert-danger  { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.app-body .alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #064e3b; }
.app-body .alert-info    { background: #f0f9ff; border-color: #bae6fd; color: #0c4a6e; }
.app-body .alert-light   { background: #f8fafc; border-color: #e2e8f0; color: #334155; }

/* ---------- Pagination, dropdowns, empty states ---------- */
.app-body .pagination { --bs-pagination-border-radius: .55rem; --bs-pagination-color: #334155; }
.app-body .card-body.text-center.text-muted.py-5 .bi.fs-1 { display: inline-grid !important; place-items: center; width: 4rem; height: 4rem; margin: 0 auto .75rem; border-radius: 1.2rem; background: #f0f9ff; color: var(--sky-600); opacity: 1 !important; font-size: 1.8rem !important; }

/* Container list on phones. */
.app-body .container-card { background: #fff; }

/* ---------- Detail page summary strip + section jump bar ---------- */
.sum-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 768px) { .sum-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .sum-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.sum-item {
  display: flex; flex-direction: column; gap: .15rem;
  padding: .85rem 1rem; border-radius: .9rem; background: #fff;
  border: 1px solid var(--panel-line); border-top: 3px solid var(--tone, #cbd5e1);
  color: inherit; text-decoration: none; transition: transform .15s var(--ease-out), box-shadow .15s ease;
}
.sum-item:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -14px rgba(16, 24, 40, .35); color: inherit; }
.sum-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }
.sum-value { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.sum-sub { font-size: .78rem; color: #64748b; }
.sum-progress { display: block; height: 6px; margin-top: .35rem; border-radius: 99px; background: #eef2f6; overflow: hidden; }
.sum-progress span { display: block; height: 100%; background: var(--tone, #38bdf8); border-radius: inherit; }
.sum-item.tone-ok   { --tone: #10b981; }
.sum-item.tone-warn { --tone: #f59e0b; }
.sum-item.tone-bad  { --tone: #ef4444; }
.sum-item.tone-bad .sum-value { color: #b91c1c; }
.sum-item.tone-muted { --tone: #cbd5e1; }

.jump-nav {
  position: sticky; top: 4.1rem; z-index: 5;
  display: flex; gap: .25rem; overflow-x: auto; padding: .35rem;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--panel-line); border-radius: .85rem; scrollbar-width: none;
}
.jump-nav a { flex-shrink: 0; padding: .4rem .8rem; border-radius: .6rem; font-size: .85rem; font-weight: 600; color: #475569; text-decoration: none; }
.jump-nav a:hover { background: #f0f9ff; color: var(--sky-700); }
.app-body [id] { scroll-margin-top: 8rem; }

/* Link chips (filters that are links, e.g. Payments). */
a.chip { text-decoration: none; }
.chip.is-on { color: #fff; background: var(--sky-600); border-color: var(--sky-600); }
.chip.is-on .bi { color: #fff; }
.chip.chip-late-on.is-on { background: #dc2626; border-color: #dc2626; }
.chip.chip-soon-on.is-on { background: #d97706; border-color: #d97706; }
.chip-count { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem; margin-left: .15rem; border-radius: 99px; font-size: .72rem; font-weight: 700; background: rgba(15, 23, 42, .08); }
.chip.is-on .chip-count { background: rgba(255, 255, 255, .25); }

/* ---------- Container journey stepper ---------- */
.stepper {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  padding: 1rem .75rem .85rem; background: #fff; border: 1px solid var(--panel-line); border-radius: 1rem; overflow-x: auto;
}
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; min-width: 5.5rem; }
.step::before { content: ""; position: absolute; top: 1rem; left: -50%; right: 50%; height: 3px; background: #e2e8f0; z-index: 0; }
.step:first-child::before { display: none; }
.step.is-done::before, .step.is-now::before { background: linear-gradient(90deg, #38bdf8, #0284c7); }
.step-dot {
  position: relative; z-index: 1; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%;
  font-size: .8rem; font-weight: 700; color: #94a3b8; background: #fff; border: 2px solid #e2e8f0;
}
.step.is-done .step-dot { color: #fff; background: #0284c7; border-color: #0284c7; }
.step.is-now .step-dot { color: #fff; background: var(--accent-grad); border-color: #7dd3fc; box-shadow: 0 0 0 5px rgba(14, 165, 233, .18); }
.step-name { font-size: .78rem; font-weight: 600; color: #64748b; line-height: 1.2; }
.step.is-now .step-name { color: var(--ink); }
.step-date { font-size: .72rem; color: #94a3b8; }
