/* DEOBOAT GPS Portal v3 */

:root {
    --navy: #001b46;
    --bg: #f5f7fb;
    --card: #ffffff;
    --muted: #667085;
    --line: #e5eaf0;
    --green: #13a05f;
    --orange: #e49b22;
    --red: #c93c3c;
    --shadow: 0 14px 35px rgba(0, 27, 70, 0.11);
    --radius: 18px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    background: radial-gradient(circle at top left, #fff 0, #f5f7fb 46%, #eef3f8 100%);
    color: var(--navy);
}

.topbar {
    background: rgba(255,255,255,0.96);
    border-bottom: 1px solid var(--line);
    padding: 20px 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: 0 8px 25px rgba(0, 27, 70, 0.06);
}

.brand { display: flex; align-items: center; gap: 16px; }
.logo { height: 54px; width: auto; }
.brand-title { font-size: 29px; font-weight: 850; letter-spacing: 4px; line-height: 1; }
.brand-subtitle { color: var(--muted); margin-top: 6px; font-size: 14px; }

.top-actions { display: flex; align-items: center; gap: 18px; }
.fleet-count {
    background: #f3f6fa;
    padding: 10px 16px;
    border-radius: 12px;
    text-align: center;
}
.fleet-count span { display: block; font-weight: 850; font-size: 24px; }
.fleet-count small { color: var(--muted); }

.refresh-btn {
    border: none;
    background: var(--navy);
    color: white;
    padding: 14px 22px;
    border-radius: 10px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 27, 70, 0.2);
}

.layout {
    max-width: 1480px;
    margin: 0 auto;
    padding: 28px 24px;
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 26px;
}

.sidebar {
    background: white;
    border-radius: 22px;
    padding: 18px;
    box-shadow: var(--shadow);
    align-self: start;
}

.panel-title {
    font-size: 18px;
    font-weight: 850;
    margin: 6px 4px 16px;
}

.boat-item {
    width: 100%;
    text-align: left;
    border: 1px solid var(--line);
    background: #fbfcfe;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    color: var(--navy);
}

.boat-item:hover,
.boat-item.active {
    border-color: var(--navy);
    background: #f4f8fc;
}

.boat-item-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}
.dot.ok { background: var(--green); }
.dot.danger { background: var(--red); }

.boat-meta {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-note {
    color: var(--muted);
    font-size: 13px;
    margin: 18px 4px 4px;
    line-height: 1.45;
}

code {
    background: #eef3f8;
    padding: 2px 5px;
    border-radius: 4px;
}

.hero {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 24px;
}

.hero-icon {
    background: white;
    height: 86px;
    width: 86px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.hero-icon img { width: 50px; }

.hero h1 { margin: 0; font-size: 42px; line-height: 1.05; }
.hero p { margin: 8px 0 0; font-size: 20px; color: var(--muted); }

.cards {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    min-height: 108px;
    box-shadow: var(--shadow);
}

.card-label { color: var(--muted); font-size: 13px; }
.card-value {
    margin-top: 10px;
    font-size: 23px;
    font-weight: 850;
    color: var(--navy);
    word-break: break-word;
}
.card-value.small { font-size: 18px; }
.card-value.tiny { font-size: 15px; }
.ok { color: var(--green) !important; }
.warning { color: var(--orange) !important; }
.danger { color: var(--red) !important; }

.map-card {
    background: white;
    padding: 10px;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

#map {
    height: 610px;
    border-radius: 16px;
    overflow: hidden;
}

.deo-marker { background: transparent; }
.marker-inner {
    width: 58px;
    height: 58px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: var(--navy);
    border: 4px solid white;
    box-shadow: 0 10px 25px rgba(0, 27, 70, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
}
.marker-inner img {
    width: 28px;
    transform: rotate(45deg);
}

.popup-brand {
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 850;
    color: var(--navy);
    margin-bottom: 4px;
}

.leaflet-popup-content { color: var(--navy); font-size: 14px; }
.leaflet-popup-content a { color: var(--navy); font-weight: 750; }

footer {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    padding: 0 0 40px;
}
.footer-logo {
    display: block;
    width: 34px;
    margin: 0 auto 10px;
}

@media (max-width: 1160px) {
    .layout { grid-template-columns: 1fr; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .topbar { flex-direction: column; align-items: flex-start; padding: 18px 20px; }
    .logo { height: 44px; }
    .brand-title { font-size: 22px; letter-spacing: 2px; }
    .top-actions { width: 100%; justify-content: space-between; }
    .layout { padding: 20px 14px; }
    .hero h1 { font-size: 31px; }
    .cards { grid-template-columns: 1fr; }
    #map { height: 470px; }
}
