* { box-sizing: border-box; }
body { font-family: 'DM Sans', system-ui, -apple-system, sans-serif; margin: 0; background: #020617; color: #e2e8f0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: #38bdf8; text-decoration: none; }
a:hover { text-decoration: underline; }


.row { display: flex; flex-wrap: wrap; gap: 1rem; }
.spacing { margin-bottom: 1rem;margin-top: 1rem; }
.col-3 { flex: 0 0 calc(33.333% - 0.67rem); max-width: calc(33.333% - 0.67rem); }
.col-6 { flex: 1 1 48%; }
.col-9 { flex: 1 1 75%; }
.col-12 { flex: 1 1 100%; }
.col-1 { flex: 1 1 100%; }
.col-2 { flex: 1 1 50%; }

.col-4 { flex: 1 1 20%; }
.col-5 { flex: 1 1 15%; }

.icon { width: 32px; height: 32px; vertical-align: middle; margin-right: 0.5rem; }
.hide { display: none !important; }
/* Icons inside buttons: use natural font size and tighter box so text aligns nicely */
.btn .icon {
    width: auto;
    height: auto;
    margin-right: 0.4rem;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}
.mobile {
    display: none;
}
.site-header {
    background: #1e293b;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: fixed;
    z-index: 1000;
    width:100%;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.8);
}

.site-header h1 { margin: 0; font-size: 1.25rem; }
.site-header h1 a { color: #f8fafc; }
.site-header nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-header nav a.active { font-weight: 600; color: #f8fafc; }
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    padding: 0.25rem;
    cursor: pointer;
}
.nav-toggle-line {
    display: block;
    width: 20px;
    height: 2px;
    background: #e5e7eb;
    border-radius: 999px;
}
.nav-toggle-line + .nav-toggle-line {
    margin-top: 4px;
}
.nav-toggle i {
    font-size: 1.1rem;
}
.nav-link-mail { position: relative; display: inline-flex; align-items: center; gap: 0.35rem; }
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: #ef4444;
    border-radius: 999px;
}

@media (max-width: 768px) {

    .desktop {
        display:none !important;
    }
    .col-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .col-4 {
        flex: 1 1 40%;
        margin:0;
    }

    .site-header {
        flex-wrap: wrap;
    }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        flex-direction: column;
    }
    .balance {
       display:none;
    }
    .nav-display-name {
        display:none;
    }
    nav.site-nav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        margin-top: 0.5rem;
        gap: 0rem;
    }
    nav.site-nav.site-nav-open {
        display: flex;
    }
    .site-nav a {
        width: 100%;
        text-align: center;
        
        padding:20px 0px;
        margin:0px;
        border-bottom:1px solid #334155;
    }

    /* last site-nav item */
    .site-nav a:last-child {
        border-bottom: none;
    }
    .ship-cards .ship-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .bookings-list .booking-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .charter-ship-info-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .charter-ship-info-meta {
        width: 100%;
        align-items: flex-start;
    }
    .charter-ship-info-stats .ship-row .label {
        min-width: 0;
    }
    .charter-ship-info-stats .condition-bar {
        height: 0.5rem;
    }
}
.ship-dot-container {
      width: 100%;
  
   position: relative;
}
.ship-dot {
    position: absolute;
    top: 0;
    left: 0;
    margin-left:-7px;
    margin-top:-2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #00aeff;
    box-shadow: 0 0 5px #00000060;
    z-index: 5;
}
.ship-lease-badge {
    margin-top: 0.35rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #cbd5f5;
}
#ship-inline-route-map {
   
    width: 100%;
}
.badge-lease {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: #f97316;
    color: #0f172a;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-red {
    background: #f91d16;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.03em;
    border-radius: 3px;
    padding: 0.1rem 0.5rem;

}
.badge-grey {
    background: #606c7c;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.03em;
    border-radius: 3px;
    padding: 0.1rem 0.5rem;
}
.badge-green {
    background: #098135;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.03em;
    border-radius: 3px;
    padding: 0.1rem 0.5rem;
}
.red-txt { color: #ff5a7d; }
@keyframes badge-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}
.badge-orange {
    background: #f97316;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: 3px;
    padding: 0.1rem 0.5rem;

}
.ship-lease-terms {
    opacity: 0.9;
}
.balance { color: #a5f3fc; font-weight: 600; }
.balance-negative { color: #f97373; }
.nav-level { color: #0ea5e9; font-size: 0.85rem; margin-right: 0.5rem; }
.nav-display-name { color: #94a3b8; font-size: 0.9rem; }

.main { max-width: 1300px; margin: 0 auto; padding: 1.5rem; padding-bottom: 4rem; padding-top: 70px; flex: 1; width: 100%; }

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #1e293b;
    padding: 0.5rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    border-top: 1px solid #334155;
}
.footer-gamedate { font-size: 0.95rem; color: #94a3b8; }
.footer-gamedate strong { color: #a5f3fc; }
.footer-next-day { margin-left: 0.25rem; }
.footer-add-route { display: inline-flex; align-items: center; gap: 0.4rem; margin-left: 0.5rem; }
.footer-add-route-label { font-size: 0.85rem; color: #64748b; }
.footer-add-route select, .footer-add-route input[type="number"] {
    font-size: 0.9rem; padding: 0.25rem 0.4rem; background: #334155; border: 1px solid #475569;
    color: #f8fafc; border-radius: 4px; max-width: 4rem;
}
.footer-add-route input[type="number"] { width: 3rem; }
.btn-small { padding: 0.25rem 0.5rem; font-size: 0.85rem; }
.footer-route-msg { font-size: 0.85rem; }
.footer-route-msg.success { color: #86efac; }
.footer-route-msg.error { color: #fca5a5; }
.footer-debug-link { font-size: 0.85rem; color: #64748b; margin-left: 0.5rem; }
.footer-debug-link:hover { color: #94a3b8; }

/* Front page (not logged in): hero image, selling text, Epic-style login/register */
.front-page { max-width: 1080px; margin: 0 auto 3rem; padding: 0 1rem; }
.tight { width: 480px; margin: 0 auto;padding: 1rem;}
.front-msg { margin: 1rem 0; }

.front-hero { margin-bottom: 2rem; }
.front-hero-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 620px;
    min-height: 280px;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    margin-bottom: 1.25rem;
    position: relative;
}
.front-hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.front-hero-text { text-align: center; }
.front-hero-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.25;
}
.front-hero-tagline {
    margin: 0;
    font-size: 1rem;
    color: #94a3b8;
    line-height: 1.5;
}
.front-overlay {
    position: absolute;
    right:25px;
    top:25px;
    width: 50%;
    background: rgba(0, 0, 0, 0.9);
    padding: 25px;
    border-radius: 12px;
}
.front-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 25px;
    margin-bottom: 10px;
}
.front-cta-btn {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    border: none;
    cursor: pointer;
}
.front-cta-login {
    background: #334155;
    color: #f8fafc;
}
.front-cta-login:hover {
    background: #475569;
    color: #fff;
}
.front-cta-register {
    background: #0ea5e9;
    color: #fff;
}
.front-cta-register:hover {
    background: #0284c7;
    color: #fff;
}

/* Separate login / register pages – floating box */
.front-auth-page { max-width: 440px; margin: 3rem auto; padding: 0 1rem; }
.front-auth-box {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 2rem 2rem 2rem;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 4px 6px -2px rgba(0, 0, 0, 0.2),
        0 10px 20px -5px rgba(0, 0, 0, 0.3),
        0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.front-auth-heading { margin: 0 0 1.25rem 0; font-size: 1.5rem; font-weight: 700; color: #f8fafc; }
.front-auth-link { margin: 1.5rem 0 0; text-align: center; color: #94a3b8; font-size: 0.95rem; }
.front-auth-link a { color: #0ea5e9; text-decoration: none; }
.front-auth-link a:hover { text-decoration: underline; }

.front-auth-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.front-auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #334155;
}
.front-auth-tab {
    flex: 1;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #94a3b8;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.front-auth-tab:hover { color: #cbd5e1; }
.front-auth-tab.active {
    color: #f8fafc;
    border-bottom-color: #0ea5e9;
}
.front-auth-panel { display: none; }
.front-auth-panel.active { display: block; }
.front-auth-form label { display: block; margin-bottom: 0.35rem; color: #94a3b8; font-size: 0.9rem; }
.front-auth-form input[type="email"],
.front-auth-form input[type="password"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    margin-bottom: 1rem;
    background: #0f172a;
    border: 1px solid #475569;
    color: #f8fafc;
    border-radius: 6px;
    font-size: 1rem;
}
.front-auth-form input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.25);
}
.front-auth-submit {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #0ea5e9;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.front-auth-submit:hover { background: #0284c7; }

.front-page h2 { margin-top: 0; color: #f8fafc; }
.front-page form { margin-bottom: 2rem; }
.front-page label { display: block; margin-bottom: 0.25rem; color: #94a3b8; }
.front-page input[type="text"],
.front-page input[type="password"],
.front-page input[type="email"] {
    width: 100%; padding: 0.5rem 0.75rem; margin-bottom: 0.75rem;
    background: #1e293b; border: 1px solid #334155; color: #f8fafc; border-radius: 4px;
}
.front-page button, .btn {
    background: #0081bd;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}
.front-page button:hover, .btn:hover { background: #006394; }
.btn-start-load,
.btn.btn-start-load { background: #16a34a; color: #fff; }
.btn-red { background: #f91d16; color: #fff; }
.btn-orange { background: #f59e0b; color: #fff; }
.btn-start-load:hover,
.btn.btn-start-load:hover { background: #15803d; }
.msg { padding: 0.75rem; border-radius: 4px; margin-bottom: 1rem; }
.msg.error { background: #7f1d1d; color: #fecaca; }
.msg.success { background: #14532d; color: #bbf7d0; }

/* Dashboard & tables */
.card {
    background: #212938;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 0px 15px rgba(15, 23, 42, 0.85);
}
.dimmed-card { opacity: 0.33; }

/* Smaller cards used inside other cards */
.cards-inner {
    background: #020617;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(51, 65, 85, 0.9);
}
.cards-inner h3 {
    margin: 0 0 0.4rem 0;
    font-size: 0.95rem;
    color: #e5e7eb;
}
.cards-inner p {
    margin: 0.1rem 0;
    font-size: 0.85rem;
    color: #cbd5e1;
}

/* Dashboard top summary cards – toned-down with distinct accents */
.dashboard-summary-card {
    
    position: relative;
    overflow: hidden;
    background: #083655;

   
}
.dashboard-summary-card::before {
    content: '';
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 0 0, rgba(248, 250, 252, 0.16), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(148, 163, 184, 0.18), transparent 60%);
    opacity: 0.3;
    pointer-events: none;
}
.dashboard-summary-card h2 {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #e5e7eb;
}
.dashboard-summary-card h2 .icon {
    width: 26px;
    height: 26px;
    margin-right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.dashboard-summary-card p {
    position: relative;
    margin:0;
    z-index: 1;
    font-size: 1.4rem;
}

/* Per-card color accents */
.dashboard-summary-card--balance {
  
}
.dashboard-summary-card--balance h2 .icon {
    color: #38bdf8;
}

.dashboard-summary-card--fuel {
 
}
.dashboard-summary-card--fuel h2 .icon {
    color: #f59e0b;
}

.dashboard-summary-card--market {
 
}
.dashboard-summary-card--market h2 .icon {
    color: #818cf8;
}

.card h2 {
    margin: 0 0 0.75rem 0;
    font-size: 1.05rem;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.card h2 .icon {
    width: 22px;
    height: 22px;
    margin-right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.gamedate { font-size: 1.1rem; color: #a5f3fc; margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid #334155; }
th { color: #94a3b8; font-weight: 600; }
tr:hover { background: #334155; }
.regnskab-table .amount { text-align: right; font-variant-numeric: tabular-nums; }
.regnskab-table .amount.income { color: #86efac; }
.regnskab-table .amount.expense { color: #fca5a5; }
.route-bar-wrap { display: flex; align-items: center; gap: 0.5rem; }
.route-bar-label { font-size: 0.8rem; color: #94a3b8; white-space: nowrap; }

/* Generic responsive table wrapper (used on regnskab) */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.regnskab-table-wrap {
    margin-top: 0.75rem;
}

/* Home port marker on dashboard fleet map – small green dot */
.home-port-marker {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #0f172a;
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.7);
}

/* Graphical route indicator: thin line with a moving dot */
.route-line-wrap { display: inline-flex; align-items: center; }
.route-line {
    position: relative;
    width: 120px;
    height: 4px;
    background: #000000;
    border-radius: 2px;
    overflow: visible;
}
.route-line-dot {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px; /* center vertically */
    border-radius: 50%;
    background: #0ea5e9;
  
    box-shadow: 0 0 4px rgba(14,165,233,0.8);
    transform: translateX(-50%);
}
.status { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.85rem; }
.status.in_port { background: #14532d; }
.status.in_port.laid-up { background: #334155; color: #94a3b8; }
.status.loading { background: #a14d04; }
.status.sailing { background: #1e3a8a; }
.status.unloading { background: #088112; }
.status.repair { background: #7f1d1d; }
.cargo-cell { text-align: right; font-variant-numeric: tabular-nums; }
.cargo-bar-wrap { display: flex; align-items: center; gap: 0.5rem; }
.cargo-bar-wrap.cargo-bar-unloading .condition-bar .condition-fill { animation: cargo-unloading-flash 2s ease-in-out infinite; }
@keyframes cargo-unloading-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}
.cargo-bar-wrap .cargo-bar { flex-shrink: 0; }
.cargo-bar-text { font-size: 0.85rem; color: #94a3b8; font-variant-numeric: tabular-nums; white-space: nowrap; }

.dashboard-bookings-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}
.dashboard-bookings-label { font-size: 0.9rem; color: #e2e8f0; display: block; }

.dashboard-events-card { border-left: 4px solid #0ea5e9; }
.dashboard-events-empty { color: #94a3b8; font-size: 0.9rem; margin: 0; }
.dashboard-events-list { list-style: none; margin: 0 0 0.75rem 0; padding: 0; }
.dashboard-event-item {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #334155;
    font-size: 0.9rem;
}
.dashboard-event-item:last-child { border-bottom: none; }
.dashboard-event-main {
    display: flex;
    flex-direction:row;
    align-items: flex-start;
    gap: 0.1rem;
    min-width: 0;
}
.dashboard-event-ship {
    font-size: 0.8rem;
    color: #94a3b8;

    width:120px;
}
.dashboard-event-subject { font-weight: 500; color: #e2e8f0; text-decoration: none; }
.dashboard-event-subject:hover { color: #38bdf8; text-decoration: underline; }
.dashboard-event-subject-btn {
    background: none; border: none; padding: 0; font: inherit; cursor: pointer; text-align: left;
    flex: 1; min-width: 0;
}
.dashboard-event-subject-btn:hover { color: #38bdf8; text-decoration: underline; }
.dashboard-event-date { flex-shrink: 0; color: #64748b; font-size: 0.85rem; }

/* Forms */
form.inline { display: inline; }
form.buy-ship-form { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.buy-ship-name-input {
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    background: #0f172a;
    border: 1px solid #475569;
    border-radius: 6px;
    color: #f8fafc;
    width: 100%;
    min-width: 200px;
    max-width: 320px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.buy-ship-name-input::placeholder { color: #64748b; }
.buy-ship-name-input:hover { border-color: #64748b; }
.buy-ship-name-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.25);
}

/* Køb skib: billede + typenavn i tabelcelle */
.buy-ship-type-cell { display: flex; align-items: center; gap: 0.75rem; }
.buy-ship-type-image {
    width: 96px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    background: #0f172a;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.buy-ship-type-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.buy-ship-type-placeholder { width: 100%; height: 100%; background: #1e293b; border: 1px dashed #475569; }
.buy-ship-type-name { font-weight: 500; color: #f8fafc; }

.buy-ship-type-image-clickable { cursor: pointer; }
.buy-ship-type-image-clickable:hover { opacity: 0.9; }
.buy-ship-type-image-clickable:focus { outline: 2px solid #3b82f6; outline-offset: 2px; }

/* Ship details modal (image + specs) */
#ship-details-modal .ship-details-modal-inner { max-width: 480px; }
.ship-details-modal-body { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 1rem; }
.ship-details-modal-image-wrap {
    width: 100%; max-height: 220px; border-radius: 6px; overflow: hidden; background: #0f172a;
    border: 1px solid #334155; display: flex; align-items: center; justify-content: center;
}
.ship-details-modal-img { width: 100%; height: 100%; max-height: 220px; object-fit: cover; display: block; }
.ship-details-modal-placeholder { width: 100%; min-height: 140px; background: #1e293b; border: 1px dashed #475569; }
.ship-details-modal-specs {
    display: grid;
    grid-template-columns: minmax(11rem, auto) auto;
    gap: 0.35rem 1.5rem;
    margin: 0;
    font-size: 0.95rem;
    align-items: baseline;
}
.ship-details-modal-specs dt {
    color: #94a3b8;
    font-weight: normal;
}
.ship-details-modal-specs dd {
    margin: 0;
    color: #f8fafc;
    text-align: right;
}

/* Modal (buy ship: overlay + inner box) */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.modal-overlay.modal-overlay-visible {
    opacity: 1;
    visibility: visible;
}
.modal-overlay > .modal {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.modal-overlay .modal-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    color: #f8fafc;
}
.modal-overlay .modal-field { margin: 0 0 1.25rem 0; }
.modal-overlay .modal-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: #94a3b8;
}
.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.modal-overlay .dashboard-event-modal-subject,
.modal-overlay .dashboard-event-modal-preview,
.modal-overlay .dashboard-event-modal-date {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    color: #cbd5e1;
}
.modal-overlay .dashboard-event-modal-date { color: #94a3b8; font-size: 0.9rem; }
.modal-overlay .dashboard-event-modal-content .modal-actions { margin-top: 1rem; margin-bottom: 0; }
.btn-ghost {
    background: transparent;
    color: #94a3b8;
    border: 1px solid #475569;
}
.btn-ghost:hover { background: #334155; color: #e2e8f0; }

.profile-bankruptcy-card { border-left: 4px solid #94a3b8; }
.profile-bankruptcy-card p { margin: 0 0 1rem 0; color: #94a3b8; font-size: 0.95rem; }
.profile-bankruptcy-btn { color: #f87171; border-color: #b91c1c; }
.profile-bankruptcy-btn:hover { background: rgba(185, 28, 28, 0.2); color: #fca5a5; }

select { padding: 0.35rem 0.5rem; background: #1e293b; border: 1px solid #334155; color: #f8fafc; border-radius: 4px; }
/* Smaller buttons: same height as .btn, slightly narrower and smaller text */
.btn-small {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

/* Charters */
.charter-grid { display: grid; gap: 1rem; }
.charter-card { background: #1e293b; padding: 1rem; border-radius: 8px; border-left: 4px solid #0ea5e9; }
.charter-card-inner {
    display: flex;
    gap: 0.9rem;
}
.charter-card-icon {
    flex: 0 0 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.charter-card-icon-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}
.charter-card-icon-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: #020617;
    border: 1px dashed #334155;
}
.charter-card-body {
    flex: 1 1 auto;
    min-width: 0;
}
.charter-card .route { font-weight: 600; color: #f8fafc; }
.charter-card .earnings { color: #86efac; }
.debug-actions { margin: 0.5rem 0; padding: 0.5rem 0; border-top: 1px solid #334155; }
.debug-actions form { display: inline-flex; align-items: center; gap: 0.5rem; }
.debug-actions label { color: #94a3b8; font-size: 0.9rem; }
.risk-low { border-left-color: #22c55e; }
.risk-medium { border-left-color: #eab308; }
.risk-high { border-left-color: #ef4444; }
.charter-sort { margin: 0.5rem 0; font-size: 0.95rem; color: #94a3b8; }
.charter-sort .sort-active { color: #f8fafc; font-weight: 600; }
.charter-card .sailing-days { font-size: 0.9rem; color: #94a3b8; }
.charter-warning-badge { display: inline-block; padding: 0.35rem 0.75rem; background: #78350f; color: #fde68a; border-radius: 6px; font-size: 0.9rem; margin: 0.25rem 0 0 0; }
.charter-laycan-warning-badge { margin: 0.25rem 0 0 0; font-size: 0.9rem; color: #fde68a; }
.charter-laycan-warning-badge .badge { display: inline-block; padding: 0.2rem 0.5rem; background: #b45309; color: #fef3c7; border-radius: 4px; font-weight: 600; margin-right: 0.35rem; }
.charter-no-capacity { font-size: 0.9rem; color: #94a3b8; font-style: italic; }

/* Charter ship info (selected ship on charters page) */
.charter-ship-info { border: 1px solid #334155; }
.charter-ship-info-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #334155;
}
.charter-ship-info-title { min-width: 0; }
.charter-ship-info-name {
    margin: 0 0 0.25rem 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #f8fafc;
}
.charter-ship-info-type {
    font-size: 0.9rem;
    color: #94a3b8;
}
.charter-ship-info-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}
.charter-ship-info-capacity {
    font-size: 0.9rem;
    color: #94a3b8;
}
.charter-ship-info-capacity strong { color: #a5f3fc; }
.charter-ship-state {
    display: inline-flex;
    flex-direction: column;
    gap: 0.2rem;
}
.charter-ship-info .status {
    font-size: 0.8rem;
    padding: 0.15rem 0.45rem;
}
.charter-ship-state-dest {
    font-size: 0.85rem;
    color: #94a3b8;
}
.charter-ship-state-desc { font-size: 0.85rem; color: #94a3b8; font-weight: normal; }
.charter-ship-info-stats {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.charter-ship-info-stats .ship-row .label {
    min-width: 7rem;
}
.charter-ship-info-stats .condition-bar {
    height: 0.6rem;
}
.charter-ship-info-clear {
    font-size: 0.9rem;
    color: #64748b;
}
.charter-ship-info-clear:hover { color: #38bdf8; }
.charter-ship-info-section { margin-bottom: 1rem; }
.charter-ship-info-section:last-child { margin-bottom: 0; }
.charter-ship-info-section-title {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.charter-ship-info-table {
    width: 100%;
    font-size: 0.9rem;
    border-collapse: collapse;
}
.charter-ship-info-table th,
.charter-ship-info-table td {
    padding: 0.4rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid #334155;
}
.charter-ship-info-table th { color: #64748b; font-weight: 600; }
.charter-ship-info-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.charter-ship-info-table .route-from { color: #e2e8f0; }
.charter-ship-info-table .route-to { color: #a5f3fc; }
.charter-ship-info-empty {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    font-style: italic;
}

/* Ship cards */
.ship-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.ship-card {
    background: #272f3f;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #333e4d;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
    flex: 0 0 calc(33.333% - 0.67rem);
    max-width: calc(33.333% - 0.67rem);
    display: flex;
    flex-direction: column;
}
.ship-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
   
    border-bottom: 1px solid #1f2937;
}
.ship-card-inner {
    display: flex;
    flex-direction: column;
}
.ship-card-image {
    width: 100%;
    height: 200px;
   
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ship-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ship-image-placeholder {
    color: #64748b;
    font-size: 0.85rem;
}
.ship-card-body {
    padding: 0.85rem 1rem 1rem;
    flex: 1;
    min-width: 0;
}
.ship-row {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}
.ship-row:last-child { margin-bottom: 0; }
.ship-row .label { color: #94a3b8; min-width: 11rem; display: inline-block; }
.ship-row-meter {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
   
}
.ship-row-meter-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.0em;
    width:100%;
}
.ship-row-meter-header .label {

}
.ship-row-meter-value {
   
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.ship-row .bookings-can-start { color: #86efac; }
.ship-row .bookings-waiting { color: #94a3b8; font-style: italic; }
.ship-card-no-cargo-badge { display: inline-block; padding: 0.2rem 0.5rem; background: #7f1d1d; color: #fecaca; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.condition-bar { position:relative;display: inline-block; width: 100%; height: 0.6rem; background: #00000060; border-radius: 3px; overflow: hidden; vertical-align: middle; margin: 0; }
.condition-fill { display: block; height: 100%; background: linear-gradient(90deg,#22c55e80, #22c55e); transition: width 0.2s; border-radius: 10px;}
.ship-card.low-condition .condition-fill { background: #ef4444; }
.ship-card.condition-critical .condition-fill { background: #b91c1c; }
.condition-bar-fuel-warning .condition-fill {
    background: #ea580c;
}
.condition-bar-low-fuel .condition-fill {
    background: #ef4444;
    animation: fuel-low-pulse 1s infinite alternate;
}
@keyframes fuel-low-pulse {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}
.ship-card.condition-critical { border-color: #b91c1c; }
.repair-badge { margin-left: 0.5rem; color: #fbbf24; font-size: 0.85rem; }
.repair-info { margin-left: 0.5rem; color: #94a3b8; font-size: 0.85rem; }
.ship-card-actions {
    padding: 0.75rem 1rem;
    background: #272f3f;
    border-top: 1px solid #333e4d;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.ship-card-actions form { margin-right: 0.5rem; }
.ship-card-link { color: #f8fafc; }
.ship-card-link:hover { color: #38bdf8; }

/* Ship detail page */
.ship-detail-card { max-width: 900px; }
.ship-page-back { margin: 0 0 1rem 0; font-size: 0.95rem; }
.ship-page-back a { color: #94a3b8; }
.ship-page-back a:hover { color: #e2e8f0; }

.ship-page-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #334155;
}
.ship-page-hero-main {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}
.ship-page-hero-image {
    width: 180px;
    height: 120px;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.45);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ship-page-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ship-page-hero-text {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.ship-page-hero-text .status {
    align-self: flex-start;
}
.ship-page-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #f8fafc;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.ship-page-title .ship-page-rename-btn { font-size: 0.8rem; padding: 0.2rem 0.5rem; opacity: 0.85; }
.ship-page-title .ship-page-rename-btn:hover { opacity: 1; }
.ship-page-type { margin: 0 0 0.5rem 0; font-size: 0.9rem; color: #94a3b8; }
.ship-page-hero .status { margin-top: 0.25rem; display: inline-block; }
.ship-page-hero-location { font-size: 0.95rem; color: #cbd5e1; }
.ship-page-route { font-weight: 500; }
.ship-page-eta { color: #94a3b8; }

.ship-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: #334155;
    border-radius: 8px;
    border: 1px solid #475569;
}
.ship-page-action-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0; }
.ship-page-sail-form select { min-width: 11rem; padding: 0.4rem 0.5rem; background: #1e293b; border: 1px solid #475569; color: #f8fafc; border-radius: 4px; font-size: 0.9rem; }
.ship-page-warn { color: #fca5a5; font-size: 0.9rem; }

.ship-page-overview {
    padding: 1rem 1.25rem;
    background: #334155;
    border-radius: 8px;
    border: 1px solid #475569;
    margin-bottom: 0.75rem;
    flex:1;
    flex-direction: column;
    width:50%;
}
.ship-page-overview-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 1.75rem;
    
    
 
}
.ship-page-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    min-width: 150px;
}
.ship-page-stat-label { font-size: 0.85rem; color: #94a3b8; }
.ship-page-stat .condition-bar { width: 140px; height: 0.5rem; margin: 0; }
.ship-page-stat-value { font-weight: 600; color: #e2e8f0; font-variant-numeric: tabular-nums; }
.ship-page-refuel-inline { display: inline-block; margin-left: 0.5rem; vertical-align: middle; }
.ship-page-stat .ship-refuel-open { margin-top: 0.25rem; margin-left: 0; vertical-align: middle; }
.ship-page-fuel-full { font-size: 0.85rem; color: #64748b; margin-top: 0.25rem; margin-left: 0; }
.ship-page-route-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #475569;
    flex-wrap: wrap;
}
.ship-page-route-bar .condition-bar { height: 0.5rem; }
.ship-page-route-line {
    position: relative;
    display: inline-block;
    width: 160px;
    height: 4px;
    background: #1e293b;
    border-radius: 2px;
}
.ship-page-route-line-dot {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #e5e7eb;
    box-shadow: 0 0 4px rgba(34,197,94,0.8);
    transform: translateX(-50%);
}
.ship-page-route-pct { font-size: 0.9rem; color: #94a3b8; font-variant-numeric: tabular-nums; }
.ship-page-route-eta { font-size: 0.9rem; color: #a5f3fc; }
.ship-page-repair-days { margin: 0.75rem 0 0; font-size: 0.9rem; color: #fbbf24; }
.ship-page-meta { margin: 0.5rem 0 0; font-size: 0.8rem; color: #64748b; }

.ship-page-section {
    margin-bottom: 0.5rem;
    background: #334155;
    border: 1px solid #475569;
    border-radius: 8px;
    overflow: hidden;
}
.ship-page-section summary {
    padding: 0.65rem 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: #e2e8f0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.ship-page-section summary::-webkit-details-marker { display: none; }
.ship-page-section summary::before { content: '▸'; font-size: 0.75rem; color: #94a3b8; transition: transform 0.2s; }
.ship-page-section[open] summary::before { transform: rotate(90deg); }
.ship-page-section-inner { padding: 1rem; border-top: 1px solid #475569; }
.ship-page-section-inner > p { margin: 0 0 0.5rem 0; font-size: 0.9rem; }
.ship-page-section-inner > p:last-child { margin-bottom: 0; }
.ship-page-section .form-hint { margin: 0.25rem 0 0; font-size: 0.8rem; color: #64748b; }

/* Specifikationer: grid af felter */
.ship-spec-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1.5rem;
    margin: 0 0 1.25rem 0;
    font-size: 0.9rem;
    max-width: 28rem;
}
.ship-spec-grid dt {
    color: #94a3b8;
    font-weight: 500;
    margin: 0;
}
.ship-spec-grid dd {
    margin: 0;
    font-weight: 600;
    color: #e2e8f0;
    font-variant-numeric: tabular-nums;
}

/* Hastighed: tydelig blok med slider */
.ship-speed-block {
    padding: 1rem 0;
    border-top: 1px solid #475569;
}
.ship-speed-block-title {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #94a3b8;
}
.ship-speed-block .speed-slider-form { margin-top: 0; }
.ship-speed-block .speed-slider-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.ship-speed-block .speed-slider {
    flex: 1;
    min-width: 140px;
    max-width: 240px;
    height: 0.5rem;
    background: #475569;
    border-radius: 4px;
    accent-color: #38bdf8;
}
.ship-speed-block .speed-value { font-weight: 600; min-width: 2.5rem; color: #a5f3fc; font-variant-numeric: tabular-nums; }
.ship-speed-block .speed-max { color: #64748b; font-size: 0.9rem; }
.ship-speed-block .speed-slider-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }

.ship-spec-port-costs { font-size: 0.85rem; color: #64748b; margin: 1rem 0 0 0; padding-top: 0.75rem; border-top: 1px solid #334155; }

/* Ship detail – mobile tweaks */
.space {
    margin-top:5px;
    margin-bottom:5px;
}
@media (max-width: 768px) {

    .mobile {
        display: block;
    }
    .dashboard-event-ship {
        width:60px;
    }
    td label {
        font-size:0.7rem;
        color:#94a3b8;
        margin-bottom:0;
        margin-top:4px;
    }
    small {
        font-size:0.6rem;
    }
    .btn {
        width:100%;
    }
    .card {
        padding:10px;
       
    }
    .card h2 {
        font-size:1rem;
    }
    nav {
        display:none;
    }

    
   
    .ship-detail-card {
        max-width: 100%;
        padding: 0.75rem;
    }
    .ship-page-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .ship-page-hero-main {
        flex-direction: column;
        gap: 0.75rem;
    }
    .ship-page-hero-image {
        width: 100%;
        height: 160px;
    }
    .ship-page-title {
        font-size: 1.25rem;
    }
    .ship-page-actions {
        padding: 0.5rem 0.75rem;
        flex-direction: column;
        align-items: stretch;
    }
    .ship-page-actions .btn,
    .ship-page-actions .btn-small,
    .ship-page-action-form .btn {
        width: 100%;
        justify-content: center;
    }
    .ship-page-sail-form {
        flex-direction: column;
        align-items: stretch;
    }
    .ship-page-sail-form select {
        width: 100%;
        min-width: 0;
    }
    .ship-page-overview {
        padding: 0.75rem;
        flex: 1 1 100%;
        width:100%;
    }
    .ship-page-overview-row {
        gap: 0.75rem 1rem;
    }
    .ship-page-stat {
        min-width: 120px;
    }
    .ship-page-route-line {
        width: 100%;
        max-width: 240px;
    }
    .ship-page-section summary {
        padding: 0.6rem 0.75rem;
    }
    .ship-page-section-inner {
        padding: 0.75rem;
    }
}

.ship-cargo-card,
.ship-booked-card {
    padding: 0.75rem 0;
    border-bottom: 1px solid #475569;
    margin-bottom: 0.5rem;
    display: flex;
    gap: 0.75rem;
}
.ship-cargo-card:last-child,
.ship-booked-card:last-child { border-bottom: none; margin-bottom: 0; }
.ship-cargo-icon {
    flex: 0 0 128px;
    height: 128px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ship-cargo-icon-img {
    width: 128px;
    height: 128px  ;
    object-fit: contain;
}
.ship-cargo-icon-placeholder {
    width: 128px;
    height: 128px   ;
    border-radius: 6px;
    background: #020617;
    border: 1px dashed #334155;
}
.ship-cargo-content {
    flex: 1 1 auto;
    min-width: 0;
}
.ship-cargo-route { font-weight: 600; color: #f8fafc; font-size: 0.95rem; }
.ship-cargo-meta { font-size: 0.85rem; color: #94a3b8; margin: 0.2rem 0 0; }
.ship-cargo-deadline { font-size: 0.85rem; color: #94a3b8; margin: 0.2rem 0 0; }
.ship-cargo-route-length { font-size: 0.85rem; color: #94a3b8; margin: 0.2rem 0 0; }
.ship-cargo-earnings { font-size: 0.9rem; color: #86efac; margin: 0.25rem 0 0; }
.ship-cargo-empty-badge { display: inline-block; padding: 0.25rem 0.6rem; background: #78350f; color: #fde68a; border-radius: 4px; font-size: 0.85rem; font-weight: 600; margin-right: 0.5rem; }
.ship-booked-dates { font-size: 0.85rem; color: #94a3b8; margin: 0.2rem 0 0; }
.ship-booked-card .booked-status { margin: 0.35rem 0 0; font-size: 0.85rem; }
.ship-booked-card .booked-status-delay { color: #fbbf24; }
.ship-booked-cancel { margin: 0.5rem 0 0; }

.ship-detail-card { max-width: 1300px; }

/* Dashboard ships as 3-column card grid */
.dashboard-ship-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.dashboard-ship-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    flex: 0 0 calc(33.333% - 0.67rem);
    max-width: calc(33.333% - 0.67rem);
    background:#273a53;
}
.dashboard-ship-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.dashboard-ship-title {
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.dashboard-ship-title i {
    color: #38bdf8;
}
.dashboard-ship-title a {
    color: #e2e8f0;
    text-decoration: none;
}
.dashboard-ship-title a:hover {
    color: #38bdf8;
    text-decoration: underline;
}
.dashboard-ship-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    font-size: 0.8rem;
}
.dashboard-ship-line {
    margin: 0.15rem 0;
    font-size: 0.9rem;
    color: #cbd5e1;
}
.dashboard-ship-line i {
    margin-right: 0.3rem;
    color: #64748b;
}
.dashboard-ship-cargo-bar {
    margin: 0.35rem 0 0.5rem 0;
}
.dashboard-ship-actions {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.6rem;
    align-items: center;
}
.dashboard-ship-more {
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: none;
}
.dashboard-ship-more i {
    margin-right: 0.25rem;
}
.dashboard-ship-more:hover {
    color: #e2e8f0;
}
.ship-detail-actions-top { background: #1e293b; padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; border: 1px solid #334155; }
.ship-detail-actions-top h3 { margin: 0 0 0.75rem 0; font-size: 0.95rem; color: #94a3b8; }
.ship-actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.ship-actions-row .msg { margin: 0; }
.ship-actions-row form.inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.ship-actions-row .ship-sail-form select { min-width: 10rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.ship-detail-header { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; align-items: flex-start; }
.ship-detail-image {
    width: 280px; min-width: 280px; height: 160px; background: #334155;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0; border-radius: 8px;
}
.ship-detail-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ship-detail-title { flex: 1; min-width: 0; }
.ship-detail-title h2 { margin: 0 0 0.5rem 0; font-size: 1.5rem; color: #f8fafc; display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.ship-detail-title h2 .btn-ghost { font-size: 0.8rem; padding: 0.2rem 0.5rem; }
.ship-type-label { margin: 0 0 0.5rem 0; font-size: 0.9rem; color: #94a3b8; }
.ship-rename-form { margin: 0.5rem 0 0.75rem 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.ship-rename-form label { margin: 0; font-size: 0.9rem; color: #94a3b8; }
.ship-rename-form input[type="text"] { padding: 0.35rem 0.5rem; background: #0f172a; border: 1px solid #475569; color: #f8fafc; border-radius: 4px; width: 12rem; max-width: 100%; }
.ship-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.ship-detail-section { background: #334155; padding: 1rem; border-radius: 8px; }
.ship-detail-section h3 { margin: 0 0 0.75rem 0; font-size: 0.95rem; color: #94a3b8; }
.ship-detail-section p { margin: 0 0 0.5rem 0; font-size: 0.9rem; }
.ship-detail-section p:last-child { margin-bottom: 0; }
.booked-status-delay { color: #fbbf24; }

.speed-slider-form { margin-top: 0.75rem; }
.speed-slider-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.speed-slider-row label { margin: 0; }
.speed-slider {
    flex: 1;
    min-width: 120px;
    max-width: 220px;
    height: 0.5rem;
    background: #475569;
    border-radius: 4px;
    accent-color: #38bdf8;
}
.speed-value { font-weight: 600; min-width: 2.5rem; color: #a5f3fc; }
.speed-max { color: #64748b; font-size: 0.9rem; }
.speed-slider-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.ship-detail-section .form-hint { margin: 0.35rem 0 0; font-size: 0.8rem; color: #64748b; }

.ship-detail-actions { background: #334155; padding: 1rem; border-radius: 8px; }
.ship-detail-actions h3 { margin: 0 0 0.75rem 0; font-size: 0.95rem; color: #94a3b8; }
.ship-sail-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.ship-sail-form label { margin-right: 0.25rem; }
.ship-detail-actions p { margin: 0.5rem 0 0 0; }

/* Ship rename + refuel + sell + lease + repair modals (wrapper uses .modal; has .modal-backdrop + .modal-content) */
#ship-rename-modal.modal,
#ship-refuel-modal.modal,
#ship-sell-modal.modal,
#ship-cancel-lease-modal.modal,
#ship-repair-modal.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.modal-open {
    display: flex;
}
#ship-rename-modal.modal.modal-open,
#ship-refuel-modal.modal.modal-open,
#ship-sell-modal.modal.modal-open,
#ship-cancel-lease-modal.modal.modal-open,
#ship-repair-modal.modal.modal-open {
    pointer-events: auto;
    opacity: 1; 
    visibility: visible;
}
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); cursor: pointer; }
.modal-content { position: relative; background: #1e293b; border: 1px solid #334155; border-radius: 8px; padding: 1.5rem; max-width: 400px; width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,0.4); }
.modal-content h3 { margin: 0 0 1rem 0; font-size: 1.1rem; color: #f8fafc; }
.modal-content label { display: block; margin-bottom: 0.35rem; font-size: 0.9rem; color: #94a3b8; }
.modal-content input[type="text"] { width: 100%; padding: 0.5rem 0.6rem; background: #0f172a; border: 1px solid #475569; color: #f8fafc; border-radius: 4px; margin-bottom: 1rem; font-size: 1rem; }
.modal-content .modal-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.modal-content .modal-actions .btn { flex: 1; min-width: 6rem; }
.refuel-modal-summary { margin: 0 0 1.25rem 0; font-size: 1rem; color: #cbd5e1; line-height: 1.5; }
.refuel-modal-summary strong { color: #f8fafc; }
.refuel-slider-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.refuel-slider-row label { margin: 0; font-size: 0.9rem; color: #94a3b8; min-width: 6rem; }
.refuel-slider { flex: 1; min-width: 120px; height: 8px; -webkit-appearance: none; appearance: none; background: #334155; border-radius: 4px; }
.refuel-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #3b82f6; cursor: pointer; }
.refuel-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #3b82f6; cursor: pointer; border: none; }
.refuel-units-display { font-weight: 600; color: #f8fafc; min-width: 5rem; }
.refuel-modal-cost { margin: 0 0 1.25rem 0; font-size: 1rem; color: #cbd5e1; }
.refuel-modal-cost strong { color: #f8fafc; }
.sell-modal-summary { margin: 0 0 0.75rem 0; font-size: 1rem; color: #cbd5e1; line-height: 1.5; }
.sell-modal-summary strong { color: #f8fafc; }
.sell-modal-warn { margin: 0 0 1.25rem 0; font-size: 0.9rem; color: #94a3b8; }
.ship-sell-confirm { color: #f87171; }
.ship-sell-confirm:hover { color: #fca5a5; }

/* Start lastning modal */
.start-load-modal-intro { margin: 0 0 1rem 0; font-size: 0.95rem; color: #cbd5e1; line-height: 1.5; }
.start-load-booked-list { list-style: none; margin: 0 0 1.25rem 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; max-height: 12rem; overflow-y: auto; }
.start-load-booked-item { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.6rem 0.75rem; background: #0f172a; border: 1px solid #334155; border-radius: 6px; font-size: 0.9rem; }
.start-load-route { color: #e2e8f0; font-weight: 500; }
.start-load-meta { color: #94a3b8; font-size: 0.85rem; }
.start-load-deadlines { color: #94a3b8; font-size: 0.85rem; }
.start-load-form .start-load-speed-row { margin-bottom: 1rem; }
.start-load-form .speed-slider-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.start-load-form .speed-slider { flex: 1; min-width: 100px; }
.start-load-form .speed-value { font-weight: 600; color: #f8fafc; min-width: 3rem; }
.start-load-form .speed-max { color: #64748b; font-size: 0.9rem; }

/* Mail */
.mail-list { display: flex; flex-direction: column; gap: 0.75rem; }
.mail-item { background: #334155; padding: 1rem; border-radius: 8px; border-left: 4px solid #64748b; }
.mail-item-link { display: block; text-decoration: none; color: inherit; cursor: pointer; }
.mail-item-link:hover { background: #3b4a5f; }
.mail-item.unread { border-left-color: #0ea5e9; }
.mail-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; flex-wrap: wrap; gap: 0.25rem; }
.mail-date { color: #94a3b8; font-size: 0.85rem; }
.mail-body { font-size: 0.9rem; color: #e2e8f0; margin-bottom: 0.5rem; }
.mail-item p { margin: 0; }

/* Admin */
.admin-form p { margin-bottom: 0.75rem; }
.admin-form label { display: block; margin-bottom: 0.25rem; color: #94a3b8; }
.admin-form select { min-width: 220px; }
.admin-input { padding: 0.35rem 0.5rem; background: #0f172a; border: 1px solid #475569; color: #f8fafc; border-radius: 4px; width: 100%; max-width: 200px; }
.admin-input-code { max-width: 100px; }
.btn-danger { background: #b91c1c; }
.btn-danger:hover { background: #991b1b; }

/* Charter bookings */
.bookings-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.booking-card {
    background: #334155;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    border-left: 4px solid #64748b;
    flex: 0 0 calc(33.333% - 0.67rem);
    max-width: calc(33.333% - 0.67rem);
}
.booking-main {
    display: flex;
    gap: 1rem;
}
.booking-icon {
    flex: 0 0 128px;
    height: 128px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.booking-icon-fa i {
    font-size: 3.5rem;
    color: #38bdf8;
}
.booking-icon-img {
    width: 128px;
    height: 128px;
    object-fit: contain;
}
.booking-icon-placeholder {
    width: 128px;
    height: 128px;
    border-radius: 12px;
    background: #020617;
    border: 1px dashed #475569;
}
.booking-content {
    flex: 1 1 auto;
    min-width: 0;
}
.booking-card.booking-pending { border-left-color: #94a3b8; }
.booking-card.booking-loading { border-left-color: #f59e0b; }
.booking-card.booking-sailing { border-left-color: #0ea5e9; }
.booking-card.booking-unloading { border-left-color: #22c55e; }
.booking-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.booking-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}
.booking-badge.status-pending { background: #475569; color: #e2e8f0; }
.booking-badge.stage-loading { background: #713f12; color: #fef3c7; }
.booking-badge.stage-sailing { background: #1e3a8a; color: #bfdbfe; }
.booking-badge.stage-unloading { background: #14532d; color: #bbf7d0; }
.booking-ship { font-weight: 600; }
.booking-route { margin: 0.25rem 0; font-size: 0.95rem; color: #e2e8f0; }
.booking-cargo { margin: 0.25rem 0; font-size: 0.9rem; color: #94a3b8; }
.booking-status { margin: 0.5rem 0; font-size: 0.9rem; }
.booking-status.status-ready { color: #86efac; }
.booking-status.status-delay { color: #fca5a5; }
.booking-status.status-pending { color: #94a3b8; }
.booking-dates {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 1rem;
    margin: 0.5rem 0;
    font-size: 0.85rem;
}
.booking-dates dt { color: #778ba7; }
.booking-dates dd { margin: 0; color: #e2e8f0; }
.booking-earnings { margin: 0.5rem 0 0; font-size: 1.2rem; background:#233043;padding: 0.5rem;border-radius: 5px;margin-bottom: 0.5rem; }
.booking-earnings strong { font-size: 1.5rem;color:white } 
.booking-earnings small { font-size: 0.7rem;color:#69a5ad;display:block;}
.booking-earnings .late-penalty { font-size: 0.85rem; color: #fca5a5; font-weight: normal; }
.fuel-note { font-size: 0.85rem; color: #64748b; font-weight: normal; }


/* Mobile */
@media (max-width: 768px) {

    .front-overlay {
        width: 90%;
        right: 5%;;
        top: 5%;
        padding: 15px;
    }
    .front-hero-image {
        min-height:750px;
    }
}