:root {
    --ink: #14213d;
    --muted: #637083;
    --line: #d9e1ea;
    --brand: #12355b;
    --gold: #c9962d;
    --sea: #0f6b7a;
    --bg: #f5f7fa;
    --paper: #ffffff;
    --danger: #b42318;
    --ok: #087443;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}
a { color: var(--brand); text-decoration: none; }
.topbar {
    background: var(--brand);
    color: #fff;
    border-bottom: 4px solid var(--gold);
}
.topbar-inner, .wrap { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.topbar-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .2px; }
.logo {
    width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center;
    background: #fff; color: var(--brand); font-weight: 900;
}
.nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nav a, .nav button { color: #fff; background: transparent; border: 0; font: inherit; cursor: pointer; }
.hero {
    min-height: 520px;
    display: grid;
    align-items: center;
    background:
        linear-gradient(90deg, rgba(18,53,91,.92), rgba(15,107,122,.72)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='640' viewBox='0 0 1200 640'%3E%3Crect width='1200' height='640' fill='%23dce8ef'/%3E%3Cpath d='M0 430c120-36 230-34 360 0s244 36 392 0 294-48 448-8v218H0z' fill='%2390b9c5'/%3E%3Cpath d='M120 360h700l-90 120H190z' fill='%23ffffff'/%3E%3Cpath d='M210 210h270v150H210z' fill='%23c9962d'/%3E%3Cpath d='M520 180h150l105 180H520z' fill='%23ffffff'/%3E%3Cpath d='M247 250h184v22H247zm0 48h408v22H247z' fill='%2312355b'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    color: #fff;
}
.hero h1 { font-size: clamp(40px, 7vw, 82px); line-height: .95; margin: 0 0 18px; letter-spacing: 0; max-width: 900px; }
.hero p { max-width: 680px; font-size: 18px; color: #e7eff6; }
.main { padding: 28px 0 60px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel, .card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
}
.card-title { margin: 0 0 8px; font-size: 18px; }
.muted { color: var(--muted); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid var(--brand); background: var(--brand); color: #fff;
    min-height: 40px; padding: 9px 14px; border-radius: 6px; font-weight: 700; cursor: pointer;
}
.btn.secondary { background: #fff; color: var(--brand); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1f2733; }
.status { display: inline-flex; align-items: center; min-height: 28px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 800; }
.status.Draft { background: #eef3f8; color: #41526a; }
.status.Issued { background: #e7f6ee; color: var(--ok); }
.status.Cancelled { background: #fdeceb; color: var(--danger); }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
input, select, textarea {
    width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 10px 11px;
    font: inherit; color: var(--ink); background: #fff;
}
textarea { min-height: 96px; resize: vertical; }
label { display: block; font-weight: 700; margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.errors, .alert { border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.errors { background: #fdeceb; color: var(--danger); border: 1px solid #f5b5ad; }
.alert { background: #e7f6ee; color: var(--ok); border: 1px solid #a8dec4; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.login-shell { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 32px 0; }
.login-card { width: min(430px, calc(100% - 32px)); }
.verify-box { border-left: 6px solid var(--gold); }
.pagination { margin-top: 16px; }
.footer { padding: 28px 0; color: var(--muted); border-top: 1px solid var(--line); background: #fff; }
.page-hero {
    min-height: 280px; display: grid; align-items: center; padding: 38px;
    background: linear-gradient(120deg, rgba(18,53,91,.96), rgba(15,107,122,.86));
    color: #fff; border-radius: 8px; margin-bottom: 18px;
}
.page-hero.compact { min-height: 230px; }
.page-hero h1 { margin: 0 0 10px; font-size: clamp(34px, 5vw, 58px); line-height: 1; }
.page-hero p { max-width: 760px; color: #e9f1f7; font-size: 17px; }
.eyebrow { margin: 0 0 10px; color: #f2cb6b; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.info-section { margin-top: 18px; }
.info-list { display: grid; grid-template-columns: 150px 1fr; gap: 10px 18px; margin: 0; }
.info-list dt { color: var(--muted); font-size: 12px; text-transform: uppercase; font-weight: 800; letter-spacing: .04em; }
.info-list dd { margin: 0; font-weight: 700; }
.contact-grid { grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); align-items: start; }
.contact-card { border-top: 4px solid var(--gold); }
.contact-note { margin-top: 18px; padding: 14px; background: #eef5fb; border: 1px solid var(--line); border-radius: 6px; color: var(--brand); font-weight: 700; }
.client-panel { padding: 0; overflow-x: auto; }
.client-table th, .client-table td { padding: 14px 16px; }
.client-actions { min-width: 300px; }
.client-actions .btn { min-height: 36px; padding: 7px 11px; white-space: nowrap; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.release-modal {
    position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
    background: rgba(10, 25, 45, .62); padding: 18px;
}
.release-modal[hidden] { display: none; }
.release-dialog {
    width: min(520px, 100%); background: #fff; border-radius: 8px; padding: 24px;
    box-shadow: 0 24px 80px rgba(0,0,0,.28); border-top: 5px solid var(--gold);
}
.release-dialog h2 { margin-top: 0; }
.release-progress { height: 12px; background: #e7edf4; border-radius: 999px; overflow: hidden; margin: 18px 0; }
.release-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--gold)); transition: width 5s linear; }
.release-modal-actions { justify-content: flex-end; }
.tracking-shell { margin-top: 18px; }
.tracking-title {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: #fff; border: 1px solid var(--line); border-bottom: 0; padding: 16px 22px; border-radius: 8px 8px 0 0;
}
.tracking-title h2 { margin: 0; font-size: 28px; font-weight: 500; }
.route-strip {
    position: relative; height: 310px; overflow: hidden; border: 1px solid var(--line);
    background: #d8e8fb;
}
.route-map-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.map-land { fill: #dfe9d7; stroke: rgba(86,116,91,.28); stroke-width: 2; }
.map-coast { fill: none; stroke: rgba(86,116,91,.42); stroke-width: 2; stroke-dasharray: 7 9; }
.route-base { fill: none; stroke: #0d2a84; stroke-width: 5; stroke-dasharray: 10 12; opacity: .75; }
.route-progress-path { fill: none; stroke: #e50019; stroke-width: 6; stroke-linecap: round; }
.route-line {
    position: absolute; left: 7%; right: 8%; top: 48%; height: 5px; z-index: 2;
    background: #0d2a84; border-radius: 999px;
    display: none;
}
.route-progress {
    position: absolute; left: 0; top: 0; bottom: 0; width: 0;
    background: #e50019; border-radius: 999px;
}
.route-vessel {
    position: absolute; width: 48px; height: 24px; margin-left: -24px; margin-top: -12px; z-index: 4;
    background: #e50019; border: 3px solid #fff; border-radius: 4px 18px 18px 12px;
    box-shadow: 0 0 0 10px rgba(229,0,25,.12), 0 7px 18px rgba(0,0,0,.28);
    transform: rotate(8deg);
    transition: left .8s ease, top .8s ease;
    animation: ship-bob 1.8s ease-in-out infinite;
}
.route-vessel:before {
    content: ""; position: absolute; left: 8px; top: -12px; width: 21px; height: 12px;
    background: #fff; border: 2px solid #0d2a84; border-bottom: 0; border-radius: 4px 4px 0 0;
}
.route-vessel:after {
    content: ""; position: absolute; left: -30px; top: 14px; width: 26px; height: 7px;
    border-top: 2px solid rgba(13,42,132,.72); border-bottom: 2px solid rgba(13,42,132,.28);
    border-radius: 999px; animation: wake-flow 1.1s linear infinite;
}
.sea-route { fill: none; stroke: #0d2a84; stroke-width: 4; stroke-dasharray: 10 12; opacity: .9; }
.sea-route.done { stroke-dasharray: none; stroke-width: 5; }
.port-dot { position: absolute; width: 16px; height: 16px; border: 4px solid #0d2a84; background: #fff; border-radius: 50%; z-index: 3; }
.origin-dot { left: calc(9% - 10px); top: calc(64% - 10px); }
.dest-dot { right: calc(10% - 10px); top: calc(64% - 10px); background: #e50019; border-color: #fff; box-shadow: 0 0 0 4px rgba(229,0,25,.25); }
.map-label { position: absolute; z-index: 2; color: #0b2272; font-weight: 800; font-size: 14px; }
.map-label.origin { left: 4%; top: 70%; }
.map-label.dest { right: 4%; top: 70%; text-align: right; }
.map-label.current { left: 43%; top: 20%; text-align: center; font-size: 11px; color: #061b8c; }
.vessel-marker { position: absolute; z-index: 3; left: 46%; top: 45%; width: 26px; height: 14px; background: #e50019; border-radius: 3px; transform: rotate(-18deg); box-shadow: 0 0 0 18px rgba(42,110,230,.18); font-size: 0; color: transparent; }
.vessel-marker:after { content: ""; position: absolute; right: -7px; top: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 8px solid #e50019; }
.eta-box {
    position: absolute; right: 26%; top: 22%; z-index: 4; background: #061b8c; color: #fff;
    padding: 18px 22px; border-radius: 4px; box-shadow: 0 8px 22px rgba(0,0,0,.24);
}
.eta-box span, .eta-box small { display: block; font-size: 12px; opacity: .92; }
.eta-box strong { display: block; font-size: 18px; margin: 6px 0; }
.progress-chip {
    position: absolute; right: 18px; top: 18px; z-index: 4; background: #fff; color: #061b8c;
    border: 1px solid rgba(6,27,140,.18); border-radius: 999px; padding: 8px 14px; font-weight: 800;
}
.move-icon { display: inline-block; width: 12px; height: 12px; margin-right: 12px; border-radius: 50%; background: #e50019; vertical-align: middle; }
.move-icon.done { background: #0d2a84; }
@keyframes ship-bob {
    0%, 100% { transform: translateY(0) rotate(6deg); }
    50% { transform: translateY(-4px) rotate(10deg); }
}
@keyframes wake-flow {
    0% { opacity: .15; transform: translateX(8px) scaleX(.7); }
    50% { opacity: .75; }
    100% { opacity: .12; transform: translateX(-8px) scaleX(1.2); }
}
@media (max-width: 760px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .info-list { grid-template-columns: 1fr; }
    .page-hero { padding: 26px; }
    .topbar-inner { align-items: flex-start; flex-direction: column; padding: 14px 0; }
    table { display: block; overflow-x: auto; white-space: nowrap; }
    .hero { min-height: 460px; }
    .tracking-title { align-items: flex-start; flex-direction: column; }
    .route-strip { height: 330px; }
    .eta-box { left: 18px; right: 18px; top: 24px; }
    .origin-dot { left: calc(9% - 10px); top: calc(64% - 10px); }
    .dest-dot { right: calc(10% - 10px); top: calc(64% - 10px); }
    .map-label.origin, .map-label.dest { top: 72%; }
    .map-label.current { left: 34%; top: 43%; }
}
