:root {
    /* Palet utama: teal profesional + netral hangat */
    --bg-0: #e2e8f0;
    --bg-1: #ecf4f2;
    --bg-2: #f0f4f8;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --text: #0f172a;
    --text-soft: #334155;
    --muted: #64748b;
    --accent: #0d9488;
    --accent-deep: #0f766e;
    --accent-glow: rgba(13, 148, 136, 0.12);
    --accent-border: rgba(13, 148, 136, 0.35);
    --violet: #6366f1;
    --amber: #d97706;
    --rose: #e11d48;
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 4px 6px rgba(15, 23, 42, 0.05), 0 12px 32px rgba(15, 23, 42, 0.08);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text);
    line-height: 1.55;
    background-color: var(--bg-2);
    background-image:
        radial-gradient(ellipse 120% 80% at 100% -20%, rgba(13, 148, 136, 0.09), transparent 50%),
        radial-gradient(ellipse 90% 60% at 0% 100%, rgba(99, 102, 241, 0.06), transparent 45%),
        linear-gradient(165deg, var(--bg-2) 0%, var(--bg-1) 40%, var(--bg-0) 100%);
    background-attachment: fixed;
}

.topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    position: sticky;
    top: 0;
    z-index: 20;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-strong);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, var(--shadow);
}

.brand {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    margin-right: auto;
    color: var(--accent-deep);
    background: linear-gradient(135deg, var(--accent-deep) 0%, #0ea5a0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-toggle {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 1.25rem;
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
    color: var(--text-soft);
    transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.nav-toggle:hover {
    border-color: var(--accent-border);
    color: var(--accent-deep);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 0.5rem;
}

body.nav-open .nav {
    display: flex;
}

.nav a {
    color: var(--text-soft);
    text-decoration: none;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    min-height: 44px;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav a:hover {
    color: var(--accent-deep);
    background: var(--accent-glow);
}

.nav a.active {
    color: var(--accent-deep);
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.14) 0%, rgba(99, 102, 241, 0.08) 100%);
    border: 1px solid var(--accent-border);
}

@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }
    .nav {
        display: flex;
        flex-direction: row;
        width: auto;
        padding-top: 0;
        gap: 0.35rem;
    }
    body.nav-open .nav {
        display: flex;
    }
}

.main {
    flex: 1;
    padding: 1rem 1rem 1.5rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.footer {
    padding: 1rem 1.25rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.5);
}

h1 {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
    color: var(--text);
}

h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
    color: var(--text-soft);
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.15rem 1.2rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-lg);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text-soft);
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.btn:hover {
    background: var(--surface-2);
    border-color: var(--muted);
    color: var(--text);
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(180deg, #14b8a6 0%, var(--accent) 100%);
    border-color: var(--accent-deep);
    color: #fff;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #2dd4bf 0%, #0d9488 100%);
    border-color: var(--accent-deep);
    color: #fff;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.4);
}

.btn-danger {
    background: linear-gradient(180deg, #f43f5e 0%, var(--rose) 100%);
    border-color: #be123c;
    color: #fff;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.25);
}

.btn-danger:hover {
    background: linear-gradient(180deg, #fb7185 0%, #e11d48 100%);
    color: #fff;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

input[type="text"],
input[type="search"],
input[type="password"],
select,
textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font: inherit;
    min-height: 44px;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea {
    min-height: 88px;
}

.form-grid {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 560px) {
    .form-grid.cols-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.25rem;
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table.data th,
table.data td {
    border-bottom: 1px solid var(--border);
    padding: 0.55rem 0.5rem;
    text-align: left;
    vertical-align: top;
}

table.data thead th {
    background: linear-gradient(180deg, #f1f5f9 0%, #e8eef4 100%);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    white-space: nowrap;
}

table.data tr:hover td {
    background: rgba(13, 148, 136, 0.04);
}

.badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #e0f2fe 0%, #e0f2f1 100%);
    color: var(--accent-deep);
    border: 1px solid var(--accent-border);
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dash-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 0.9rem 1rem;
    min-height: 88px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dash-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
    background: var(--accent);
    opacity: 0.85;
}

.dash-card:nth-child(2)::before {
    background: var(--violet);
}
.dash-card:nth-child(3)::before {
    background: var(--amber);
}
.dash-card:nth-child(4)::before {
    background: #059669;
}
.dash-card:nth-child(5)::before {
    background: #94a3b8;
}

.dash-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.dash-label {
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.35;
    padding-left: 0.25rem;
}

.dash-value {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.15;
    padding-left: 0.25rem;
}

.dash-hint {
    font-size: 0.85rem;
    color: var(--muted);
    margin: -0.25rem 0 1rem;
}

.msg {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.msg.ok {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
    border-color: rgba(5, 150, 105, 0.25);
}

.msg.err {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    color: #9f1239;
    border-color: rgba(225, 29, 72, 0.2);
}

.cards-mobile {
    display: none;
}

@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
    .cards-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    .team-card {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 0.85rem 1rem;
        box-shadow: var(--shadow);
    }
    .team-card dt {
        font-size: 0.75rem;
        color: var(--muted);
        margin: 0;
    }
    .team-card dd {
        margin: 0 0 0.5rem;
        color: var(--text-soft);
    }
    .team-card .actions {
        margin-top: 0.5rem;
    }
}
