/* =========================================================
   ROMS-DASH MASTER STYLESHEET (DARK & CLEAN LIGHT MODE)
   ========================================================= */
:root {
    --bg-topbar-line: #4f5a69;
    --bg-header-main: #364150;
    --bg-sidebar: #364150;
    --bg-workspace: #17202a;
    --bg-dashboard-card: #041b24;
    --bg-empty-grey: #5a6675;
    --text-primary: #ffffff;
    --text-muted: #95a5a6;
    --text-main: #ffffff;
    --accent-teal: #00f5d4;
    --accent-blue: #2980b9;
    --accent-red: #e74c3c;
    --border-subtle: rgba(149, 165, 166, 0.16);
    --sidebar-panel-width: 245px;
    --combined-header-height: 86px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
    scrollbar-width: thin;
    scrollbar-color: #374151 transparent;
}

/* Nonaktifkan transisi warna massal saat ganti tema/pindah halaman agar tidak muncul efek splash berat */
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
    transition: none !important;
}

body {
    background-color: var(--bg-workspace);
    color: var(--text-primary);
    font-size: 0.8125rem;
    line-height: 1.45;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: #374151;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background-color: #4b5563;
}

#roms-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: var(--accent-teal);
    z-index: 3000;
    transition: width 0.1s ease-out;
}

#roms-top-block-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.roms-mini-topbar {
    height: 28px;
    background-color: var(--bg-topbar-line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    font-size: 0.72rem;
    color: #e2e8f0;
    transition:
        margin-top 0.2s ease,
        opacity 0.2s ease;
}

.mini-left-socials a {
    color: #e2e8f0;
    margin-right: 14px;
    text-decoration: none;
    display: inline-block;
    vertical-align: middle;
}

.mini-right-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

#roms-main-header {
    height: 58px;
    background-color: var(--bg-header-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    border-radius: 0 0 22px 22px;
    transition: box-shadow 0.2s ease;
}

#roms-main-header.flat-state {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-left-side,
.header-right-side,
.dashboard-logo-brand {
    display: flex;
    align-items: center;
}

.header-left-side,
.header-right-side {
    gap: 16px;
}

.dashboard-logo-brand {
    gap: 10px;
}
.brand-logo {
    max-height: 36px;
}
.brand-title {
    margin-top: 4px;
    margin-bottom: 0;
    line-height: 1;
}
.brand-subtitle {
    margin: 3px 0 0 0;
    line-height: 1;
}
.brand-text-titles h1 {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.brand-text-titles p {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.header-action-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.header-search-box {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 5px 13px;
    border-radius: 20px;
    gap: 8px;
}

.header-search-box input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.8rem;
    width: 140px;
}

.notification-bell-container {
    position: relative;
    cursor: pointer;
}

.active-green-dot {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 7px;
    height: 7px;
    background-color: var(--accent-teal);
    border-radius: 50%;
}

.user-profile-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #7f8c8d;
    padding: 2px;
    cursor: pointer;
}

.avatar-fallback-img {
    width: 100%;
    height: 100%;
    background-color: #bdc3c7;
    border-radius: 50%;
}

#roms-page-layout {
    display: flex;
    margin-top: calc(var(--combined-header-height) + 8px);
    min-height: calc(100vh - var(--combined-header-height) - 8px);
}

#roms-sidebar-panel {
    width: var(--sidebar-panel-width);
    background-color: var(--bg-sidebar);
    position: fixed;
    top: calc(var(--combined-header-height) + 8px);
    left: 0;
    bottom: 0;
    border-top-right-radius: 18px;
    overflow-y: auto;
    z-index: 1000;
    transition:
        left 0.22s ease,
        top 0.2s ease,
        width 0.22s ease;
}

.inner-sidebar-nav ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.inner-sidebar-nav ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.8125rem;
    line-height: 1.25;
}

.inner-sidebar-nav ul li a i {
    font-size: 0.92rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.nav-text {
    flex: 1;
    min-width: 0;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inner-sidebar-nav ul li.active-link > a,
.inner-sidebar-nav ul li a:hover {
    background-color: rgba(0, 0, 0, 0.16);
    color: var(--accent-teal);
}

.nav-group-title {
    padding: 10px 14px 3px;
    font-size: 0.66rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav-chevron {
    font-size: 0.6rem;
    opacity: 0.6;
    flex-shrink: 0;
}

.badge-blue-new {
    background-color: var(--accent-blue);
    color: #ffffff;
    font-size: 0.6rem;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
    flex-shrink: 0;
}

#roms-workspace-area {
    margin-left: var(--sidebar-panel-width);
    flex: 1;
    padding: 4px 16px 20px 16px;
    font-size: 0.8125rem;
    line-height: 1.45;
    transition: margin-left 0.22s ease;
    max-width: 100vw;
    overflow-x: hidden;
}

/* =========================================================
   PENYELARASAN SKALA KONTEN WORKSPACE AGAR MATCHING SIDEBAR
   ========================================================= */
#roms-workspace-area h1,
#roms-workspace-area .h1 {
    font-size: 1.35rem;
}

#roms-workspace-area h2,
#roms-workspace-area .h2,
.roms-page-header-bar h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

#roms-workspace-area h3,
#roms-workspace-area .h3 {
    font-size: 1.05rem;
}

#roms-workspace-area h4,
#roms-workspace-area .h4 {
    font-size: 1.02rem;
    line-height: 1.3;
}

#roms-workspace-area h5,
#roms-workspace-area .h5 {
    font-size: 0.9rem;
}

#roms-workspace-area h6,
#roms-workspace-area .h6 {
    font-size: 0.8rem;
}

.roms-page-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.roms-page-header-bar p,
#roms-workspace-area .small,
#roms-workspace-area small {
    font-size: 0.74rem;
}

/* Penyesuaian Card, Stat Box, Tabel, Tombol, Form & Badge SAKA-NU / Bootstrap */
#roms-workspace-area .card,
#roms-workspace-area .sakanu-table-card {
    border-radius: 0.75rem;
}

#roms-workspace-area .card-header {
    padding: 0.55rem 0.85rem;
    font-size: 0.8rem;
}

#roms-workspace-area .card-body {
    padding: 0.85rem;
}

#roms-workspace-area .card-footer {
    padding: 0.5rem 0.85rem;
    font-size: 0.75rem;
}

#roms-workspace-area .sakanu-stat-mini,
#roms-workspace-area .bg-body-tertiary {
    padding: 0.7rem 0.9rem;
    border-radius: 0.75rem;
}

#roms-workspace-area .sakanu-stat-mini .fs-5 {
    font-size: 0.95rem !important;
    line-height: 1.3;
}

#roms-workspace-area .table,
#roms-workspace-area .sakanu-table {
    font-size: 0.78rem !important;
}

#roms-workspace-area .table > :not(caption) > * > *,
#roms-workspace-area .sakanu-table td {
    padding: 0.45rem 0.65rem !important;
    font-size: 0.78rem !important;
}

#roms-workspace-area .table thead th,
#roms-workspace-area .sakanu-table th {
    font-size: 0.68rem !important;
    padding: 0.5rem 0.65rem !important;
    letter-spacing: 0.04em;
}

#roms-workspace-area .btn {
    font-size: 0.78rem;
    padding: 0.32rem 0.68rem;
    border-radius: 6px;
}

#roms-workspace-area .btn-sm {
    font-size: 0.73rem;
    padding: 0.24rem 0.54rem;
    border-radius: 5px;
}

#roms-workspace-area .form-control,
#roms-workspace-area .form-select,
#roms-workspace-area textarea {
    font-size: 0.78rem;
    padding: 0.32rem 0.6rem;
    border-radius: 6px;
}

#roms-workspace-area .form-control-sm,
#roms-workspace-area .form-select-sm {
    font-size: 0.74rem;
    padding: 0.24rem 0.5rem;
}

#roms-workspace-area .form-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

#roms-workspace-area .badge {
    font-size: 0.67rem;
    padding: 0.26em 0.55em;
    font-weight: 600;
}

#roms-workspace-area .alert {
    padding: 0.55rem 0.85rem;
    font-size: 0.78rem;
    margin-bottom: 0.85rem;
}

.modal-header {
    padding: 0.7rem 1rem;
}
.modal-title {
    font-size: 0.95rem;
    font-weight: 700;
}
.modal-body {
    padding: 0.9rem 1rem;
    font-size: 0.8rem;
}
.modal-footer {
    padding: 0.6rem 1rem;
}
.modal-body .form-control,
.modal-body .form-select,
.modal-body textarea {
    font-size: 0.78rem;
    padding: 0.32rem 0.6rem;
}
.modal-body .form-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

#roms-sidebar-panel.collapsed {
    width: 68px !important;
}

#roms-sidebar-panel.collapsed .nav-text,
#roms-sidebar-panel.collapsed .nav-chevron,
#roms-sidebar-panel.collapsed .nav-group-title,
#roms-sidebar-panel.collapsed .badge-blue-new {
    display: none !important;
}

#roms-sidebar-panel.collapsed .inner-sidebar-nav ul li a {
    justify-content: center;
    padding: 12px 0;
    gap: 0;
}

#roms-sidebar-panel.collapsed .inner-sidebar-nav ul li a i {
    width: auto;
    font-size: 1.15rem;
}
#roms-sidebar-panel.collapsed ~ #roms-workspace-area {
    margin-left: 68px !important;
}

/* Dashboard Stat Blocks & Cards (Proporsi Compact) */
.roms-grey-blocks-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.block-item {
    height: 86px;
    background-color: var(--bg-empty-grey);
    border-radius: 14px 0 14px 0 !important;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 11px 14px;
}

.block-item::after,
.block-bg-icon {
    position: absolute;
    bottom: -10px;
    right: 6px;
    font-size: 4.8rem;
    color: rgba(0, 0, 0, 0.08);
    z-index: 0;
}

.block-item::after {
    font-family: "Font Awesome 7 Free", "Font Awesome 6 Free";
    font-weight: 900;
    content: "";
}

.block-subtitle {
    font-size: 0.66rem;
    color: #cbd5e1;
    letter-spacing: 0.3px;
    z-index: 1;
    position: relative;
}
.block-value {
    font-size: 1.65rem;
    line-height: 1.1;
    z-index: 1;
    position: relative;
}

.roms-workspace-row-1 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.content-data-card {
    background-color: var(--bg-dashboard-card);
    border-radius: 8px;
    padding: 14px 16px;
    border: 1px solid var(--border-subtle);
    min-width: 0 !important;
    max-width: 100% !important;
}

.split-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.text-info h6 {
    color: var(--accent-teal);
    font-size: 0.72rem;
    margin-bottom: 4px;
    letter-spacing: 0.4px;
}
.text-info h3 {
    font-size: 1.35rem;
    margin-bottom: 6px;
}
.text-info p {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.radial-ring-border {
    width: 48px;
    height: 48px;
    border: 3.5px solid var(--accent-teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ring-percentage {
    font-weight: bold;
    color: var(--accent-teal);
    font-size: 0.78rem;
}

.split-card-footer,
.three-columns-footer {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-subtle);
    padding-top: 10px;
}

.split-card-footer {
    margin-top: 12px;
    font-size: 0.74rem;
}
.split-card-footer h4 {
    font-size: 0.92rem;
    margin: 2px 0;
}
.three-columns-footer {
    text-align: center;
}
.three-columns-footer > div {
    width: 33.33%;
}
.three-columns-footer h4 {
    font-size: 0.86rem;
    margin: 2px 0;
}
.three-columns-footer small {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.center-large-ring-box {
    display: flex;
    justify-content: center;
    padding: 2px 0 10px 0;
}
.large-radial-ring {
    width: 78px;
    height: 78px;
    border: 5px solid var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.large-radial-ring strong,
.large-radial-ring h4 {
    font-size: 0.95rem;
}
.inner-ring-labels small {
    display: block;
    color: var(--text-muted);
    font-size: 0.66rem;
}

.total-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.total-row-header h3,
.total-row-header h4 {
    font-size: 1.15rem;
    margin: 0;
}
.horizontal-bars-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}
.bar-track {
    width: 100%;
    height: 5px;
    background-color: rgba(149, 165, 166, 0.16);
    border-radius: 3px;
}
.bar-fill-progress {
    height: 100%;
    background-color: var(--accent-teal);
    border-radius: 3px;
}

.roms-workspace-row-2 {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 12px;
    margin-bottom: 14px;
}

.card-title-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
    flex-wrap: wrap;
}

.card-title-flex h3 {
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0;
}
.view-all-trigger {
    font-size: 0.74rem;
    color: var(--accent-teal);
    text-decoration: none;
}

.timeline-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.timeline-row {
    display: flex;
    gap: 10px;
    position: relative;
}
.timeline-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}
.timeline-indicator.blue-node {
    background-color: var(--accent-blue);
}
.timeline-indicator.teal-node {
    background-color: var(--accent-teal);
}
.timeline-body {
    font-size: 0.78rem;
}
.text-dim {
    color: var(--text-muted);
}
.timeline-meta-tag {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.responsive-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.workspace-native-table,
.workspace-bordered-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    text-align: left;
}

.workspace-native-table th {
    padding: 8px 8px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
}

.workspace-native-table td {
    padding: 9px 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.workspace-bordered-table th,
.workspace-bordered-table td {
    border: 1px solid var(--border-subtle);
    padding: 9px 10px;
}

.workspace-bordered-table th {
    color: var(--text-muted);
    font-size: 0.74rem;
}

.accent-teal {
    color: var(--accent-teal);
}
.accent-red {
    color: var(--accent-red);
}
.weight-bold {
    font-weight: bold;
}

#roms-floating-actions-bar {
    position: fixed;
    bottom: 22px;
    right: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2500;
}

.floating-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease;
}

.floating-btn:hover {
    transform: scale(1.06);
}

body.adjust-scrolled-layout #roms-sidebar-panel {
    top: calc(58px + 8px);
}

@media (min-width: 993px) {
    #roms-main-header {
        padding-left: 15px !important;
    }
    .dashboard-logo-brand {
        margin-left: 0;
        padding-left: 0;
    }
    #sidebar-hamburger-trigger {
        margin-left: 48px;
    }
}

#roms-mobile-bottom-nav {
    display: none;
}

@media (max-width: 992px) {
    #roms-sidebar-panel {
        left: -250px;
        top: calc(var(--combined-header-height) + 8px) !important;
    }
    #roms-workspace-area {
        margin-left: 0 !important;
    }
    body.show-sidebar-mobile #roms-sidebar-panel {
        left: 0;
        width: var(--sidebar-panel-width) !important;
    }
    body.show-sidebar-mobile #roms-sidebar-panel .nav-text,
    body.show-sidebar-mobile #roms-sidebar-panel .nav-chevron,
    body.show-sidebar-mobile #roms-sidebar-panel .nav-group-title,
    body.show-sidebar-mobile #roms-sidebar-panel .badge-blue-new {
        display: block !important;
    }
    body.show-sidebar-mobile #roms-sidebar-panel .inner-sidebar-nav ul li a {
        justify-content: flex-start;
        padding: 7px 14px;
        gap: 8px;
    }
    .roms-grey-blocks-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .roms-workspace-row-1,
    .roms-workspace-row-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #roms-workspace-area {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 10px !important;
        padding-bottom: 75px !important;
    }
    .header-search-box,
    #sidebar-hamburger-trigger {
        display: none;
    }
    .roms-grey-blocks-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    .roms-workspace-row-1,
    .roms-workspace-row-2 {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
    #roms-mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 55px;
        background-color: var(--bg-header-main);
        box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
        z-index: 3000;
        justify-content: space-around;
        align-items: center;
    }
    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--text-muted);
        font-size: 0.65rem;
        gap: 3px;
        flex: 1;
        background: none;
        border: none;
    }
    .nav-item.active-nav {
        color: #f1c40f;
    }
    .center-action {
        position: relative;
        top: -20px;
        cursor: pointer;
    }
    .center-circle {
        width: 50px;
        height: 50px;
        background-color: #7f8c8d;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        color: white;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
        border: 4px solid var(--bg-workspace);
    }
    #roms-floating-actions-bar {
        bottom: 75px;
    }
}

/* =========================================================
   LIGHT MODE REFINEMENT (CLEAN MODERN SAAS - NON-NEGATIVE)
   ========================================================= */
body:not(.dark-mode) {
    --bg-topbar-line: #f8fafc;
    --bg-header-main: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-workspace: #f1f5f9;
    --bg-dashboard-card: #ffffff;
    --bg-empty-grey: #ffffff;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --text-main: #0f172a;
    --accent-teal: #0d9488;
    --accent-blue: #2563eb;
    --accent-red: #dc2626;
    --border-subtle: #e2e8f0;
    scrollbar-color: #cbd5e1 transparent;
}

body:not(.dark-mode) ::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
}

body:not(.dark-mode) .roms-mini-topbar {
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
}

body:not(.dark-mode) .mini-right-date,
body:not(.dark-mode) .mini-left-socials a {
    color: #475569;
}

body:not(.dark-mode) #roms-main-header {
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

body:not(.dark-mode) #roms-main-header.flat-state {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

body:not(.dark-mode) .header-search-box {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
}

body:not(.dark-mode) #roms-sidebar-panel {
    background-color: #ffffff !important;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 12px rgba(15, 23, 42, 0.03);
}

body:not(.dark-mode) .inner-sidebar-nav ul li a {
    color: #334155;
    font-weight: 500;
}

body:not(.dark-mode) .inner-sidebar-nav ul li a i {
    color: #64748b;
}

body:not(.dark-mode) .inner-sidebar-nav ul li a:hover {
    background-color: #f8fafc;
    color: #0d9488;
}

body:not(.dark-mode) .inner-sidebar-nav ul li a:hover i {
    color: #0d9488;
}

body:not(.dark-mode) .inner-sidebar-nav ul li.active-link > a {
    background-color: rgba(13, 148, 136, 0.1);
    color: #0f766e !important;
    font-weight: 700;
    border-left: 3px solid #0d9488;
}

body:not(.dark-mode) .inner-sidebar-nav ul li.active-link > a i {
    color: #0d9488 !important;
}

body:not(.dark-mode) .nav-group-title {
    color: #94a3b8;
}

body:not(.dark-mode) .block-item {
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

body:not(.dark-mode) .block-item::after,
body:not(.dark-mode) .block-bg-icon {
    color: rgba(15, 23, 42, 0.04);
}

body:not(.dark-mode) .block-subtitle {
    color: #64748b;
    font-weight: 600;
}

body:not(.dark-mode) .block-value {
    color: #0f172a;
}

body:not(.dark-mode) .content-data-card,
body:not(.dark-mode) #roms-workspace-area .card,
body:not(.dark-mode) .sakanu-table-card,
body:not(.dark-mode) .sakanu-stat-mini {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
}

body:not(.dark-mode) .workspace-native-table th,
body:not(.dark-mode) .workspace-native-table td {
    border-color: #e2e8f0;
}

body:not(.dark-mode) .form-control,
body:not(.dark-mode) .form-select,
body:not(.dark-mode) textarea {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

body:not(.dark-mode) .form-control:focus,
body:not(.dark-mode) .form-select:focus,
body:not(.dark-mode) textarea:focus {
    border-color: #0d9488 !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 148, 136, 0.15) !important;
}

body:not(.dark-mode) .input-group-text {
    background-color: #f8fafc !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}

body:not(.dark-mode) .floating-btn {
    background-color: #ffffff;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

body:not(.dark-mode) .floating-btn:hover {
    background-color: #f8fafc;
    color: #0d9488;
}

body.dark-mode .mini-right-date,
body.dark-mode .mini-left-socials a {
    color: #d1d5db;
}

/* Submenu */
.inner-sidebar-nav ul li .submenu {
    max-height: 0;
    overflow: hidden;
    list-style: none;
    padding-left: 16px;
    background-color: rgba(0, 0, 0, 0.12);
    transition: max-height 0.25s ease-out;
}
body:not(.dark-mode) .inner-sidebar-nav ul li .submenu {
    background-color: #f8fafc;
}
.inner-sidebar-nav ul li.dropdown-open .submenu {
    max-height: 450px;
    transition: max-height 0.25s ease-in;
}
.inner-sidebar-nav ul li .nav-chevron {
    transition: transform 0.2s ease;
    margin-left: auto;
}
.inner-sidebar-nav ul li.dropdown-open .nav-chevron {
    transform: rotate(180deg);
}
.inner-sidebar-nav .submenu li a.active-link {
    color: var(--accent-teal) !important;
    font-weight: 600;
}

/* Forms & Inputs */
.form-control,
.form-select,
textarea {
    background-color: var(--bg-workspace) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(149, 165, 166, 0.3) !important;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: var(--accent-teal) !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 245, 212, 0.15) !important;
}

.input-group-text {
    background-color: var(--bg-topbar-line) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(149, 165, 166, 0.3) !important;
}

.roms-custom-grid-box {
    background-color: var(--bg-workspace);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    color: var(--text-primary);
}

.roms-theme-dropdown {
    background-color: var(--bg-header-main) !important;
    border-color: var(--border-subtle) !important;
}
.roms-theme-dropdown .dropdown-item {
    color: var(--text-primary) !important;
}

/* Native HTML5 Progress Bar (Zero Inline Style) */
.roms-native-progress {
    appearance: none;
    -webkit-appearance: none;
    height: 6px;
    border: none;
    border-radius: 6px;
    background-color: rgba(149, 165, 166, 0.18);
    overflow: hidden;
    display: block;
}

.roms-native-progress::-webkit-progress-bar {
    background-color: rgba(149, 165, 166, 0.18);
    border-radius: 6px;
}

.roms-native-progress::-webkit-progress-value {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-teal));
    border-radius: 6px;
}

.roms-native-progress::-moz-progress-bar {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-teal));
    border-radius: 6px;
}

/* DataTables & Pagination */
.roms-dt-wrapper .roms-dt-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.roms-dt-input {
    background-color: transparent;
    border: 1px solid rgba(149, 165, 166, 0.3);
    color: var(--text-main);
    padding: 0.22rem 0.5rem;
    border-radius: 4px;
    outline: none;
    font-size: 0.78rem;
}

.roms-dt-select {
    width: auto;
    display: inline-block;
    padding-right: 1.4rem;
}
.roms-sort-icon {
    font-size: 0.62rem;
    opacity: 0.4;
    margin-left: 5px;
}
.roms-sortable {
    cursor: pointer;
}
.roms-sortable.active-sort .roms-sort-icon {
    opacity: 1;
    color: #4a85f6;
}

.roms-dt-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.76rem;
    color: var(--text-muted);
}

.roms-pagination,
.pagination {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
    list-style: none;
    padding-left: 0;
    flex-wrap: wrap;
}

.roms-page-btn,
.pagination .page-link {
    background-color: var(--bg-dashboard-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.22rem 0.55rem;
    border-radius: 5px;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: none;
}

.roms-page-btn.active,
.pagination .page-item.active .page-link {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #ffffff;
}

.roms-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Dropdowns & Modals */
.custom-roms-dropdown {
    background-color: #242a30;
    border: 1px solid rgba(149, 165, 166, 0.15);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 0.3rem 0;
    min-width: 145px;
}
body:not(.dark-mode) .custom-roms-dropdown,
[data-theme="light"] .custom-roms-dropdown {
    background-color: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
}
.custom-roms-dropdown .dropdown-item {
    color: #e0e0e0;
    font-size: 0.78rem;
    padding: 0.35rem 0.85rem;
}
body:not(.dark-mode) .custom-roms-dropdown .dropdown-item,
[data-theme="light"] .custom-roms-dropdown .dropdown-item {
    color: #334155;
}
.custom-roms-dropdown .dropdown-item:hover {
    background-color: rgba(37, 99, 235, 0.08) !important;
    color: var(--accent-blue) !important;
}

.custom-roms-modal .modal-content {
    background-color: #242a30;
    border: 1px solid rgba(149, 165, 166, 0.2);
    color: var(--text-main);
    border-radius: 8px;
}
body:not(.dark-mode) .custom-roms-modal .modal-content,
[data-theme="light"] .custom-roms-modal .modal-content {
    background-color: #ffffff;
    border-color: #e2e8f0;
}
.custom-roms-modal .modal-header,
.custom-roms-modal .modal-footer {
    border-color: var(--border-subtle);
}

/* Charts */
.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 8px;
}
.chart-card-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
}
.chart-controls {
    display: flex;
    gap: 4px;
}
.chart-btn-sm {
    background: rgba(149, 165, 166, 0.1);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 4px;
    cursor: pointer;
}
.chart-btn-sm.active,
.chart-btn-sm:hover {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
}
.chart-container-wrapper {
    position: relative;
    height: 245px;
    width: 100%;
}

/* Auth, Roles, User Detail & Tabs */
.guest-main-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.login-card {
    width: 100%;
    max-width: 380px;
    border-radius: 12px;
    background-color: var(--bg-dashboard-card);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
}
.login-btn-primary {
    background-color: var(--accent-blue);
    color: #ffffff;
    border: none;
    transition: all 0.2s ease;
}
.login-btn-primary:hover {
    background-color: var(--accent-teal);
    color: #ffffff;
}
.btn-toggle-password {
    background-color: var(--bg-topbar-line) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(149, 165, 166, 0.3) !important;
    border-left: none !important;
}
.form-divider {
    border-top: 1px solid var(--border-subtle);
    margin: 1.25rem 0;
}

.permission-group-box {
    background-color: var(--bg-workspace);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px;
    height: 100%;
}
.permission-group-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-teal);
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.badge-role-level {
    background-color: rgba(13, 148, 136, 0.12);
    color: var(--accent-teal);
    border: 1px solid rgba(13, 148, 136, 0.3);
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
}
.badge-status-active {
    background-color: rgba(13, 148, 136, 0.14);
    color: var(--accent-teal);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}
.badge-status-inactive {
    background-color: rgba(220, 38, 38, 0.14);
    color: var(--accent-red);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.user-detail-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-teal));
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-meta-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}
.user-meta-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.78rem;
    gap: 10px;
}
.user-meta-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.perm-audit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 0.76rem;
    border-bottom: 1px dashed var(--border-subtle);
}
.perm-audit-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.perm-source-tag {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}
.perm-source-role {
    background-color: rgba(37, 99, 235, 0.14);
    color: var(--accent-blue);
}
.perm-source-allow {
    background-color: rgba(13, 148, 136, 0.14);
    color: var(--accent-teal);
}
.perm-source-deny {
    background-color: rgba(220, 38, 38, 0.14);
    color: var(--accent-red);
}
.perm-source-none {
    background-color: rgba(149, 165, 166, 0.12);
    color: var(--text-muted);
}

.roms-notif-menu {
    min-width: 250px;
    font-size: 0.78rem;
}
.roms-workspace-footer {
    border-top: 1px solid var(--border-subtle);
    font-size: 0.74rem;
}

.roms-nav-tabs {
    border-bottom: 1px solid var(--border-subtle);
    gap: 5px;
}
.roms-nav-tabs .nav-link {
    color: var(--text-muted);
    background-color: transparent;
    border: 1px solid transparent;
    border-bottom: 2px solid transparent;
    border-radius: 6px 6px 0 0;
    padding: 0.42rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
}
.roms-nav-tabs .nav-link.active {
    color: var(--accent-teal);
    background-color: rgba(13, 148, 136, 0.08);
    border-color: var(--border-subtle);
    border-bottom: 2px solid var(--accent-teal);
}

/* =========================================================
   ROMS-DASH LARAVEL INTEGRATION HELPERS (ZERO-INLINE CSS)
   ========================================================= */
.roms-brand-link {
    text-decoration: none;
    color: inherit;
}

.roms-avatar-circle-overflow {
    overflow: hidden;
    cursor: pointer;
    padding: 0;
}

.roms-avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-teal));
    color: #ffffff;
    font-weight: 800;
    font-size: 0.74rem;
    border-radius: 50%;
}

.roms-avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-teal));
    color: #ffffff;
    font-weight: 800;
    font-size: 0.74rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chart-container-wrapper-sm {
    position: relative;
    height: 220px;
    width: 100%;
}

.roms-alert-box {
    background-color: var(--bg-dashboard-card);
    border: 1px solid rgba(13, 148, 136, 0.35);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 9px 14px;
    margin-bottom: 12px;
    font-size: 0.78rem;
}

.roms-alert-danger {
    border-color: rgba(220, 38, 38, 0.6);
}

.roms-alert-warning {
    border-color: rgba(245, 158, 11, 0.6);
}

.bar-w-80 {
    width: 80%;
}
.bar-w-55 {
    width: 55%;
}
.bar-w-40 {
    width: 40%;
}

.roms-db-pill {
    background-color: rgba(0, 245, 212, 0.12);
    color: var(--accent-teal);
    border: 1px solid rgba(0, 245, 212, 0.25);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 600;
}

body:not(.dark-mode) .roms-db-pill {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--accent-blue);
    border-color: rgba(37, 99, 235, 0.25);
}

body.dark-mode .table {
    color: var(--text-primary);
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: rgba(149, 165, 166, 0.15);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    --bs-table-hover-bg: rgba(0, 245, 212, 0.05);
}

body.dark-mode .modal-content {
    background-color: #242a30;
    color: var(--text-primary);
    border: 1px solid rgba(149, 165, 166, 0.2);
}

body.dark-mode .modal-header,
body.dark-mode .modal-footer {
    border-color: rgba(149, 165, 166, 0.15);
}

body.dark-mode .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

body.dark-mode code {
    color: var(--accent-teal);
}

.roms-cred-box {
    background-color: var(--bg-workspace);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.76rem;
}
