/* RADIUS Admin — stil */

* { box-sizing: border-box; }

body {
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background: #f3f4f6;
    color: #111827;
}

a       { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
code    { background: #eef2ff; padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }

.muted  { color: #6b7280; }
.small  { font-size: 0.9em; }
.center { text-align: center; }
hr      { border: none; border-top: 1px solid #e5e7eb; margin: 24px 0; }

/* ---- topbar ---- */
.topbar {
    background: #111827;
    color: #fff;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.topbar .brand { font-weight: 700; font-size: 1.1em; margin-right: 10px; }
.topbar .mainnav a { color: #d1d5db; margin-right: 14px; font-weight: 500; }
.topbar .mainnav a.active { color: #fff; border-bottom: 2px solid #60a5fa; padding-bottom: 2px; }
.topbar .topright { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topbar .topright .muted { color: #9ca3af; }

.srvchip {
    background: #1f2937;
    color: #d1d5db;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85em;
}
.srvchip.active { background: #2563eb; color: #fff; }

/* ---- content ---- */
.content   { max-width: 1280px; margin: 24px auto; padding: 0 18px; }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
h2         { margin: 0 0 12px 0; }

/* ---- alerts ---- */
.alert       { padding: 10px 14px; border-radius: 6px; margin: 10px 0; }
.alert.ok    { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ---- cards ---- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}
.card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.card-head    { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.card .kv     { width: 100%; margin-top: 10px; border-collapse: collapse; }
.card .kv th  { text-align: left; font-weight: 500; color: #4b5563; padding: 4px 0; width: 55%; }
.card .kv td  { text-align: right; padding: 4px 0; }
.card-actions { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.card.status-fail { opacity: 0.85; }

.badge {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75em;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.badge.ok   { background: #d1fae5; color: #065f46; }
.badge.fail { background: #fee2e2; color: #991b1b; }

/* ---- tables ---- */
table.data {
    width: 100%;
    background: #fff;
    border-collapse: collapse;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
table.data th,
table.data td             { padding: 9px 10px; text-align: left; border-bottom: 1px solid #f1f5f9; font-size: 0.93em; }
table.data thead th       { background: #f9fafb; color: #374151; font-weight: 600; }
table.data tbody tr:hover { background: #fafbfc; }
a.sort                    { color: #374151; }

/* ---- filter / bulk ---- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 14px 0;
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.filter-bar input[type=text],
.filter-bar select        { padding: 7px 9px; border: 1px solid #d1d5db; border-radius: 5px; font-size: 0.95em; }
.filter-bar input[type=text] { flex: 1; min-width: 200px; }
.bulkbar { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.pager   { margin-top: 14px; text-align: center; }

/* ---- forms ---- */
.form {
    background: #fff;
    border-radius: 6px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    max-width: 680px;
}
.field        { margin-bottom: 14px; }
.field label  { display: block; margin-bottom: 4px; font-weight: 500; color: #374151; }
.field input[type=text],
.field input[type=password] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.95em;
}
.req          { color: #dc2626; }
.form-actions { margin-top: 14px; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    background: #fff;
    padding: 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ---- buttons ---- */
.btn {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 5px;
    background: #e5e7eb;
    color: #111827;
    border: none;
    cursor: pointer;
    font-size: 0.92em;
    text-decoration: none;
}
.btn:hover         { background: #d1d5db; text-decoration: none; }
.btn.primary       { background: #2563eb; color: #fff; }
.btn.primary:hover { background: #1d4ed8; }
.btn.danger        { background: #dc2626; color: #fff; }
.btn.danger:hover  { background: #b91c1c; }
.btn.small         { padding: 4px 10px; font-size: 0.82em; }

/* ---- login ---- */
.login-body {
    background: #111827;
    color: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}
.login-box {
    background: #1f2937;
    padding: 28px;
    border-radius: 8px;
    width: 340px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.login-box h1     { margin: 0 0 12px 0; font-size: 1.3em; }
.login-box label  { font-size: 0.85em; color: #9ca3af; margin-top: 6px; }
.login-box input  { padding: 10px; border-radius: 5px; border: 1px solid #374151; background: #111827; color: #fff; font-size: 0.95em; }
.login-box .btn   { margin-top: 14px; }
.login-box .alert { margin: 0 0 6px 0; }

/* ---- modal ---- */
#modal { display: none; position: fixed; inset: 0; z-index: 1000; }
#modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-box {
    position: relative;
    max-width: 680px;
    margin: 60px auto;
    background: #fff;
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head h3 { margin: 0; }
.modal-close {
    border: none;
    background: transparent;
    font-size: 1.6em;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
}
.modal-close:hover { color: #111827; }
.modal-loading { padding: 30px; text-align: center; color: #6b7280; }

/* ---- toast ---- */
#toaster {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    background: #111827;
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    min-width: 200px;
    max-width: 360px;
    animation: toast-in 0.2s ease-out;
}
.toast.ok    { background: #065f46; }
.toast.error { background: #991b1b; }
.toast.out   { animation: toast-out 0.3s ease-in forwards; }
@keyframes toast-in  { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toast-out { to { transform: translateX(20px); opacity: 0; } }

/* ---- clickable badge (aktif toggle) ---- */
.badge.clickable {
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 0.75em;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.badge.clickable:hover { opacity: 0.85; }
.badge.clickable:disabled { opacity: 0.5; cursor: wait; }

/* ---- dashboard refresh indicator ---- */
.refresh-ind { font-size: 0.8em; color: #6b7280; margin-left: 6px; }

/* ---- loading state ---- */
.loading { opacity: 0.5; transition: opacity 0.15s; }
