@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ═══════════════════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════════════════ */
:root {
    /* Surfaces */
    --bg:           #f0f4f8;
    --surface:      #ffffff;
    --surface-2:    #f8fafc;
    --border:       #e2e8f0;
    --border-strong:#cbd5e1;

    /* Text */
    --text:         #0f172a;
    --text-2:       #334155;
    --text-muted:   #64748b;
    --text-dim:     #94a3b8;

    /* Brand */
    --primary:      #1d4ed8;
    --primary-h:    #1e40af;
    --primary-dim:  rgba(29,78,216,.08);
    --primary-ring: rgba(29,78,216,.2);

    /* Semantic */
    --success:      #059669;
    --success-dim:  rgba(5,150,105,.08);
    --warning:      #d97706;
    --warning-dim:  rgba(217,119,6,.08);
    --danger:       #dc2626;
    --danger-dim:   rgba(220,38,38,.08);
    --info:         #0891b2;
    --info-dim:     rgba(8,145,178,.08);

    /* Nav */
    --nav-bg:       #0f172a;
    --nav-accent:   #3b82f6;

    /* Radius */
    --r-sm: 6px;
    --r:    10px;
    --r-lg: 14px;

    /* Shadow */
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow:    0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.05);
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 5rem;
    font-size: 15px;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════════════════════ */
nav {
    background: var(--nav-bg);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 4px 12px rgba(0,0,0,.3);
    overflow-x: auto;
    scrollbar-width: none;
}
nav::-webkit-scrollbar { display: none; }

nav .logo {
    color: #f8fafc;
    font-weight: 800;
    font-size: .88rem;
    letter-spacing: -.02em;
    margin-right: 1rem;
    padding: 1rem 0;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: .5rem;
}
nav .logo .logo-icon {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--nav-accent), #6366f1);
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}
nav a {
    color: #94a3b8;
    text-decoration: none;
    padding: .875rem .75rem;
    font-size: .8rem;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
    flex-shrink: 0;
}
nav a:hover  { color: #e2e8f0; }
nav a.active { color: #fff; border-bottom-color: var(--nav-accent); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════
   PAGE HERO
═══════════════════════════════════════════════════════════════ */
.page-hero {
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
    padding: 2.5rem 2rem 2.75rem;
    text-align: center;
    border-bottom: 3px solid var(--primary);
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 60% 80% at 50% 120%, rgba(59,130,246,.15), transparent);
    pointer-events: none;
}
.page-hero h1 {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.03em;
    margin-bottom: .375rem;
    position: relative;
}
.page-hero p {
    color: #94a3b8;
    font-size: .9rem;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.65;
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════
   CONTAINER
═══════════════════════════════════════════════════════════════ */
.container { max-width: 700px; margin: 0 auto; padding: 2rem 1.25rem; }
.container.wide { max-width: 960px; }
.container.dashboard { max-width: 900px; }

/* ═══════════════════════════════════════════════════════════════
   CARD
═══════════════════════════════════════════════════════════════ */
.card {
    background: var(--surface);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 1.25rem;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.01em;
}
.card-subtitle { font-size: .8rem; color: var(--text-muted); margin-top: .15rem; }

/* Collapsible card */
.card-step { border-left: 3px solid var(--border); padding-left: 1rem; }
.card-step.active  { border-left-color: var(--primary); }
.card-step.done    { border-left-color: var(--success); }
.card-step.blocked { border-left-color: #e2e8f0; opacity: .55; pointer-events: none; }

/* ═══════════════════════════════════════════════════════════════
   PERMOHONAN LIST ITEM
═══════════════════════════════════════════════════════════════ */
.perm-item {
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: .75rem;
    background: var(--surface);
    transition: box-shadow .15s, border-color .15s;
    overflow: hidden;
}
.perm-item:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }

.perm-item-header {
    padding: .875rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: .875rem;
}
.perm-avatar {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1d4ed8, #6366f1);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: .9rem;
    flex-shrink: 0;
}
.perm-info { flex: 1; min-width: 0; }
.perm-name {
    font-weight: 700;
    font-size: .9rem;
    color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.perm-meta {
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: .15rem;
    display: flex; gap: .75rem; flex-wrap: wrap;
}

.perm-item-body {
    padding: 0 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .625rem;
}

.perm-item-actions {
    padding: .75rem 1rem;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.perm-item-actions.hidden { display: none; }

/* ═══════════════════════════════════════════════════════════════
   STATUS BADGE
═══════════════════════════════════════════════════════════════ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .6rem;
    border-radius: 9999px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: capitalize;
    border: 1px solid transparent;
    white-space: nowrap;
}
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; flex-shrink: 0; }

/* Status color map — matched to APSStatus constants */
.s-draft               { background:#f1f5f9; color:#475569; border-color:#e2e8f0; }
.s-diajukan            { background:#eff6ff; color:#1d4ed8; border-color:#bfdbfe; }
.s-dikembalikan        { background:#fef2f2; color:#dc2626; border-color:#fecaca; }
.s-unit                { background:#f0fdf4; color:#059669; border-color:#86efac; }
.s-bast                { background:#f0fdfa; color:#0d9488; border-color:#99f6e4; }
.s-ikatan-dinas        { background:#fff7ed; color:#c2410c; border-color:#fed7aa; }
.s-exit-interview      { background:#fdf4ff; color:#7e22ce; border-color:#e9d5ff; }
.s-kabiro              { background:#fffbeb; color:#b45309; border-color:#fde68a; }
.s-pokja               { background:#fff7ed; color:#c2410c; border-color:#fed7aa; }
.s-tim                 { background:#f0fdf4; color:#15803d; border-color:#86efac; }
.s-jf                  { background:#ecfeff; color:#0e7490; border-color:#a5f3fc; }
.s-penetapan           { background:#eef2ff; color:#4338ca; border-color:#c7d2fe; }
.s-selesai             { background:#f0fdf4; color:#166534; border-color:#86efac; }
.s-ditolak             { background:#fef2f2; color:#991b1b; border-color:#fecaca; }
.s-ditunda             { background:#fafaf9; color:#78716c; border-color:#d6d3d1; }

.badge-dhp { background:#dcfce7; color:#166534; border:1px solid #86efac; padding:.15rem .55rem; border-radius:9999px; font-size:.68rem; font-weight:700; }
.badge-thp { background:#fef3c7; color:#92400e; border:1px solid #fde68a; padding:.15rem .55rem; border-radius:9999px; font-size:.68rem; font-weight:700; }
.badge-gol { background:#dbeafe; color:#1e40af; border:1px solid #bfdbfe; padding:.15rem .55rem; border-radius:9999px; font-size:.68rem; font-weight:700; }

/* ═══════════════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 1rem; }
.form-group:last-child { margin-bottom: 0; }

label {
    display: block;
    font-weight: 600;
    font-size: .8rem;
    color: var(--text-2);
    margin-bottom: .375rem;
}
label .required { color: var(--danger); margin-left: .2rem; }

input[type="text"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: .625rem .875rem;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    font-family: inherit;
    font-size: .875rem;
    color: var(--text);
    background: var(--surface);
    transition: border-color .18s, box-shadow .18s;
    outline: none;
    resize: vertical;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}
input[readonly], input:disabled, textarea:disabled, select:disabled {
    background: var(--surface-2);
    color: var(--text-muted);
    cursor: not-allowed;
    border-style: dashed;
}
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button { display: none; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .875rem; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }

/* Inline small input (inside action sections) */
.input-sm {
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-family: inherit;
    font-size: .8rem;
    color: var(--text);
    background: var(--surface);
    outline: none;
    resize: vertical;
    transition: border-color .18s;
    margin-bottom: .375rem;
}
.input-sm:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-ring); }

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .625rem 1.125rem;
    border-radius: var(--r-sm);
    border: none;
    font-family: inherit;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, box-shadow .15s, opacity .15s, transform .1s;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    line-height: 1.2;
}
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.btn:not(:disabled):active { transform: scale(.97); }
.btn.full { width: 100%; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:not(:disabled):hover { background: var(--primary-h); box-shadow: 0 4px 12px rgba(29,78,216,.3); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:not(:disabled):hover { background: #047857; box-shadow: 0 4px 12px rgba(5,150,105,.3); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:not(:disabled):hover { background: #b91c1c; box-shadow: 0 4px 12px rgba(220,38,38,.3); }

.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:not(:disabled):hover { background: #b45309; box-shadow: 0 4px 12px rgba(217,119,6,.3); }

.btn-secondary { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.btn-secondary:not(:disabled):hover { background: var(--bg); border-color: var(--border-strong); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:not(:disabled):hover { background: var(--surface-2); color: var(--text-2); }

.btn-group { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Loader inside button */
.btn .btn-loader {
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: none;
    flex-shrink: 0;
}
.btn.btn-secondary .btn-loader,
.btn.btn-ghost .btn-loader { border-color: rgba(0,0,0,.15); border-top-color: var(--text-muted); }
.btn.loading { pointer-events: none; }
.btn.loading .btn-loader { display: inline-block; }
.btn.loading .btn-text { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════
   ALERT
═══════════════════════════════════════════════════════════════ */
.alert {
    padding: .875rem 1rem;
    border-radius: var(--r);
    font-size: .85rem;
    line-height: 1.55;
    margin-bottom: 1rem;
    display: flex;
    gap: .75rem;
    align-items: flex-start;
}
.alert-icon { font-size: 1.1rem; flex-shrink: 0; line-height: 1.4; }
.alert-content { flex: 1; }
.alert-content strong { font-weight: 700; display: block; margin-bottom: .15rem; }
.alert-success { background: var(--success-dim); border: 1px solid #86efac; color: #14532d; }
.alert-error   { background: var(--danger-dim);  border: 1px solid #fca5a5; color: #7f1d1d; }
.alert-info    { background: var(--primary-dim);  border: 1px solid #93c5fd; color: #1e3a8a; }
.alert-warning { background: var(--warning-dim);  border: 1px solid #fde68a; color: #78350f; }
#alert-container .alert { animation: alertIn .2s ease; }
@keyframes alertIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATION SYSTEM
═══════════════════════════════════════════════════════════════ */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: .625rem;
    align-items: flex-end;
    pointer-events: none;
}
.toast {
    background: #1e293b;
    color: #f1f5f9;
    padding: .75rem 1rem;
    border-radius: var(--r);
    font-size: .82rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    max-width: 340px;
    pointer-events: all;
    animation: toastIn .25s cubic-bezier(.34,1.56,.64,1);
    border-left: 3px solid var(--primary);
}
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error   { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast-icon { font-size: 1rem; flex-shrink: 0; line-height: 1.3; }
.toast-body { flex: 1; }
.toast-title { font-weight: 700; font-size: .8rem; margin-bottom: .1rem; }
.toast-msg   { color: #94a3b8; font-size: .78rem; line-height: 1.4; }
.toast-out { animation: toastOut .2s ease forwards; }
@keyframes toastIn  { from { opacity:0; transform:translateX(20px) scale(.95); } to { opacity:1; transform:none; } }
@keyframes toastOut { to   { opacity:0; transform:translateX(20px); } }

/* ═══════════════════════════════════════════════════════════════
   ACTION SECTION (inside permohonan item)
═══════════════════════════════════════════════════════════════ */
.action-box {
    border: 1.5px solid var(--border);
    border-radius: var(--r);
    padding: .875rem 1rem;
    background: var(--surface);
}
.action-box.action-primary { border-color: #93c5fd; background: #eff6ff; }
.action-box.action-success { border-color: #86efac; background: #f0fdf4; }
.action-box.action-warning { border-color: #fde68a; background: #fffbeb; }
.action-box.action-danger  { border-color: #fca5a5; background: #fef2f2; }
.action-box.action-info    { border-color: #a5f3fc; background: #ecfeff; }
.action-box.action-purple  { border-color: #ddd6fe; background: #f5f3ff; }

.action-box-title {
    font-size: .78rem;
    font-weight: 700;
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}
.action-box p {
    font-size: .78rem;
    color: var(--text-muted);
    margin-bottom: .625rem;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   TIMELINE (audit trail)
═══════════════════════════════════════════════════════════════ */
.timeline {
    position: relative;
    padding-left: 1.25rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 5px; top: 6px; bottom: 0;
    width: 1px;
    background: var(--border);
}
.timeline-item {
    position: relative;
    padding-bottom: 1rem;
    padding-left: .875rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -14px; top: 5px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--border-strong);
    border: 2px solid var(--surface);
}
.timeline-item.latest::before { background: var(--primary); }
.timeline-date { font-size: .7rem; color: var(--text-dim); margin-bottom: .15rem; }
.timeline-title { font-size: .8rem; font-weight: 600; color: var(--text-2); }
.timeline-note { font-size: .75rem; color: var(--text-muted); margin-top: .15rem; line-height: 1.45; }
.timeline-by { font-size: .68rem; color: var(--text-dim); margin-top: .2rem; }

/* ═══════════════════════════════════════════════════════════════
   CONFIG PANEL
═══════════════════════════════════════════════════════════════ */
.config-panel {
    background: var(--surface);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.config-panel summary {
    cursor: pointer;
    font-weight: 600;
    font-size: .82rem;
    color: var(--text-muted);
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.config-panel[open] summary { color: var(--text); margin-bottom: 1rem; }
.config-panel summary::-webkit-details-marker { display: none; }
.config-panel summary::after { content: '▾'; font-size: .7rem; margin-left: auto; }
.config-panel[open] summary::after { transform: rotate(180deg); display: inline-block; }

/* ═══════════════════════════════════════════════════════════════
   ROUTING INFO BOX
═══════════════════════════════════════════════════════════════ */
.routing-box {
    padding: .5rem .875rem;
    background: var(--primary-dim);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    font-size: .78rem;
    font-weight: 600;
    color: #1e3a8a;
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE / PLACEHOLDER
═══════════════════════════════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: .75rem; opacity: .5; }
.empty-state p { font-size: .875rem; }

/* ═══════════════════════════════════════════════════════════════
   DETAIL EXPAND
═══════════════════════════════════════════════════════════════ */
.detail-expand {
    display: none;
    margin-top: .5rem;
    background: #0f172a;
    border-radius: var(--r-sm);
    padding: .875rem 1rem;
    overflow-x: auto;
}
.detail-expand pre {
    margin: 0;
    font-size: .72rem;
    color: #67e8f9;
    font-family: ui-monospace, SFMono-Regular, monospace;
    white-space: pre-wrap;
    word-break: break-all;
}
.detail-expand.open { display: block; }

/* ═══════════════════════════════════════════════════════════════
   SEPARATOR & MISC
═══════════════════════════════════════════════════════════════ */
.sep { height: 1px; background: var(--border); margin: 1rem 0; }
.mono { font-family: ui-monospace, SFMono-Regular, monospace; font-size: .82em; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: .82rem; }
.fw-bold { font-weight: 700; }

/* Scrollable list container */
.list-scroll { max-height: 560px; overflow-y: auto; padding-right: .25rem; }
.list-scroll::-webkit-scrollbar { width: 4px; }
.list-scroll::-webkit-scrollbar-track { background: transparent; }
.list-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

/* ═══════════════════════════════════════════════════════════════
   SHARED JS UTILITIES (inline script tag style)
═══════════════════════════════════════════════════════════════ */
/* Toast container injected by JS */

/* ═══════════════════════════════════════════════════════════════
   HUKUMAN DISIPLIN SNAPSHOT COMPONENTS
═══════════════════════════════════════════════════════════════ */

/* Section label (used inside action boxes) */
.hukdis-section-label {
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: .75rem 0 .375rem;
}

/* Container holding 1+ hukdis-card elements */
.hukdis-snapshot-list {
    display: flex;
    flex-direction: column;
    gap: .625rem;
}

/* Individual hukdis record card */
.hukdis-card {
    background: #fff;
    border: 1.5px solid #fca5a5;
    border-radius: 8px;
    overflow: hidden;
}

/* Card header: index badge + tingkat + status chip */
.hukdis-card-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: #fef2f2;
    padding: .5rem .75rem;
    border-bottom: 1px solid #fca5a5;
}
.hukdis-index {
    font-size: .72rem;
    font-weight: 700;
    color: #991b1b;
    background: #fee2e2;
    border-radius: 4px;
    padding: .1rem .4rem;
    font-family: ui-monospace, monospace;
}
.hukdis-tingkat {
    font-weight: 600;
    font-size: .85rem;
    color: #7f1d1d;
    flex: 1;
}

/* Status chips */
.hukdis-chip {
    font-size: .7rem;
    font-weight: 700;
    border-radius: 999px;
    padding: .15rem .55rem;
    letter-spacing: .02em;
}
.hukdis-chip-aktif  { background: #fee2e2; color: #991b1b; }
.hukdis-chip-batal  { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* 2-column property grid inside card */
.hukdis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: .5rem;
}
@media (max-width: 640px) {
    .hukdis-grid { grid-template-columns: 1fr; }
}
.hukdis-field {
    padding: .35rem .5rem;
    border-bottom: 1px solid #fef2f2;
    border-right: 1px solid #fef2f2;
}
.hukdis-field:nth-child(even) { border-right: none; }
.hukdis-full { grid-column: 1 / -1; border-right: none; }
.hukdis-label {
    font-size: .7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: .1rem;
}
.hukdis-value {
    font-size: .83rem;
    color: var(--text-2);
    line-height: 1.4;
}
.hukdis-value.mono { font-family: ui-monospace, SFMono-Regular, monospace; font-size: .78rem; }

/* ── Happy-path: clean / zero records panel ────────────────── */
.hukdis-clean {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 8px;
    padding: .75rem 1rem;
    margin-top: .375rem;
}
.hukdis-clean-icon { font-size: 1.5rem; flex-shrink: 0; }

/* Meta row: shows timestamp + source + count */
.hukdis-clean-result { margin-top: .5rem; }
.hukdis-clean-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem .875rem;
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: .5rem;
    padding: .375rem .5rem;
    background: rgba(5,150,105,.06);
    border-radius: 6px;
    border: 1px solid rgba(5,150,105,.15);
}
.hukdis-clean-meta strong { color: #065f46; }
