:root {
    --ink: #111827;
    --muted: #667085;
    --line: #e5e7eb;
    --paper: #ffffff;
    --soft: #f4f7fb;
    --brand: #0f766e;
    --brand-dark: #064e3b;
    --orange: #f97316;
    --sidebar: #0b1220;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 12%, rgba(15, 118, 110, .11), transparent 32rem),
        radial-gradient(circle at 94% 4%, rgba(249, 115, 22, .09), transparent 26rem),
        #f6f8fb;
}

.fw-black { font-weight: 900; letter-spacing: -.045em; }

.app-shell {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar-desktop {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 18px;
}

.sidebar-card {
    height: 100%;
    padding: 22px;
    border-radius: 28px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
        var(--sidebar);
    box-shadow: 0 28px 70px rgba(15, 23, 42, .18);
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    margin-bottom: 26px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), #22c55e);
    font-size: 1.2rem;
}

.brand strong,
.brand small { display: block; }
.brand strong { font-weight: 850; }
.brand small { color: rgba(255,255,255,.55); font-size: .78rem; }

.sidebar-nav { display: grid; gap: 8px; }

.nav-item-link {
    min-height: 48px;
    padding: 0 14px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,.68);
    text-decoration: none;
    font-weight: 700;
    transition: .18s ease;
}

.nav-item-link:hover,
.nav-item-link.active {
    color: #fff;
    background: rgba(255,255,255,.11);
}

.sidebar-footer {
    margin-top: auto;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.76);
    background: rgba(255,255,255,.07);
    font-weight: 700;
}

.content-wrap {
    width: 100%;
    max-width: 1540px;
    padding: 34px 36px 56px;
}

.mobile-menu {
    display: none;
    position: fixed;
    z-index: 1050;
    right: 18px;
    top: 18px;
    width: 48px;
    height: 48px;
    border-radius: 16px;
}

.offcanvas .sidebar-card {
    border-radius: 0;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--brand);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.page-hero,
.detail-hero {
    border-radius: 32px;
    padding: clamp(26px, 4vw, 44px);
    color: #fff;
    overflow: hidden;
    position: relative;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .98), rgba(6, 78, 59, .91)),
        radial-gradient(circle at 84% 10%, rgba(34,197,94,.45), transparent 24rem);
    box-shadow: 0 30px 80px rgba(15, 23, 42, .2);
}

.page-hero::after,
.detail-hero::after {
    content: "";
    position: absolute;
    right: -84px;
    top: -82px;
    width: 260px;
    height: 260px;
    border: 38px solid rgba(255,255,255,.08);
    border-radius: 999px;
}

.page-hero > *,
.detail-hero > * { position: relative; z-index: 1; }
.page-hero .eyebrow,
.detail-hero .eyebrow { color: #86efac; }
.page-hero .lead,
.detail-hero .lead { color: rgba(255,255,255,.72); }

.hero-search {
    max-width: 780px;
    min-height: 62px;
    padding: 6px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(0,0,0,.18);
}

.hero-search i { color: var(--muted); padding-left: 14px; }
.hero-search input { width: 100%; border: 0; outline: 0; font-weight: 700; color: var(--ink); }
.hero-search .btn { min-height: 48px; border-radius: 16px; padding-inline: 24px; }

.mini-stat {
    min-height: 114px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(10px);
}

.mini-stat strong { display: block; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1; font-weight: 900; letter-spacing: -.07em; }
.mini-stat span { display: block; margin-top: 8px; color: rgba(255,255,255,.72); font-weight: 700; }

.card { background: rgba(255,255,255,.9); backdrop-filter: blur(14px); }
.form-label { color: #475467; font-weight: 800; font-size: .82rem; }
.form-control,
.form-select,
.ts-control {
    min-height: 46px;
    border-radius: 14px !important;
    border-color: var(--line) !important;
    font-weight: 650;
}

.ts-wrapper.single .ts-control { background-image: none !important; }
.ts-dropdown { border-radius: 14px; overflow: hidden; }
.no-results { padding: 10px 12px; color: var(--muted); }

.btn { font-weight: 800; }
.btn-dark { background: #111827; border-color: #111827; }
.btn-dark:hover { background: #0b1220; border-color: #0b1220; }

.directory-table thead th {
    background: #f8fafc;
    color: #667085;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 16px 20px;
    white-space: nowrap;
}

.directory-table tbody td {
    padding: 18px 20px;
    border-color: #eef2f6;
}

.journal-col { min-width: 320px; }
.index-count {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #064e3b;
    background: #dcfce7;
    font-weight: 900;
}

.sinta-badge {
    color: #7c2d12;
    background: #ffedd5;
}

.meta-grid > div,
.meta-box {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.meta-grid span,
.meta-box span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.meta-grid strong,
.meta-box strong {
    display: block;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.section-label {
    margin: 26px 0 12px;
    color: #111827;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.section-label:first-child { margin-top: 0; }
.admin-list { max-height: 820px; overflow: auto; padding-right: 4px; }
.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.admin-item strong,
.admin-item span,
.admin-item small { display: block; }
.admin-item strong { font-weight: 850; }
.admin-item span { color: var(--muted); font-size: .86rem; margin-top: 3px; }
.admin-item small { color: #98a2b3; font-size: .76rem; margin-top: 4px; }
.min-w-0 { min-width: 0; }

.login-wrap {
    min-height: calc(100vh - 90px);
    display: grid;
    place-items: center;
}

.login-card { width: min(460px, 100%); }
.login-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), #22c55e);
    font-size: 1.35rem;
}

@media (max-width: 1180px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar-desktop { display: none; }
    .mobile-menu { display: grid; place-items: center; }
    .content-wrap { padding: 84px 18px 38px; }
}

@media (max-width: 768px) {
    .hero-search { flex-wrap: wrap; padding: 10px; }
    .hero-search input { min-height: 42px; padding-left: 10px; }
    .hero-search i { display: none; }
    .hero-search .btn { width: 100%; }
    .mini-stat { min-height: 94px; }
    .directory-table tbody td,
    .directory-table thead th { padding: 14px; }
}

/* Modern glassy dashboard refinement */
body {
    background:
        radial-gradient(circle at 12% 10%, rgba(20, 184, 166, .18), transparent 30rem),
        radial-gradient(circle at 88% 0%, rgba(59, 130, 246, .13), transparent 28rem),
        radial-gradient(circle at 82% 70%, rgba(249, 115, 22, .12), transparent 24rem),
        linear-gradient(135deg, #f8fbff 0%, #eef6f5 48%, #f8fafc 100%);
}

.glass-hero {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .88), rgba(6, 78, 59, .78)),
        radial-gradient(circle at 78% 18%, rgba(45, 212, 191, .35), transparent 24rem),
        radial-gradient(circle at 18% 86%, rgba(59, 130, 246, .22), transparent 22rem);
    border: 1px solid rgba(255,255,255,.22);
    box-shadow: 0 32px 90px rgba(15, 23, 42, .24);
    backdrop-filter: blur(18px);
}

.glass-search {
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(255,255,255,.72);
    box-shadow: 0 24px 56px rgba(15, 23, 42, .22);
    backdrop-filter: blur(18px);
}

.stat-glass-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.stat-glass-card,
.stat-breakdown-card,
.glass-panel {
    border: 1px solid rgba(255,255,255,.62) !important;
    background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(255,255,255,.48)) !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .12) !important;
    backdrop-filter: blur(18px);
}

.stat-glass-card {
    min-height: 188px;
    padding: 22px;
    border-radius: 28px;
    color: #0f172a;
    position: relative;
    overflow: hidden;
}

.stat-glass-card::after {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    right: -54px;
    top: -58px;
    border-radius: 999px;
    background: rgba(20, 184, 166, .18);
}

.stat-glass-card.stat-primary {
    color: #fff;
    background: linear-gradient(145deg, rgba(20, 184, 166, .86), rgba(15, 23, 42, .72)) !important;
    border-color: rgba(255,255,255,.32) !important;
}

.stat-glass-card .stat-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(255,255,255,.24);
    color: inherit;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.stat-glass-card span,
.stat-glass-card strong,
.stat-glass-card small {
    display: block;
    position: relative;
    z-index: 1;
}

.stat-glass-card span {
    color: currentColor;
    opacity: .72;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.stat-glass-card strong {
    margin-top: 8px;
    font-size: clamp(2.35rem, 5vw, 4.25rem);
    line-height: .9;
    font-weight: 950;
    letter-spacing: -.08em;
}

.stat-glass-card small {
    margin-top: 12px;
    color: currentColor;
    opacity: .64;
    font-weight: 750;
}

.stat-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.stat-breakdown-card {
    padding: 22px;
    border-radius: 28px;
    color: #0f172a;
}

.stat-breakdown-card > .d-flex > i {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #0f766e;
    background: rgba(15, 118, 110, .10);
    font-size: 1.2rem;
}

.stat-breakdown-card .stat-label {
    display: block;
    color: #64748b;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.stat-breakdown-card > .d-flex strong {
    display: block;
    margin-top: 4px;
    font-size: 2rem;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -.06em;
}

.stat-chip-grid {
    display: grid;
    gap: 10px;
}

.stat-chip-grid.four-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-chip-grid.six-cols { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.stat-chip {
    min-height: 74px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255,255,255,.68);
    border: 1px solid rgba(15, 23, 42, .06);
    display: grid;
    align-content: center;
    gap: 4px;
}

.stat-chip span {
    color: #64748b;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.stat-chip strong {
    color: #0f172a;
    font-size: 1.45rem;
    line-height: 1;
    font-weight: 950;
}

.filter-panel,
.data-card {
    border-radius: 28px !important;
}

.data-card .card-header {
    border-bottom: 1px solid rgba(15, 23, 42, .06) !important;
}

.directory-table {
    overflow: hidden;
    border-radius: 22px;
}

.directory-table thead th {
    background: rgba(248, 250, 252, .88);
}

.directory-table tbody tr {
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.directory-table tbody tr:hover {
    background: rgba(240, 253, 250, .68);
}

.dt-container .dt-search input,
.dt-container .dt-length select {
    border-radius: 14px !important;
    border: 1px solid rgba(15, 23, 42, .10) !important;
    background-color: rgba(255,255,255,.72) !important;
    font-weight: 700;
}

.dt-container .dt-search label,
.dt-container .dt-length label,
.dt-container .dt-info {
    color: #64748b;
    font-weight: 750;
    font-size: .88rem;
}

.dt-container .pagination .page-link {
    border-radius: 12px;
    margin-inline: 2px;
    border-color: rgba(15, 23, 42, .08);
    color: #0f172a;
    font-weight: 800;
}

.dt-container .pagination .active .page-link {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.dt-container .row:first-child,
.dt-container .row:last-child {
    padding: 14px 4px;
    row-gap: 14px;
}

@media (max-width: 1200px) {
    .stat-glass-grid,
    .stat-breakdown-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .stat-chip-grid.four-cols,
    .stat-chip-grid.six-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-glass-card { min-height: 156px; }
}

@media (max-width: 576px) {
    .stat-glass-grid { grid-template-columns: 1fr; }
    .stat-chip-grid.four-cols,
    .stat-chip-grid.six-cols { grid-template-columns: 1fr; }
    .stat-breakdown-card,
    .stat-glass-card { border-radius: 22px; }
}

/* DataTables.net official bundle polish */
.datatable-shell {
    overflow: visible;
}

.journal-datatable-container {
    color: #0f172a;
}

.journal-datatable-container .row:first-child,
.journal-datatable-container .row:last-child {
    align-items: center;
    padding: 14px 4px;
    row-gap: 14px;
}

.journal-datatable-container .dt-layout-row {
    margin: 0;
}

.journal-datatable-container .dt-layout-cell {
    padding-block: 10px;
}

.journal-datatable-container .dt-search {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 10px;
}

.journal-datatable-container .dt-length {
    display: flex;
    align-items: center;
    gap: 10px;
}

.journal-datatable-container .dt-search input,
.journal-datatable-container .dt-length select {
    min-height: 44px;
    border-radius: 16px !important;
    border: 1px solid rgba(15, 23, 42, .10) !important;
    background: rgba(255,255,255,.76) !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .07);
    font-weight: 750;
}

.journal-datatable-container .dt-search input {
    min-width: min(360px, 52vw);
    padding-inline: 16px;
}

.journal-datatable-container .dt-search label,
.journal-datatable-container .dt-length label,
.journal-datatable-container .dt-info {
    color: #64748b;
    font-size: .88rem;
    font-weight: 800;
}

.journal-datatable-container .dt-paging .pagination {
    gap: 4px;
    margin-bottom: 0;
}

.journal-datatable-container .dt-paging .page-link {
    min-width: 40px;
    min-height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px !important;
    border-color: rgba(15, 23, 42, .08);
    background: rgba(255,255,255,.78);
    color: #0f172a;
    font-weight: 850;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.journal-datatable-container .dt-paging .active .page-link {
    color: #fff;
    background: linear-gradient(135deg, #111827, #0f766e);
    border-color: transparent;
}

.journal-datatable-container .dt-paging .disabled .page-link {
    color: #94a3b8;
    background: rgba(255,255,255,.48);
}

#journalDataTable.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
#journalDataTable.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    box-shadow: none;
    background: #0f766e;
}

#journalDataTable.dataTable > tbody > tr.child ul.dtr-details {
    width: 100%;
}

#journalDataTable.dataTable > tbody > tr.child span.dtr-title {
    color: #64748b;
    font-weight: 900;
    min-width: 96px;
}

#journalDataTable.dataTable > tbody > tr.child span.dtr-data {
    color: #0f172a;
    font-weight: 700;
}

.dt-action-col {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .journal-datatable-container .dt-search,
    .journal-datatable-container .dt-length {
        align-items: stretch;
        flex-direction: column;
        justify-content: start;
    }

    .journal-datatable-container .dt-search input {
        min-width: 100%;
        width: 100%;
    }

    .journal-datatable-container .dt-layout-cell {
        width: 100%;
    }
}
