/* FishFlow — local theme (Bootstrap 5.3 base) */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap");

:root {
  --ff-font: "DM Sans", system-ui, -apple-system, sans-serif;
  --ff-ocean-950: #0c1929;
  --ff-ocean-900: #0f2847;
  --ff-ocean-800: #134e6f;
  --ff-teal: #0d9488;
  --ff-teal-bright: #14b8a6;
  --ff-accent: #f59e0b;
  --ff-surface: #ffffff;
  --ff-bg: #e8f4f8;
  --ff-bg-gradient: linear-gradient(160deg, #dbeafe 0%, #e0f2fe 45%, #f0fdfa 100%);
  --ff-border: rgba(15, 40, 71, 0.08);
  --ff-shadow: 0 4px 24px rgba(12, 25, 41, 0.08);
  --ff-shadow-lg: 0 12px 40px rgba(12, 25, 41, 0.12);
  --ff-radius: 16px;
  --ff-radius-sm: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--ff-font);
  background: var(--ff-bg);
  background-image: var(--ff-bg-gradient);
  background-attachment: fixed;
  color: var(--ff-ocean-950);
  min-height: 100vh;
}

/* ——— Navbar ——— */
.navbar-fishflow {
  background: linear-gradient(105deg, var(--ff-ocean-900) 0%, var(--ff-ocean-800) 50%, #0f766e 100%) !important;
  box-shadow: 0 4px 20px rgba(12, 25, 41, 0.25);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.navbar-fishflow .navbar-brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-fishflow .navbar-brand .brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--ff-teal-bright), var(--ff-teal));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  color: #fff;
}

.navbar-fishflow .nav-link {
  font-weight: 500;
  border-radius: 8px;
  margin: 0 0.1rem;
  padding: 0.45rem 0.75rem !important;
  transition: background 0.15s ease, color 0.15s ease;
}

.navbar-fishflow .nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.navbar-fishflow .nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff !important;
}

.navbar-fishflow .navbar-text {
  font-size: 0.9rem;
  opacity: 0.95;
}

.navbar-fishflow .btn-logout {
  border-radius: 10px;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border: 0;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ff-ocean-900);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.navbar-fishflow .btn-logout:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: var(--ff-ocean-900);
}

/* ——— Main shell ——— */
main.container-fluid {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 3rem;
}

.page-header {
  margin-bottom: 1.75rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ff-ocean-900);
  margin-bottom: 0.25rem;
}

.page-subtitle {
  color: #64748b;
  font-size: 0.95rem;
  margin: 0;
}

/* ——— Cards ——— */
.card {
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius);
  box-shadow: var(--ff-shadow);
  background: var(--ff-surface);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--ff-shadow-lg);
  border-color: rgba(13, 148, 136, 0.15);
}

/* Dashboard stat cards */
.stat-card {
  position: relative;
  overflow: hidden;
  padding: 1.35rem 1.35rem 1.25rem !important;
  border-radius: var(--ff-radius) !important;
}

.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.12) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(30%, -30%);
}

.stat-card .stat-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--ff-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.stat-card .stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ff-ocean-900);
  line-height: 1.2;
  margin: 0;
}

.stat-card.stat-trips .stat-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.stat-card.stat-sales .stat-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.stat-card.stat-expenses .stat-icon {
  background: rgba(245, 158, 11, 0.18);
  color: #d97706;
}

.stat-card.stat-pending .stat-icon {
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
}

.stat-card.stat-profit .stat-icon {
  background: rgba(20, 184, 166, 0.18);
  color: #0f766e;
}

/* ——— Tables ——— */
.table {
  background: var(--ff-surface);
  border-radius: var(--ff-radius-sm);
  overflow: hidden;
  vertical-align: middle;
}

.table thead th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 2px solid var(--ff-border);
  padding: 0.85rem 1rem;
}

.table tbody td {
  padding: 0.85rem 1rem;
  border-color: var(--ff-border);
}

.table tbody tr:hover {
  background: rgba(240, 253, 250, 0.6);
}

.table-bordered {
  border: 1px solid var(--ff-border);
}

.table-bordered thead th,
.table-bordered tbody td {
  border-color: var(--ff-border);
}

/* ——— Forms ——— */
.form-control,
.form-select {
  border-radius: 10px;
  border-color: #cbd5e1;
  padding: 0.55rem 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--ff-teal);
  box-shadow: 0 0 0 0.2rem rgba(13, 148, 136, 0.2);
}

label {
  font-weight: 500;
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 0.35rem;
}

/* ——— Buttons ——— */
.btn {
  touch-action: manipulation;
}

.btn-primary {
  --bs-btn-bg: var(--ff-teal);
  --bs-btn-border-color: var(--ff-teal);
  --bs-btn-hover-bg: #0f766e;
  --bs-btn-hover-border-color: #0f766e;
  --bs-btn-active-bg: #0d6960;
  --bs-btn-active-border-color: #0d6960;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.5rem 1.15rem;
}

.btn-primary:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(13, 148, 136, 0.35);
}

/* ——— Badges ——— */
.badge {
  font-weight: 600;
  padding: 0.4em 0.65em;
  border-radius: 8px;
}

.badge-open {
  background: #059669 !important;
}

.badge-closed {
  background: #64748b !important;
}

/* ——— Alerts ——— */
.alert {
  border-radius: var(--ff-radius-sm);
  border: none;
}

/* ——— Login ——— */
body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--ff-bg);
  background-image: var(--ff-bg-gradient);
  background-attachment: fixed;
}

.login-page-inner {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.login-shell {
  width: 100%;
}

.ff-login-footer {
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0;
}

.ff-navbar-brand-text {
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

@media (max-width: 575.98px) {
  .ff-navbar-brand-text {
    font-size: 0.8rem;
  }

  .login-brand h1 {
    font-size: 1.2rem;
  }
}

.login-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-brand .brand-mark-lg {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 0.75rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ff-teal-bright), var(--ff-ocean-800));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: var(--ff-shadow-lg);
  color: #fff;
}

.login-brand h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ff-ocean-900);
  letter-spacing: -0.03em;
  margin: 0;
}

.login-brand p {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0.35rem 0 0;
}

.login-page .card {
  border-radius: var(--ff-radius);
  box-shadow: var(--ff-shadow-lg);
}

.login-page .card-body {
  padding: 2rem !important;
}

.login-page .form-control {
  padding: 0.65rem 0.9rem;
}

.login-page .btn-primary {
  padding: 0.65rem 1rem;
}

/* ——— Utilities ——— */
.text-muted.small-hint {
  font-size: 0.85rem;
}

/* ——— Mobile & touch (Bootstrap lg breakpoint and below) ——— */
@media (max-width: 991.98px) {
  .navbar-fishflow .navbar-collapse {
    margin-top: 0.5rem;
    padding-top: 0.25rem;
  }

  .ff-nav-scroll {
    max-height: min(65vh, 22rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  /* Inline submenus in collapsed nav (avoids Popper overlap / wrong taps) */
  .navbar-fishflow .nav-item.dropdown {
    position: relative;
  }

  .navbar-fishflow .dropdown-menu {
    position: static !important;
    display: none;
    float: none;
    inset: auto !important;
    transform: none !important;
    margin: 0.15rem 0 0.35rem 0.75rem;
    width: auto;
  }

  .navbar-fishflow .dropdown-menu.show {
    display: block;
  }

  .navbar-fishflow .nav-link {
    padding: 0.65rem 0.85rem !important;
    border-radius: 10px;
    min-height: 2.75rem;
    display: flex;
    align-items: center;
  }

  .navbar-fishflow .ff-nav-user .btn-logout {
    width: 100%;
  }

  .navbar-fishflow .ff-nav-user {
    border-color: rgba(255, 255, 255, 0.2) !important;
  }
}

@media (min-width: 992px) {
  .navbar-fishflow .ff-nav-user {
    border-top: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .navbar-fishflow .ff-nav-user .btn-logout {
    width: auto;
  }
}

@media (max-width: 767.98px) {
  .ff-main-shell {
    padding-left: max(0.75rem, env(safe-area-inset-left)) !important;
    padding-right: max(0.75rem, env(safe-area-inset-right)) !important;
    padding-bottom: max(2rem, env(safe-area-inset-bottom)) !important;
  }

  .page-header {
    margin-bottom: 1.25rem;
  }

  .page-title {
    font-size: 1.4rem;
    line-height: 1.2;
  }

  .page-subtitle {
    font-size: 0.875rem;
    line-height: 1.45;
  }

  .page-subtitle strong {
    word-break: break-word;
  }

  .stat-card {
    padding: 1rem 1.1rem !important;
  }

  .stat-card .stat-value {
    font-size: 1.35rem;
  }

  .stat-card .stat-value.small {
    font-size: 0.95rem !important;
  }

  .table thead th,
  .table tbody td {
    padding: 0.55rem 0.65rem;
    font-size: 0.875rem;
  }

  .table thead th {
    white-space: nowrap;
  }

  .btn {
    min-height: 2.5rem;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
  }

  .btn-sm {
    min-height: 2.25rem;
  }

  .form-control,
  .form-select {
    min-height: 2.75rem;
    font-size: 1rem;
  }

  .card-body {
    padding: 1rem !important;
  }

  .card.p-3 {
    padding: 1rem !important;
  }

  .table-responsive {
    -webkit-overflow-scrolling: touch;
    border-radius: var(--ff-radius-sm);
  }
}

@media (max-width: 575.98px) {
  .page-title {
    font-size: 1.25rem;
  }

  h4.mb-0,
  h4 {
    font-size: 1.15rem;
  }

  .navbar-fishflow .navbar-brand {
    font-size: 1rem;
  }

  .navbar-fishflow .navbar-brand .brand-mark {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1rem;
  }

  body.login-page {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }

  .login-page .card-body {
    padding: 1.5rem !important;
  }
}

/* Trip profit — slim 7-column layout */
.ff-trip-profit-table {
  font-size: 0.875rem;
}

.ff-trip-profit-table thead th {
  padding: 0.5rem 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  vertical-align: bottom;
}

.ff-trip-profit-table tbody td {
  padding: 0.45rem 0.45rem;
  vertical-align: middle;
}

.ff-trip-profit-stmt .btn-group .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* Revenue report */
.ff-revenue-page .ff-revenue-stats .stat-card {
  padding: 1rem 1.1rem !important;
}

.ff-revenue-active-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ff-revenue-dist {
  color: #475569;
  font-size: 0.8125rem;
}

.ff-revenue-totals-card {
  overflow: hidden;
}

.ff-revenue-totals-card .card-header {
  background: #fafbfc;
}

.ff-revenue-totals-table tbody tr {
  background: #f8fafc;
}

.ff-revenue-stmt .btn-group .btn {
  padding: 0.25rem 0.45rem;
  font-size: 0.75rem;
}

.ff-list-table col.ff-col-actions {
  width: 6.5rem;
  min-width: 6.5rem;
}

.ff-sale-doc-links .btn {
  font-size: 0.72rem;
}

#ff-sale-lines .ff-sale-doc {
  font-size: 0.75rem;
}

@media (max-width: 575.98px) {
  .ff-revenue-stmt .btn-group,
  .ff-trip-profit-stmt .btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .ff-revenue-stmt .btn-group .btn,
  .ff-trip-profit-stmt .btn-group .btn {
    border-radius: 0.25rem !important;
    margin-left: 0 !important;
  }

  .ff-revenue-table,
  .ff-trip-profit-table {
    font-size: 0.8rem;
  }

  .ff-revenue-table thead th,
  .ff-revenue-table tbody td,
  .ff-trip-profit-table thead th,
  .ff-trip-profit-table tbody td {
    padding: 0.35rem 0.3rem;
  }
}

/* ——— App shell enhancements ——— */
.ff-skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1100;
  padding: 0.5rem 1rem;
  background: #fff;
  color: var(--ff-ocean-900);
  border-radius: 8px;
  box-shadow: var(--ff-shadow);
  text-decoration: none;
  font-weight: 600;
}

.ff-flash {
  margin-bottom: 1rem;
}

.navbar-fishflow .dropdown-menu {
  border-radius: var(--ff-radius-sm);
  border: 1px solid var(--ff-border);
  box-shadow: var(--ff-shadow-lg);
  padding: 0.35rem;
}

.navbar-fishflow .dropdown-item {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
}

.navbar-fishflow .dropdown-item.active,
.navbar-fishflow .dropdown-item:active {
  background: rgba(13, 148, 136, 0.12);
  color: var(--ff-ocean-900);
}

.navbar-fishflow .nav-link.dropdown-toggle.active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff !important;
}

.ff-page-header {
  gap: 0.75rem;
}

.ff-page-header h1,
.ff-page-header h2,
.ff-page-header h3,
.ff-page-header h4 {
  margin-bottom: 0;
  color: var(--ff-ocean-900);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ff-page-header .btn,
.ff-page-header .btn-group {
  flex-shrink: 0;
}

.ff-filter-card {
  border-radius: var(--ff-radius-sm);
}

.ff-filter-card .row {
  --bs-gutter-y: 0.75rem;
}

.ff-table-scroll {
  position: relative;
  margin-bottom: 0;
}

.ff-table-scroll::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28px;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.95), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ff-table-scroll.ff-can-scroll::after {
  opacity: 1;
}

.ff-table-scroll-hint {
  display: none;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.35rem;
  text-align: center;
}

.ff-table-scroll.ff-can-scroll + .ff-table-scroll-hint,
.ff-table-scroll-wrap .ff-table-scroll-hint {
  display: block;
}

.ff-app-footer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1rem 1.5rem;
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
}

@media (min-width: 768px) {
  .ff-table-scroll::after,
  .ff-table-scroll-hint {
    display: none !important;
  }
}

@media (hover: none) and (pointer: coarse) {
  .card:hover {
    box-shadow: var(--ff-shadow);
    border-color: var(--ff-border);
  }

  .table tbody tr:hover {
    background: transparent;
  }

  .navbar-fishflow .nav-link:hover {
    background: transparent;
  }
}

@media (max-width: 767.98px) {
  .ff-page-header {
    flex-direction: column;
    align-items: stretch !important;
  }

  .ff-page-header > .d-flex,
  .ff-page-header > .btn-group,
  .ff-page-header > a.btn {
    width: 100%;
  }

  .ff-page-header .btn-group {
    display: flex;
    flex-direction: column;
  }

  .ff-page-header .btn-group .btn {
    border-radius: 0.375rem !important;
    margin-left: 0 !important;
  }

  .navbar-fishflow .dropdown-menu {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
    margin-left: 0.5rem;
    padding-left: 0.25rem;
  }

  .navbar-fishflow .dropdown-item {
    color: rgba(255, 255, 255, 0.92);
  }

  .navbar-fishflow .dropdown-item:hover,
  .navbar-fishflow .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }

  .navbar-fishflow .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.15);
  }
}

/* ——— Dashboard (premium) ——— */
.ff-dashboard {
  --dash-muted: #64748b;
  --dash-card: #ffffff;
  --dash-hero: linear-gradient(135deg, #0f2847 0%, #134e6f 42%, #0f766e 100%);
  padding-bottom: 0.5rem;
}

.ff-dash-empty {
  color: var(--dash-muted);
  font-size: 0.875rem;
  text-align: center;
  margin: 0;
  padding: 1.5rem 1rem;
}

/* Compact top bar */
.ff-dash-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.85rem;
  border-radius: var(--ff-radius-sm);
  background: var(--dash-hero);
  color: #fff;
  box-shadow: var(--ff-shadow);
}

.ff-dash-topbar-greet {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.ff-dash-topbar-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.1rem 0 0.2rem;
  line-height: 1.2;
}

.ff-dash-topbar-meta {
  font-size: 0.8rem;
  opacity: 0.92;
}

.ff-dash-topbar-trip {
  font-weight: 600;
}

.ff-dash-topbar-profit {
  font-weight: 600;
}

.ff-dash-topbar-profit.is-negative {
  color: #fecaca;
}

.ff-dash-topbar-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  justify-content: flex-end;
}

.ff-dash-nav-month {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.2rem;
}

.ff-dash-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  transition: background 0.15s ease;
}

.ff-dash-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.ff-dash-nav-label {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 2.5rem;
  text-align: center;
  padding: 0 0.35rem;
}

.ff-dash-topbar-form .form-select {
  width: auto;
  min-width: 4.25rem;
  max-width: 7.5rem;
  background: rgba(255, 255, 255, 0.95);
  border: 0;
  font-size: 0.8rem;
}

.ff-dash-trip-select {
  min-width: 5.5rem;
  max-width: 8rem;
}

.ff-dash-topbar-form .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.ff-dash-topbar-form .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Alert */
.ff-dash-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.65rem;
  border-radius: var(--ff-radius-sm);
  background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: 0.875rem;
}

.ff-dash-alert i {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.ff-dash-alert strong {
  display: block;
  margin-bottom: 0.15rem;
}

/* KPIs */
.ff-dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.ff-dash-kpi {
  padding: 0.75rem 0.85rem;
  background: var(--dash-card);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius-sm);
  box-shadow: var(--ff-shadow);
}

.ff-dash-kpi-profit {
  border-color: rgba(13, 148, 136, 0.3);
  background: linear-gradient(145deg, #f0fdfa 0%, #fff 55%);
}

.ff-dash-kpi-warn {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(145deg, #fffbeb 0%, #fff 60%);
}

.ff-dash-kpi-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dash-muted);
  margin-bottom: 0.2rem;
}

.ff-dash-kpi-value {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ff-ocean-900);
}

.ff-dash-kpi-profit .ff-dash-kpi-value {
  font-size: 1.05rem;
}

.ff-dash-kpi-hint {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.3rem;
}

.ff-dash-kpi-muted {
  color: #10b981;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Cards */
.ff-dash-card {
  background: var(--dash-card);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius);
  box-shadow: var(--ff-shadow);
  overflow: hidden;
  height: 100%;
}

.ff-dash-card-head {
  padding: 0.65rem 0.85rem 0.5rem;
  border-bottom: 1px solid var(--ff-border);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.ff-dash-card-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ff-dash-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: var(--ff-ocean-900);
}

.ff-dash-card-sub {
  font-size: 0.78rem;
  color: var(--dash-muted);
  margin: 0.15rem 0 0;
}

.ff-dash-card-body {
  padding: 0.75rem 0.85rem 0.85rem;
}

.ff-dash-card-body-compact {
  padding: 1rem 1.15rem;
}

/* Analytics layout — chart + side stack, no row-span gap */
.ff-dash-analytics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  align-items: start;
}

.ff-dash-analytics-side {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ff-dash-card-body-collections {
  padding: 0.75rem 0.85rem !important;
}

.ff-dash-chart-panel .ff-dash-card-body {
  padding: 0.75rem 1rem 1rem;
}

.ff-dash-card-body-compact {
  padding: 0.65rem 0.75rem !important;
}

.ff-dash-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

/* SVG profit chart */
.ff-dash-svg-chart {
  width: 100%;
}

.ff-dash-svg {
  width: 100%;
  height: auto;
  display: block;
}

.ff-dash-grid-line {
  stroke: #e8eef4;
  stroke-width: 1;
}

.ff-dash-zero-line {
  stroke: #cbd5e1;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.ff-dash-area {
  pointer-events: none;
}

.ff-dash-line {
  stroke: #0d9488;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ff-dash-point {
  fill: #fff;
  stroke: #0d9488;
  stroke-width: 2.5;
}

.ff-dash-point.is-negative {
  stroke: #ef4444;
  fill: #fef2f2;
}

.ff-dash-axis-label {
  font-size: 11px;
  fill: #64748b;
  font-family: var(--ff-font);
  font-weight: 600;
}

.ff-dash-svg-legend {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--dash-muted);
}

.ff-dash-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0d9488;
  margin-right: 0.35rem;
  vertical-align: middle;
}

/* Compare bars */
.ff-dash-compare-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  gap: 0.5rem 0.65rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.ff-dash-compare-row:last-of-type {
  margin-bottom: 0;
}

.ff-dash-compare-code {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--ff-ocean-900);
}

.ff-dash-compare-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ff-dash-hbar {
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.ff-dash-hbar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  min-width: 2px;
  transition: width 0.4s ease;
}

.ff-dash-hbar-sales {
  background: linear-gradient(90deg, #34d399, #10b981);
}

.ff-dash-hbar-exp {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.ff-dash-compare-val {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.ff-dash-mini-legend {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.72rem;
  color: var(--dash-muted);
}

.ff-dash-swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 0.25rem;
  vertical-align: middle;
}

.ff-dash-swatch-sales {
  background: #10b981;
}

.ff-dash-swatch-exp {
  background: #f59e0b;
}

/* Mini ring charts (trip status + collections) */
.ff-mini-ring-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
}

.ff-mini-ring {
  position: relative;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: conic-gradient(
    #10b981 0 var(--ring-open, 50%),
    #94a3b8 var(--ring-open, 50%) 100%
  );
}

.ff-mini-ring-collection {
  background: conic-gradient(
    #f59e0b 0 var(--ring-collected, 0%),
    #fef3c7 var(--ring-collected, 0%) 100%
  );
}

.ff-mini-ring::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #fff;
}

.ff-mini-ring-center {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  color: var(--ff-ocean-900);
}

.ff-mini-ring-legend {
  font-size: 10px;
  line-height: 1.35;
  color: var(--dash-muted);
  min-width: 0;
}

.ff-mini-ring-legend li {
  margin-bottom: 0.1rem;
  white-space: nowrap;
}

.ff-mini-ring-legend li:last-child {
  margin-bottom: 0;
}

.ff-mini-ring-legend strong {
  color: var(--ff-ocean-900);
  font-weight: 600;
}

.ff-mini-ring-legend-stack .label {
  color: #94a3b8;
  font-size: 9px;
  text-transform: uppercase;
  margin-right: 0.2rem;
}

.ff-mini-ring-legend-stack strong {
  font-size: 10px;
  font-weight: 600;
}

.ff-mini-ring-legend-pct {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--dash-muted);
  margin-bottom: 0.15rem !important;
}

.ff-mini-ring-legend li.is-warn strong {
  color: #d97706;
}

.ff-mini-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  margin-right: 0.2rem;
  vertical-align: middle;
}

.ff-mini-dot-open {
  background: #10b981;
}

.ff-mini-dot-closed {
  background: #94a3b8;
}

.ff-mini-dot-collection {
  background: #f59e0b;
}

/* Collections card (enhanced) */
.ff-dash-coll {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ff-dash-coll-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ff-dash-coll-hero {
  flex: 1;
  min-width: 0;
}

.ff-dash-coll-hero-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-bottom: 0.1rem;
}

.ff-dash-coll-hero-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ff-ocean-900);
  letter-spacing: -0.02em;
}

.ff-dash-coll-ring {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.ff-dash-coll-ring::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #fff;
}

.ff-dash-coll-ring-inner {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
}

.ff-dash-coll-ring-pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ff-ocean-900);
}

.ff-dash-coll-ring-sub {
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.ff-dash-coll-stack {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

.ff-dash-coll-stack-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  min-width: 2px;
}

.ff-dash-coll-stack-seg-sale-bank {
  background: #2563eb;
}

.ff-dash-coll-stack-seg-inv-bank {
  background: #7c3aed;
}

.ff-dash-coll-stack-seg-inv-cash {
  background: #f59e0b;
}

.ff-dash-coll-lines {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.ff-dash-coll-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.35rem 0.4rem;
  align-items: center;
  font-size: 0.72rem;
  line-height: 1.25;
}

.ff-dash-coll-line-main {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  color: #64748b;
}

.ff-dash-coll-line-main .bi {
  font-size: 0.8rem;
  flex-shrink: 0;
}

.ff-dash-coll-line-label {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ff-dash-coll-line-amt {
  font-weight: 600;
  color: var(--ff-ocean-900);
  white-space: nowrap;
}

.ff-dash-coll-line-pct {
  font-size: 0.65rem;
  font-weight: 600;
  color: #94a3b8;
  min-width: 2rem;
  text-align: right;
}

.ff-dash-coll-line-inv-cash .ff-dash-coll-line-amt {
  color: #059669;
}

.ff-dash-coll-line-inv-cash .ff-dash-coll-line-main .bi {
  color: #d97706;
}

.ff-dash-coll-fish {
  padding-top: 0.35rem;
  border-top: 1px solid #f1f5f9;
}

.ff-dash-coll-fish-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
}

.ff-dash-coll-fish-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94a3b8;
}

.ff-dash-coll-fish-pct {
  font-size: 0.68rem;
  font-weight: 700;
  color: #f59e0b;
}

.ff-dash-coll-fish-track {
  height: 5px;
  border-radius: 999px;
  background: #fef3c7;
  overflow: hidden;
  margin-bottom: 0.2rem;
}

.ff-dash-coll-fish-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.ff-dash-coll-fish-meta {
  font-size: 0.65rem;
  color: #94a3b8;
}

.ff-dash-coll-due {
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.ff-dash-coll-due-title {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #b45309;
  margin-bottom: 0.25rem;
}

.ff-dash-coll-due-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: #92400e;
}

.ff-dash-coll-due-list strong {
  color: #b45309;
  font-weight: 600;
}

/* Hide legacy SVG donuts if any remain */
.ff-dash-donut,
.ff-dash-collection-svg {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
}

/* Top trips */
.ff-dash-top-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  gap: 0.5rem 0.65rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.ff-dash-top-code {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--ff-ocean-900);
}

.ff-dash-top-track {
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.ff-dash-top-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2dd4bf, #0d9488);
  border-radius: 999px;
  min-width: 3px;
}

.ff-dash-top-fill.is-negative {
  background: linear-gradient(90deg, #f87171, #ef4444);
}

.ff-dash-top-val {
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.ff-dash-top-val.is-negative {
  color: #dc2626;
}

/* YTD grid */
.ff-dash-ytd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.ff-dash-ytd-stat {
  padding: 0.85rem;
  background: #f8fafc;
  border-radius: 10px;
  text-align: center;
}

.ff-dash-ytd-stat-wide {
  grid-column: span 2;
  text-align: left;
}

.ff-dash-ytd-stat-highlight {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
  border: 1px solid rgba(13, 148, 136, 0.2);
}

.ff-dash-ytd-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ff-ocean-900);
  line-height: 1.2;
}

.ff-dash-ytd-lbl {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dash-muted);
  margin-top: 0.15rem;
}

.ff-dash-ytd-val {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ff-ocean-900);
  margin-top: 0.2rem;
}

/* Trips table */
.ff-dash-card-trips {
  margin-bottom: 1rem;
}

.ff-dash-trips-table thead th {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dash-muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--ff-border);
  padding: 0.65rem 1rem;
  white-space: nowrap;
}

.ff-dash-trips-table tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

.ff-dash-trips-table tfoot td {
  padding: 0.65rem 1rem;
  background: #f8fafc;
  border-top: 1px solid var(--ff-border);
}

.ff-dash-trip-link {
  font-weight: 600;
  color: var(--ff-teal);
  text-decoration: none;
}

.ff-dash-trip-link:hover {
  color: var(--ff-ocean-800);
  text-decoration: underline;
}

.ff-dash-status {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: capitalize;
  padding: 0.3em 0.65em;
}

.ff-dash-status-open {
  background: #d1fae5 !important;
  color: #047857 !important;
}

.ff-dash-status-closed {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

.ff-dash-trip-cards {
  padding: 0.5rem 1rem 1rem;
}

.ff-dash-trip-card {
  padding: 1rem 0;
  border-bottom: 1px solid var(--ff-border);
}

.ff-dash-trip-card:last-child {
  border-bottom: 0;
}

.ff-dash-trip-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.ff-dash-trip-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.ff-dash-trip-card-grid .label {
  display: block;
  font-size: 0.68rem;
  color: var(--dash-muted);
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

/* Activity feed */
.ff-dash-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ff-dash-feed-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--ff-border);
  transition: background 0.12s ease;
}

.ff-dash-feed-item:hover {
  background: #f8fafc;
}

.ff-dash-feed-item:last-child {
  border-bottom: 0;
}

.ff-dash-feed-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.ff-dash-feed-icon-sale {
  background: #ecfdf5;
  color: #059669;
}

.ff-dash-feed-icon-bank {
  background: #eff6ff;
  color: #2563eb;
}

.ff-dash-feed-icon-cash {
  background: #fffbeb;
  color: #b45309;
}

.ff-dash-feed-icon-invoice {
  background: #f5f3ff;
  color: #6d28d9;
}

.ff-dash-ytd-sub {
  display: block;
  margin-top: 0.2rem;
}

.ff-dash-feed-main {
  flex: 1;
  min-width: 0;
}

.ff-dash-feed-title {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ff-ocean-900);
}

.ff-dash-feed-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--dash-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ff-dash-feed-amount {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.ff-dash-feed-empty {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--dash-muted);
  font-size: 0.875rem;
}

.ff-dash-footnote {
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0.5rem 0 0;
}

/* Responsive */
@media (max-width: 1199.98px) {
  .ff-dash-analytics {
    grid-template-columns: 1fr;
  }

  .ff-dash-analytics-side {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991.98px) {
  .ff-dash-kpis {
    grid-template-columns: repeat(2, 1fr);
  }

  .ff-dash-row-2 {
    grid-template-columns: 1fr;
  }

  .ff-dash-analytics-side {
    grid-template-columns: 1fr;
  }

  .ff-dash-ytd-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ff-dash-ytd-stat-wide {
    grid-column: span 2;
  }
}

@media (max-width: 767.98px) {
  .ff-dash-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .ff-dash-topbar-form {
    justify-content: flex-start;
  }

  .ff-dash-topbar-form .form-select,
  .ff-dash-trip-select {
    flex: 1 1 40%;
    max-width: none;
  }

  .ff-dash-kpis {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .ff-dash-kpi {
    padding: 0.9rem;
  }

  .ff-dash-kpi-icon {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 1rem;
  }

  .ff-dash-kpi-value {
    font-size: 1rem;
  }
}

@media (max-width: 479.98px) {
  .ff-dash-kpis {
    grid-template-columns: 1fr;
  }
}

/* ——— Module list pages (sales, expenses, …) ——— */
.ff-list-page .ff-list-stats .stat-card,
.ff-sales-page .ff-sales-stats .stat-card {
  padding: 1rem 1.1rem !important;
}

.ff-list-page .ff-list-stats .stat-value,
.ff-sales-page .ff-sales-stats .stat-value {
  font-size: 1.2rem;
}

.ff-list-page .ff-list-stats .stat-value.small,
.ff-sales-page .ff-sales-stats .stat-value.small {
  font-size: 0.95rem !important;
  line-height: 1.35;
}

.ff-list-table-card,
.ff-sales-table-card {
  overflow: hidden;
}

.ff-list-table-card .card-header,
.ff-sales-table-card .card-header {
  background: #fafbfc;
}

.ff-list-table thead th,
.ff-sales-table thead th {
  white-space: nowrap;
  font-size: 0.7rem;
}

.ff-list-table tbody td,
.ff-sales-table tbody td {
  font-size: 0.875rem;
}

.ff-list-table tfoot td,
.ff-sales-table tfoot td {
  font-size: 0.8rem;
  border-top: 2px solid var(--ff-border);
}

/* Right-aligned money in list tables (header, body, footer) */
.ff-list-table th.ff-amount-col,
.ff-list-table td.ff-amount-col,
.ff-sales-table th.ff-amount-col,
.ff-sales-table td.ff-amount-col {
  text-align: right !important;
  padding-left: 0.5rem !important;
  padding-right: 0.75rem !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  vertical-align: middle;
}

.ff-list-table col.ff-col-amount,
.ff-sales-table col.ff-col-amount {
  width: 9.25rem;
  min-width: 9.25rem;
}

.ff-list-table th.ff-num-col,
.ff-list-table td.ff-num-col,
.ff-sales-table th.ff-num-col,
.ff-sales-table td.ff-num-col {
  text-align: right !important;
  padding-left: 0.5rem !important;
  padding-right: 0.75rem !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ff-list-table tfoot td.ff-tfoot-label,
.ff-sales-table tfoot td.ff-tfoot-label {
  text-align: right !important;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
}

.ff-amount-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  vertical-align: middle;
  max-width: 100%;
}

.ff-amount-stack.ff-amount-stack--end {
  display: flex;
  width: 100%;
  align-items: flex-end;
}

.ff-amount-line {
  display: block;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.ff-list-table td.ff-amount-col .ff-amount-line,
.ff-sales-table td.ff-amount-col .ff-amount-line {
  width: 100%;
}

.stat-card.stat-expenses .stat-icon {
  background: rgba(245, 158, 11, 0.18);
  color: #d97706;
}

.ff-sale-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.35em 0.55em;
}

.ff-sale-badge-paid {
  background: #d1fae5 !important;
  color: #047857 !important;
}

.ff-sale-badge-partial {
  background: #fef3c7 !important;
  color: #b45309 !important;
}

.ff-sale-badge-unpaid {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}

.ff-sale-balance-due .ff-amount-line,
.ff-inv-balance-due .ff-amount-line {
  color: #b45309;
  font-weight: 600;
}

.ff-list-empty-icon,
.ff-sales-empty-icon {
  font-size: 2.5rem;
  color: #94a3b8;
  display: block;
  margin-bottom: 0.75rem;
}

.ff-list-empty .card-body,
.ff-sales-empty .card-body {
  padding: 2.5rem 1.5rem;
}

/* Trip expense type badges */
.ff-exp-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.35em 0.55em;
}

.ff-exp-badge-food {
  background: #dcfce7 !important;
  color: #166534 !important;
}

.ff-exp-badge-ice {
  background: #dbeafe !important;
  color: #1e40af !important;
}

.ff-exp-badge-fuel {
  background: #ffedd5 !important;
  color: #c2410c !important;
}

.ff-exp-badge-repair {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}

.ff-exp-badge-accessories {
  background: #ede9fe !important;
  color: #6d28d9 !important;
}

.ff-exp-badge-other {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

.ff-exp-remarks {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 992px) {
  .ff-exp-remarks {
    max-width: 22rem;
  }
}

/* Customer invoices */
.stat-card.stat-invoices .stat-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.ff-inv-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.35em 0.55em;
}

.ff-inv-badge-done {
  background: #d1fae5 !important;
  color: #047857 !important;
}

.ff-inv-badge-partial {
  background: #fef3c7 !important;
  color: #b45309 !important;
}

.ff-inv-badge-pending {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}

.ff-inv-customer {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-inv-actions .btn {
  padding-left: 0.45rem;
  padding-right: 0.45rem;
}

@media (min-width: 992px) {
  .ff-inv-customer {
    max-width: 18rem;
  }
}

/* Bank transfers */
.stat-card.stat-bank .stat-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.ff-bank-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.35em 0.55em;
}

.ff-bank-badge-sale {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

.ff-bank-badge-invoice {
  background: #dbeafe !important;
  color: #1e40af !important;
}

.ff-bank-badge-cash {
  background: #fef3c7 !important;
  color: #b45309 !important;
}

.ff-bank-badge-bank {
  background: #e0e7ff !important;
  color: #4338ca !important;
}

.ff-bank-party,
.ff-bank-ref,
.ff-bank-remarks {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-bank-actions .btn {
  padding-left: 0.45rem;
  padding-right: 0.45rem;
}

@media (min-width: 992px) {
  .ff-bank-party {
    max-width: 14rem;
  }

  .ff-bank-remarks {
    max-width: 18rem;
  }
}

/* Trip statement (screen view) */
.ff-trip-statement-page {
  background: var(--ff-bg, #f1f5f9);
  min-height: 100vh;
  padding-bottom: 2rem;
}

.ff-trip-statement-page .ff-stmt-toolbar-wrap {
  max-width: 1100px;
  margin: 0 auto 1rem;
  padding: 0 0.75rem;
}

.ff-trip-statement-page .ff-stmt-notice {
  max-width: 1100px;
  margin: 0.75rem auto;
}

.ff-trip-statement-page .ff-stmt-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 0.75rem;
}

.ff-trip-statement-page .ff-stmt-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ff-navy, #0f2847);
}

.ff-trip-statement-page .ff-stmt-code {
  font-size: 0.9rem;
}

.ff-trip-statement-page .ff-stmt-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.65rem 1.25rem;
  font-size: 0.875rem;
}

.ff-trip-statement-page .ff-stmt-meta-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.15rem;
}

.ff-trip-statement-page .ff-stmt-meta-notes {
  grid-column: 1 / -1;
}

.ff-trip-statement-page .ff-stmt-status-open {
  background: #dbeafe !important;
  color: #1e40af !important;
}

.ff-trip-statement-page .ff-stmt-status-closed {
  background: #e2e8f0 !important;
  color: #475569 !important;
}

.ff-trip-statement-page .ff-stmt-kpis .stat-card {
  padding: 0.85rem 1rem !important;
}

.ff-trip-statement-page .ff-stmt-kpis .stat-value.small {
  font-size: 0.88rem !important;
}

.ff-trip-statement-page .ff-stmt-section-title {
  letter-spacing: 0.06em;
}

.ff-trip-statement-page table.ff-stmt-table {
  font-size: 0.875rem;
}

.ff-trip-statement-page table.ff-stmt-table tfoot td.ff-tfoot-label {
  text-align: right;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
}

.ff-trip-statement-page .foot {
  max-width: 1100px;
  margin: 1.25rem auto 0;
  padding: 0 0.75rem;
  font-size: 0.8rem;
  color: #64748b;
}

@media print {
  .ff-trip-statement-page {
    background: #fff !important;
    min-height: 0 !important;
    padding-bottom: 0 !important;
  }

  .ff-trip-statement-page .ff-stmt-kpis,
  .ff-trip-statement-page .no-print {
    display: none !important;
  }

  .ff-trip-statement-page .ff-stmt-shell {
    max-width: none !important;
    padding: 0 !important;
  }
}
