/* ==========================================================================
   MarinePass — Design system
   Application de gestion d'un bateau de transport de passagers
   ========================================================================== */

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../fonts/plus-jakarta-sans.woff2') format('woff2');
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-sans: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;

    --bg: #f4f7fb;
    --bg-accent: #eaf2fa;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #eef4fa;
    --border: #e2e9f2;
    --border-strong: #cfdbe9;
    --text: #0f2137;
    --text-2: #334155;
    --muted: #70839b;
    --muted-2: #93a5ba;

    --navy: #082f49;
    --navy-2: #0b3b70;
    --ocean: #0e7490;
    --ocean-2: #0891b2;
    --accent: #0ea5e9;
    --accent-2: #22d3ee;
    --accent-soft: rgba(14, 165, 233, 0.1);

    --success: #059669;
    --success-soft: rgba(5, 150, 105, 0.11);
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, 0.1);
    --warning: #d97706;
    --warning-soft: rgba(217, 119, 6, 0.12);
    --info: #2563eb;
    --info-soft: rgba(37, 99, 235, 0.1);
    --purple: #7c3aed;
    --purple-soft: rgba(124, 58, 237, 0.1);

    --sidebar-width: 278px;
    --topbar-height: 78px;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;

    --shadow-xs: 0 1px 2px rgba(15, 35, 55, 0.04);
    --shadow-sm: 0 4px 16px rgba(15, 35, 55, 0.05);
    --shadow-md: 0 12px 34px rgba(15, 35, 55, 0.08);
    --shadow-lg: 0 24px 60px rgba(8, 47, 73, 0.16);
    --ring: 0 0 0 4px rgba(14, 165, 233, 0.14);

    --sidebar-bg: linear-gradient(178deg, #082f49 0%, #0a3355 45%, #0b3b70 100%);
    --sidebar-text: rgba(232, 243, 252, 0.74);
    --sidebar-active: rgba(34, 211, 238, 0.14);
}

[data-theme='dark'] {
    --bg: #071420;
    --bg-accent: #0a1b2a;
    --surface: #0d2031;
    --surface-2: #102639;
    --surface-3: #153047;
    --border: #1d3a52;
    --border-strong: #294b68;
    --text: #e9f2fb;
    --text-2: #c5d6e6;
    --muted: #8ba6bf;
    --muted-2: #6c8aa5;

    --navy: #061d2e;
    --navy-2: #0b3b70;
    --accent-soft: rgba(34, 211, 238, 0.1);

    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.12);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.12);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.12);
    --info: #60a5fa;
    --info-soft: rgba(96, 165, 250, 0.12);
    --purple: #a78bfa;
    --purple-soft: rgba(167, 139, 250, 0.12);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 4px 18px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.45);
    --ring: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    font-size: 14.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    transition: background-color 0.25s ease, color 0.25s ease;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(1000px 500px at 100% -10%, rgba(14, 165, 233, 0.07), transparent 60%),
        radial-gradient(700px 400px at -10% 100%, rgba(13, 148, 136, 0.05), transparent 60%);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 0;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.18s ease;
}

a:hover {
    color: var(--ocean);
}

p {
    color: var(--text-2);
}

::selection {
    background: rgba(14, 165, 233, 0.22);
}

.text-muted {
    color: var(--muted) !important;
}

.text-primary {
    color: var(--accent) !important;
}

.fw-800 { font-weight: 800 !important; }
.fw-700 { font-weight: 700 !important; }
.fs-12 { font-size: 12px !important; }
.fs-13 { font-size: 13px !important; }
.fs-15 { font-size: 15px !important; }
.fs-18 { font-size: 18px !important; }
.lh-1 { line-height: 1 !important; }
.cursor-pointer { cursor: pointer; }
.min-w-0 { min-width: 0; }
.gap-6 { gap: 6px; }
.gap-10 { gap: 10px; }
.gap-14 { gap: 14px; }
.gap-20 { gap: 20px; }
.text-gradient {
    background: linear-gradient(100deg, var(--accent-2), var(--accent), #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Scrollbars */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

/* ==========================================================================
   Layout général
   ========================================================================== */

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    z-index: 1045;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 14px 0 40px rgba(8, 47, 73, 0.08);
    overflow: hidden;
}

.sidebar::before,
.sidebar::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.sidebar::before {
    width: 340px;
    height: 340px;
    right: -170px;
    top: -140px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.14), transparent 66%);
}

.sidebar::after {
    width: 280px;
    height: 280px;
    left: -140px;
    bottom: -100px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.16), transparent 66%);
}

.sidebar-brand {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 22px 20px;
    color: #fff;
    z-index: 1;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
    flex: 0 0 auto;
}

.brand-name {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #fff;
}

.brand-sub {
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(186, 230, 253, 0.65);
    margin-top: 4px;
    font-weight: 600;
}

.sidebar-scroll {
    position: relative;
    z-index: 1;
    flex: 1;
    overflow-y: auto;
    padding: 4px 14px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

.nav-section {
    margin-top: 18px;
}

.nav-section:first-child {
    margin-top: 6px;
}

.nav-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(186, 230, 253, 0.42);
    padding: 0 12px 8px;
}

.sidebar .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--sidebar-text);
    font-size: 13.3px;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 11px;
    margin-bottom: 2px;
    transition: all 0.18s ease;
    line-height: 1.2;
}

.sidebar .nav-link i {
    font-size: 17px;
    width: 20px;
    text-align: center;
    color: rgba(148, 210, 241, 0.78);
    transition: color 0.18s ease;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.055);
    color: #fff;
}

.sidebar .nav-link:hover i {
    color: var(--accent-2);
}

.sidebar .nav-link.active {
    background: linear-gradient(100deg, rgba(14, 165, 233, 0.22), rgba(34, 211, 238, 0.09));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.12);
}

.sidebar .nav-link.active i {
    color: var(--accent-2);
}

.sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.7);
}

.sidebar .nav-link .nav-badge {
    margin-left: auto;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

.sidebar-footer {
    position: relative;
    z-index: 1;
    padding: 14px;
}

.boat-pill {
    border-radius: 16px;
    padding: 14px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035));
    border: 1px solid rgba(125, 211, 252, 0.14);
    color: #e0f2fe;
}

.boat-pill .boat-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.boat-pill .boat-meta {
    font-size: 10.5px;
    color: rgba(186, 230, 253, 0.6);
    margin-top: 2px;
}

.boat-pill .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.13);
    display: inline-block;
    margin-right: 6px;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 20, 33, 0.55);
    backdrop-filter: blur(3px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
}

.app-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 30px;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.topbar-toggle {
    display: none;
}

.topbar-search {
    position: relative;
    flex: 1;
    max-width: 460px;
}

.topbar-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-2);
    font-size: 15px;
    pointer-events: none;
}

.topbar-search input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    border-radius: 13px;
    padding: 0 78px 0 42px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.topbar-search input::placeholder {
    color: var(--muted-2);
}

.topbar-search input:focus {
    border-color: rgba(14, 165, 233, 0.5);
    background: var(--surface);
    box-shadow: var(--ring);
}

.search-kbd {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 600;
    color: var(--muted-2);
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 6px;
    padding: 2px 6px;
    pointer-events: none;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
}

.icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    font-size: 17px;
    transition: all 0.18s ease;
}

.icon-btn:hover {
    color: var(--accent);
    border-color: rgba(14, 165, 233, 0.35);
    background: var(--accent-soft);
}

.icon-btn .notif-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 16px;
    height: 16px;
    border-radius: 9px;
    background: var(--danger);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--surface);
}

.theme-icon-dark { display: none; }
[data-theme='dark'] .theme-icon-dark { display: inline; }
[data-theme='dark'] .theme-icon-light { display: none; }

.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 5px 4px 10px;
    border-radius: 13px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    transition: all 0.18s ease;
}

.user-pill:hover {
    background: var(--surface-2);
    border-color: var(--border);
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--ocean), var(--accent));
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.03em;
    flex: 0 0 auto;
    box-shadow: 0 6px 16px rgba(14, 116, 144, 0.22);
}

.avatar-sm { width: 34px; height: 34px; border-radius: 10px; font-size: 11.5px; }
.avatar-lg { width: 56px; height: 56px; border-radius: 16px; font-size: 18px; }
.avatar-xl { width: 74px; height: 74px; border-radius: 20px; font-size: 24px; }

.avatar-soft {
    background: var(--accent-soft);
    color: var(--ocean);
    box-shadow: none;
}

.user-meta { line-height: 1.15; text-align: left; }
.user-meta .name { font-size: 12.8px; font-weight: 700; display: block; }
.user-meta .role { font-size: 10.5px; color: var(--muted); display: block; margin-top: 3px; }

.dropdown-menu {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    padding: 8px;
    font-size: 13px;
    color: var(--text);
}

.dropdown-item {
    border-radius: 9px;
    padding: 8px 11px;
    color: var(--text-2);
    font-size: 12.8px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--surface-2);
    color: var(--text);
}

.dropdown-item.text-danger:hover {
    background: var(--danger-soft);
    color: var(--danger) !important;
}

.dropdown-divider {
    border-color: var(--border);
    margin: 6px 0;
}

.notif-menu {
    width: 380px;
    max-width: calc(100vw - 30px);
    padding: 0;
    overflow: hidden;
}

.notif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.notif-head h6 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
}

.notif-list {
    max-height: 380px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    gap: 11px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
    transition: background 0.15s ease;
}

.notif-item:hover {
    background: var(--surface-2);
    color: var(--text);
}

.notif-item:last-child { border-bottom: 0; }

.notif-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.notif-title {
    font-size: 12.3px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 2px;
}

.notif-sub {
    font-size: 11px;
    color: var(--muted);
}

.notif-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    text-align: center;
    background: var(--surface-2);
    font-size: 12px;
    font-weight: 600;
}

.page-content {
    flex: 1;
    padding: 28px 30px 42px;
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
}

.app-footer {
    padding: 16px 30px 24px;
    color: var(--muted-2);
    font-size: 11.5px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==========================================================================
   En-têtes de page
   ========================================================================== */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: var(--ocean-2);
    margin-bottom: 8px;
}

.page-title {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.035em;
    margin: 0;
    line-height: 1.15;
}

.page-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    max-width: 720px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    padding-top: 4px;
}

/* ==========================================================================
   Boutons
   ========================================================================== */

.btn {
    --bs-btn-border-radius: 11px;
    border-radius: 11px;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.18s ease;
    border-width: 1px;
    line-height: 1.3;
    white-space: nowrap;
}

.btn i { font-size: 15px; }

.btn-primary {
    --bs-btn-bg: #0e7490;
    --bs-btn-border-color: #0e7490;
    --bs-btn-hover-bg: #0891b2;
    --bs-btn-hover-border-color: #0891b2;
    --bs-btn-active-bg: #0e7490;
    --bs-btn-active-border-color: #0e7490;
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-disabled-bg: #7ca9b4;
    --bs-btn-disabled-border-color: #7ca9b4;
    background: linear-gradient(135deg, #0e7490 0%, #0284c7 100%);
    border: 0;
    box-shadow: 0 6px 16px rgba(14, 116, 144, 0.22);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0ea5e9 100%);
    box-shadow: 0 9px 22px rgba(14, 116, 144, 0.3);
    transform: translateY(-1px);
}

.btn-navy {
    background: linear-gradient(135deg, #0b3b70, #0c4a6e);
    border: 0;
    color: #fff;
    box-shadow: 0 6px 16px rgba(11, 59, 112, 0.2);
}

.btn-navy:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 9px 22px rgba(11, 59, 112, 0.28); }

.btn-soft {
    background: var(--accent-soft);
    border: 1px solid transparent;
    color: var(--ocean-2);
}

.btn-soft:hover {
    background: rgba(14, 165, 233, 0.16);
    color: var(--ocean);
    border-color: rgba(14, 165, 233, 0.22);
}

.btn-outline-soft {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    box-shadow: var(--shadow-xs);
}

.btn-outline-soft:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text);
}

.btn-light-soft {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-2);
}

.btn-light-soft:hover { background: var(--surface-3); color: var(--text); }

.btn-success-soft {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid transparent;
}

.btn-success-soft:hover { background: rgba(5, 150, 105, 0.18); color: var(--success); }

.btn-danger-soft {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid transparent;
}

.btn-danger-soft:hover { background: rgba(220, 38, 38, 0.16); color: var(--danger); }

.btn-warning-soft {
    background: var(--warning-soft);
    color: var(--warning);
    border: 1px solid transparent;
}

.btn-warning-soft:hover { background: rgba(217, 119, 6, 0.18); color: var(--warning); }

.btn-outline-danger {
    color: var(--danger);
    border-color: rgba(220, 38, 38, 0.3);
    background: transparent;
}

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

.btn-sm {
    font-size: 11.8px;
    padding: 7px 12px;
    border-radius: 9px;
}

.btn-sm i { font-size: 13px; }

.btn-lg {
    font-size: 14.5px;
    padding: 13px 22px;
    border-radius: 13px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
}

.btn-icon.btn-sm { width: 31px; height: 31px; }

.btn-white {
    background: #fff;
    color: var(--navy-2);
    border: 0;
    box-shadow: 0 8px 24px rgba(4, 20, 33, 0.16);
}

.btn-white:hover { background: #f0f9ff; color: var(--navy); transform: translateY(-1px); }

.btn-glass {
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    backdrop-filter: blur(8px);
}

.btn-glass:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }

.btn-link {
    color: var(--ocean-2);
    text-decoration: none;
    font-weight: 600;
    padding: 0;
}

.btn-link:hover { color: var(--accent); text-decoration: underline; }

/* ==========================================================================
   Cartes & panneaux
   ========================================================================== */

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.panel-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.panel-title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-title i { color: var(--ocean-2); font-size: 16px; }

.panel-subtitle {
    margin: 3px 0 0;
    font-size: 11.5px;
    color: var(--muted);
}

.panel-body { padding: 20px; }
.panel-body.p-0 { padding: 0; }
.panel-footer {
    padding: 13px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}

.panel-flush { border: 0; box-shadow: none; background: transparent; }

/* Cartes statistiques */
.stat-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 19px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    height: 100%;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.stat-card::after {
    content: '';
    position: absolute;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    right: -38px;
    bottom: -48px;
    background: var(--stat-soft, var(--accent-soft));
    opacity: 0.75;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: color-mix(in srgb, var(--stat-color, var(--accent)) 30%, var(--border));
}

.stat-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--stat-soft, var(--accent-soft));
    color: var(--stat-color, var(--accent));
    font-size: 19px;
}

.stat-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted);
    margin: 14px 0 3px;
    letter-spacing: 0.01em;
}

.stat-value {
    font-size: 25px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text);
    position: relative;
    z-index: 1;
}

.stat-value small {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0;
}

.stat-meta {
    font-size: 10.8px;
    color: var(--muted);
    margin-top: 7px;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    z-index: 1;
}

.stat-meta .up { color: var(--success); font-weight: 700; }
.stat-meta .down { color: var(--danger); font-weight: 700; }

.stat-accent { --stat-color: var(--accent); --stat-soft: var(--accent-soft); }
.stat-success { --stat-color: var(--success); --stat-soft: var(--success-soft); }
.stat-warning { --stat-color: var(--warning); --stat-soft: var(--warning-soft); }
.stat-danger { --stat-color: var(--danger); --stat-soft: var(--danger-soft); }
.stat-info { --stat-color: var(--info); --stat-soft: var(--info-soft); }
.stat-purple { --stat-color: var(--purple); --stat-soft: var(--purple-soft); }
.stat-navy { --stat-color: #0b3b70; --stat-soft: rgba(11, 59, 112, 0.08); }

[data-theme='dark'] .stat-navy { --stat-color: #7dd3fc; --stat-soft: rgba(125, 211, 252, 0.1); }

/* Bandeau d'accueil */
.welcome-card {
    position: relative;
    border-radius: var(--radius-lg);
    background: linear-gradient(118deg, #082f49 0%, #0b3b70 55%, #0e7490 100%);
    color: #fff;
    padding: 28px 30px;
    overflow: hidden;
    box-shadow: 0 20px 48px rgba(8, 47, 73, 0.22);
    min-height: 188px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
}

.welcome-card::before {
    content: '';
    position: absolute;
    inset: auto -60px -140px auto;
    width: 430px;
    height: 430px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.28), transparent 66%);
}

.welcome-card::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    left: -130px;
    top: -130px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent 65%);
}

.welcome-content { position: relative; z-index: 1; max-width: 600px; }

.welcome-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(165, 243, 252, 0.85);
    margin-bottom: 8px;
}

.welcome-card h1 {
    color: #fff;
    font-size: 25px;
    line-height: 1.22;
    margin: 0 0 7px;
    letter-spacing: -0.035em;
}

.welcome-card p {
    color: rgba(224, 242, 254, 0.72);
    font-size: 12.5px;
    margin: 0;
}

.welcome-actions {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.next-trip-card {
    position: relative;
    z-index: 1;
    flex: 0 0 300px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 17px;
    padding: 17px 18px;
    backdrop-filter: blur(12px);
    color: #fff;
}

.next-trip-card .label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(165, 243, 252, 0.75);
    margin-bottom: 8px;
}

.next-trip-route {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.next-trip-meta {
    font-size: 11px;
    color: rgba(224, 242, 254, 0.65);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.next-trip-stats {
    display: flex;
    gap: 16px;
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.next-trip-stats .value {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.next-trip-stats .label {
    margin: 0;
    font-size: 9.5px;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Badges & pastilles
   ========================================================================== */

.badge {
    font-family: var(--font-sans);
    font-weight: 600;
    border-radius: 7px;
    padding: 4px 8px;
    font-size: 10.5px;
    letter-spacing: 0.01em;
}

.badge-soft,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 20px;
    padding: 4px 9px;
    font-size: 10.6px;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}

.badge-soft i,
.status-badge i { font-size: 10px; }

.badge-soft::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
}

.badge-success-soft { background: var(--success-soft); color: var(--success); }
.badge-danger-soft { background: var(--danger-soft); color: var(--danger); }
.badge-warning-soft { background: var(--warning-soft); color: var(--warning); }
.badge-info-soft { background: var(--info-soft); color: var(--info); }
.badge-primary-soft { background: var(--accent-soft); color: var(--ocean-2); }
.badge-purple-soft { background: var(--purple-soft); color: var(--purple); }
.badge-secondary-soft { background: var(--surface-3); color: var(--muted); }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-2);
    font-weight: 500;
}

.chip i { color: var(--muted); }
.chip-accent { background: var(--accent-soft); border-color: transparent; color: var(--ocean-2); }
.chip-accent i { color: var(--ocean-2); }

.payment-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
}

/* ==========================================================================
   Tableaux
   ========================================================================== */

.table-shell {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-2);
    font-size: 12.8px;
    min-width: 760px;
}

.data-table thead th {
    background: var(--surface-2);
    color: var(--muted);
    font-size: 9.6px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    background: var(--surface);
}

.data-table tbody tr:last-child td { border-bottom: 0; }

.data-table tbody tr {
    transition: background 0.14s ease;
}

.data-table tbody tr:hover td {
    background: var(--surface-2);
}

.data-table .cell-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.data-table .cell-title {
    font-weight: 700;
    color: var(--text);
    font-size: 12.8px;
    line-height: 1.3;
    display: block;
}

.data-table .cell-sub {
    font-size: 10.8px;
    color: var(--muted);
    display: block;
    margin-top: 1px;
}

.data-table .cell-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: flex-end;
}

.data-table .num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.data-table a.cell-title:hover { color: var(--accent); }

.row-route {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.row-route i { color: var(--muted-2); font-size: 11px; }

.table-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--surface);
}

.table-footer .info {
    font-size: 11.5px;
    color: var(--muted);
}

/* Pagination */
.pagination {
    --bs-pagination-bg: var(--surface);
    --bs-pagination-border-color: var(--border);
    --bs-pagination-color: var(--text-2);
    --bs-pagination-hover-bg: var(--surface-2);
    --bs-pagination-hover-color: var(--text);
    --bs-pagination-hover-border-color: var(--border-strong);
    --bs-pagination-active-bg: var(--ocean-2);
    --bs-pagination-active-border-color: var(--ocean-2);
    --bs-pagination-disabled-bg: var(--surface-2);
    --bs-pagination-disabled-color: var(--muted-2);
    --bs-pagination-border-radius: 9px;
    gap: 4px;
    margin: 0;
    flex-wrap: wrap;
}

.pagination .page-link {
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    min-width: 33px;
    text-align: center;
    padding: 6px 9px;
}

/* ==========================================================================
   Formulaires
   ========================================================================== */

.form-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-2);
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.01em;
}

.form-label .req { color: var(--danger); margin-left: 2px; }

.form-control,
.form-select {
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 11px;
    color: var(--text);
    font-size: 13px;
    padding: 9px 12px;
    min-height: 42px;
    font-family: var(--font-sans);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-control::placeholder { color: var(--muted-2); }

.form-control:focus,
.form-select:focus {
    background-color: var(--surface);
    color: var(--text);
    border-color: var(--accent);
    box-shadow: var(--ring);
}

.form-control:disabled,
.form-select:disabled {
    background-color: var(--surface-2);
    color: var(--muted);
    opacity: 0.8;
}

.form-control-sm,
.form-select-sm {
    min-height: 34px;
    font-size: 12px;
    border-radius: 9px;
    padding: 5px 9px;
}

textarea.form-control { min-height: 88px; }

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2370839b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-size: 13px 10px;
}

.form-text,
.form-hint {
    font-size: 10.8px;
    color: var(--muted);
    margin-top: 5px;
}

.invalid-feedback {
    font-size: 10.8px;
    color: var(--danger);
    font-weight: 500;
    margin-top: 4px;
    display: block;
}

.is-invalid {
    border-color: var(--danger) !important;
    background-image: none;
}

.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.input-group-text {
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    color: var(--muted);
    font-size: 12px;
    border-radius: 11px;
}

.input-icon {
    position: relative;
}

.input-icon > i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-2);
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
}

.input-icon .form-control,
.input-icon .form-select {
    padding-left: 36px;
}

.form-check-input {
    background-color: var(--surface);
    border-color: var(--border-strong);
    width: 16px;
    height: 16px;
    margin-top: 0.16em;
}

.form-check-input:checked {
    background-color: var(--ocean-2);
    border-color: var(--ocean-2);
}

.form-check-input:focus {
    border-color: var(--accent);
    box-shadow: var(--ring);
}

.form-check-label {
    font-size: 12.5px;
    color: var(--text-2);
    cursor: pointer;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.form-section {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.form-section:last-child { border-bottom: 0; }

.form-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 4px;
}

.form-section-title .num {
    width: 23px;
    height: 23px;
    border-radius: 7px;
    background: var(--accent-soft);
    color: var(--ocean-2);
    font-size: 10.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-section-desc {
    font-size: 11px;
    color: var(--muted);
    margin: 0 0 17px 32px;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    flex-wrap: wrap;
}

.radio-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.radio-card {
    position: relative;
}

.radio-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-card label {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-strong);
    border-radius: 11px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    background: var(--surface);
    transition: all 0.15s ease;
    margin: 0;
}

.radio-card input:checked + label {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--ocean-2);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.08);
}

.radio-card label i { font-size: 14px; }

/* Switch */
.form-switch .form-check-input {
    width: 34px;
    height: 19px;
    border-radius: 20px;
}

.form-switch .form-check-input:checked { background-color: var(--ocean-2); }

/* Filtres */
.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.filter-bar .filter-field { min-width: 130px; }
.filter-bar .filter-search { flex: 1; min-width: 220px; }
.filter-bar .form-label { margin-bottom: 4px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }

.filter-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted);
    transition: all 0.15s ease;
}

.filter-chip:hover { border-color: var(--border-strong); color: var(--text); }
.filter-chip.active { background: var(--ocean-2); border-color: var(--ocean-2); color: #fff; }

/* ==========================================================================
   Alertes / toasts
   ========================================================================== */

.flash-wrap {
    position: fixed;
    top: 88px;
    right: 22px;
    z-index: 1090;
    width: 370px;
    max-width: calc(100vw - 30px);
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.flash-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    font-size: 12.3px;
    color: var(--text-2);
    animation: slideIn 0.32s ease both;
}

.flash-alert.success { border-left-color: var(--success); }
.flash-alert.danger { border-left-color: var(--danger); }
.flash-alert.warning { border-left-color: var(--warning); }

.flash-alert > i { font-size: 17px; margin-top: 1px; flex: 0 0 auto; }
.flash-alert.success > i { color: var(--success); }
.flash-alert.danger > i { color: var(--danger); }
.flash-alert.warning > i { color: var(--warning); }

.flash-alert .btn-close {
    margin-left: auto;
    font-size: 9px;
    opacity: 0.45;
    padding: 2px;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeUp 0.4s ease both; }
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }

.alert {
    border-radius: 12px;
    font-size: 12.5px;
    padding: 12px 15px;
    border: 1px solid var(--border);
}

.alert-danger {
    background: var(--danger-soft);
    border-color: rgba(220, 38, 38, 0.18);
    color: var(--danger);
}

.alert-info {
    background: var(--info-soft);
    border-color: rgba(37, 99, 235, 0.16);
    color: var(--info);
}

.alert-warning {
    background: var(--warning-soft);
    border-color: rgba(217, 119, 6, 0.18);
    color: var(--warning);
}

.alert-success {
    background: var(--success-soft);
    border-color: rgba(5, 150, 105, 0.18);
    color: var(--success);
}

.alert ul { padding-left: 18px; margin: 4px 0 0; }
.alert li { margin-bottom: 2px; }

/* ==========================================================================
   Modales
   ========================================================================== */

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 18px 22px;
    align-items: flex-start;
}

.modal-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
}

.modal-subtitle {
    font-size: 11.5px;
    color: var(--muted);
    margin: 3px 0 0;
}

.modal-body { padding: 22px; }

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 14px 22px;
    background: var(--surface-2);
    gap: 8px;
}

.btn-close {
    filter: var(--btn-close-filter, none);
    opacity: 0.45;
}

[data-theme='dark'] .btn-close { filter: invert(1) grayscale(1); }

.modal-backdrop.show { opacity: 0.55; }

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 13px;
    overflow: hidden;
}

.modal-info-grid > div {
    background: var(--surface);
    padding: 11px 13px;
}

.modal-info-grid .label {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.modal-info-grid .value {
    font-size: 12.8px;
    font-weight: 600;
    color: var(--text);
}

/* ==========================================================================
   Carte des sièges
   ========================================================================== */

.seat-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 20px;
    align-items: start;
}

.boat-deck {
    position: relative;
    background:
        linear-gradient(180deg, rgba(14, 165, 233, 0.045), transparent 38%),
        var(--surface);
    border: 1px solid var(--border);
    border-radius: 26px;
    padding: 24px 26px 28px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.boat-deck::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(var(--border-strong) 0.7px, transparent 0.7px);
    background-size: 18px 18px;
    opacity: 0.25;
    mask-image: linear-gradient(to bottom, #000, transparent 60%);
}

.deck-top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.deck-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.deck-badge {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: linear-gradient(135deg, #0b3b70, #0e7490);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    box-shadow: 0 8px 20px rgba(11, 59, 112, 0.22);
}

.deck-heading h3 { margin: 0; font-size: 15px; font-weight: 800; }
.deck-heading p { margin: 2px 0 0; font-size: 11px; color: var(--muted); }

.deck-legend {
    display: flex;
    gap: 13px;
    flex-wrap: wrap;
    font-size: 10.5px;
    color: var(--muted);
    font-weight: 600;
}

.legend-item { display: inline-flex; align-items: center; gap: 5px; }

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.legend-dot.disponible { background: #10b981; }
.legend-dot.reservee { background: #ef4444; }
.legend-dot.embarquee { background: #3b82f6; }
.legend-dot.indisponible { background: #94a3b8; }

.deck-cabin {
    position: relative;
    margin: 0 auto;
    max-width: 660px;
    border: 1.5px solid var(--border-strong);
    border-radius: 42px 42px 26px 26px;
    padding: 30px 26px 22px;
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
}

.deck-cabin::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    width: 72px;
    height: 5px;
    border-radius: 4px;
    background: var(--border-strong);
}

.deck-front-label {
    position: absolute;
    left: 50%;
    top: -8px;
    transform: translateX(-50%);
    background: var(--surface);
    padding: 0 9px;
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--muted-2);
    text-transform: uppercase;
}

.seat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    position: relative;
    z-index: 1;
}

.seat-grid::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 4px;
    bottom: 4px;
    border-left: 1px dashed var(--border-strong);
    opacity: 0.65;
    pointer-events: none;
}

.seat-btn {
    position: relative;
    aspect-ratio: 1 / 1;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 11.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    box-shadow: 0 4px 10px rgba(15, 35, 55, 0.12);
    font-variant-numeric: tabular-nums;
}

.seat-btn::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    pointer-events: none;
}

.seat-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 35, 55, 0.2);
    filter: brightness(1.05);
}

.seat-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.seat-btn.seat--disponible { background: linear-gradient(145deg, #34d399, #059669); }
.seat-btn.seat--reservee { background: linear-gradient(145deg, #f87171, #dc2626); }
.seat-btn.seat--embarquee { background: linear-gradient(145deg, #60a5fa, #2563eb); }
.seat-btn.seat--indisponible {
    background: linear-gradient(145deg, #cbd5e1, #94a3b8);
    color: #f8fafc;
    box-shadow: none;
}

.seat-btn.seat--indisponible::after { border-color: rgba(255, 255, 255, 0.1); }

.seat-btn.is-selected {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    transform: translateY(-2px);
}

.seat-btn .seat-check {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--ocean-2);
    font-size: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.seat-btn.is-selected .seat-check { display: flex; }

.seat-note {
    margin-top: 18px;
    font-size: 10.5px;
    color: var(--muted);
    text-align: center;
    position: relative;
    z-index: 1;
}

.seat-sidebar { display: flex; flex-direction: column; gap: 14px; }

.seat-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.seat-stat {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 12px;
    padding: 12px;
}

.seat-stat .value {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.seat-stat .label {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    font-weight: 700;
    margin-top: 3px;
}

.seat-stat.dispo .value { color: var(--success); }
.seat-stat.reserve .value { color: var(--danger); }
.seat-stat.embarque .value { color: var(--info); }
.seat-stat.indispo .value { color: var(--muted); }

.occupancy-ring {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
}

.occupancy-ring svg { transform: rotate(-90deg); }
.occupancy-ring .ring-value {
    position: absolute;
    text-align: center;
}
.occupancy-ring .ring-value strong { display: block; font-size: 24px; font-weight: 800; letter-spacing: -0.04em; }
.occupancy-ring .ring-value span { font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }

.trip-switcher {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.trip-switch-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    color: var(--text-2);
    font-size: 11.5px;
    transition: all 0.15s ease;
}

.trip-switch-item:hover { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.trip-switch-item.active { background: var(--accent-soft); border-color: rgba(14, 165, 233, 0.2); color: var(--ocean-2); font-weight: 600; }

.trip-switch-item .date-box {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--surface-3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex: 0 0 auto;
}

.trip-switch-item .date-box strong { font-size: 12px; }
.trip-switch-item .date-box span { font-size: 7.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 2px; }
.trip-switch-item.active .date-box { background: rgba(14, 165, 233, 0.15); }

/* Détails du siège */
.seat-detail-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 13px;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.seat-detail-number {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    flex: 0 0 auto;
}

.seat-detail-number.disponible { background: linear-gradient(145deg, #34d399, #059669); }
.seat-detail-number.reservee { background: linear-gradient(145deg, #f87171, #dc2626); }
.seat-detail-number.embarquee { background: linear-gradient(145deg, #60a5fa, #2563eb); }
.seat-detail-number.indisponible { background: linear-gradient(145deg, #cbd5e1, #94a3b8); }

.detail-list { display: flex; flex-direction: column; gap: 0; }

.detail-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 12px;
}

.detail-item:last-child { border-bottom: 0; }
.detail-item .label { color: var(--muted); font-size: 11px; flex: 0 0 auto; max-width: 52%; }
.detail-item .value { font-weight: 600; color: var(--text); text-align: right; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }

/* ==========================================================================
   Timeline / suivi colis
   ========================================================================== */

.timeline {
    position: relative;
    padding-left: 26px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding: 0 0 20px 0;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -26px;
    top: 1px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-2);
    font-size: 8.5px;
    z-index: 1;
}

.timeline-item.done .timeline-dot { background: var(--success); border-color: var(--success); color: #fff; }
.timeline-item.current .timeline-dot { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 5px var(--accent-soft); }
.timeline-item.current .timeline-title { color: var(--accent); font-weight: 700; }

.timeline-title { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.timeline-desc { font-size: 10.5px; color: var(--muted); margin-top: 1px; }

.tracking-hero {
    background: linear-gradient(118deg, #082f49, #0b3b70 60%, #0e7490);
    border-radius: 24px;
    color: #fff;
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.tracking-hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    right: -140px;
    top: -160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.25), transparent 65%);
}

.tracking-hero h1 { color: #fff; font-size: 26px; letter-spacing: -0.03em; position: relative; z-index: 1; }
.tracking-hero p { color: rgba(224, 242, 254, 0.7); font-size: 12.5px; position: relative; z-index: 1; }

.tracking-form {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 8px;
    max-width: 540px;
    margin-top: 20px;
}

.tracking-form .form-control {
    height: 48px;
    background: rgba(255, 255, 255, 0.96);
    border: 0;
    color: #0f2137;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.tracking-form .btn { height: 48px; padding: 0 20px; }

.tracking-code {
    font-family: 'Courier New', monospace;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--ocean-2);
}

/* ==========================================================================
   Tickets & reçus
   ========================================================================== */

.print-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ticket {
    max-width: 820px;
    margin: 0 auto;
    background: #fff;
    color: #0f2137;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(15, 35, 55, 0.12);
    overflow: hidden;
    position: relative;
}

.ticket-head {
    background: linear-gradient(118deg, #082f49, #0b3b70 55%, #0e7490);
    color: #fff;
    padding: 26px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.ticket-head::after {
    content: '';
    position: absolute;
    width: 260px;
    height: 260px;
    right: -100px;
    top: -130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.3), transparent 65%);
}

.ticket-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.ticket-brand img { width: 46px; height: 46px; border-radius: 13px; }
.ticket-brand .name { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.ticket-brand .sub { font-size: 9.5px; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(186, 230, 253, 0.7); }

.ticket-type {
    position: relative;
    z-index: 1;
    text-align: right;
}
.ticket-type .label { font-size: 9px; letter-spacing: 0.17em; text-transform: uppercase; color: rgba(186, 230, 253, 0.7); }
.ticket-type .value { font-size: 15px; font-weight: 800; }
.ticket-type .ref { font-size: 10px; color: rgba(224, 242, 254, 0.72); font-family: monospace; margin-top: 2px; }

.ticket-body { padding: 28px 30px; }

.ticket-route {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 22px;
    border-bottom: 1px dashed #d5e0eb;
}

.ticket-port { flex: 1; }
.ticket-port .time { font-size: 25px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: #0b3b70; }
.ticket-port .port { font-size: 12.5px; font-weight: 700; margin-top: 5px; }
.ticket-port .date { font-size: 10.5px; color: #70839b; margin-top: 1px; }
.ticket-port.arrival { text-align: right; }

.ticket-arrow {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #eaf7fd;
    color: #0e7490;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex: 0 0 auto;
}

.ticket-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding-top: 22px;
}

.ticket-field .label {
    font-size: 8.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8ba6bf;
    font-weight: 700;
    margin-bottom: 3px;
}
.ticket-field .value { font-size: 12.8px; font-weight: 700; color: #0f2137; }
.ticket-field .value.mono { font-family: 'Courier New', monospace; letter-spacing: 0.04em; }

.ticket-footer {
    padding: 18px 30px;
    background: #f8fafc;
    border-top: 1px dashed #d5e0eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.ticket-note { font-size: 9.5px; color: #70839b; line-height: 1.55; max-width: 430px; }

.barcode {
    height: 42px;
    width: 170px;
    background: repeating-linear-gradient(90deg, #0f2137 0 2px, transparent 2px 4px, #0f2137 4px 5px, transparent 5px 8px, #0f2137 8px 11px, transparent 11px 13px);
    opacity: 0.85;
}

.ticket-tear {
    position: absolute;
    left: 0;
    right: 0;
    height: 20px;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.ticket-tear::before,
.ticket-tear::after {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg);
    flex: 0 0 auto;
}

.ticket-tear .line {
    flex: 1;
    border-top: 1px dashed #d5e0eb;
}

.receipt {
    max-width: 760px;
    margin: 0 auto;
    background: #fff;
    color: #0f2137;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 35, 55, 0.12);
    overflow: hidden;
}

.receipt-head {
    padding: 28px 32px;
    border-bottom: 2px solid #0b3b70;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.receipt-head .brand { display: flex; align-items: center; gap: 12px; }
.receipt-head img { width: 48px; height: 48px; }
.receipt-head h2 { margin: 0; font-size: 18px; color: #0b3b70; letter-spacing: -0.03em; }
.receipt-head .company { font-size: 10.5px; color: #70839b; margin-top: 5px; line-height: 1.5; }

.receipt-title { text-align: right; }
.receipt-title .label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #8ba6bf; font-weight: 700; }
.receipt-title .value { font-size: 20px; font-weight: 800; color: #0f2137; margin-top: 2px; }
.receipt-title .ref { font-family: monospace; font-size: 10.5px; color: #70839b; margin-top: 3px; }

.receipt-body { padding: 28px 32px; }
.receipt-amount {
    background: linear-gradient(120deg, #f0f9ff, #ecfeff);
    border: 1px solid #d5edf7;
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
}
.receipt-amount .label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: #70839b; font-weight: 700; }
.receipt-amount .value { font-size: 28px; font-weight: 800; color: #0b3b70; letter-spacing: -0.04em; }

.receipt-footer {
    padding: 20px 32px;
    background: #f8fafc;
    border-top: 1px solid #e2e9f2;
    font-size: 9.5px;
    color: #70839b;
    text-align: center;
    line-height: 1.6;
}

/* ==========================================================================
   Page de connexion
   ========================================================================== */

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    background: var(--bg);
}

.auth-visual {
    position: relative;
    background: linear-gradient(150deg, #061d2e 0%, #082f49 40%, #0b3b70 75%, #0e7490 100%);
    color: #fff;
    padding: 42px 52px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.auth-visual::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    right: -220px;
    top: -190px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.2), transparent 65%);
}

.auth-visual::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 260px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 260'%3E%3Cpath fill='rgba(255,255,255,0.05)' d='M0,160L60,149.3C120,139,240,117,360,128C480,139,600,181,720,186.7C840,192,960,160,1080,144C1200,128,1320,128,1380,128L1440,128L1440,260L0,260Z'/%3E%3Cpath fill='rgba(34,211,238,0.07)' d='M0,200L80,192C160,184,320,168,480,176C640,184,800,216,960,213.3C1120,211,1280,173,1360,154.7L1440,136L1440,260L0,260Z'/%3E%3C/svg%3E") bottom/cover no-repeat;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.auth-brand img { width: 44px; height: 44px; border-radius: 13px; box-shadow: 0 10px 26px rgba(0,0,0,.25); }
.auth-brand .name { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.auth-brand .sub { font-size: 9.5px; letter-spacing: 0.17em; text-transform: uppercase; color: rgba(186, 230, 253, 0.62); }

.auth-hero {
    position: relative;
    z-index: 1;
    margin: auto 0;
    max-width: 520px;
    padding: 30px 0;
}

.auth-hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(165, 243, 252, 0.8);
    border: 1px solid rgba(165, 243, 252, 0.22);
    background: rgba(255, 255, 255, 0.06);
    padding: 6px 11px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.auth-hero h1 {
    color: #fff;
    font-size: 40px;
    line-height: 1.12;
    letter-spacing: -0.045em;
    margin-bottom: 16px;
    font-weight: 800;
}

.auth-hero h1 span {
    background: linear-gradient(100deg, #67e8f9, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-hero p {
    color: rgba(224, 242, 254, 0.66);
    font-size: 13.5px;
    line-height: 1.7;
    max-width: 430px;
}

.auth-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 28px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 11.5px;
    color: rgba(224, 242, 254, 0.84);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 9px 11px;
}

.auth-feature i { color: #67e8f9; font-size: 14px; }

.auth-visual-footer {
    position: relative;
    z-index: 1;
    font-size: 10.5px;
    color: rgba(186, 230, 253, 0.42);
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px;
    position: relative;
}

.auth-theme-toggle {
    position: absolute;
    top: 22px;
    right: 26px;
    z-index: 2;
}

.auth-form-wrap { width: 100%; max-width: 400px; }

.auth-form-wrap .mobile-brand { display: none; }

.auth-title { font-size: 27px; letter-spacing: -0.04em; margin-bottom: 7px; font-weight: 800; }
.auth-subtitle { color: var(--muted); font-size: 12.5px; margin-bottom: 26px; }

.auth-form .form-control { min-height: 46px; font-size: 13.5px; }
.auth-form .form-label { font-size: 11.5px; }

.password-wrap { position: relative; }
.password-wrap .form-control { padding-right: 42px; }
.password-toggle {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 15px;
    padding: 4px;
    z-index: 3;
}

.auth-submit { width: 100%; min-height: 46px; margin-top: 4px; }

.auth-copyright {
    text-align: center;
    font-size: 10.5px;
    color: var(--muted-2);
    margin-top: 24px;
}

/* ==========================================================================
   Page publique de suivi
   ========================================================================== */

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

.public-topbar {
    height: 74px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.public-brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.public-brand img { width: 36px; height: 36px; border-radius: 11px; }
.public-brand .name { font-weight: 800; font-size: 16px; letter-spacing: -0.03em; }
.public-brand .sub { font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }

.public-content {
    flex: 1;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 36px 24px 50px;
}

.public-footer {
    padding: 18px 24px 28px;
    text-align: center;
    font-size: 10.5px;
    color: var(--muted-2);
}

.track-result {
    margin-top: 24px;
}

/* ==========================================================================
   Détails / fiches
   ========================================================================== */

.detail-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.detail-hero .info { flex: 1; min-width: 200px; }
.detail-hero h2 { font-size: 20px; margin: 0 0 3px; letter-spacing: -0.03em; }
.detail-hero .meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.detail-hero .meta span { display: inline-flex; align-items: center; gap: 4px; }
.detail-hero .actions { display: flex; gap: 7px; flex-wrap: wrap; }

.detail-grid {
    display: grid;
    grid-template-columns: 1.65fr 1fr;
    gap: 20px;
    align-items: start;
}

.detail-grid > * { min-width: 0; }

.info-list { display: flex; flex-direction: column; }

.info-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 12.5px;
}

.info-row:last-child { border-bottom: 0; }
.info-row .label { color: var(--muted); font-size: 11.5px; flex: 0 0 auto; max-width: 52%; }
.info-row .value { font-weight: 600; text-align: right; color: var(--text); flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }

.summary-box {
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    padding: 15px;
}

.summary-box .row-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    padding: 4px 0;
    color: var(--text-2);
}
.summary-box .row-line.total {
    border-top: 1px dashed var(--border-strong);
    margin-top: 6px;
    padding-top: 9px;
    font-weight: 800;
    font-size: 14px;
    color: var(--text);
}
.summary-box .row-line .value { font-weight: 700; }
.summary-box .row-line.due .value { color: var(--danger); }
.summary-box .row-line.paid .value { color: var(--success); }

.progress {
    background: var(--surface-3);
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--ocean-2), var(--accent-2));
    border-radius: 20px;
}

.progress-bar.bg-success { background: linear-gradient(90deg, #34d399, #059669) !important; }
.progress-bar.bg-warning { background: linear-gradient(90deg, #fbbf24, #d97706) !important; }
.progress-bar.bg-danger { background: linear-gradient(90deg, #f87171, #dc2626) !important; }

.stat-inline {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.stat-inline .item .value { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
.stat-inline .item .label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 700; }

.note-box {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 11.5px;
    color: var(--text-2);
    line-height: 1.6;
}

.boat-photo {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: block;
}

.boat-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.boat-spec {
    border: 1px solid var(--border);
    background: var(--surface-2);
    border-radius: 12px;
    padding: 12px 14px;
}

.boat-spec .label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.boat-spec .value { font-size: 15px; font-weight: 800; margin-top: 2px; letter-spacing: -0.02em; }

/* ==========================================================================
   États vides, chargement
   ========================================================================== */

.empty-state {
    padding: 46px 24px;
    text-align: center;
}

.empty-icon {
    width: 58px;
    height: 58px;
    border-radius: 17px;
    background: var(--accent-soft);
    color: var(--ocean-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    margin-bottom: 14px;
}

.empty-state h5 { font-size: 14px; margin-bottom: 4px; }
.empty-state p { font-size: 11.5px; color: var(--muted); margin: 0 auto 14px; max-width: 340px; }

.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

/* ==========================================================================
   Utilitaires personnalisés
   ========================================================================== */

.divider { height: 1px; background: var(--border); margin: 16px 0; }
.divider-dashed { height: 1px; border-top: 1px dashed var(--border); margin: 16px 0; }

.icon-square {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--accent-soft);
    color: var(--ocean-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex: 0 0 auto;
}

.icon-square.green { background: var(--success-soft); color: var(--success); }
.icon-square.red { background: var(--danger-soft); color: var(--danger); }
.icon-square.amber { background: var(--warning-soft); color: var(--warning); }
.icon-square.blue { background: var(--info-soft); color: var(--info); }
.icon-square.purple { background: var(--purple-soft); color: var(--purple); }
.icon-square.navy { background: rgba(11, 59, 112, 0.08); color: #0b3b70; }
[data-theme='dark'] .icon-square.navy { background: rgba(125, 211, 252, 0.1); color: #7dd3fc; }

.quick-action {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    transition: all 0.18s ease;
    font-size: 12px;
    font-weight: 600;
}

.quick-action:hover {
    border-color: rgba(14, 165, 233, 0.3);
    background: var(--surface-2);
    color: var(--text);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.quick-action .icon-square { width: 34px; height: 34px; font-size: 15px; }
.quick-action .sub { display: block; font-size: 10px; color: var(--muted); font-weight: 500; }

.chart-wrap { position: relative; width: 100%; height: 280px; }
.chart-wrap-sm { height: 210px; }

.legend-dot-sm { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.table-avatar-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.table-avatar-name .name { font-weight: 700; color: var(--text); font-size: 12.7px; line-height: 1.25; }
.table-avatar-name .sub { font-size: 10.5px; color: var(--muted); }

.text-tabular { font-variant-numeric: tabular-nums; }

.pill-tabs {
    display: inline-flex;
    gap: 3px;
    padding: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 11px;
}

.pill-tabs button {
    border: 0;
    background: transparent;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted);
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.pill-tabs button.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-xs);
}

.copy-btn { border: 0; background: transparent; color: var(--muted); padding: 2px 4px; font-size: 12px; }
.copy-btn:hover { color: var(--accent); }

/* Bootstrap helpers */
.row { --bs-gutter-x: 1.15rem; --bs-gutter-y: 1.15rem; }
.dropdown-toggle::after { border: 0; content: '\F282'; font-family: 'bootstrap-icons'; font-size: 10px; vertical-align: middle; margin-left: 4px; opacity: 0.55; }
.dropdown-toggle.no-caret::after { display: none; }
[data-bs-theme='dark'] .dropdown-menu { --bs-dropdown-bg: var(--surface); --bs-dropdown-link-color: var(--text-2); --bs-dropdown-link-hover-bg: var(--surface-2); --bs-dropdown-link-hover-color: var(--text); --bs-dropdown-border-color: var(--border); }
[data-bs-theme='dark'] .form-control { color-scheme: dark; }
[data-bs-theme='dark'] input[type='date'],
[data-bs-theme='dark'] input[type='time'],
[data-bs-theme='dark'] input[type='datetime-local'] { color-scheme: dark; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1199.98px) {
    :root { --sidebar-width: 250px; }
    .page-content { padding: 24px 22px 38px; }
    .topbar { padding: 0 22px; }
    .next-trip-card { flex-basis: 270px; }
}

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-open .sidebar-overlay { opacity: 1; visibility: visible; }
    .app-main { margin-left: 0; }
    .topbar-toggle { display: inline-flex; }
    .page-content { padding: 22px 18px 36px; }
    .topbar { padding: 0 18px; height: 70px; }
    .topbar-search { max-width: none; }
    .user-meta { display: none; }
    .user-pill { padding: 4px; }
    .seat-map-layout { grid-template-columns: 1fr; }
    .seat-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-grid { grid-template-columns: 1fr; }
    .welcome-card { flex-direction: column; align-items: flex-start; }
    .next-trip-card { flex-basis: auto; width: 100%; }
    .auth-page { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-panel { min-height: 100vh; }
    .auth-form-wrap .mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 30px;
    }
    .auth-form-wrap .mobile-brand img { width: 40px; height: 40px; border-radius: 12px; }
    .auth-form-wrap .mobile-brand .name { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
}

@media (max-width: 767.98px) {
    body { font-size: 14px; }
    .page-header { margin-bottom: 18px; }
    .page-title { font-size: 22px; }
    .page-subtitle { font-size: 12px; }
    .topbar { gap: 9px; padding: 0 14px; height: 66px; }
    .topbar-search { display: none; }
    .topbar-actions { gap: 4px; }
    .icon-btn { width: 39px; height: 39px; border-radius: 11px; }
    .page-content { padding: 18px 14px 32px; }
    .welcome-card { padding: 22px 20px; border-radius: 20px; }
    .welcome-card h1 { font-size: 21px; }
    .welcome-actions .btn { flex: 1; }
    .stat-card { padding: 15px; }
    .stat-value { font-size: 22px; }
    .stat-label { margin-top: 12px; }
    .seat-sidebar { grid-template-columns: 1fr; }
    .seat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .seat-grid::after { display: none; }
    .deck-cabin { padding: 28px 14px 18px; border-radius: 28px; }
    .boat-deck { padding: 18px 14px 22px; border-radius: 20px; }
    .deck-legend { gap: 8px; font-size: 9.5px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid-3 { grid-template-columns: 1fr; }
    .form-section { padding: 16px; }
    .form-actions { padding: 13px 16px; }
    .panel-header { padding: 14px 15px; }
    .panel-body { padding: 15px; }
    .filter-bar { padding: 12px; }
    .filter-bar .filter-field { flex: 1 1 45%; }
    .table-footer { padding: 10px 13px; }
    .ticket-head { padding: 20px; flex-direction: column; align-items: flex-start; }
    .ticket-type { text-align: left; }
    .ticket-body { padding: 20px; }
    .ticket-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .ticket-footer { padding: 16px 20px; flex-direction: column; align-items: flex-start; }
    .ticket-route { gap: 10px; }
    .ticket-port .time { font-size: 21px; }
    .receipt-head { padding: 20px; flex-direction: column; }
    .receipt-title { text-align: left; }
    .receipt-body { padding: 20px; }
    .tracking-hero { padding: 24px 20px; }
    .tracking-hero h1 { font-size: 22px; }
    .tracking-form { flex-direction: column; }
    .public-topbar { padding: 0 16px; height: 66px; }
    .public-content { padding: 24px 14px 40px; }
    .flash-wrap { top: 74px; right: 12px; width: calc(100vw - 24px); }
    .modal-dialog { margin: 10px; }
    .modal-body { padding: 18px; }
    .modal-header, .modal-footer { padding: 14px 18px; }
    .detail-hero { padding: 17px; }
    .detail-hero h2 { font-size: 18px; }
    .boat-spec-grid { grid-template-columns: 1fr; }
    .boat-photo { height: 190px; }
    .auth-panel { padding: 24px; }
    .auth-title { font-size: 24px; }
    .auth-theme-toggle { top: 14px; right: 16px; }
    .notif-menu { width: 330px; }
    .stat-inline { gap: 14px; }
    .chart-wrap { height: 230px; }
}

@media (max-width: 575.98px) {
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
    .seat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
    .seat-btn { border-radius: 10px; font-size: 10.5px; min-height: 36px; }
    .seat-grid::after { display: none; }
    .seat-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ticket-grid { grid-template-columns: 1fr 1fr; }
    .radio-cards { grid-template-columns: 1fr; }
    .form-grid { gap: 13px; }
    .table-shell .data-table { min-width: 700px; }
}

/* Impression */
@media print {
    .sidebar,
    .topbar,
    .app-footer,
    .print-toolbar,
    .flash-wrap,
    .no-print,
    .sidebar-overlay {
        display: none !important;
    }

    body { background: #fff !important; color: #000; }
    .app-main { margin-left: 0 !important; }
    .page-content { padding: 0 !important; max-width: none; }
    .ticket, .receipt { box-shadow: none !important; border-radius: 0 !important; max-width: none; }
    .ticket-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .ticket, .receipt { page-break-inside: avoid; }
    a { color: inherit; text-decoration: none; }
}
