/* =========================================================
   DISKOMINFO Admin — "GOV BLUE" Console (Tailwind-aligned)
   Loaded alongside css/tailwind.css. Keep only shell/complex
   pieces here; use Tailwind utilities in markup where possible.
   ========================================================= */
:root {
    --admin-sidebar: #0a1128;
    --admin-sidebar-2: #0e1f4d;
    --admin-sidebar-text: #a8b8dc;
    --admin-primary: #1d4ed8;
    --admin-accent: #0ea5e9;
    --admin-cyan: #22d3ee;
    --admin-grad: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #0ea5e9 100%);
    --admin-ink: #0a1730;
    --admin-ink-soft: #47567a;
    --admin-line: rgba(10, 23, 48, .09);
    --admin-glow: 0 8px 30px rgba(37, 99, 235, .35);
    --admin-shadow: 0 1px 2px rgba(10, 23, 48, .05), 0 6px 18px rgba(10, 23, 48, .06);
    --admin-radius: 14px;
    --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
}

body {
    background:
        radial-gradient(1000px 460px at 88% -8%, rgba(14, 165, 233, .08), transparent 60%),
        radial-gradient(800px 400px at 0% 0%, rgba(29, 78, 216, .08), transparent 55%),
        #eef2fa;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, .stat-value, .sidebar-brand { font-family: var(--font-display); letter-spacing: -.02em; }

.admin-shell { min-height: 100vh; }

/* ============ Sidebar ============ */
.admin-sidebar {
    width: 248px;
    min-width: 248px;
    background:
        radial-gradient(340px 200px at 100% 0%, rgba(14, 165, 233, .3), transparent 60%),
        radial-gradient(300px 260px at 0% 100%, rgba(34, 211, 238, .16), transparent 55%),
        linear-gradient(180deg, var(--admin-sidebar), var(--admin-sidebar-2));
    color: var(--admin-sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid rgba(14, 165, 233, .25);
    scrollbar-width: thin;
}

.admin-sidebar .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px;
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.sidebar-brand small { font-weight: 400; opacity: .65; font-size: 12px; letter-spacing: .02em; }
.brand-icon {
    font-size: 26px; color: #38bdf8;
    background: rgba(56, 189, 248, .14);
    border: 1px solid rgba(56, 189, 248, .35);
    border-radius: 12px;
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(56, 189, 248, .25);
}
.brand-text { font-size: 15px; letter-spacing: .02em; }
.brand-text small { display: block; font-weight: 400; opacity: .65; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-top: 1px; }

.top-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--admin-ink-soft);
    text-decoration: none;
    font-size: .8rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 10px;
    transition: background .15s, color .15s;
}
.top-link:hover { background: rgba(29, 78, 216, .06); color: var(--admin-primary); }

.sidebar-nav { flex: 1; padding: 12px 10px; }

.nav-section {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #64748f;
    padding: 16px 10px 6px;
    font-weight: 700;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--admin-sidebar-text);
    text-decoration: none;
    padding: 9.5px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    position: relative;
    transition: background .18s, color .18s, transform .18s;
    margin-bottom: 2px;
}
.sidebar-nav .nav-item i { width: 18px; text-align: center; font-size: 1rem; }
.sidebar-nav .nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; transform: translateX(2px); }
.sidebar-nav .nav-item.active {
    background: var(--admin-grad);
    color: #fff;
    box-shadow: var(--admin-glow);
}
.sidebar-nav .nav-item.active::before {
    content: ""; position: absolute; left: 0; top: 20%; bottom: 20%;
    width: 4px; border-radius: 4px; background: #22d3ee;
}
.sidebar-nav .nav-item .badge { font-size: .68rem; }

.sidebar-footer { border-top: 1px solid rgba(255, 255, 255, .1); padding: 10px; }
.sidebar-footer .nav-item {
    color: var(--admin-sidebar-text);
    display: flex; align-items: center; gap: 11px;
    text-decoration: none; padding: 9.5px 12px; border-radius: 10px;
    font-size: 13.5px; font-weight: 500;
    transition: background .18s, color .18s;
}
.sidebar-footer .nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }

/* ============ Main area ============ */
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.admin-topbar {
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--admin-line);
    padding: 10px 18px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-content { flex: 1; }

@media (max-width: 991px) {
    .admin-shell { display: block; }
    .admin-sidebar { position: fixed; left: 0; top: 0; z-index: 1050; transform: translateX(-100%); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
    .admin-sidebar.open { transform: translateX(0); box-shadow: 0 0 60px rgba(0, 0, 0, .45); }
}

/* ============ Cards & stats ============ */
.admin-card {
    border: 1px solid var(--admin-line);
    border-radius: var(--admin-radius);
    background: #fff;
    box-shadow: var(--admin-shadow);
    overflow: hidden;
}
.admin-card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--admin-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-weight: 700;
    color: var(--admin-ink);
}
.admin-card-header h4, .admin-card-header h5 { margin: 0; }
.admin-card-body { padding: 18px; }
.admin-card-body-flush { padding: 0; }

.stat-card {
    border: 1px solid var(--admin-line);
    border-radius: var(--admin-radius);
    background: #fff;
    box-shadow: var(--admin-shadow);
    position: relative;
    overflow: hidden;
    padding: 1.1rem;
    transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(10, 23, 48, .12); }
.stat-card::after {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--admin-grad);
}
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; color: var(--admin-ink); }
.stat-card .stat-label { color: #5b6990; font-size: .82rem; font-weight: 500; }

/* ============ Tables ============ */
.admin-table thead th {
    background: linear-gradient(120deg, #0a1636, #123f8a);
    color: #e0edff;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
    border: 0 !important;
    font-weight: 600;
    padding: 12px 16px;
}
.admin-table thead th:first-child { border-radius: 10px 0 0 10px; }
.admin-table thead th:last-child { border-radius: 0 10px 10px 0; }
.admin-table td { vertical-align: middle; color: var(--admin-ink-soft); padding: 12px 16px; font-size: .875rem; }
.admin-table tbody tr { transition: background .15s; }
.admin-table tbody tr:hover { background: rgba(29, 78, 216, .05); }
.admin-table { --bs-table-hover-bg: rgba(29, 78, 216, .05); }

/* ============ Forms ============ */
.form-label { font-weight: 600; font-size: .85rem; color: var(--admin-ink); }

.form-control {
    width: 100%;
    border: 1px solid var(--admin-line);
    background: #fff;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: .875rem;
    color: var(--admin-ink);
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
    outline: none;
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, .14);
}
textarea.form-control { min-height: 96px; resize: vertical; }
select.form-control { padding-right: 32px; }
.form-control::placeholder { color: #94a3b8; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check-input { width: 16px; height: 16px; accent-color: var(--admin-primary); }
.form-text { font-size: .78rem; color: #64748b; }

/* ============ Buttons ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 9px 16px;
    font-size: .86rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .16s, color .16s, border-color .16s, box-shadow .16s, transform .12s;
    text-decoration: none;
    line-height: 1.3;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--admin-grad); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .3); }
.btn-primary:hover { box-shadow: 0 10px 22px rgba(37, 99, 235, .4); }
.btn-outline-primary { background: #fff; color: var(--admin-primary); border-color: rgba(29, 78, 216, .35); }
.btn-outline-primary:hover { background: rgba(29, 78, 216, .06); }
.btn-outline-secondary { background: #fff; color: var(--admin-ink-soft); border-color: var(--admin-line); }
.btn-outline-secondary:hover { background: #f1f5f9; }
.btn-success { background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; }
.btn-danger { background: linear-gradient(135deg, #dc2626, #b91c1c); color: #fff; }
.btn-outline-danger { background: #fff; color: #dc2626; border-color: rgba(220, 38, 38, .3); }
.btn-outline-danger:hover { background: rgba(220, 38, 38, .06); }
.btn-sm { padding: 5px 10px; font-size: .78rem; border-radius: 8px; }
.btn-lg { padding: 12px 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--admin-primary); padding: 0; font-weight: 600; }
.btn-link:hover { text-decoration: underline; }

/* ============ Badges ============ */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; line-height: 1.2; }
.bg-primary { background: #1d4ed8; color: #fff; }
.bg-success { background: #16a34a; color: #fff; }
.bg-danger { background: #dc2626; color: #fff; }
.bg-warning { background: #f59e0b; color: #fff; }
.bg-info { background: #0891b2; color: #fff; }
.bg-secondary { background: #64748b; color: #fff; }
.bg-dark { background: #0f172a; color: #fff; }
.badge-pill-soft { font-weight: 500; border-radius: 999px; }

/* ============ Alerts ============ */
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; font-size: .875rem; margin-bottom: 16px; border: 1px solid transparent; }
.alert-danger { background: rgba(220, 38, 38, .09); color: #b91c1c; border-color: rgba(220, 38, 38, .25); }
.alert-success { background: rgba(22, 163, 74, .09); color: #15803d; border-color: rgba(22, 163, 74, .25); }
.alert-warning { background: rgba(245, 158, 11, .09); color: #b45309; border-color: rgba(245, 158, 11, .3); }
.alert-info { background: rgba(8, 145, 178, .09); color: #0e7490; border-color: rgba(8, 145, 178, .25); }

/* ============ Lists ============ */
.list-group { list-style: none; margin: 0; padding: 0; }
.list-group-flush .list-group-item { border-bottom: 1px solid var(--admin-line); }
.list-group-item { padding: 12px 18px; }
.list-group-item:last-child { border-bottom: 0; }

.thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; background: #eef2f6; border: 1px solid var(--admin-line); }

/* ============ Pagination ============ */
.pagination { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pagination li { display: inline-flex; }
.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid var(--admin-line);
    background: #fff;
    color: var(--admin-ink-soft);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}
.pagination .page-link:hover { border-color: var(--admin-accent); color: var(--admin-primary); }
.pagination .active .page-link { background: var(--admin-grad); color: #fff; border-color: transparent; box-shadow: var(--admin-glow); }
.pagination .disabled .page-link { opacity: .45; pointer-events: none; }

.preview-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.preview-bars .bar { flex: 1; background: var(--admin-grad); border-radius: 3px 3px 0 0; min-height: 2px; }

/* Scrollbar */
.admin-sidebar::-webkit-scrollbar { width: 8px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, .4); border-radius: 8px; }

/* ============ Reduced transparency ============ */
@media (prefers-reduced-transparency: reduce) {
    .admin-topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
}

/* =========================================================
   Bootstrap-compat layer (admin views only).
   Admin views are authored with Bootstrap class names but we
   do NOT ship Bootstrap anymore. Provide the needed subset here
   so every admin page renders with the GOV BLUE look.
   Loaded AFTER tailwind.css so these win on conflicts.
   ========================================================= */

/* --- Cards (alias) --- */
.card {
    border: 1px solid var(--admin-line);
    border-radius: var(--admin-radius);
    background: #fff;
    box-shadow: var(--admin-shadow);
    overflow: hidden;
}
.card-body { padding: 18px; }
.card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--admin-line);
    background: rgba(29, 78, 216, .03);
    font-weight: 700;
    color: var(--admin-ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.card-title { font-weight: 700; color: var(--admin-ink); }

/* --- Tables --- */
.table-responsive { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table thead th {
    background: linear-gradient(120deg, #0a1636, #123f8a);
    color: #e0edff;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
    border: 0;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
}
.table thead th:first-child { border-radius: 10px 0 0 10px; }
.table thead th:last-child { border-radius: 0 10px 10px 0; }
.table td { vertical-align: middle; color: var(--admin-ink-soft); padding: 12px 16px; font-size: .875rem; border-bottom: 1px solid var(--admin-line); }
.table-hover tbody tr { transition: background .15s; }
.table-hover tbody tr:hover { background: rgba(29, 78, 216, .05); }
.table-warning td, .table-warning { background: rgba(245, 158, 11, .12); }
.table-striped tbody tr:nth-child(odd) { background: rgba(10, 23, 48, .02); }

/* --- Forms (aliases for select + sizes) --- */
select.form-select {
    width: 100%;
    border: 1px solid var(--admin-line);
    background: #fff url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2347567a' d='M6 8 1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    border-radius: 10px;
    padding: 9px 32px 9px 12px;
    font-size: .875rem;
    color: var(--admin-ink);
    appearance: none;
    -webkit-appearance: none;
}
select.form-select:focus { outline: none; border-color: var(--admin-accent); box-shadow: 0 0 0 4px rgba(14, 165, 233, .14); }
.form-control-sm, select.form-select-sm { padding: 5px 10px; font-size: .8rem; border-radius: 8px; }
.form-text { display: block; margin-top: 4px; font-size: .78rem; color: #64748b; }
.input-group { display: flex; }
.input-group .form-control { flex: 1 1 auto; }
.input-group-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border: 1px solid var(--admin-line);
    background: #f1f5f9;
    border-radius: 10px;
    color: var(--admin-ink-soft);
    font-size: .875rem;
    white-space: nowrap;
}
.input-group .form-control:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group .input-group-text:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* --- Grid --- */
.row { display: flex; flex-wrap: wrap; margin-right: -12px; margin-left: -12px; }
.row > [class*="col-"] { padding-right: 12px; padding-left: 12px; width: 100%; }
.row.g-3 { margin-right: -12px; margin-left: -12px; }
.row.g-3 > [class*="col-"] { padding-right: 12px; padding-left: 12px; margin-bottom: 0; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-xl-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
@media (min-width: 768px) {
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
    .col-lg-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
}
@media (min-width: 992px) {
    .col-lg-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
}

/* --- Flexbox / display --- */
.d-flex { display: flex; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.flex-grow-1 { flex-grow: 1; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.align-items-start { align-items: flex-start; }
.align-self-start { align-self: flex-start; }

/* --- Spacing (Bootstrap scale) --- */
.gap-2 { gap: .5rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: .25rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.me-1 { margin-right: .25rem; }
.ms-1 { margin-left: .25rem; }
.ms-auto { margin-left: auto; }
.me-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.p-lg-5 { padding: 3rem; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.min-vh-100 { min-height: 100vh; }

/* --- Text --- */
.text-muted { color: #5b6990; }
.text-dark { color: var(--admin-ink); }
.text-primary { color: var(--admin-primary); }
.text-success { color: #16a34a; }
.text-danger { color: #dc2626; }
.text-end { text-align: right; }
.text-center { text-align: center; }
.text-nowrap { white-space: nowrap; }
.text-decoration-none { text-decoration: none; }
.fw-normal { font-weight: 400; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }
.fs-3 { font-size: 1.75rem; }
.small { font-size: .8em; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Media / misc --- */
.img-fluid { max-width: 100%; height: auto; }
.rounded { border-radius: .375rem; }
.rounded-circle { border-radius: 50%; }
.border { border: 1px solid #dbe2ee; }
.border-0 { border: 0; }
.shadow-lg { box-shadow: 0 1rem 3rem rgba(10, 23, 48, .18); }
.bg-light { background: #f4f7fb; }
.ratio { position: relative; width: 100%; }
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-16x9::after { display: none; }

/* --- Tabs / pills --- */
.nav { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav .nav-item { list-style: none; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; color: var(--admin-ink-soft); text-decoration: none; font-size: .85rem; font-weight: 500; transition: background .15s, color .15s; }
.nav-pills .nav-link:hover { background: rgba(29, 78, 216, .06); color: var(--admin-primary); }
.nav-pills .nav-link.active { background: var(--admin-grad); color: #fff; box-shadow: var(--admin-glow); }

/* --- Button group --- */
.btn-group { display: inline-flex; }
.btn-group .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.btn-group .btn:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* --- Pagination extras --- */
.pagination .page-item { display: inline-flex; }
.pagination .page-item.active .page-link { background: var(--admin-grad); color: #fff; border-color: transparent; box-shadow: var(--admin-glow); }
.pagination .page-item.disabled .page-link { opacity: .45; pointer-events: none; }
