:root {
    --bg-page: #f6faf7;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-muted: #edf5f0;
    --text-main: #103222;
    --text-muted: #5b7467;
    --border-color: #dce8e0;
    --primary: #229a58;
    --primary-hover: #1b8149;
    --primary-soft: rgba(34, 154, 88, 0.11);
    --aside-dark: #154d30;
}

html.dark {
    --bg-page: #0a1711;
    --bg-card: #102219;
    --bg-sidebar: #0d1c15;
    --bg-muted: #173024;
    --text-main: #e4f2ea;
    --text-muted: #8fb09e;
    --border-color: #203d2e;
    --primary: #2eb86b;
    --primary-hover: #229a58;
    --primary-soft: rgba(46, 184, 107, 0.16);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

.arka-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.arka-input, .arka-select, .arka-textarea {
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.arka-input:focus, .arka-select:focus, .arka-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(34, 154, 88, 0.16);
}

.arka-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all .15s;
    line-height: 1.3;
}
.arka-btn-primary { background: var(--primary); color: #fff; }
.arka-btn-primary:hover { background: var(--primary-hover); }
.arka-btn-outline {
    background: var(--bg-card);
    color: var(--text-main);
    border-color: var(--border-color);
}
.arka-btn-outline:hover { background: var(--bg-muted); }
.arka-btn-danger { background: #ef4444; color: #fff; }
.arka-btn-danger:hover { background: #dc2626; }
.arka-btn-sm { padding: 5px 10px; font-size: 12.5px; }

.arka-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 600;
}
.badge-blue { background: var(--primary-soft); color: var(--primary); }
.badge-green { background: rgba(34, 154, 88, 0.14); color: #1b8149; }
html.dark .badge-green { color: #4ade80; }
.badge-amber { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.badge-red { background: rgba(239, 68, 68, 0.13); color: #dc2626; }
.badge-slate { background: var(--bg-muted); color: var(--text-muted); }

/* Override residual Tailwind blue accents to soft Bimbel ARKA green */
.text-blue-600, .text-blue-500 { color: var(--primary) !important; }
.bg-blue-600, .bg-blue-500 { background-color: var(--primary) !important; }
.border-blue-600, .border-blue-500, .border-blue-400 { border-color: var(--primary) !important; }
.bg-blue-50 { background-color: var(--primary-soft) !important; }
.hover\:border-blue-400:hover, .hover\:border-blue-500:hover { border-color: var(--primary) !important; }
.hover\:bg-blue-50:hover { background-color: var(--primary-soft) !important; }

/* Autohide Admin Sidebar (slim 64px icon rail, expands smoothly on hover or pin) */
@media (min-width: 1024px) {
    .arka-autohide-sidebar {
        width: 68px !important;
        transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-x: hidden;
        position: sticky;
        top: 0;
        height: 100vh;
        z-index: 40;
    }
    .arka-autohide-sidebar:hover,
    .arka-autohide-sidebar.pinned {
        width: 244px !important;
        box-shadow: 4px 0 24px rgba(16, 50, 34, 0.08);
    }
    .arka-autohide-sidebar .sidebar-label {
        opacity: 0;
        width: 0;
        overflow: hidden;
        white-space: nowrap;
        transition: opacity 0.16s ease;
    }
    .arka-autohide-sidebar:hover .sidebar-label,
    .arka-autohide-sidebar.pinned .sidebar-label {
        opacity: 1;
        width: auto;
    }
    .arka-autohide-sidebar .nav-link-item {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }
    .arka-autohide-sidebar:hover .nav-link-item,
    .arka-autohide-sidebar.pinned .nav-link-item {
        justify-content: flex-start;
        padding-left: 12px;
        padding-right: 12px;
    }
}

.nav-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: all .15s;
}
.nav-link-item:hover { background: var(--bg-muted); color: var(--text-main); }
.nav-link-item.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}

.arka-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.arka-table th {
    text-align: left;
    padding: 11px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-muted);
}
.arka-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.arka-table tr:last-child td { border-bottom: none; }

@media print {
    .no-print { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
    .arka-card { border: 1px solid #ccc !important; box-shadow: none !important; }
}
