﻿/* padding-top removed – layout now uses left sidebar, not a fixed top nav */
body {
    padding-top: 0;
}

/* ── Brand colour overrides ─────────────────────────────────────── */
:root {
    --bs-primary:        #12304b;
    --bs-primary-rgb:    18,48,75;
    --bs-link-color:     #12304b;
    --bs-link-hover-color: #78afd9;
}

h1, h2, h3, h4, h5, h6 {
    color: #12304b;
}

.card-header {
    background-color: #12304b;
    color: #fff;
    border-bottom: 2px solid #78afd9;
}

.card {
    border-color: rgba(18,48,75,0.12);
    box-shadow: 0 1px 6px rgba(18,48,75,0.08);
}

.badge.bg-primary  { background-color: #12304b !important; }
.badge.bg-info     { background-color: #78afd9 !important; color: #12304b !important; }

.form-control:focus, .form-select:focus {
    border-color: #78afd9;
    box-shadow: 0 0 0 0.2rem rgba(120,175,217,0.30);
}

/* Remove any conflicting margins */
.container, .container-fluid {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure main content flows properly */
main {
    margin-top: 0;
    padding-top: 0;
}

/* Specific fix for your slotlist page */
.col-12 {
    margin-top: 0 !important;
}

/* Fix for fixed navbar */
.page-wrapper {
    padding-top: 76px; /* Height of navbar */
}

.main-content {
    min-height: calc(100vh - 76px);
}

/* Custom navbar styles */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

    .navbar-nav .nav-link:hover {
        background-color: rgba(255,255,255,0.1);
    }

    .navbar-nav .nav-link.active {
        background-color: rgba(255,255,255,0.2);
        font-weight: bold;
    }

/* Dropdown styles */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .dropdown-item:hover {
        background-color: #f8f9fa;
        color: #0d6efd;
    }

.dropdown-divider {
    margin: 0.5rem 0;
}

/* Mobile responsive */
@media (max-width: 991.98px) {
    .navbar-nav {
        text-align: center;
    }

    .nav-item {
        margin: 0.25rem 0;
    }

    .dropdown-menu {
        text-align: center;
        border: none;
        box-shadow: none;
    }
}

/* Target the grid root (Syncfusion adds .e-grid) plus your CssClass for max specificity */
.e-grid.grid-light-theme .e-gridheader,
.e-grid.grid-light-theme .e-gridheader .e-headercell,
.e-grid.grid-light-theme .e-gridheader .e-rowcell {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%) !important;
    color: #333333 !important;
    font-weight: 600 !important;
    border-bottom: 1px solid #d1d5db !important;
}

/* Header text specifically */
.e-grid.grid-light-theme .e-headercell .e-headertext {
    color: #333333 !important;
}

/* pager & footer matching theme */
.e-grid.grid-light-theme .e-gridpager,
.e-grid.grid-light-theme .e-gridfooter {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-top: 1px solid #d1d5db !important;
}

/* overall grid card look */
.e-grid.grid-light-theme .e-grid {
    border-radius: 0.5rem;
    border: 1px solid #d1d5db !important;
}

.pf-page-shell {
    margin-top: 0;
    padding-top: 20px;
    width: 100%;
    max-width: none;
}

.pf-page-breadcrumb {
    margin-bottom: 20px;
}

.container.mt-6,
.container.mt-8,
.container.mt-10,
.container-fluid[style*="margin-top"],
.container[style*="margin-top"] {
    width: 100% !important;
    max-width: none !important;
    margin-top: 0 !important;
    padding-top: 20px !important;
}

.container > .row.justify-content-center,
.container-fluid > .row.justify-content-center {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.card.shadow.p-0.mb-4.bg-body.border-1[class*="col-"],
.card.shadow.p-0.mb-12.bg-body.border-1[class*="col-"],
.card.shadow-sm.border-0[class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

.pf-panel-card {
    border: 0;
    box-shadow: 0 1px 6px rgba(18,48,75,0.08);
    margin-bottom: 1.5rem;
}

.pf-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    background-color: #12304b !important;
    color: #fff !important;
    border-bottom: 2px solid #78afd9;
    padding: .85rem 1rem;
}

.pf-panel-title {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
    font-weight: 600;
}

.pf-panel-title span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-panel-icon {
    height: 20px;
    width: auto;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

.pf-panel-count-badge {
    background: rgba(255,255,255,.18);
    color: #fff;
    font-weight: 600;
}

.pf-panel-body {
    padding: 1rem;
}

.pf-action-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}

.card-body > .pf-action-bar,
.card-body > .row.pb-0,
.card-body > .crud-actions,
.card-body > .d-flex.justify-content-between.align-items-center.mb-3 {
    margin-bottom: 5px !important;
}

.card-body .e-grid,
.card-body .table-responsive,
.card-body .list-group {
    margin-top: 5px;
}

.pf-loading-state,
.pf-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #6c757d;
    padding: 2rem 1rem;
    gap: .5rem;
}

.pf-empty-state i {
    color: #78afd9;
}

.pf-loading-state .spinner-border {
    color: #12304b;
}

.pf-inline-actions {
    display: inline-flex;
    gap: .35rem;
    flex-wrap: wrap;
}

.pf-compact-badge {
    font-size: .75rem;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════
   Global PortFlow 3D design system
   These classes are the canonical home for the 3D button + dialog
   styles used across VisualBerthPlanner, SelectedSlot, AgentVessels
   and the approval dialogs. New screens should reuse these directly.
   ═══════════════════════════════════════════════════════════════════ */

/* ── 3D action buttons ────────────────────────────────────────────── */
.pf-btn-3d {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .28rem;
    height: 34px;
    padding: 0 1.15rem;
    border: none;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .02em;
    cursor: pointer;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    transition: transform .08s, box-shadow .08s, opacity .12s;
}

.pf-btn-3d:active:not(:disabled) {
    transform: translateY(2px);
}

.pf-btn-3d:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.pf-btn-3d--save,
.pf-btn-3d--primary {
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 55%, #15803d 100%);
    box-shadow: 0 4px 0 #166534, 0 2px 6px rgba(22, 163, 74, .35);
}

.pf-btn-3d--save:hover:not(:disabled),
.pf-btn-3d--primary:hover:not(:disabled) {
    background: linear-gradient(180deg, #34d399 0%, #22c55e 55%, #16a34a 100%);
    color: #fff;
}

.pf-btn-3d--save:active:not(:disabled),
.pf-btn-3d--primary:active:not(:disabled) {
    box-shadow: 0 2px 0 #166534;
}

.pf-btn-3d--cancel,
.pf-btn-3d--secondary {
    background: linear-gradient(180deg, #6b7280 0%, #4b5563 55%, #374151 100%);
    box-shadow: 0 4px 0 #1f2937, 0 2px 6px rgba(75, 85, 99, .3);
}

.pf-btn-3d--cancel:hover:not(:disabled),
.pf-btn-3d--secondary:hover:not(:disabled) {
    background: linear-gradient(180deg, #7b8290 0%, #5b6573 55%, #47515f 100%);
    color: #fff;
}

.pf-btn-3d--cancel:active:not(:disabled),
.pf-btn-3d--secondary:active:not(:disabled) {
    box-shadow: 0 2px 0 #1f2937;
}

.pf-btn-3d--reject,
.pf-btn-3d--danger {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 55%, #b91c1c 100%);
    box-shadow: 0 4px 0 #7f1d1d, 0 2px 6px rgba(220, 38, 38, .3);
}

.pf-btn-3d--reject:hover:not(:disabled),
.pf-btn-3d--danger:hover:not(:disabled) {
    background: linear-gradient(180deg, #f87171 0%, #ef4444 55%, #dc2626 100%);
    color: #fff;
}

.pf-btn-3d--reject:active:not(:disabled),
.pf-btn-3d--danger:active:not(:disabled) {
    box-shadow: 0 2px 0 #7f1d1d;
}

/* ── ShoreTensionDeployment: Deployment Status DDL text colour fix ── */
/* NOTE: site.css is not loaded by App.razor — this rule has no effect. */
/* The active fix is in app.css at the bottom of the file.              */

/* ── 3D dialog header / body / footer ─────────────────────────────── */
/* Apply .pf-dialog-standard as a CssClass on SfDialog. The wrapper class
   pierces Syncfusion's portal markup with descendant selectors so it
   works from a global stylesheet (no ::deep needed). */
.pf-dialog-standard .e-dlg-header-content {
    background: linear-gradient(180deg, #4a6b84 0%, #2c4d65 40%, #1a3550 70%, #12304b 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25),
        0 4px 10px rgba(0, 0, 0, 0.35) !important;
    color: #fff !important;
}

.pf-dialog-standard .e-dlg-header-content .e-dlg-header,
.pf-dialog-standard .e-dlg-header-content * {
    color: #fff !important;
}

.pf-dialog-standard .e-dlg-header-content .e-btn.e-dlg-closeicon-btn,
.pf-dialog-standard .e-dlg-header-content .e-dlg-closeicon-btn .e-icons {
    color: #fff !important;
}

/* Dialog content area background — matches visual-planner-slot-dialog style */
.pf-dialog-standard .e-dlg-content {
    background: #f8fafc;
    padding: .85rem 1rem;
}

/* Footer area inside dialog content */
.pf-dialog-standard .e-dlg-footercontent {
    background: #f8fafc;
    border-top: 1px solid #d0e2f0;
    padding: .5rem 1rem;
}

/* Bordered body container — use as the inner wrapper inside <Content> */
.pf-dialog-body {
    background: #f4f8fc;
    border: 1px solid #d0e2f0;
    border-radius: 8px;
    padding: .85rem 1rem;
    margin-bottom: .5rem;
}

.pf-dialog-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .5rem;
    padding-top: .5rem;
}

/* ── DarkSlateGray badge text — global standard ───────────────────── */
.pf-badge-darkslate {
    color: #2f4f4f !important;
}

.stu-status-ddl input.e-input,
  .stu-status-ddl .e-input,
  .stu-status-ddl span.e-input-value,
  .stu-status-ddl .e-dropdownlist {
      color: #1a1a2e !important;
  }

/* ── Shared panel header styling (matches /operations/port-performance) ── */
.pp-panel__header {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem 0.5rem 0 0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header-turq {
    background: linear-gradient(180deg, #99F6E4 0%, #5EEAD4 100%);
    border: 1px solid #2DD4BF;
    border-bottom: 0;
    box-shadow: 0 2px 4px rgba(45, 212, 191, 0.25);
    color: #0F766E;
    font-weight: 600;
    font-size: 1rem;
}

/* Shipping List Display table styling */
.shipping-list-display.table {
    border-collapse: separate;
    border-spacing: 0;
}

.shipping-list-display td,
.shipping-list-display th {
    border-left: 1px solid #F3F4F6 !important;
    border-right: 1px solid #F3F4F6 !important;
    border-top: 0;
    border-bottom: 0;
}

.shipping-list-display th {
    text-align: center;
}

/* Compact day-group headers (TODAY / TOMORROW / DAY AFTER TOMORROW) */
.date-header-small {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

/* Mobile responsive tweaks for the Shipping List Display */
@media (max-width: 768px) {
    .shipping-list-display .card-header,
    .shipping-list-display .card-body {
        padding: 0.5rem;
    }

    .shipping-list-display .sld-table th,
    .shipping-list-display .sld-table td {
        font-size: .7rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   PortFlow — Marine 3D Premium
   LIGHT = airy marine: sky-blue page (#f0f9ff), white appbar,
           marine-blue/seafoam accents.
   DARK  = deep ocean: navy page (#0c1a2a) + dark appbar.
   CRITICAL RULE: panels/cards keep the WHITE SMOKE surface (#f8fafc)
   in BOTH modes — content always sits on a light surface; only the
   shells (page background, appbar, drawer, headers) change.
   Dark overrides scope to body.pf-theme-dark (synced by
   ThemeControl.razor).

   PROTECTED — BERTH SLOT COLORS BUSINESS CRITICAL — DO NOT MODIFY:
   .slot-type-*, .slot-card, .permanent-slot, .opportunistic-slot,
   .priority-slot, .reserved-slot. No rule in this section may target
   them; panel overrides explicitly exclude .slot-card.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Base: Inter + theme-aware page shell ────────────────────────── */
body {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--mud-palette-background, #f0f9ff);
    color: var(--mud-palette-text-primary, #0f172a);
}

.mud-main-content {
    background: var(--mud-palette-background, #f0f9ff);
}

/* Smooth 200ms theme switch on the main surfaces */
body,
.card,
.card-header,
.card-body,
.mud-card,
.mud-card-header,
.mud-paper,
.mud-appbar,
.mud-table,
.mud-table-cell,
.mud-dialog,
.pf-topbar,
.pf-sidebar,
.modal-content,
.table,
.sld-day-header {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Utility used by ShippingListDisplay MudCards */
.rounded-xl {
    border-radius: 16px !important;
    overflow: hidden;
}

/* ── PANEL CONTAINER RULE: white smoke in BOTH modes ──────────────
   v4: crisp 1px border + subtle shadow so panels don't "lose" their
   edges against the light page background. */
.mud-card,
.mud-paper:not(.e-schedule) {
    background: #f8fafc !important;
    border-radius: 10px;
    border: 1px solid rgba(203, 213, 225, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.card:not(.slot-card) {
    background-color: #f8fafc;
    border-radius: 10px;
    border: 1px solid rgba(203, 213, 225, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    color: #0f172a;
}

body.pf-theme-dark .mud-card,
body.pf-theme-dark .mud-paper:not(.e-schedule),
body.pf-theme-dark .card:not(.slot-card) {
    border: 1px solid rgba(51, 65, 85, 0.6);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.modal-content,
.dropdown-menu {
    background-color: #f8fafc;
}

/* Dark mode: panels stay light, so content on them must stay DARK
   (MudBlazor's dark TextPrimary #f8fafc would be white-on-white) */
body.pf-theme-dark .mud-card,
body.pf-theme-dark .mud-paper:not(.e-schedule),
body.pf-theme-dark .card:not(.slot-card),
body.pf-theme-dark .modal-content,
body.pf-theme-dark .dropdown-menu,
body.pf-theme-dark .mud-dialog,
body.pf-theme-dark .mud-table,
body.pf-theme-dark .mud-table .mud-table-cell {
    color: #0f172a;
}

body.pf-theme-dark .mud-input input,
body.pf-theme-dark .mud-input textarea,
body.pf-theme-dark .mud-input .mud-input-slot,
body.pf-theme-dark .mud-select .mud-input {
    color: #0f172a;
}

/* ── Headings ────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    color: #0f172a;
}

/* On the dark ocean page shell, headings are light… */
body.pf-theme-dark h1,
body.pf-theme-dark h2,
body.pf-theme-dark h3,
body.pf-theme-dark h4,
body.pf-theme-dark h5,
body.pf-theme-dark h6 {
    color: #f8fafc;
}

/* …but inside light panels they stay dark */
body.pf-theme-dark .card h1, body.pf-theme-dark .card h2,
body.pf-theme-dark .card h3, body.pf-theme-dark .card h4,
body.pf-theme-dark .card h5, body.pf-theme-dark .card h6,
body.pf-theme-dark .mud-card h1, body.pf-theme-dark .mud-card h2,
body.pf-theme-dark .mud-card h3, body.pf-theme-dark .mud-card h4,
body.pf-theme-dark .mud-card h5, body.pf-theme-dark .mud-card h6,
body.pf-theme-dark .mud-paper h1, body.pf-theme-dark .mud-paper h2,
body.pf-theme-dark .mud-paper h3, body.pf-theme-dark .mud-paper h4,
body.pf-theme-dark .mud-paper h5, body.pf-theme-dark .mud-paper h6,
body.pf-theme-dark .modal-content h1, body.pf-theme-dark .modal-content h2,
body.pf-theme-dark .modal-content h3, body.pf-theme-dark .modal-content h4,
body.pf-theme-dark .modal-content h5, body.pf-theme-dark .modal-content h6 {
    color: #0f172a;
}

/* ── Marine Glass Appbar v3: navy gradient + blur in BOTH modes ────
   Glass effect is ONLY here — panels stay solid white smoke. */
.mud-appbar,
.pf-layout .pf-topbar {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.9) 0%, rgba(59, 130, 246, 0.9) 100%) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    padding: 8px 24px;
}

body.pf-theme-dark .mud-appbar,
body.pf-theme-dark .pf-layout .pf-topbar {
    background: linear-gradient(135deg, rgba(12, 26, 42, 0.9) 0%, rgba(30, 58, 138, 0.9) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35) !important;
}

/* Fallback: solid gradient when backdrop-filter is unsupported */
@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
    .mud-appbar,
    .pf-layout .pf-topbar {
        background: linear-gradient(135deg, rgb(30, 64, 175) 0%, rgb(59, 130, 246) 100%) !important;
    }

    body.pf-theme-dark .mud-appbar,
    body.pf-theme-dark .pf-layout .pf-topbar {
        background: linear-gradient(135deg, rgb(12, 26, 42) 0%, rgb(30, 58, 138) 100%) !important;
    }
}

/* Controls on glass: white with a soft text shadow in BOTH modes */
.pf-layout .pf-topbar .pf-topbar-toggle,
.pf-layout .pf-topbar .pf-topbar-right,
body.pf-theme-dark .pf-layout .pf-topbar .pf-topbar-toggle,
body.pf-theme-dark .pf-layout .pf-topbar .pf-topbar-right {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.pf-layout .pf-topbar .pf-topbar-right .text-white,
body.pf-theme-dark .pf-layout .pf-topbar .pf-topbar-right .text-white {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.pf-layout .pf-topbar .btn-outline-light,
body.pf-theme-dark .pf-layout .pf-topbar .btn-outline-light {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.6);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.pf-theme-toggle,
body.pf-theme-dark .pf-theme-toggle {
    color: #ffffff !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Glass hover state for icon buttons on the bar */
.pf-layout .pf-topbar .mud-icon-button:hover,
.pf-layout .pf-topbar .pf-topbar-toggle:hover,
.mud-appbar .mud-icon-button:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(16px);
}

/* Navy/blue wordmark is unreadable on navy glass — render it white
   with a drop shadow, in BOTH modes */
.pf-topbar-brand img,
body.pf-theme-dark .pf-topbar-brand img {
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.logo-container {
    padding: 14px 20px;
}

.logo-container img {
    max-height: 40px;
    width: auto;
}

/* ── Sidebar (drawer): light blue tint / deep ocean ──────────────── */
.pf-layout .pf-sidebar {
    background: #eff6ff;
}

body.pf-theme-dark .pf-layout .pf-sidebar {
    background: #0c1a2a;
}

body.pf-theme-dark .pf-layout .pf-sidebar .pf-nav-item,
body.pf-theme-dark .pf-layout .pf-sidebar .pf-nav-group-header,
body.pf-theme-dark .pf-layout .pf-sidebar .pf-nav-label,
body.pf-theme-dark .pf-layout .pf-sidebar .pf-nav-icon {
    color: #e2e8f0;
}

body.pf-theme-dark .pf-layout .pf-sidebar .pf-nav-item:hover {
    background: rgba(37, 99, 235, 0.3);
}

/* ── Marine Headers Defined v4: compact 40px, crisp borders ───────
   Light pastel headers were "losing" against the light page — v4
   uses a stronger pastel fill, a full 1px border, a solid 2px marine
   line at the bottom edge, and NO shadow glow. Applies to
   MudCardHeader, Bootstrap .card-header and legacy .pf-panel-header.
   .pp-panel__header (turquoise shipping-list headers) excluded. */
.mud-card-header:not(.pp-panel__header),
.card-header:not(.pp-panel__header) {
    position: relative;
    min-height: 40px !important;
    padding: 8px 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    border-radius: 10px 10px 0 0 !important;
    background: linear-gradient(180deg, #e0f2fe 0%, #dbeafe 100%) !important;
    color: #0f172a !important;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-bottom: none !important;
    box-shadow: none !important;
}

/* Crisp solid marine line at the bottom edge */
.mud-card-header:not(.pp-panel__header)::after,
.card-header:not(.pp-panel__header)::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #3b82f6;
    pointer-events: none;
}

.mud-card-header:not(.pp-panel__header) .mud-icon-root {
    font-size: 20px !important;
    width: 20px;
    height: 20px;
    color: #1e40af;
    flex-shrink: 0;
}

.mud-card-header:not(.pp-panel__header) .mud-typography {
    font-size: 0.9375rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px;
    color: #0f172a !important;
}

/* Header icons (Bootstrap img icons): dark silhouette on the pastel */
.card-header:not(.pp-panel__header) img {
    filter: brightness(0) opacity(0.75);
}

/* Dark: navy gradient headers on the light panels — strong contrast */
body.pf-theme-dark .mud-card-header:not(.pp-panel__header),
body.pf-theme-dark .card-header:not(.pp-panel__header) {
    background: linear-gradient(180deg, #1e40af 0%, #1e3a8a 100%) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-bottom: none !important;
    box-shadow: none !important;
}

body.pf-theme-dark .mud-card-header:not(.pp-panel__header)::after,
body.pf-theme-dark .card-header:not(.pp-panel__header)::after {
    background: #2563eb;
}

body.pf-theme-dark .mud-card-header:not(.pp-panel__header) .mud-typography {
    color: #f8fafc !important;
}

body.pf-theme-dark .mud-card-header:not(.pp-panel__header) .mud-icon-root {
    color: #60a5fa;
}

body.pf-theme-dark .card-header:not(.pp-panel__header) img {
    filter: brightness(0) invert(1);
}

/* Legacy navy panel headers join the v4 system */
.pf-panel-header {
    position: relative;
    background: linear-gradient(180deg, #e0f2fe 0%, #dbeafe 100%) !important;
    color: #0f172a !important;
    min-height: 40px !important;
    padding: 8px 16px !important;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-bottom: none !important;
    border-radius: 10px 10px 0 0 !important;
    box-shadow: none !important;
}

.pf-panel-header::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #3b82f6;
    pointer-events: none;
}

.pf-panel-header .pf-panel-icon {
    filter: brightness(0) opacity(0.75);
}

.pf-panel-header .pf-panel-count-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #1e3a8a;
}

body.pf-theme-dark .pf-panel-header {
    background: linear-gradient(180deg, #1e40af 0%, #1e3a8a 100%) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-bottom: none !important;
    box-shadow: none !important;
}

body.pf-theme-dark .pf-panel-header::after {
    background: #2563eb;
}

body.pf-theme-dark .pf-panel-header .pf-panel-icon {
    filter: brightness(0) invert(1);
}

body.pf-theme-dark .pf-panel-header .pf-panel-count-badge {
    background: rgba(248, 250, 252, 0.2);
    color: #f8fafc;
}

/* ── MudTable: marine headers — light surface in BOTH modes ──────── */
.mud-table thead .mud-table-cell,
.mud-table .mud-table-head .mud-table-cell {
    background-color: #eff6ff;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #1e3a8a;
    border-bottom: 2px solid #e0f2fe;
}

/* Full-height headers only on non-dense tables — dense shipping-list
   tables keep their locked compact layout */
.mud-table:not(.mud-table-dense) thead .mud-table-cell {
    height: 56px;
    padding: 18px;
}

.mud-table.mud-table-hover .mud-table-body .mud-table-row:hover {
    background-color: #eff6ff;
}

/* Dark palette would paint white-alpha stripes/hover on the light
   surface — pin them to marine tints instead */
body.pf-theme-dark .mud-table thead .mud-table-cell,
body.pf-theme-dark .mud-table .mud-table-head .mud-table-cell {
    background-color: #eff6ff;
    color: #1e3a8a;
}

body.pf-theme-dark .mud-table.mud-table-hover .mud-table-body .mud-table-row:hover {
    background-color: #e0f2fe;
}

body.pf-theme-dark .mud-table .mud-table-body .mud-table-row:nth-of-type(odd) {
    background-color: rgba(224, 242, 254, 0.5);
}

body.pf-theme-dark .table {
    color: #0f172a;
}

/* ── Dialogs: marine premium ─────────────────────────────────────── */
.mud-dialog {
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.mud-dialog .mud-dialog-title {
    min-height: 72px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: 20px 20px 0 0;
}

.mud-dialog .mud-dialog-title .mud-icon-root,
.mud-dialog .mud-dialog-title .mud-typography {
    color: #ffffff;
}

.mud-dialog .mud-dialog-content {
    padding: 28px;
}

body.pf-theme-dark .mud-dialog .mud-dialog-title {
    background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
}

/* Syncfusion dialogs join the same gradient system; their content
   stays on the light surface in both modes */
.pf-dialog-standard .e-dlg-header-content {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%) !important;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25) !important;
}

body.pf-theme-dark .pf-dialog-standard .e-dlg-header-content {
    background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%) !important;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4) !important;
}

/* ── 3D Marine filter buttons ────────────────────────────────────── */
.btn-filter-3d {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-filter-3d:hover {
    transform: translateY(-3px);
    color: #ffffff;
}

/* Shipping-list instances keep their compact padding (locked layout)
   but adopt the marine gradient. !important matches legacy rules. */
.shipping-list-display .btn-filter-3d,
.shipping-list-display .btn-filter-3d:focus {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow:
        0 6px 20px rgba(59, 130, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 0.5rem 1rem !important;
    position: relative !important;
    top: 0 !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.shipping-list-display .btn-filter-3d.active {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%) !important;
    box-shadow:
        0 2px 8px rgba(8, 145, 178, 0.5),
        inset 0 2px 4px rgba(0, 0, 0, 0.15) !important;
    top: 2px !important;
}

.shipping-list-display .btn-filter-3d:hover:not(.active) {
    transform: translateY(-3px) !important;
    box-shadow:
        0 10px 24px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

body.pf-theme-dark .btn-filter-3d,
body.pf-theme-dark .shipping-list-display .btn-filter-3d,
body.pf-theme-dark .shipping-list-display .btn-filter-3d:focus {
    background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%) !important;
    box-shadow:
        0 6px 20px rgba(37, 99, 235, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

body.pf-theme-dark .shipping-list-display .btn-filter-3d.active {
    background: linear-gradient(135deg, #0e7490 0%, #155e75 100%) !important;
    box-shadow:
        0 2px 8px rgba(14, 116, 144, 0.5),
        inset 0 2px 4px rgba(0, 0, 0, 0.25) !important;
}

body.pf-theme-dark .shipping-list-display .btn-filter-3d:hover:not(.active) {
    box-shadow:
        0 10px 24px rgba(37, 99, 235, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

/* ── Forms: marine focus rings; inputs stay light in both modes ──── */
.form-control:focus,
.form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

body.pf-theme-dark .form-control,
body.pf-theme-dark .form-select {
    background-color: #ffffff;
    border-color: #e0f2fe;
    color: #0f172a;
}

body.pf-theme-dark .form-control:focus,
body.pf-theme-dark .form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.3);
}

/* ── Shipping List Display: theme companions (CSS only — the .razor
      structure and its 3 fixes are locked) ──────────────────────── */
.shipping-list-display .sld-banner {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    color: #ffffff;
}

body.pf-theme-dark .shipping-list-display .sld-banner {
    background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
}

/* Day headers sit on the light panel in both modes — marine tint */
.sld-day-header {
    background: #e0f2fe;
    color: #1e3a8a;
}

/* ── Syncfusion Schedule: PROTECTED grid ─────────────────────────
   No theme border/radius/shadow on .e-schedule — the Berthing
   Schedule grid (slot colors, grid lines) must stay untouched. The
   panel rule above already excludes it via :not(.e-schedule). Only
   the toolbar (not the grid) carries theme colors below. */

/* Light: marine gradient toolbar (overrides legacy navy in
   MainLayout.css — same !important, later in cascade) */
.e-schedule .e-schedule-toolbar-container,
.e-schedule .e-schedule-toolbar-container .e-toolbar,
.e-schedule .e-schedule-toolbar-container .e-toolbar-items,
.e-schedule .e-schedule-toolbar,
.e-schedule .e-schedule-toolbar.e-toolbar,
.e-schedule .e-schedule-toolbar .e-toolbar-items {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%) !important;
    border-color: #3b82f6 !important;
}

.e-schedule .e-schedule-toolbar-container {
    border-bottom: 3px solid #06b6d4 !important;
}

.e-schedule .e-schedule-toolbar-container .e-toolbar-item .e-tbar-btn:hover .e-tbar-btn-text,
.e-schedule .e-schedule-toolbar-container .e-toolbar-item .e-tbar-btn:hover .e-icons,
.e-schedule .e-schedule-toolbar .e-toolbar-item .e-tbar-btn:hover .e-tbar-btn-text,
.e-schedule .e-schedule-toolbar .e-toolbar-item .e-tbar-btn:hover .e-icons {
    color: #cffafe !important;
}

.e-schedule .e-schedule-toolbar-container .e-active-view .e-tbar-btn,
.e-schedule .e-schedule-toolbar-container .e-active-view .e-tbar-btn .e-tbar-btn-text,
.e-schedule .e-schedule-toolbar .e-active-view .e-tbar-btn,
.e-schedule .e-schedule-toolbar .e-active-view .e-tbar-btn .e-tbar-btn-text {
    color: #a5f3fc !important;
}

/* Dark: deep navy toolbar with teal accent */
body.pf-theme-dark .e-schedule .e-schedule-toolbar-container,
body.pf-theme-dark .e-schedule .e-schedule-toolbar-container .e-toolbar,
body.pf-theme-dark .e-schedule .e-schedule-toolbar-container .e-toolbar-items,
body.pf-theme-dark .e-schedule .e-schedule-toolbar,
body.pf-theme-dark .e-schedule .e-schedule-toolbar.e-toolbar,
body.pf-theme-dark .e-schedule .e-schedule-toolbar .e-toolbar-items {
    background: #0f172a !important;
    border-color: #0f172a !important;
}

body.pf-theme-dark .e-schedule .e-schedule-toolbar-container {
    border-bottom: 3px solid #0891b2 !important;
}

body.pf-theme-dark .e-schedule .e-schedule-toolbar-container .e-toolbar-item .e-tbar-btn:hover .e-tbar-btn-text,
body.pf-theme-dark .e-schedule .e-schedule-toolbar-container .e-toolbar-item .e-tbar-btn:hover .e-icons,
body.pf-theme-dark .e-schedule .e-schedule-toolbar-container .e-active-view .e-tbar-btn .e-tbar-btn-text {
    color: #22d3ee !important;
}
