:root {
    --ink: #172033;
    --muted: #667085;
    --line: #e5e7eb;
    --surface: #ffffff;
    --soft: #f5f7fb;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --warning: #b45309;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    text-decoration: none;
}

.public-page {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
}

.public-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.public-brand,
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--primary);
}

.public-main {
    display: grid;
    grid-template-columns: 380px 1fr;
    min-height: calc(100vh - 71px);
}

.finder-panel {
    background: var(--surface);
    border-right: 1px solid var(--line);
    padding: 22px;
    overflow-y: auto;
}

.finder-title {
    font-size: 1.35rem;
    font-weight: 750;
    margin-bottom: 6px;
}

.map-wrap {
    min-height: 520px;
}

#publicMap,
#adminMap {
    width: 100%;
    height: 100%;
    min-height: 520px;
}

#modalMap {
    width: 100%;
    height: 320px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #eef2f7;
}

.location-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.location-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.location-item:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(15, 118, 110, .08);
}

.location-item h3 {
    font-size: 1rem;
    margin: 0 0 4px;
}

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    color: var(--muted);
    font-size: .86rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: .78rem;
    font-weight: 700;
}

.status-tersedia {
    color: #047857;
    background: #d1fae5;
}

.status-terisi {
    color: #b45309;
    background: #fef3c7;
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 264px 1fr;
}

.sidebar {
    background: #111827;
    color: #fff;
    padding: 22px;
}

.sidebar .brand {
    margin-bottom: 28px;
}

.sidebar small {
    display: block;
    color: #aab1c0;
}

.sidebar .nav-link {
    color: #cbd5e1;
    border-radius: 8px;
    padding: 11px 12px;
    margin-bottom: 6px;
    display: flex;
    gap: 10px;
    align-items: center;
}

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

.content {
    min-width: 0;
    padding: 24px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.topbar h1 {
    font-size: 1.6rem;
    margin: 0;
    font-weight: 760;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.metric {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.metric span {
    color: var(--muted);
    font-size: .88rem;
}

.metric strong {
    display: block;
    font-size: 2rem;
    line-height: 1.1;
    margin-top: 8px;
}

.table > :not(caption) > * > * {
    vertical-align: middle;
}

.thumb {
    width: 64px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    background: #eef2f7;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(145deg, #eef7f6 0%, #f7fafc 52%, #eef2ff 100%);
}

.login-card {
    width: min(430px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .12);
}

@media (max-width: 992px) {
    .public-main,
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .public-main {
        grid-template-rows: auto 520px;
    }
}

@media (max-width: 640px) {
    .public-nav,
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .content,
    .finder-panel {
        padding: 16px;
    }
}
