/* Marina - estilos con Bootstrap (sin pisar demasiado) */

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f4f6f9;
}

a { text-decoration: none; }
a:hover { text-decoration: underline; }

.marina-excel-export-bar .btn-success {
  font-weight: 500;
}

/* Layout */
.app-shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: #0f172a;
  color: #fff;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  flex: 0 0 260px;
  min-height: 100vh;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.sidebar-menu {
  flex: 1 1 auto;
  min-height: 0;
}

.sidebar .list-group-item {
  background: transparent !important;
  color: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.sidebar .list-group-item-action:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.sidebar .list-group-item.active,
.sidebar .list-group-item.active:hover {
  background: #0d6efd !important;
  border-color: #0d6efd !important;
  color: #fff !important;
}

.sidebar .list-group-flush .list-group-item {
  border-left: 0 !important;
  border-right: 0 !important;
}

.sidebar-brand {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
}

.sidebar-user {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  margin-top: .1rem;
  word-break: break-word;
}

.sidebar-footer {
  padding: 1rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .5rem;
}

.sidebar-exit {
  display: block;
  color: #fff;
  padding: .4rem .6rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: .5rem;
  font-size: .9rem;
  text-align: center;
  width: 100%;
}

.sidebar-exit:hover {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.mobile-sidebar {
  width: 100%;
}

/* Menú acordeón lateral */
.menu-section-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .74rem;
  font-weight: 800;
  text-align: left;
  padding: .65rem 1rem .35rem;
}

.menu-section-toggle:hover {
  color: #fff;
}

.menu-sub-toggle {
  text-transform: none;
  letter-spacing: .02em;
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.sidebar-accordion .collapse {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: .15rem;
}

.sidebar-accordion .collapse .list-group-item {
  padding-left: 1.5rem;
}

.main-area {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: #0f172a;
  height: 56px;
}

/* Mensajes (compat con HTML actual) */
.error {
  color: #b42318;
  background: #feeceb;
  padding: .6rem .75rem;
  border-radius: .5rem;
  margin-bottom: 1rem;
}

.success {
  color: #137333;
  background: #e6f4ea;
  padding: .6rem .75rem;
  border-radius: .5rem;
  margin-bottom: 1rem;
}

.toolbar {
  margin-bottom: 1rem;
}

.acciones {
  white-space: nowrap;
}

.form-actions {
  margin-top: 1.25rem;
}

/* Tablas (estilo suave) */
table {
  background: #fff;
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

th, td {
  padding: .75rem 1rem;
  border-bottom: 1px solid #edf0f4;
}

th {
  background: #f8fafc;
  font-weight: 700;
}

tr:hover { background: #f7f9fc; }

/* DataTables look uniforme en todo el sistema */
.dataTables_wrapper {
  width: 100%;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  margin-bottom: .25rem;
}

.dataTables_wrapper .dataTables_filter input {
  margin-left: .35rem !important;
  min-width: 220px;
}

.dataTables_wrapper .dataTables_paginate .pagination {
  margin-bottom: 0;
}

.dataTables_wrapper table.dataTable {
  margin-top: .25rem !important;
  margin-bottom: .25rem !important;
}

/* Formulario */
form label { display: block; margin-top: .75rem; margin-bottom: .25rem; font-weight: 600; }
form textarea {
  min-height: 80px;
  resize: vertical;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="number"],
form input[type="date"],
form select,
form textarea {
  width: 100%;
  max-width: 500px;
  padding: .375rem .65rem;
  border: 1px solid #d9dee6;
  border-radius: .5rem;
  font-size: 1rem;
  background: #fff;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="number"],
form input[type="date"],
form select {
  height: auto;
  min-height: 0;
}

/* Login (separate) */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
}

.login-box {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  width: 100%;
  max-width: 420px;
}

.login-box h1 {
  margin-top: 0;
  text-align: center;
  color: #0f172a;
}

.login-box label { margin-top: 1rem; }
.login-box input { margin-bottom: .25rem; }
.login-box button { width: 100%; margin-top: 1.5rem; padding: .8rem; font-size: 1rem; }

/* Partidas / reportes */
.partida-tree {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.partida-item {
  position: relative;
  margin: 0.45rem 0;
}

.partida-node {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid #e6edf5;
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.6rem 0.7rem;
}

.partida-node-main {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.partida-name {
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.partida-node-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.partida-children {
  margin-top: 0.45rem;
  margin-left: 1.35rem;
  padding-left: 1rem;
  border-left: 2px dashed #dbe7f3;
}

.partida-children > .partida-item::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 1.1rem;
  width: 1rem;
  border-top: 2px dashed #dbe7f3;
}

@media (max-width: 768px) {
  .partida-node {
    flex-direction: column;
    align-items: stretch;
  }

  .partida-node-actions {
    justify-content: flex-start;
  }
}

.reportes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }

/* Reporte ingresos/egresos (p=reportes): paneles a todo el ancho del contenido */
.reportes-ingresos-page {
  flex: 1 1 auto;
  min-width: 0;
}
.reportes-creditos-debitos-row > [class*="col-"] > .card {
  min-width: 0;
}
.reportes-creditos-debitos-row .table-responsive {
  max-width: 100%;
}

/* Dashboard (Power BI-like) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.kpi-card {
  background: #ffffff;
  border-radius: 0.9rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  border: 1px solid #eef2f7;
  padding: 1rem 1.1rem;
}

.kpi-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.35rem;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  align-items: start;
}

/* Contenedor con altura fija: evita bucle de resize de Chart.js */
.charts-grid .chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  max-height: 420px;
  flex: 0 0 auto;
}
.charts-grid .chart-canvas-wrap--doughnut {
  height: 200px;
  max-height: 240px;
}
.charts-grid .chart-canvas-wrap--bar {
  height: 200px;
  max-height: 280px;
}

.charts-grid .card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.charts-grid .card canvas {
  display: block;
  max-width: 100%;
}

/* Mapa Marina */
.mapa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.mapa-muelle {
  min-height: 160px;
}

.mapa-slips-list {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.mapa-slip-item {
  padding: .35rem .5rem;
  border-radius: .6rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
}

.mapa-slip-item:hover {
  background: #f8fafc;
}

.mapa-slip-item.cursor-pointer {
  cursor: pointer;
}

/* ===== Refactor visual premium marina ===== */
:root {
  --bg-main: #f3f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text-main: #0f172a;
  --text-soft: #64748b;
  --brand-1: #0a3d62;
  --brand-2: #0ea5a6;
  --ok: #0f9f64;
  --danger: #d14343;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
}

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(1200px 600px at -10% -10%, rgba(14, 165, 166, 0.16), transparent 40%),
    radial-gradient(900px 500px at 120% -20%, rgba(10, 61, 98, 0.2), transparent 35%),
    var(--bg-main);
}

.content-main {
  padding-top: 1.25rem !important;
}

.card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.btn {
  border-radius: 12px;
  font-weight: 600;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-1), #125c8f);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(10, 61, 98, .25);
}
.btn-success {
  background: linear-gradient(135deg, #0d8d63, #14b889);
  border-color: transparent;
}
.btn-danger {
  background: linear-gradient(135deg, #d14343, #ef4444);
  border-color: transparent;
}

.sidebar {
  background: linear-gradient(180deg, #07172b 0%, #0a2038 55%, #08213a 100%);
  border-right: 1px solid rgba(148, 163, 184, 0.22);
}
.sidebar-logo {
  letter-spacing: .02em;
}
.sidebar .list-group-item {
  border-radius: 10px !important;
  margin: 2px 10px;
  border: 0 !important;
  transition: all .16s ease;
}
.sidebar .list-group-item.active,
.sidebar .list-group-item.active:hover {
  background: linear-gradient(135deg, rgba(14, 165, 166, 0.26), rgba(14, 116, 144, 0.32)) !important;
  box-shadow: inset 2px 0 0 rgba(45, 212, 191, .95);
}
.menu-ico {
  width: 16px;
  height: 16px;
  margin-right: .5rem;
  vertical-align: -3px;
}

.menu-section-toggle {
  color: rgba(191, 214, 240, 0.8);
}

.kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.kpi-card {
  position: relative;
  background: linear-gradient(180deg, #fff 0%, #f9fcff 100%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}
.kpi-title {
  color: var(--text-soft);
  text-transform: uppercase;
  font-size: .76rem;
  letter-spacing: .06em;
}
.kpi-value {
  font-size: 1.72rem;
}

.charts-grid .card h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #0b3558;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border-radius: 10px !important;
  border: 1px solid #cdd8e5 !important;
  background: #fff !important;
}

.dataTables_wrapper table.dataTable thead th {
  background: #f3f8fd !important;
  color: #0a2f4e;
}
.dataTables_wrapper table.dataTable tbody tr:hover {
  background: #eef8ff !important;
}

.mapa-grid {
  gap: 1.2rem;
}
.mapa-muelle {
  background: linear-gradient(180deg, #fff, #f7fbff);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .22);
  box-shadow: var(--shadow-soft);
}
.mapa-muelle h2 {
  color: #0b3558;
  font-weight: 700;
}
.mapa-slip-item {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  padding: .5rem .75rem;
  transition: all .15s ease;
}
.mapa-slip-item:hover {
  transform: translateY(-1px);
}

/* Mapa Marina — plano compacto (5 muelles en pantalla) */
.mapa-marina-page {
  --mapa-marina-hero-h: auto;
}

.mapa-marina-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 18px;
  border: 1px solid rgba(14, 116, 144, 0.18);
  background: linear-gradient(135deg, #e8f4fc 0%, #f0f9ff 45%, #fff 100%);
  box-shadow: var(--shadow-soft);
}

.mapa-marina-hero-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mapa-marina-hero-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 14px;
  background: linear-gradient(145deg, #0e7490, #0c4a6e);
  color: #fff;
  box-shadow: 0 4px 14px rgba(12, 74, 110, 0.28);
}

.mapa-marina-hero-icon .mapa-hero-ico {
  width: 1.65rem;
  height: 1.65rem;
}

.mapa-marina-title {
  font-weight: 800;
  color: #0a3d62;
  letter-spacing: -0.02em;
  font-size: 1.5rem;
}

.mapa-marina-subtitle {
  color: #64748b;
  font-size: 0.9rem;
}

.mapa-marina-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.mapa-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.mapa-legend-item .menu-ico {
  width: 1rem;
  height: 1rem;
}

.mapa-legend-item--ocupado {
  background: #ecfdf5;
  color: #047857;
  border-color: rgba(16, 185, 129, 0.35);
}

.mapa-legend-item--libre {
  background: #f1f5f9;
  color: #475569;
  border-color: rgba(148, 163, 184, 0.4);
}

.mapa-marina-page .mapa-marina-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
  max-height: calc(100vh - 11.5rem);
  min-height: 0;
}

.mapa-marina-page .mapa-marina-muelle {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - 12rem);
  padding: 0.65rem 0.75rem !important;
  border-radius: 14px;
  border: 1px solid rgba(14, 116, 144, 0.2);
  background: linear-gradient(180deg, #fff 0%, #f0f9ff 100%);
}

.mapa-marina-muelle-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed rgba(14, 116, 144, 0.25);
  flex-shrink: 0;
}

.mapa-muelle-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: rgba(14, 116, 144, 0.12);
  color: #0e7490;
}

.mapa-muelle-ico .menu-ico {
  width: 1rem;
  height: 1rem;
}

.mapa-marina-muelle-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0b3558;
  line-height: 1.2;
  word-break: break-word;
}

.mapa-marina-page .mapa-slips-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-right: 2px;
}

.mapa-marina-page .mapa-slip-item {
  border-radius: 10px;
  padding: 0.35rem 0.5rem;
}

.mapa-marina-page .mapa-marina-slip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
}

.mapa-marina-slip--ocupado {
  background: linear-gradient(90deg, #ecfdf5, #fff);
  border-color: rgba(16, 185, 129, 0.45) !important;
}

.mapa-marina-slip--por-vencer {
  background: linear-gradient(90deg, #fff7ed, #fff) !important;
  border-color: rgba(249, 115, 22, 0.55) !important;
}

.mapa-marina-slip--vencido {
  background: linear-gradient(90deg, #fef2f2, #fff) !important;
  border-color: rgba(239, 68, 68, 0.55) !important;
}

.mapa-marina-slip--libre {
  background: #fff;
  border-color: rgba(148, 163, 184, 0.35) !important;
}

.mapa-slip-ico {
  display: flex;
  color: #0e7490;
}

.mapa-marina-slip--ocupado .mapa-slip-ico {
  color: #059669;
}

.mapa-marina-slip--por-vencer .mapa-slip-ico {
  color: #ea580c;
}

.mapa-marina-slip--vencido .mapa-slip-ico {
  color: #dc2626;
}

.mapa-slip-ico .menu-ico {
  width: 0.95rem;
  height: 0.95rem;
}

.mapa-slip-name {
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mapa-slip-pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  white-space: nowrap;
}

.mapa-slip-pill--ocupado {
  background: #10b981;
  color: #fff;
}

.mapa-slip-pill--por-vencer {
  background: #f97316;
  color: #fff;
}

.mapa-slip-pill--vencido {
  background: #ef4444;
  color: #fff;
}

.mapa-slip-pill--libre {
  background: #e2e8f0;
  color: #64748b;
}

.mapa-marina-page .mapa-marina-slip.cursor-pointer:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.mapa-marina-page .mapa-marina-slip--por-vencer.cursor-pointer:hover {
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

.mapa-marina-page .mapa-marina-slip--vencido.cursor-pointer:hover {
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.mapa-legend-item--por-vencer {
  color: #c2410c;
}

.mapa-legend-item--vencido {
  color: #b91c1c;
}

.mapa-badge-por-vencer {
  background: #f97316 !important;
  color: #fff !important;
}

.mapa-grupos-page .mapa-grupo-unidad {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  margin-bottom: 0.25rem;
}

.mapa-grupos-page .mapa-grupo-unidad--libre {
  background: #fff;
}

.mapa-grupos-page .mapa-grupo-unidad--ocupado {
  background: linear-gradient(90deg, #ecfdf5, #fff);
  border-color: rgba(16, 185, 129, 0.45);
}

.mapa-grupos-page .mapa-grupo-unidad--por-vencer {
  background: linear-gradient(90deg, #fff7ed, #fff);
  border-color: rgba(249, 115, 22, 0.55);
}

.mapa-grupos-page .mapa-grupo-unidad--vencido {
  background: linear-gradient(90deg, #fef2f2, #fff);
  border-color: rgba(239, 68, 68, 0.55);
}

@media (max-width: 1400px) {
  .mapa-marina-page .mapa-marina-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: none;
  }
  .mapa-marina-page .mapa-marina-muelle {
    max-height: 420px;
  }
}

@media (max-width: 992px) {
  .mapa-marina-page .mapa-marina-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .mapa-marina-page .mapa-marina-grid {
    grid-template-columns: 1fr;
  }
  .mapa-marina-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Dashboard */
.dashboard-page .dashboard-title {
  font-weight: 800;
  color: #0a3d62;
  letter-spacing: -0.02em;
}
.dashboard-hero {
  background: linear-gradient(135deg, #fff 0%, #f0f9ff 55%, #e8f7f5 100%);
  box-shadow: var(--shadow-soft);
}
.dashboard-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  margin-bottom: 0.75rem;
}
.kpi-card--link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.kpi-card--link:hover {
  color: inherit;
  text-decoration: none;
}
.kpi-card-hint {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #0ea5a6;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.kpi-card--link:hover .kpi-card-hint {
  opacity: 1;
  transform: translateY(0);
}
.kpi-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.2rem 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.35);
}
.kpi-breakdown li:last-child {
  border-bottom: 0;
}
.kpi-breakdown strong {
  font-weight: 700;
  color: #0f172a;
}
.dashboard-charts .chart-card {
  min-height: 280px;
}
.dashboard-charts--ocupacion .chart-card {
  min-height: 0;
}
.dashboard-charts .chart-card--wide {
  grid-column: 1 / -1;
}
@media (min-width: 992px) {
  .dashboard-charts .chart-card--wide {
    grid-column: span 2;
  }
  .charts-grid.dashboard-charts {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Modal permisos usuario (Rol) */
.permisos-menu-lista {
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.permisos-menu-seccion {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.75rem;
}
.permisos-menu-seccion:last-child {
  border-bottom: 0;
}
.permisos-globales .form-check-label {
  font-size: 0.92rem;
}

/* Combustible: filtro de fechas en una fila */
.combustible-filtro-form__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}
.combustible-filtro-campo {
  flex: 0 0 auto;
}
.combustible-filtro-campo label {
  display: block;
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.combustible-filtro-campo input[type="date"] {
  display: block;
  width: auto;
  min-width: 10.5rem;
  margin-top: 0;
}
.combustible-filtro-campo--btn {
  padding-bottom: 1px;
}
.combustible-filtro-hint {
  flex: 1 1 12rem;
  min-width: 0;
  align-self: center;
  margin: 0;
}

/* Combustible pedidos / despacho: fila de totales */
.combustible-tfoot {
  border-top: 2px solid #0e7490;
}
.combustible-tfoot tr:first-child th,
.combustible-tfoot tr:first-child td {
  font-weight: 700;
  background: #f0fdfa;
  color: #0f172a;
}
.combustible-tfoot-labels td {
  font-size: 0.75rem;
  padding-top: 0.15rem !important;
}

/* Combustible despacho: sin cuenta sugerida asignada */
.combustible-despacho-sin-cuenta > td {
  background-color: #fee2e2 !important;
}
.dataTables_wrapper table.dataTable tbody tr.combustible-despacho-sin-cuenta:hover > td {
  background-color: #fecaca !important;
}

/* Reporte cobranzas: cabecera fija al hacer scroll */
.reporte-cobranzas-table-wrap {
  overflow: visible;
}
.reporte-cobranzas-tabla {
  overflow: visible;
}
.reporte-cobranzas-tabla thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background-color: #f8f9fa;
  box-shadow: inset 0 -1px 0 #dee2e6;
  vertical-align: middle;
}
@media (max-width: 767.98px) {
  .reporte-cobranzas-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .reporte-cobranzas-tabla thead th {
    top: 56px;
  }
}

.reporte-cobranzas-tabla tr.reporte-cobranzas-subtotal td {
  font-weight: 600;
  background-color: #f1f5f9;
  border-top: 2px solid #cbd5e1;
}
.reporte-cobranzas-tabla tr.reporte-cobranzas-separador td {
  height: 0.85rem;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none;
}

/* Reporte cobranzas detalle: distribución uniforme de columnas */
.reporte-ocupacion-detalle-tabla {
  table-layout: fixed;
  width: 100%;
}
.reporte-ocupacion-detalle-tabla col.col-oc-tipo { width: 4.5rem; }
.reporte-ocupacion-detalle-tabla col.col-oc-unidad { width: 17%; }
.reporte-ocupacion-detalle-tabla col.col-oc-ocupacion { width: 5.5rem; }
.reporte-ocupacion-detalle-tabla col.col-oc-cliente { width: 13%; }
.reporte-ocupacion-detalle-tabla col.col-oc-monto { width: 7.25rem; }
.reporte-ocupacion-detalle-tabla col.col-oc-fecha { width: 5.75rem; }
.reporte-ocupacion-detalle-tabla col.col-oc-num { width: 6.75rem; }
.reporte-ocupacion-detalle-tabla thead th {
  white-space: normal;
  line-height: 1.15;
  font-size: 0.78rem;
  padding: 0.45rem 0.35rem;
}
.reporte-ocupacion-detalle-tabla tbody td,
.reporte-ocupacion-detalle-tabla tfoot td,
.reporte-ocupacion-detalle-tabla tfoot th {
  padding: 0.4rem 0.35rem;
  vertical-align: middle;
}
.reporte-ocupacion-detalle-tabla .badge {
  font-size: 0.7rem;
  padding: 0.25em 0.45em;
}

/* Reporte cobranzas grupos: columnas compactas + montos alineados */
.reporte-ocupacion-grupos-tabla {
  table-layout: fixed;
  width: 100%;
}
.reporte-ocupacion-grupos-tabla col.col-ocg-ambito { width: 5.5rem; }
.reporte-ocupacion-grupos-tabla col.col-ocg-nombre { width: 22%; }
.reporte-ocupacion-grupos-tabla col.col-ocg-cnt { width: 4.25rem; }
.reporte-ocupacion-grupos-tabla col.col-ocg-monto { width: 8.5rem; }
.reporte-ocupacion-grupos-tabla thead th {
  white-space: normal;
  line-height: 1.15;
  font-size: 0.78rem;
  padding: 0.45rem 0.35rem;
}
.reporte-ocupacion-grupos-tabla tbody td,
.reporte-ocupacion-grupos-tabla tfoot td,
.reporte-ocupacion-grupos-tabla tfoot th {
  padding: 0.4rem 0.35rem;
}

/* Reporte recaudo (independiente de cobranzas) */
.reporte-recaudo-table-wrap {
  overflow: visible;
}
.reporte-recaudo-tabla {
  overflow: visible;
}
.reporte-recaudo-tabla thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background-color: #f8f9fa;
  box-shadow: inset 0 -1px 0 #dee2e6;
  vertical-align: middle;
}
@media (max-width: 767.98px) {
  .reporte-recaudo-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .reporte-recaudo-tabla thead th {
    top: 56px;
  }
}
.reporte-recaudo-tabla tbody tr td {
  border-bottom: 1px solid #e9ecef;
}
.reporte-recaudo-tfoot td {
  background-color: #f8f9fa;
  border-top: 2px solid #198754 !important;
  font-size: 0.95rem;
}
.reporte-recaudo-tfoot .text-success {
  font-size: 1.05rem;
}

/* Reporte ocupación / cobranzas: encabezados repetidos sobre totales */
.reporte-ocupacion-tfoot {
  border-top: 2px solid #0e7490;
}
.reporte-ocupacion-tfoot tr:first-child th {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0b3558;
  padding-top: 0.65rem;
  padding-bottom: 0.45rem;
  vertical-align: bottom;
}
.reporte-ocupacion-tfoot tr:last-child td {
  border-bottom: 0;
}

/* Autocompletado cliente (contratos y similares) */
.marina-cliente-combobox .marina-combobox-list {
  z-index: 1065;
  max-height: 240px;
  overflow-y: auto;
  margin-top: 2px;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}
.marina-cliente-combobox .marina-combobox-list .list-group-item {
  cursor: pointer;
  border-left: 0;
  border-right: 0;
  font-size: 0.9rem;
}
.marina-cliente-combobox .marina-combobox-list .list-group-item:first-child {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}
.marina-cliente-combobox .marina-combobox-list .list-group-item:last-child {
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}
.marina-cliente-combobox .marina-combobox-list .list-group-item.active,
.marina-cliente-combobox .marina-combobox-list .list-group-item:hover {
  background: #e8f4fc;
  color: #0b3558;
}
.marina-cliente-combobox .marina-combobox-sub {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
}

/* Tipo de embarcación: radios visibles sobre fondo claro */
.marina-tipo-embarcacion-group .form-check-input[type="radio"] {
  width: 1.15em;
  height: 1.15em;
  margin-top: 0.2em;
  border: 2px solid #64748b;
  background-color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.marina-tipo-embarcacion-group .form-check-input[type="radio"]:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.marina-tipo-embarcacion-group .form-check-input[type="radio"]:focus {
  border-color: #0d6efd;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.35);
}

.marina-tipo-embarcacion-group .form-check-label {
  cursor: pointer;
  padding-left: 0.15em;
}

/* Editor marketing — Summernote */
.marketing-editor-card .note-editor {
  border-radius: 0.5rem;
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.marketing-editor-card .note-toolbar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.35rem 0.5rem;
  flex-wrap: wrap;
}
.marketing-editor-card .note-editable {
  background: #fff;
  min-height: 380px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  padding: 1.25rem 1.5rem;
}
.marketing-summernote-wrap .note-frame {
  border-radius: 0.5rem;
  overflow: hidden;
}
.marketing-preview-frame {
  width: 100%;
  min-height: 70vh;
  border: 0;
  background: #e2e8f0;
}
.marketing-plantillas-dropdown {
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
}
.marketing-plantillas-dropdown .dropdown-item {
  font-size: 0.875rem;
}

