/* Sistem Manajemen KOL — gaya dasar, bersih & ringan. */
:root {
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --bg: #f5f6f8;
    --surface: #ffffff;
    --border: #e2e5ea;
    --text: #1f2733;
    --muted: #6b7280;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --radius: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Topbar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner {
    max-width: 1100px; margin: 0 auto; padding: 0 16px;
    display: flex; align-items: center; gap: 24px; height: 56px;
}
.brand { font-weight: 700; font-size: 16px; color: var(--text); }
.brand:hover { text-decoration: none; }
.mainnav { display: flex; gap: 4px; flex: 1; }
.mainnav a {
    padding: 8px 12px; border-radius: 6px; color: var(--muted); font-weight: 500;
}
.mainnav a:hover { background: var(--bg); text-decoration: none; }
.mainnav a.active { color: var(--accent); background: #eff4ff; }
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-name { font-weight: 500; }
.role-badge {
    font-size: 11px; text-transform: uppercase; letter-spacing: .03em;
    padding: 2px 8px; border-radius: 999px; font-weight: 600;
}
.role-superadmin { background: #fef3c7; color: #92400e; }
.role-karyawan { background: #e0e7ff; color: #3730a3; }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }
.footer { color: var(--muted); font-size: 12px; padding: 16px 0; text-align: center; }

.page-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; gap: 16px; flex-wrap: wrap;
}
.page-head h1 { font-size: 22px; margin: 0; }

/* Card */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
}
.card + .card { margin-top: 16px; }

/* Buttons */
.btn {
    display: inline-block; padding: 9px 16px; border-radius: 6px; border: 1px solid transparent;
    font-size: 14px; font-weight: 500; cursor: pointer; background: var(--accent); color: #fff;
    text-decoration: none; line-height: 1.2;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }

/* Forms */
.form-group { margin-bottom: 16px; }
label { display: block; font-weight: 500; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], select, textarea {
    width: 100%; padding: 9px 11px; border: 1px solid var(--border);
    border-radius: 6px; font-size: 14px; font-family: inherit; background: #fff;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #dbeafe;
}
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }

/* Table */
.table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table tbody tr:hover { background: #fafbfc; }
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

/* Alerts */
.alert { padding: 11px 14px; border-radius: 6px; margin-bottom: 16px; font-weight: 500; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-info { background: #dbeafe; color: #1e40af; }
.alert-warning { background: #fef3c7; color: #92400e; }

.errors { background: #fee2e2; color: #991b1b; border-radius: 6px; padding: 12px 14px; margin-bottom: 16px; }
.errors ul { margin: 0; padding-left: 18px; }

.muted { color: var(--muted); }
.text-right { text-align: right; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* Pills / badges */
.pill {
    display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px;
    border-radius: 999px; line-height: 1.5; margin-left: 4px; vertical-align: middle;
}
.pill-tier { background: #e0f2fe; color: #075985; }
.pill-pol { background: #fef3c7; color: #92400e; }
.pill-live { background: #ede9fe; color: #5b21b6; }
.pill-danger { background: #fee2e2; color: #991b1b; }
.pill-muted { background: #f1f5f9; color: #475569; }
.pill-success { background: #dcfce7; color: #166534; }

hr.sep { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }
dl.kv { margin: 0; }
dl.kv div { display: flex; padding: 6px 0; border-bottom: 1px solid var(--border); }
dl.kv dt { width: 160px; color: var(--muted); flex-shrink: 0; }
dl.kv dd { margin: 0; }

/* Login */
.login-wrap { max-width: 380px; margin: 8vh auto; }
.login-wrap .brand-lg { text-align: center; font-size: 20px; font-weight: 700; margin-bottom: 24px; }
