/* =============================================
   LPPM PORTAL — Design System v4

   ⚡ ATURAN WAJIB DESAIN:
   1. Semua komponen WAJIB responsif (mobile-first).
   2. Ikon default adalah SVG OUTLINE (Lucide via ic() helper).
   3. Ikon proporsional: stroke 1.75px, ukuran ikut --icon-*.
   4. Touch target minimum 40px di mobile.
   ============================================= */

/* 1. Fonts & Root Variables */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Sidebar */
    --sb-bg:      #0f172a;
    --sb-hover:   rgba(255,255,255,0.06);
    --sb-active:  rgba(99,102,241,0.18);
    --sb-text:    #94a3b8;
    --sb-active-text: #a5b4fc;
    --sb-accent:  #6366f1;
    --sb-brand:   #e2e8f0;
    --sb-border:  rgba(255,255,255,0.06);

    /* Content */
    --bg:         #f0f4f8;
    --surface:    #ffffff;
    --border:     #e2e8f0;
    --text:       #0f172a;
    --muted:      #64748b;

    /* Tokens */
    --blue:   #3b82f6;
    --green:  #10b981;
    --amber:  #f59e0b;
    --red:    #ef4444;
    --indigo: #6366f1;
    --radius: 14px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);

    /* Icon sizing tokens (proporsional) */
    --icon-xs:  14px;
    --icon-sm:  16px;
    --icon-md:  18px;
    --icon-lg:  22px;
    --icon-xl:  28px;
    --icon-2xl: 36px;
    --icon-stroke: 1.75;

    /* Fluid type scale */
    --fs-xs:   clamp(0.65rem, 0.6rem + 0.15vw, 0.72rem);
    --fs-sm:   clamp(0.72rem, 0.68rem + 0.18vw, 0.82rem);
    --fs-base: clamp(0.82rem, 0.76rem + 0.25vw, 0.92rem);
    --fs-md:   clamp(0.9rem, 0.82rem + 0.3vw, 1rem);
    --fs-lg:   clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
    --fs-xl:   clamp(1.2rem, 1rem + 0.6vw, 1.5rem);
    --fs-2xl:  clamp(1.4rem, 1.1rem + 0.9vw, 1.85rem);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Poppins', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: var(--fs-base);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    overflow-x: hidden;
}

img, svg { max-width: 100%; }

/* =============================================
   1B. UNIFIED ICON SYSTEM — Outline first
   Works for both inline SVG (Lucide/.lucide-icon)
   and Font Awesome. Use .icon + size modifier.
   ============================================= */

/* Base inline-SVG icon produced by ic() */
.lucide-icon,
svg.icon {
    width: var(--icon-md);
    height: var(--icon-md);
    stroke: currentColor;
    fill: none;
    stroke-width: var(--icon-stroke);
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    vertical-align: -0.15em;
    transition: transform 0.15s ease, color 0.15s ease;
}

/* Lucide icon normalization */

/* Size modifiers (pakai sebagai tambahan di <svg> atau <i>) */
.icon-xs  { width: var(--icon-xs)  !important; height: var(--icon-xs)  !important; font-size: var(--icon-xs)  !important; }
.icon-sm  { width: var(--icon-sm)  !important; height: var(--icon-sm)  !important; font-size: var(--icon-sm)  !important; }
.icon-md  { width: var(--icon-md)  !important; height: var(--icon-md)  !important; font-size: var(--icon-md)  !important; }
.icon-lg  { width: var(--icon-lg)  !important; height: var(--icon-lg)  !important; font-size: var(--icon-lg)  !important; }
.icon-xl  { width: var(--icon-xl)  !important; height: var(--icon-xl)  !important; font-size: var(--icon-xl)  !important; }
.icon-2xl { width: var(--icon-2xl) !important; height: var(--icon-2xl) !important; font-size: var(--icon-2xl) !important; }

/* Icon container (square chip) — selalu proporsional dengan ikon */
.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5em;
    height: 2.5em;
    border-radius: calc(var(--radius) - 4px);
    background: rgba(99,102,241,0.08);
    color: var(--indigo);
    flex-shrink: 0;
}
.icon-box > .lucide-icon,
.icon-box > svg.icon,
.icon-box > i { font-size: 1em; }

/* =============================================
   2. SIDEBAR — Powered by Bootstrap col-md-2
   ============================================= */

.sidebar {
    background: var(--sb-bg) !important;
    min-height: 100vh;
    padding: 0 !important;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--sb-border);
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 3px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.12); }

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.25rem 0.85rem 1rem;
}

/* Logo */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.25rem 0.75rem 1.5rem;
}
.sidebar-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99,102,241,0.35);
}
.sidebar-logo .logo-icon svg {
    width: 16px;
    height: 16px;
    color: #fff;
    stroke-width: 2;
}
.sidebar-logo-text {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--sb-brand);
    letter-spacing: 0.3px;
    line-height: 1.2;
}
.sidebar-logo-sub {
    font-size: 0.58rem;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
}

/* Nav Links (top-level) */
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.55rem 0.75rem;
    color: var(--sb-text);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none !important;
    border-radius: 10px;
    transition: all 0.15s;
    white-space: nowrap;
    min-height: 38px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    position: relative;
}
.nav-link:hover {
    background: var(--sb-hover);
    color: #e2e8f0;
}
.nav-link svg,
.nav-link i {
    flex-shrink: 0;
    width: var(--icon-md);
    height: var(--icon-md);
    stroke-width: var(--icon-stroke);
    opacity: 0.85;
}
.nav-link.active {
    background: var(--sb-active);
    color: var(--sb-active-text);
    font-weight: 600;
}
.nav-link.active svg {
    opacity: 1;
}

/* Gold active indicator */
.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 8px rgba(251,191,36,0.4);
}
.nav-link:hover:not(.active)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 40%;
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
    border-radius: 0 3px 3px 0;
    opacity: 0.6;
}

/* Collapsible Nav Groups */
.nav-group {
    margin-bottom: 2px;
}
.nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.55rem 0.75rem;
    color: var(--sb-text);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.15s;
    white-space: nowrap;
    min-height: 38px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    position: relative;
}
.nav-group-toggle:hover {
    background: var(--sb-hover);
    color: #e2e8f0;
}
.nav-group-toggle svg:not(.nav-chevron) {
    width: var(--icon-md);
    height: var(--icon-md);
    flex-shrink: 0;
    stroke-width: var(--icon-stroke);
    opacity: 0.85;
}
.nav-group-toggle .nav-chevron {
    width: 14px;
    height: 14px;
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.25s ease;
    opacity: 0.5;
    stroke-width: 2;
}
.nav-group-toggle[aria-expanded="true"] .nav-chevron {
    transform: rotate(180deg);
    opacity: 0.8;
}

/* Sub-items container - expanded by default, collapsed when .collapsed class added */
.nav-group-items {
    max-height: 300px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease;
    opacity: 1;
    padding-left: 0;
}
.nav-group-items.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Sub-items (nested links) */
.nav-link.nav-sub {
    padding: 0.45rem 0.75rem 0.45rem 2.5rem;
    font-size: 0.75rem;
    font-weight: 400;
    min-height: 34px;
    color: var(--sb-text);
    opacity: 0.8;
    position: relative;
}
.nav-link.nav-sub::before {
    content: '';
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--sb-text);
    opacity: 0.3;
    transition: all 0.15s;
}
.nav-link.nav-sub:hover {
    opacity: 1;
    background: var(--sb-hover);
    color: #e2e8f0;
}
.nav-link.nav-sub:hover::before {
    opacity: 0.7;
}
.nav-link.nav-sub.active {
    opacity: 1;
    color: var(--sb-active-text);
    font-weight: 600;
    background: var(--sb-active);
}
.nav-link.nav-sub.active::before {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
    opacity: 1;
    width: 16px;
    height: 3px;
    border-radius: 2px;
    box-shadow: 0 0 6px rgba(251,191,36,0.3);
}
.nav-link.nav-sub.active:hover::before {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

/* Footer */
.sidebar-footer-divider {
    height: 1px;
    background: var(--sb-border);
    margin: 0.5rem 0.5rem;
    opacity: 0.5;
}
.sidebar-footer {
    margin-top: auto;
    padding-top: 0.5rem;
}
.nav-link.nav-footer {
    font-size: 0.78rem;
}
.nav-link.nav-logout {
    color: #f87171;
}
.nav-link.nav-logout:hover {
    background: rgba(248,113,113,0.08);
    color: #fca5a5;
}

/* Dark mode */
[data-theme="dark"] .sidebar-logo-sub { color: #6b7280; }
[data-theme="dark"] .nav-link.nav-sub::before { background: #9ca3af; }
[data-theme="dark"] .nav-link.active::before {
    box-shadow: 0 0 8px rgba(251,191,36,0.5);
}
[data-theme="dark"] .nav-link.nav-sub.active::before {
    box-shadow: 0 0 6px rgba(251,191,36,0.4);
}
[data-theme="dark"] .nav-link:hover:not(.active)::before {
    opacity: 0.4;
}
[data-theme="dark"] .nav-link.nav-sub.active::before { background: #e2e8f0; }

/* Language Toggle (in sidebar, legacy) */
.lang-toggle {
    display: flex;
    gap: 4px;
    padding: 0.5rem 0.75rem 1rem;
}
.lang-toggle a {
    flex: 1;
    text-align: center;
    padding: 5px 0;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    color: var(--sb-text);
    background: rgba(255,255,255,0.04);
    transition: 0.15s;
}
.lang-toggle a.active-lang {
    background: var(--sb-accent);
    color: white;
}

/* =============================================
   3. MAIN CONTENT
   ============================================= */
.main-content {
    padding: 0 clamp(1rem, 2.5vw, 2.5rem) 0;
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.main-content .page-header,
.main-content > .row:first-of-type,
.main-content > .card-custom:first-of-type,
.main-content > .alert:first-of-type,
.main-content > div[style*="padding"]:first-of-type {
    margin-top: 2rem;
}
.content-body { padding-top: 2rem; padding-bottom: 2rem; flex: 1 0 auto; }

/* Row full viewport height */
.container-fluid > .row {
    min-height: 100vh;
}

/* =============================================
   3b. GLOBAL TOP BAR
   ============================================= */
.topbar {
    padding: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 900;
    transition: background 0.2s, border-color 0.2s;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem clamp(1rem, 2.5vw, 2.5rem);
    gap: 0.75rem;
    min-height: 60px;
}

/* Left section */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.breadcrumb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--indigo), #8b5cf6);
    color: #fff;
    flex-shrink: 0;
}

.breadcrumb-icon svg {
    width: 14px;
    height: 14px;
}

.topbar-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.breadcrumb-sep {
    color: var(--muted);
    font-size: 0.75rem;
    opacity: 0.5;
}

.topbar-page {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Right section */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* Language Toggle */
.topbar-lang {
    display: flex;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.topbar-lang a {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: none !important;
    color: var(--muted);
    transition: 0.15s;
    letter-spacing: 0.3px;
    min-width: 32px;
    text-align: center;
}

.topbar-lang a.active-lang {
    background: var(--indigo);
    color: white;
}

/* Icon buttons */
.topbar-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: var(--icon-md);
    transition: all 0.15s;
    flex-shrink: 0;
    padding: 0;
    position: relative;
}

.topbar-icon-btn:hover {
    background: var(--indigo);
    color: white;
    border-color: var(--indigo);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.2);
}

.topbar-icon-btn i,
.topbar-icon-btn svg {
    width: var(--icon-md);
    height: var(--icon-md);
    font-size: var(--icon-md);
}

/* Notification Bell */
.topbar-bell .bell-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid var(--bg);
    animation: bellPulse 2s ease-in-out infinite;
}

@keyframes bellPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Avatar Button */
.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0.6rem 0.3rem 0.3rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.topbar-user:hover,
.topbar-user:focus {
    border-color: var(--indigo);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
    background: var(--surface);
}

.topbar-user::after {
    display: none !important;
}

.topbar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--indigo), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.topbar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar-user-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.topbar-user-role {
    font-size: 0.62rem;
    color: var(--muted);
    font-weight: 500;
}

.avatar-initial {
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

/* Dropdown Menu */
.topbar-dropdown {
    min-width: 220px;
    border-radius: 14px !important;
    padding: 0.25rem 0;
    background: var(--surface);
    border: 1px solid var(--border) !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12) !important;
    margin-top: 8px !important;
}

.topbar-dropdown .dropdown-header {
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(59,130,246,0.06));
    border-radius: 10px;
    margin: 0.25rem;
}

.topbar-dropdown .dropdown-item {
    font-size: 0.83rem;
    font-weight: 500;
    padding: 0.6rem 1rem;
    color: var(--text);
    border-radius: 8px;
    margin: 0 0.25rem;
    transition: background 0.1s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-dropdown .dropdown-item i,
.topbar-dropdown .dropdown-item svg {
    width: var(--icon-sm);
    height: var(--icon-sm);
    font-size: var(--icon-sm);
}

.topbar-dropdown .dropdown-item:hover { background: var(--bg); }
.topbar-dropdown .dropdown-item.text-danger:hover { background: rgba(239,68,68,0.08); }
.topbar-dropdown .dropdown-divider { border-color: var(--border); }

/* =============================================
   4. PAGE COMPONENTS
   ============================================= */

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
    flex-wrap: wrap;
}
.page-header-title {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}
.page-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--ph-accent, var(--indigo)), var(--ph-accent-2, #8b5cf6));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--ph-accent, var(--indigo)) 28%, transparent);
}
.page-header-icon svg,
.page-header-icon i {
    width: 24px;
    height: 24px;
    font-size: 20px;
    stroke-width: 1.75;
}
/* Accent variants — pick per page */
.page-header[data-accent="indigo"] { --ph-accent: #6366f1; --ph-accent-2: #8b5cf6; }
.page-header[data-accent="blue"]   { --ph-accent: #3b82f6; --ph-accent-2: #6366f1; }
.page-header[data-accent="green"]  { --ph-accent: #10b981; --ph-accent-2: #059669; }
.page-header[data-accent="red"]    { --ph-accent: #ef4444; --ph-accent-2: #dc2626; }
.page-header[data-accent="amber"]  { --ph-accent: #f59e0b; --ph-accent-2: #d97706; }
.page-header[data-accent="slate"]  { --ph-accent: #64748b; --ph-accent-2: #475569; }

/* Fallback for browsers without color-mix */
@supports not (color: color-mix(in srgb, red 10%, transparent)) {
    .page-header-icon { box-shadow: 0 8px 18px rgba(99,102,241,0.25); }
}

[data-theme="dark"] .page-header-icon {
    box-shadow: 0 8px 18px rgba(0,0,0,0.35);
}

.page-title {
    font-size: var(--fs-xl);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
    line-height: 1.2;
}
.page-subtitle {
    font-size: var(--fs-xs);
    color: var(--muted);
    margin: 3px 0 0;
}

@media (max-width: 480px) {
    .page-header-icon { width: 40px; height: 40px; border-radius: 10px; }
    .page-header-icon svg, .page-header-icon i { width: 20px; height: 20px; font-size: 17px; }
}

/* Cards */
.card-s,
.card-custom {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card-s .card-body { padding: clamp(1rem, 2vw, 1.5rem); }
.card-custom .card-body { padding: clamp(1rem, 2vw, 1.5rem); }

/* Stat Tiles */
.stat-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(1rem, 2vw, 1.5rem);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.stat-tile-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-tile-icon i,
.stat-tile-icon svg { font-size: var(--icon-lg); width: var(--icon-lg); height: var(--icon-lg); }
.stat-tile-num {
    font-size: var(--fs-2xl);
    font-weight: 800;
    line-height: 1;
    margin: 10px 0 4px;
}
.stat-tile-lbl {
    font-size: var(--fs-xs);
    color: var(--muted);
    font-weight: 500;
}

/* Tables */
.table th {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    background: #f8fafc;
    border-bottom: 1px solid var(--border) !important;
    padding: 0.85rem 1rem;
    white-space: nowrap;
}
.table td {
    font-size: 0.85rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle;
}
.table-hover tbody tr:hover { background: #f8fafc; }

/* Badges */
.badge-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Forms */
.form-control, .form-select {
    font-size: 0.88rem;
    border-color: var(--border);
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    font-family: 'Poppins', Arial, sans-serif;
    transition: border-color 0.15s, box-shadow 0.15s;
    min-height: 42px;
}
.form-control:focus, .form-select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.1);
}
.form-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

/* Buttons */
.btn {
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.55rem 1rem;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn i, .btn svg { width: var(--icon-sm); height: var(--icon-sm); font-size: var(--icon-sm); }
.btn-primary { background: var(--blue); border-color: var(--blue); }
.btn-primary:hover { background: #2563eb; border-color: #2563eb; }
.btn-success { background: var(--green); border-color: var(--green); }
.btn-danger  { background: var(--red);   border-color: var(--red);   }
.btn-sm { min-height: 32px; padding: 0.35rem 0.75rem; font-size: 0.75rem; }
.btn-lg { min-height: 48px; padding: 0.75rem 1.25rem; font-size: 0.92rem; }

/* Action Buttons — Table Row Actions */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    text-decoration: none !important;
    transition: all 0.15s ease;
    line-height: 1;
    white-space: nowrap;
    min-height: 30px;
}
.btn-action i,
.btn-action svg { font-size: var(--icon-sm); width: var(--icon-sm); height: var(--icon-sm); }

.btn-action-view {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}
.btn-action-view:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
    transform: translateY(-1px);
}

.btn-action-delete {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}
.btn-action-delete:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
    box-shadow: 0 4px 12px rgba(220,38,38,0.25);
    transform: translateY(-1px);
}

/* Verification Radio Cards */
.btn-check:checked + .btn {
    box-shadow: 0 4px 14px rgba(0,0,0,0.12) !important;
    transform: translateY(-2px);
}
.btn-check:checked + [style*="166534"] { border-color: #16a34a !important; background: #dcfce7 !important; }
.btn-check:checked + [style*="3730a3"] { border-color: #4f46e5 !important; background: #e0e7ff !important; }
.btn-check:checked + [style*="991b1b"] { border-color: #dc2626 !important; background: #fee2e2 !important; }

/* =============================================
   Setting Page Components
   ============================================= */
.setting-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.setting-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem clamp(1rem, 2vw, 1.75rem);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.setting-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.setting-icon i,
.setting-icon svg { font-size: var(--icon-lg); width: var(--icon-lg); height: var(--icon-lg); }
.setting-sub {
    padding: 1.1rem clamp(1rem, 2vw, 1.75rem);
    border-bottom: 1px solid var(--border);
}
.setting-sub:last-child { border-bottom: none; }
.setting-sub-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    margin-bottom: 0.85rem;
}
.setting-sub-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    margin: 0.5rem 0 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--border);
}

/* Tag-item pills (faculty, location chips) */
.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid transparent;
}
.tag-del {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: rgba(0,0,0,0.08);
    color: inherit;
    text-decoration: none !important;
    font-size: 0.6rem;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.tag-del:hover { background: var(--red); color: white; }

/* Sortable Drag List */
.sortable-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.sortable-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
    cursor: default;
}
.sortable-item:last-child { border-bottom: none; }
.sortable-item:hover { background: var(--bg); }

.drag-handle {
    display: flex;
    align-items: center;
    color: var(--muted);
    cursor: grab;
    padding: 4px;
    border-radius: 6px;
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.15s, background 0.15s;
}
.drag-handle:hover { opacity: 1; background: var(--border); }
.drag-handle:active { cursor: grabbing; }

.sortable-label { flex: 1; font-size: 0.85rem; }
.sortable-label-group { display: flex; align-items: center; flex: 1; flex-wrap: wrap; gap: 4px; }

.sortable-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}
.sortable-item:hover .sortable-actions,
.sortable-item:focus-within .sortable-actions { opacity: 1; }

/* Small square icon buttons */
.btn-icon-sm {
    width: 30px; height: 30px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none !important;
    flex-shrink: 0;
}
.btn-icon-sm i,
.btn-icon-sm svg { font-size: var(--icon-sm); width: var(--icon-sm); height: var(--icon-sm); }
.btn-edit-item:hover { background: var(--indigo); border-color: var(--indigo); color: white; }
.btn-del-item:hover  { background: var(--red);    border-color: var(--red);    color: white; }

/* SortableJS states */
.sortable-ghost    { opacity: 0.35; background: rgba(99,102,241,0.06); }
.sortable-dragging { box-shadow: 0 8px 24px rgba(0,0,0,0.14); opacity: 0.95; }

/* Alerts */
.alert {
    font-size: 0.85rem;
    border-radius: var(--radius);
    border: none;
    padding: 0.9rem 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert i,
.alert svg { font-size: var(--icon-md); width: var(--icon-md); height: var(--icon-md); flex-shrink: 0; margin-top: 2px; }

/* Avatar */
.avatar-circle {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #ede9fe;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.avatar-circle svg,
.avatar-circle i { color: var(--indigo); width: var(--icon-lg); height: var(--icon-lg); font-size: var(--icon-lg); }

/* =============================================
   5. UTILITY CLASSES
   ============================================= */
.smallest { font-size: 0.72rem; }
.text-muted { color: var(--muted) !important; }
.fw-black { font-weight: 800; }
.rounded-xl { border-radius: var(--radius); }
.bg-blue-soft   { background: rgba(59,130,246,0.08);   color: var(--blue);  }
.bg-green-soft  { background: rgba(16,185,129,0.08);   color: var(--green); }
.bg-amber-soft  { background: rgba(245,158,11,0.08);   color: var(--amber); }
.bg-red-soft    { background: rgba(239,68,68,0.08);    color: var(--red);   }
.bg-indigo-soft { background: rgba(99,102,241,0.08);   color: var(--indigo);}
.bg-primary-soft{ background: rgba(59,130,246,0.08);   color: #2563eb; }
.bg-teal-soft   { background: rgba(20,184,166,0.08);   color: #0d9488; }
.bg-slate-soft  { background: rgba(100,116,139,0.08);  color: #64748b; }
.bg-orange-soft { background: rgba(249,115,22,0.08);   color: #ea580c; }

/* Border color utilities */
.border-indigo { border-color: var(--indigo) !important; }
.border-amber  { border-color: var(--amber) !important; }
.border-green  { border-color: var(--green) !important; }
.border-red    { border-color: var(--red) !important; }
.border-blue   { border-color: var(--blue) !important; }
.border-teal   { border-color: #0d9488 !important; }

/* =============================================
   6. RESPONSIVE — Mobile-first progressive enhancement
   Breakpoints: 360, 480, 640, 768, 992, 1200, 1440
   ============================================= */

/* --- Desktop besar (≥1400px): sedikit lebih lapang --- */
@media (min-width: 1400px) {
    :root { --icon-md: 20px; }
    .main-content { padding-left: 3rem; padding-right: 3rem; }
}

/* --- Tablet landscape / desktop kecil (≤1200px) --- */
@media (max-width: 1200px) {
    .stat-tile-num { font-size: var(--fs-xl); }
}

/* --- Tablet (≤992px) --- */
@media (max-width: 992px) {
    .sidebar {
        position: relative;
        height: auto;
        min-height: unset;
    }
    .sidebar-inner { padding: 1rem 0.75rem; }
    .main-content  { padding: 1.5rem; }
    .page-header   { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

    /* Tables: horizontal scroll */
    .table-responsive-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Bulk action bar: wrap */
    .bulk-bar { flex-wrap: wrap; gap: 0.5rem !important; }
    .bulk-bar .ms-auto { margin-left: 0 !important; }
}

/* --- Mobile landscape / Tablet kecil (≤768px) --- */
@media (max-width: 768px) {
    /* Hide sidebar; content fills screen */
    .sidebar         { display: none !important; }
    .col-md-10       { width: 100% !important; max-width: 100%; flex: 0 0 100%; }
    .main-content    { padding: 0 1rem; }

    /* Sidebar when collapsed (overlay mode) */
    .sidebar.collapsed {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 260px;
        z-index: 1100;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }
    .sidebar.collapsed.show {
        transform: translateX(0);
    }
    .sidebar.collapsed .sidebar-inner {
        padding: 1rem 0.75rem;
    }

    /* Topbar compacts */
    .topbar-inner      { padding: 0.5rem 1rem; min-height: 54px; gap: 0.5rem; }
    .topbar-title      { font-size: 0.75rem; }
    .topbar-page       { font-size: 0.75rem; max-width: 100px; }
    .topbar-icon-btn   { width: 34px; height: 34px; }
    .breadcrumb-icon   { width: 24px; height: 24px; }
    .breadcrumb-icon svg { width: 12px; height: 12px; }
    .topbar-user       { padding: 0.25rem 0.5rem 0.25rem 0.25rem; gap: 0.5rem; }
    .topbar-user-avatar { width: 30px; height: 30px; border-radius: 8px; }
    .topbar-user-name  { font-size: 0.72rem; max-width: 100px; }
    .topbar-user-role  { font-size: 0.58rem; }
    .topbar-lang a     { padding: 3px 8px; min-width: 28px; }

    /* Page header stacks */
    .page-header     { flex-direction: column; align-items: flex-start; gap: 0.5rem; margin-bottom: 1.25rem; }

    /* Cards edge-to-edge feel */
    .card-custom .card-body, .card-s .card-body { padding: 1rem; }

    /* Tables: always scrollable */
    .table-responsive, [class*="table-responsive"] {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius);
    }

    /* Smaller table cells */
    .table th { padding: 0.6rem 0.7rem; font-size: 0.62rem; }
    .table td { padding: 0.6rem 0.7rem; font-size: 0.78rem; }

    /* Action buttons: icon-only on mobile (but still touch-friendly) */
    .btn-action span     { display: none; }
    .btn-action          { padding: 8px 10px; min-height: 36px; min-width: 36px; justify-content: center; }
    .btn-action i,
    .btn-action svg      { font-size: var(--icon-md); width: var(--icon-md); height: var(--icon-md); }

    /* Hide less-important columns */
    .hide-mobile { display: none !important; }

    /* Bulk action bar: vertical stack */
    .bulk-bar {
        flex-direction: column;
        align-items: stretch !important;
    }
    .bulk-bar select  { width: 100% !important; }
    .bulk-bar .btn    { width: 100%; }
    .bulk-bar .ms-auto { display: none !important; }

    /* Stat tiles: 2 per row (bootstrap controls column width) */
    .stat-tile     { padding: 1rem; }
    .stat-tile-icon { width: 40px; height: 40px; }

    /* Modal: nearly full-width */
    .modal-dialog  { margin: 0.5rem; }
    .modal-content { border-radius: 16px !important; }

    /* Form stacking */
    .row .col-6, .row .col-4 { flex: 0 0 50%; max-width: 50%; }

    /* Setting card header stacks */
    .setting-card-header { padding: 1rem; }
    .setting-sub        { padding: 1rem; }
}

/* --- Mobile (≤640px) --- */
@media (max-width: 640px) {
    :root { --icon-md: 17px; --icon-lg: 20px; }
    .topbar-lang       { display: none; }
    .topbar-user-info  { display: none; }
    .topbar-user       { padding: 0.2rem; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); }
    .topbar-user-avatar { width: 32px; height: 32px; border-radius: 8px; }
    .breadcrumb-sep,
    .topbar-page       { display: none; }
    .dropdown-item     { padding: 0.7rem 1rem; }
    .page-title        { font-size: 1rem; }
}

/* --- Small Mobile (≤480px) --- */
@media (max-width: 480px) {
    .main-content       { padding: 0 0.75rem; }
    .modal-dialog       { margin: 0.25rem; }
    .row .col-6, .row .col-4 { flex: 0 0 100%; max-width: 100%; }
    .card-s .card-body,
    .card-custom .card-body { padding: 0.85rem; }

    .topbar-inner       { padding: 0.4rem 0.75rem; min-height: 50px; }
    .topbar-user-avatar { width: 28px; height: 28px; }
    .topbar-icon-btn    { width: 32px; height: 32px; border-radius: 8px; }
    .breadcrumb-icon    { width: 22px; height: 22px; border-radius: 6px; }

    /* Semua tombol jadi full-width di form actions */
    .form-actions .btn { width: 100%; }

    /* Stat tiles: full width */
    .stat-tile .row > [class^="col-"] { flex: 0 0 100%; max-width: 100%; }
    .stat-tile-num { font-size: 1.3rem; }
}

/* --- Extra small (≤360px) --- */
@media (max-width: 360px) {
    :root { --icon-md: 16px; }
    .topbar-inner     { padding: 0.4rem 0.6rem; min-height: 48px; }
    .topbar-icon-btn  { width: 30px; height: 30px; }
    .topbar-user-avatar { width: 26px; height: 26px; }
    .breadcrumb-icon  { width: 20px; height: 20px; }
    .breadcrumb-icon svg { width: 10px; height: 10px; }
    .btn              { font-size: 0.78rem; padding: 0.5rem 0.85rem; }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =============================================
   7. DARK MODE — [data-theme="dark"]
   ============================================= */

[data-theme="dark"] {
    /* Content */
    --bg:      #0d1117;
    --surface: #161b22;
    --border:  #30363d;
    --text:    #e6edf3;
    --muted:   #8b949e;
    --shadow:  0 1px 3px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.2);
    --radius:  14px;

    /* Sidebar — lebih gelap dari konten */
    --sb-bg:          #010409;
    --sb-hover:       rgba(255,255,255,0.08);
    --sb-active:      rgba(139,92,246,0.2);
    --sb-text:        #8b949e;
    --sb-active-text: #c4b5fd;
    --sb-accent:      #7c3aed;
    --sb-brand:       #e2e8f0;
    --sb-border:      rgba(255,255,255,0.04);

    /* Color tokens — lighter for dark bg readability */
    --blue:   #58a6ff;
    --green:  #3fb950;
    --amber:  #e3b341;
    --red:    #f85149;
    --indigo: #818cf8;
}

/* --- Body & Base --- */
[data-theme="dark"] body           { background: var(--bg); color: var(--text); }
[data-theme="dark"] .main-content  { background: var(--bg); }

/* --- Topbar Dark --- */
[data-theme="dark"] .topbar { border-color: var(--border); }
[data-theme="dark"] .topbar-title { color: var(--text); }
[data-theme="dark"] .topbar-lang { background: var(--bg); border-color: var(--border); }
[data-theme="dark"] .topbar-lang a { color: var(--muted); }
[data-theme="dark"] .topbar-icon-btn {
    background: var(--bg);
    border-color: var(--border);
    color: var(--muted);
}
[data-theme="dark"] .topbar-icon-btn:hover {
    background: var(--indigo);
    border-color: var(--indigo);
    color: #fff;
}
[data-theme="dark"] .topbar-user {
    background: var(--bg);
    border-color: var(--border);
}
[data-theme="dark"] .topbar-user:hover {
    border-color: var(--indigo);
    background: var(--surface);
}
[data-theme="dark"] .topbar-user-name { color: var(--text); }
[data-theme="dark"] .topbar-user-role { color: var(--muted); }
[data-theme="dark"] .topbar-bell .bell-dot { border-color: var(--bg); }
[data-theme="dark"] .topbar-dropdown {
    background: var(--surface);
    border-color: var(--border) !important;
}
[data-theme="dark"] .topbar-dropdown .dropdown-item { color: var(--text); }
[data-theme="dark"] .topbar-dropdown .dropdown-item:hover { background: var(--bg); }
[data-theme="dark"] .topbar-dropdown .dropdown-divider { border-color: var(--border); }

/* --- Cards --- */
[data-theme="dark"] .card-custom,
[data-theme="dark"] .card-s,
[data-theme="dark"] .stat-tile     { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .card          { background: var(--surface); border-color: var(--border); color: var(--text); }

/* --- Tables --- */
[data-theme="dark"] .table         { color: var(--text); border-color: var(--border); }
[data-theme="dark"] .table th      { background: #1c2128; color: var(--muted); border-bottom-color: var(--border) !important; }
[data-theme="dark"] .table td      { border-bottom-color: #21262d !important; }
[data-theme="dark"] .table-hover tbody tr:hover { background: rgba(255,255,255,0.03); }
[data-theme="dark"] .table-light   { background: #1c2128; }

/* --- Forms --- */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select   {
    background: #1c2128;
    border-color: var(--border);
    color: var(--text);
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background: #1c2128;
    border-color: var(--indigo);
    color: var(--text);
    box-shadow: 0 0 0 4px rgba(129,140,248,0.1);
}
[data-theme="dark"] .form-control::placeholder { color: #484f58; }
[data-theme="dark"] .form-label    { color: var(--muted); }
[data-theme="dark"] .input-group-text { background: #1c2128; border-color: var(--border); color: var(--muted); }

/* --- Modals --- */
[data-theme="dark"] .modal-content { background: var(--surface); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .modal-header  { border-bottom-color: var(--border); }
[data-theme="dark"] .modal-footer  { border-top-color: var(--border); }
[data-theme="dark"] .btn-close     { filter: invert(1) grayscale(1) brightness(1.5); }

/* --- Page Header --- */
[data-theme="dark"] .page-header   { border-bottom-color: var(--border); }
[data-theme="dark"] .page-title    { color: var(--text); }
[data-theme="dark"] .page-subtitle { color: var(--muted); }

/* --- Alerts --- */
[data-theme="dark"] .alert-success { background: rgba(63,185,80,0.1); color: #3fb950; }
[data-theme="dark"] .alert-danger  { background: rgba(248,81,73,0.1);  color: #f85149; }
[data-theme="dark"] .alert-warning { background: rgba(227,179,65,0.1); color: #e3b341; }
[data-theme="dark"] .alert-info    { background: rgba(88,166,255,0.1); color: #58a6ff; }

/* --- Badges & Soft Colors --- */
[data-theme="dark"] .bg-blue-soft   { background: rgba(88,166,255,0.12);   color: #58a6ff; }
[data-theme="dark"] .bg-green-soft  { background: rgba(63,185,80,0.12);    color: #3fb950; }
[data-theme="dark"] .bg-amber-soft  { background: rgba(227,179,65,0.12);   color: #e3b341; }
[data-theme="dark"] .bg-red-soft    { background: rgba(248,81,73,0.12);    color: #f85149; }
[data-theme="dark"] .bg-indigo-soft { background: rgba(129,140,248,0.12);  color: #818cf8; }
[data-theme="dark"] .bg-primary-soft{ background: rgba(96,165,250,0.12);   color: #60a5fa; }
[data-theme="dark"] .bg-teal-soft   { background: rgba(45,212,191,0.12);   color: #2dd4bf; }
[data-theme="dark"] .bg-slate-soft  { background: rgba(148,163,184,0.12);  color: #94a3b8; }
[data-theme="dark"] .bg-orange-soft { background: rgba(251,146,60,0.12);   color: #fb923c; }
[data-theme="dark"] .border-indigo  { border-color: var(--indigo) !important; }
[data-theme="dark"] .border-amber   { border-color: var(--amber) !important; }
[data-theme="dark"] .border-green   { border-color: var(--green) !important; }
[data-theme="dark"] .border-red     { border-color: var(--red) !important; }
[data-theme="dark"] .border-blue    { border-color: var(--blue) !important; }
[data-theme="dark"] .border-teal    { border-color: #2dd4bf !important; }
[data-theme="dark"] .badge          { border: 1px solid rgba(255,255,255,0.06); }

/* --- Buttons --- */
[data-theme="dark"] .btn-outline-primary  { color: #58a6ff; border-color: #58a6ff; }
[data-theme="dark"] .btn-outline-secondary{ color: var(--muted); border-color: var(--border); }
[data-theme="dark"] .btn-outline-danger   { color: #f85149; border-color: #f85149; }
[data-theme="dark"] .btn-action-view      { background: rgba(88,166,255,0.1); border-color: rgba(88,166,255,0.25); color: #58a6ff; }
[data-theme="dark"] .btn-action-delete    { background: rgba(248,81,73,0.1); border-color: rgba(248,81,73,0.25); color: #f85149; }

/* --- Setting components --- */
[data-theme="dark"] .setting-card         { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .setting-card-header  { background: rgba(255,255,255,0.02); border-bottom-color: var(--border); }
[data-theme="dark"] .setting-sub          { border-bottom-color: var(--border); }
[data-theme="dark"] .setting-sub-divider  { border-top-color: var(--border); }
[data-theme="dark"] .tag-del              { background: rgba(255,255,255,0.1); }

/* --- Sortable dark --- */
[data-theme="dark"] .sortable-list  { border-color: var(--border); }
[data-theme="dark"] .sortable-item  { background: var(--surface); border-bottom-color: var(--border); }
[data-theme="dark"] .sortable-item:hover { background: rgba(255,255,255,0.03); }
[data-theme="dark"] .btn-icon-sm    { background: var(--bg); border-color: var(--border); color: var(--muted); }

/* --- Misc Utility --- */
[data-theme="dark"] .bg-light      { background: #1c2128 !important; }
[data-theme="dark"] .border        { border-color: var(--border) !important; }
[data-theme="dark"] .text-muted    { color: var(--muted) !important; }
[data-theme="dark"] .text-dark     { color: var(--text) !important; }
[data-theme="dark"] .bg-white      { background: var(--surface) !important; }
[data-theme="dark"] .vr            { background: var(--border); }
[data-theme="dark"] hr             { border-color: var(--border); }
[data-theme="dark"] .breadcrumb    { background: transparent; }

/* --- Sidebar logo sub (dark-friendly) --- */
[data-theme="dark"] .sidebar-logo-sub { color: #374151; }

/* --- Icon color adjustments in dark mode --- */
[data-theme="dark"] .icon-box { background: rgba(129,140,248,0.12); color: #a5b4fc; }

/* Smooth theme transitions */
body, .topbar, .main-content, .card-custom, .card-s, .stat-tile,
.form-control, .form-select, .modal-content, .table, .sidebar,
.topbar-dropdown {
    transition: background 0.2s ease, border-color 0.2s ease, color 0.15s ease;
}
