/* ════════════════════════════════════════════════════
   THEME VARIABLES
   ════════════════════════════════════════════════════ */
:root {
    --sidebar-width: 260px;
    --sidebar-width-collapsed: 80px;
    --transition-speed: 0.25s;

    /* Default — Navy */
    --primary: #0b5cad;
    --primary-rgb: 11, 92, 173;
    --sidebar-bg: #17324d;
    --sidebar-text: #cdd9e5;
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --sidebar-active-bg: #2563eb;
    --sidebar-active-text: #ffffff;

    --bg: #f4f6f8;
    --bg-card: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Theme: Teal */
[data-theme="teal"] {
    --primary: #0b8a8f;
    --primary-rgb: 11, 138, 143;
    --sidebar-bg: #14353d;
    --sidebar-active-bg: #06b6d4;
}

/* Theme: Forest */
[data-theme="forest"] {
    --primary: #1a7a40;
    --primary-rgb: 26, 122, 64;
    --sidebar-bg: #1a3324;
    --sidebar-active-bg: #16a34a;
}

/* Theme: Burgundy */
[data-theme="burgundy"] {
    --primary: #a01a2a;
    --primary-rgb: 160, 26, 42;
    --sidebar-bg: #3a1520;
    --sidebar-active-bg: #dc2626;
}

/* Theme: Dark */
[data-bs-theme="dark"] {
    --primary: #60a5fa;
    --primary-rgb: 96, 165, 250;
    --sidebar-bg: #0f172a;
    --sidebar-text: #e2e8f0;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active-bg: #3b82f6;
    --bg: #020617;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #cbd5e1;
    --border: #334155;
}

/* ════════════════════════════════════════════════════
   BASE
   ════════════════════════════════════════════════════ */
body {
    background: var(--bg);
    color: var(--text-main);
    font-size: 14px;
}

/* Prevent sidebar transition flash on first paint */
html.preload-collapsed .sidebar-fixed,
html.preload-collapsed .content-main {
    transition: none !important;
}

/* ════════════════════════════════════════════════════
   SIDEBAR (desktop, grid 3-kolom)
   ════════════════════════════════════════════════════ */
.sidebar-fixed {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    z-index: 1040;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.05);
    padding: 1rem;
    transition: width var(--transition-speed) ease;
}

.sidebar-header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.sidebar-fixed .sidebar-brand-link {
    color: #fff !important;
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#sidebarToggle {
    background: transparent;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

#sidebarToggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-fixed .nav-heading {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--sidebar-text);
    opacity: 0.55;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.6rem 0.25rem 0.2rem;
    margin: 0.25rem 0 0;
    white-space: nowrap;
}

.sidebar-fixed .nav-item-container {
    padding: 0 0.1rem;
}

.sidebar-fixed .nav-item-container .row {
    --bs-gutter-x: 0.3rem;
    --bs-gutter-y: 0.3rem;
}

/* Grid: 4 kolom (col-4 di HTML, override jadi 25%) — lebih compact */
.sidebar-fixed .nav-item-container .col-4 {
    flex: 0 0 25%;
    max-width: 25%;
}

.sidebar-fixed .nav-link {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.1rem;     /* lebih ringkas */
    font-size: 0.6rem;           /* sedikit lebih kecil tapi tetap terbaca */
    font-weight: 600;
    color: var(--sidebar-text);
    border-radius: 0.45rem;
    background-color: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.15s ease;
    height: 100%;
    text-align: center;
    text-decoration: none;
    line-height: 1.1;
}

.sidebar-fixed .nav-link span {
    display: block;
    white-space: normal;
    overflow: hidden;
    max-width: 100%;
    line-height: 1.08;
    margin-top: 0.2rem;
    word-break: break-word;
}

.sidebar-fixed .nav-link i {
    font-size: 0.95rem;
    margin-bottom: 0.05rem;
    color: rgba(147, 197, 253, 0.95);
    transition: color 0.15s;
}

.sidebar-fixed .nav-link:hover {
    background-color: var(--sidebar-hover);
    color: #fff;
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.15);
}

.sidebar-fixed .nav-link:hover i {
    color: #dbeafe;
}

.sidebar-fixed .nav-link.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-text) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    border-color: transparent;
}

.sidebar-fixed .nav-link.active i {
    color: #fff !important;
}

/* ── COLLAPSED MODE ── */
body.sb-collapsed .sidebar-fixed {
    width: var(--sidebar-width-collapsed);
    padding: 1rem 0.4rem;
}

body.sb-collapsed .sidebar-brand-link span,
body.sb-collapsed .nav-heading,
body.sb-collapsed .nav-link span,
body.sb-collapsed #dropdownUser1 strong {
    display: none !important;
}

body.sb-collapsed .sidebar-header-wrapper {
    justify-content: center;
}

body.sb-collapsed .sidebar-brand-link i {
    margin: 0 !important;
}

body.sb-collapsed .sidebar-fixed .nav-link {
    padding: 0.7rem 0 !important;
}

body.sb-collapsed .sidebar-fixed .nav-link i {
    font-size: 1.4rem;
    margin: 0;
}

body.sb-collapsed .sidebar-fixed .nav-item-container .col-4 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-bottom: 3px;
}

body.sb-collapsed #dropdownUser1 i {
    margin: 0 !important;
    font-size: 1.5rem !important;
}

/* ── SIDEBAR FOOTER (user dropdown) ── */
.sidebar-footer-fixed {
    position: sticky;
    bottom: -1rem;
    background-color: var(--sidebar-bg);
    margin: 0 -1rem -1rem;
    padding: 0.6rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10;
}

#dropdownUser1 > a {
    color: #fff !important;
    padding: 0.25rem 0;
}

#dropdownUser1 strong {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Sidebar user-dropdown (di footer): pakai dropup direction + position:fixed
   supaya tembus overflow:hidden sidebar. Anchored ke kiri-bawah viewport, terbuka
   ke atas dengan max-height aman. data-bs-display="static" mencegah Popper
   reposition aneh yang bikin menu offscreen sampai user scroll. */
.sidebar-fixed .dropup .dropdown-menu {
    position: fixed !important;
    left: 0.6rem !important;
    bottom: 4rem !important;
    top: auto !important;
    transform: none !important;
    z-index: 1060;
    min-width: 220px;
    max-height: 70vh;
    overflow-y: auto;
}

body.sb-collapsed .sidebar-fixed .dropup .dropdown-menu {
    left: 0.4rem !important;
}

.theme-item.active {
    background-color: rgba(var(--primary-rgb), 0.12);
    font-weight: 700;
}

/* ── Theme swatches 2x2 grid (di sidebar footer, samping user) ── */
.user-prefs-row {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.theme-swatch-grid {
    display: grid;
    grid-template-columns: repeat(2, 18px);
    grid-template-rows: repeat(2, 18px);
    gap: 4px;
}

.theme-swatch {
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
}

.theme-swatch:hover,
.theme-swatch.active {
    border-color: rgba(255, 255, 255, 0.85);
    transform: scale(1.15);
}

/* ── Size text buttons (S/M/L/XL) — 2×2 grid sama style swatches ── */
.size-text-group {
    display: grid;
    grid-template-columns: repeat(2, 24px);
    grid-template-rows: repeat(2, 18px);
    gap: 3px;
}

.size-btn {
    min-width: 24px;
    height: 18px;
    padding: 0 2px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: var(--sidebar-text);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.size-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.size-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.theme-dark-toggle {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Legacy fsz-slider (saat ini tidak dipakai lagi, tapi tetap di-style supaya tidak break) */
.fsz-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--primary) 0%, var(--primary) 33%, #ddd 33%, #ddd 100%);
    outline: none;
    cursor: pointer;
}

.fsz-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.fsz-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
}

.fsz-ticks {
    display: flex;
    justify-content: space-between;
    padding: 4px 1px 0;
    font-size: 9px;
    color: #94a3b8;
    font-weight: 700;
}

/* ════════════════════════════════════════════════════
   CONTENT AREA
   ════════════════════════════════════════════════════ */
.content-main {
    width: 100%;
    min-width: 0;
    transition: margin-left var(--transition-speed) ease;
}

@media (min-width: 992px) {
    .content-main {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
        max-width: calc(100vw - var(--sidebar-width));
    }
    body.sb-collapsed .content-main {
        margin-left: var(--sidebar-width-collapsed);
        width: calc(100% - var(--sidebar-width-collapsed));
        max-width: calc(100vw - var(--sidebar-width-collapsed));
    }
}

.content-main main {
    padding-bottom: 100px;
    min-height: 100vh;
    overflow-x: hidden;   /* Cegah scroll horizontal layout-level */
}

@media (min-width: 992px) {
    .content-main main {
        padding-bottom: 2rem;
    }
}

/* Pastikan tabel besar tetap scrollable di dalam container, bukan menggeser layout */
.card .card-body { overflow-x: auto; }
.card .card-body.p-0 > .table,
.card .card-body.p-0 > div.dataTables_wrapper { overflow-x: auto; }
.dataTables_wrapper { width: 100%; overflow-x: auto; }
table.dataTable { width: 100% !important; }
.table-responsive { width: 100%; }

/* ════════════════════════════════════════════════════
   BOTTOM NAV (mobile)
   ════════════════════════════════════════════════════ */
.bottom-nav {
    background-color: var(--bg-card) !important;
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom);
    scrollbar-width: none;
    z-index: 2000 !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    transition: transform 0.25s ease;
}

.bottom-nav::-webkit-scrollbar { display: none; }

.bottom-nav .nav-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.3rem 0.4rem;
    min-width: 72px;
    flex-shrink: 0;
    line-height: 1;
}

.bottom-nav .nav-link i {
    font-size: 1.2rem;
    margin-bottom: 3px;
}

.bottom-nav .nav-link.active {
    color: var(--primary) !important;
}

.bottom-nav .dropdown-menu {
    position: fixed !important;
    bottom: 70px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18) !important;
    z-index: 2500 !important;
    padding: 0.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.bottom-nav .dropdown-toggle::after { display: none !important; }

/* ════════════════════════════════════════════════════
   PAGE HEADER (colored, like Elang App card-header)
   ════════════════════════════════════════════════════ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary);
    color: #fff;
    padding: 0.85rem 1.25rem;
    border-radius: 0.6rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.18);
    gap: 0.75rem;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-header h1 i {
    opacity: 0.95;
}

.page-header .btn-primary {
    background: #fff !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
    color: var(--primary) !important;
    font-weight: 700;
}

.page-header .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--primary) !important;
    filter: none;
}

.page-header .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    color: #fff !important;
}

.page-header .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    color: #fff !important;
}

/* ════════════════════════════════════════════════════
   CARD
   ════════════════════════════════════════════════════ */
.card {
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 12px 18px;
    color: var(--primary);
    border-radius: 0.6rem 0.6rem 0 0;
}

.card-body { padding: 18px; }

/* ════════════════════════════════════════════════════
   FILTER BAR (colored header via ::before)
   ════════════════════════════════════════════════════ */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.filter-bar::before {
    content: "\F2B0  Filter";
    font-family: "bootstrap-icons";
    font-weight: 700;
    display: block;
    background: var(--primary);
    color: #fff;
    padding: 0.6rem 1rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.filter-bar > .row {
    margin: 0 !important;
    padding: 0.85rem 1rem;
}

/* ════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════ */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary);
    border-color: var(--primary);
    filter: brightness(0.88);
}

.btn-primary:active { filter: brightness(0.8); }

.btn-action {
    font-size: 12px;
    padding: 3px 9px;
}

/* ════════════════════════════════════════════════════
   DASHBOARD KPI CARDS (gradient + white text)
   ════════════════════════════════════════════════════ */
.kpi-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    padding: 1.1rem 1.25rem 1.1rem;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: transform 0.18s, box-shadow 0.18s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.kpi-card-primary   { background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 70%, #000) 100%); }
.kpi-card-success   { background: linear-gradient(135deg, #198754 0%, #0f5132 100%); }
.kpi-card-warning   { background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%); }
.kpi-card-danger    { background: linear-gradient(135deg, #dc3545 0%, #842029 100%); }
.kpi-card-info      { background: linear-gradient(135deg, #0dcaf0 0%, #055160 100%); }
.kpi-card-secondary { background: linear-gradient(135deg, #6c757d 0%, #343a40 100%); }

.kpi-icon {
    position: absolute;
    top: 0.6rem;
    right: 0.9rem;
    font-size: 2.4rem;
    opacity: 0.22;
}

.kpi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.92;
    margin-bottom: 0.35rem;
}

.kpi-value {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Card header bertema (primary gradient) untuk section di dashboard */
.dashboard-section-header {
    background: linear-gradient(90deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 75%, #000) 100%);
    color: #fff;
    border-bottom: none;
    padding: 0.85rem 1.2rem;
    letter-spacing: 0.02em;
}

.dashboard-section-header h6,
.dashboard-section-header i {
    color: #fff !important;
}


/* ════════════════════════════════════════════════════
   DASHBOARD CARDS
   ════════════════════════════════════════════════════ */
.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    padding: 24px 20px;
    text-align: center;
    transition: box-shadow 0.18s, transform 0.18s;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.dash-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.dash-icon {
    font-size: 2.4rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.dash-card h5 {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

/* ════════════════════════════════════════════════════
   FORMS
   ════════════════════════════════════════════════════ */
.form-wrapper { max-width: 760px; }

.form-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-main);
}

.form-control,
.form-select {
    font-size: 13.5px;
    border-color: var(--border);
    border-radius: 6px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
}

.input-group-text {
    background: #f8f9fb;
    border-color: var(--border);
    font-size: 13.5px;
    color: var(--text-muted);
}

.form-actions {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

/* Sticky-bottom action bar — selalu visible berapa pun tinggi form,
   user tidak perlu scroll ke bawah untuk klik Simpan/Batal. */
.form-actions-bar {
    position: sticky;
    bottom: 0;
    z-index: 50;
    margin: 1rem -1rem -1rem;        /* full-bleed di dalam main */
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

@media (max-width: 991.98px) {
    /* Di mobile, naikkan supaya tidak ketutupan bottom-nav */
    .form-actions-bar {
        bottom: 65px;
    }
}

/* ════════════════════════════════════════════════════
   DATATABLES
   ════════════════════════════════════════════════════ */
div.dataTables_wrapper { padding: 12px 16px 16px; }

table.dataTable thead th {
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 2px solid color-mix(in srgb, var(--primary) 22%, var(--border));
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 10px 14px;
    white-space: nowrap;
}

table.dataTable tbody td {
    font-size: 13px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    padding: 10px 14px;
}

table.dataTable tbody tr:last-child td { border-bottom: none; }

table.dataTable.no-footer { border-bottom: 1px solid var(--border); }

table.dataTable.table-hover tbody tr:hover > td {
    background-color: color-mix(in srgb, var(--primary) 6%, transparent) !important;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_info {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.dataTables_wrapper .dataTables_length select {
    font-size: 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 2px 22px 2px 8px;
    appearance: auto;
    -webkit-appearance: auto;
    background-color: var(--bg-card);
    cursor: pointer;
    color: var(--text-main);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    font-size: 12.5px;
    border-radius: 5px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: var(--border) !important;
    color: var(--primary) !important;
}

.dataTables_processing { font-size: 13px; color: var(--primary); }

/* ════════════════════════════════════════════════════
   STOCK BADGE / PRODUCT THUMB / PHOTO UPLOAD
   ════════════════════════════════════════════════════ */
.stock-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(var(--primary-rgb), 0.06);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
    margin-right: 3px;
    white-space: nowrap;
}

.product-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: block;
}

.product-thumb-ph {
    width: 44px;
    height: 44px;
    background: #f3f4f6;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 17px;
}

.photo-upload-wrapper {
    position: relative;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
}

.photo-upload-box {
    width: 100%;
    max-width: 260px;       /* cap supaya tidak melebar di window besar */
    aspect-ratio: 1 / 1;
    background: #f8f9fb;
    border: 2px dashed rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;         /* center secara horizontal di dalam kolomnya */
}

.photo-remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(220, 53, 69, 0.92);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    z-index: 5;
    transition: background 0.15s, transform 0.15s;
}

.photo-remove-btn:hover {
    background: #dc3545;
    transform: scale(1.08);
}

.photo-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 24px;
    text-align: center;
}

/* ════════════════════════════════════════════════════
   LOGIN
   ════════════════════════════════════════════════════ */
.login-wrapper {
    min-height: 100vh;
    background: var(--bg);
}
