/* ============================================================
   FINZA-inspired theme — biru putih, untuk Aplikasi Bintang
   Gaya fintech/PWA: kartu rounded, sidebar putih, bottom-nav mobile
   File ini melapisi AdminLTE/Bootstrap 4 tanpa menghapusnya,
   jadi semua halaman lama (DataTables, form, dsb) tetap jalan.
   ============================================================ */
:root {
  --fin-primary: #1e63e9;
  --fin-primary-dark: #0b3ba8;
  --fin-primary-light: #e8efff;
  --fin-sky: #38bdf8;
  --fin-bg: #eef3ff;
  --fin-card: #ffffff;
  --fin-text: #0f2140;
  --fin-muted: #6b7a99;
  --fin-border: #e3eafb;
  --fin-green: #16a34a;
  --fin-amber: #d97706;
  --fin-red: #dc2626;
  --fin-radius: 20px;
  --fin-shadow: 0 10px 30px rgba(30, 99, 233, 0.10);
  --sidebar-w: 268px;
}

* { -webkit-tap-highlight-color: transparent; }
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', 'Source Sans Pro', system-ui, -apple-system, sans-serif !important;
  background: var(--fin-bg) !important;
  color: var(--fin-text) !important;
}

body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto 0;
  height: 240px;
  background: linear-gradient(135deg, #1e63e9 0%, #0b3ba8 60%, #082a78 100%);
  border-radius: 0 0 32px 32px;
  z-index: -1;
}

/* ---------- layout shell ---------- */
.fin-shell { min-height: 100vh; }

.fin-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid var(--fin-border);
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform .28s ease;
}
.fin-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 18px 14px;
}
.fin-logo {
  width: 46px; height: 46px; border-radius: 15px;
  background: linear-gradient(135deg, var(--fin-primary), var(--fin-primary-dark));
  color: #fff; font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(30,99,233,.35);
  overflow: hidden; flex-shrink: 0;
}
.fin-logo img { width: 100%; height: 100%; object-fit: cover; }
.fin-brand-name { font-weight: 800; font-size: 17px; line-height: 1.1; }
.fin-brand-sub { font-size: 11px; color: var(--fin-muted); letter-spacing: .06em; text-transform: uppercase; }

.fin-user-chip {
  margin: 4px 16px 10px;
  background: linear-gradient(135deg, #1e63e9, #3b82f6);
  color: #fff; border-radius: 16px; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
}
.fin-user-chip img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.7); }
.fin-user-chip .n { font-weight: 700; font-size: 14px; line-height: 1.2; }
.fin-user-chip .r { font-size: 11px; opacity: .85; }

.fin-menu { flex: 1; overflow-y: auto; padding: 6px 14px 90px; }
.fin-menu-label {
  font-size: 10.5px; font-weight: 800; letter-spacing: .12em;
  color: #93a3c4; margin: 16px 8px 8px; text-transform: uppercase;
}
.fin-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 14px;
  color: #33456b !important; font-weight: 600; font-size: 13.5px;
  text-decoration: none !important; margin-bottom: 2px;
  transition: background .15s, color .15s;
}
.fin-link i { width: 34px; height: 34px; border-radius: 11px; background: var(--fin-primary-light);
  color: var(--fin-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.fin-link:hover { background: #f2f6ff; }
.fin-link.active { background: linear-gradient(135deg, #1e63e9, #3f83f8); color: #fff !important; box-shadow: 0 8px 18px rgba(30,99,233,.35); }
.fin-link.active i { background: rgba(255,255,255,.22); color: #fff; }
.fin-sub { margin: 2px 0 6px 46px; border-left: 2px solid var(--fin-border); padding-left: 6px; display: none; }
.fin-group.open .fin-sub { display: block; }
.fin-sub a {
  display: block; padding: 7px 10px; border-radius: 10px; font-size: 13px;
  color: #44567e !important; text-decoration: none !important; font-weight: 500;
}
.fin-sub a:hover, .fin-sub a.active { background: var(--fin-primary-light); color: var(--fin-primary-dark) !important; font-weight: 700; }
.fin-caret { margin-left: auto; font-size: 11px; color: #93a3c4; transition: transform .2s; }
.fin-group.open .fin-caret { transform: rotate(90deg); }

.fin-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.fin-topbar {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--fin-border);
  padding: 12px 24px; display: flex; align-items: center; gap: 12px;
}
.fin-hamburger { display: none; border: 1px solid var(--fin-border); background: #fff; border-radius: 12px; width: 42px; height: 42px; color: var(--fin-primary); }
.fin-page-title { font-weight: 800; font-size: 18px; margin: 0; }
.fin-page-sub { font-size: 12px; color: var(--fin-muted); margin: 0; }
.fin-top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.fin-icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 14px;
  border: 1px solid var(--fin-border); background: #fff; color: var(--fin-primary);
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
}
.fin-icon-btn .dot {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  background: #f59e0b; color: #fff; font-size: 11px; font-weight: 800;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.fin-avatar { width: 42px; height: 42px; border-radius: 14px; object-fit: cover; border: 2px solid var(--fin-primary-light); }
.fin-logout { border: 1px solid var(--fin-border); background: #fff; border-radius: 12px; padding: 9px 14px; font-weight: 700; font-size: 13px; color: var(--fin-red); }

.fin-content { padding: 22px 24px 110px; }

/* ---------- kompatibilitas AdminLTE: sulap jadi kartu fintech ---------- */
.content-wrapper {
  background: transparent !important;
  margin-left: 0 !important;
  padding: 0 !important;
  min-height: auto !important;
}
.content-header { padding: 2px 2px 14px !important; }
.content-header h1 { font-size: 22px !important; font-weight: 800 !important; color: #fff !important; }
.content-header .breadcrumb { background: rgba(255,255,255,.16) !important; border-radius: 999px; padding: 5px 14px; }
.content-header .breadcrumb a, .content-header .breadcrumb-item.active { color: #fff !important; }
.content-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.7); }

.card {
  border: 1px solid var(--fin-border) !important;
  border-radius: var(--fin-radius) !important;
  box-shadow: var(--fin-shadow) !important;
  overflow: hidden;
}
.card-header {
  background: #fff !important; border-bottom: 1px solid var(--fin-border) !important;
  font-weight: 700; border-radius: var(--fin-radius) var(--fin-radius) 0 0 !important;
}
.card-body { background: #fff; }

.btn { border-radius: 12px !important; font-weight: 700 !important; }
.btn-primary { background: linear-gradient(135deg, #1e63e9, #3b82f6) !important; border: none !important; box-shadow: 0 6px 14px rgba(30,99,233,.35); }
.btn-primary:hover { filter: brightness(.95); }
.btn-success { border-radius: 12px !important; }
.btn-info { background: linear-gradient(135deg, #0284c7, #38bdf8) !important; border: none !important; }

.form-control, .custom-select, .select2-selection {
  border-radius: 12px !important; border: 1px solid var(--fin-border) !important;
}
.form-control:focus { border-color: var(--fin-primary) !important; box-shadow: 0 0 0 3px rgba(30,99,233,.15) !important; }

.table thead th { background: #f2f6ff; color: var(--fin-primary-dark); border: none !important; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.table tbody td { vertical-align: middle; font-size: 13.5px; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current { background: var(--fin-primary) !important; color: #fff !important; border-radius: 10px; border: none !important; }

/* small-box & info-box lama -> kartu fintech */
.small-box { border-radius: var(--fin-radius) !important; box-shadow: var(--fin-shadow) !important; overflow: hidden; border: none !important; }
.small-box.bg-info { background: linear-gradient(135deg, #1e63e9, #38bdf8) !important; }
.small-box.bg-success { background: linear-gradient(135deg, #16a34a, #4ade80) !important; }
.small-box.bg-warning { background: linear-gradient(135deg, #d97706, #fbbf24) !important; }
.small-box.bg-danger { background: linear-gradient(135deg, #dc2626, #fb7185) !important; }
.small-box .inner h3 { font-weight: 800; }
.small-box-footer { background: rgba(0,0,0,.12) !important; border-radius: 0 0 20px 20px; }

.info-box { border-radius: var(--fin-radius) !important; box-shadow: var(--fin-shadow) !important; border: 1px solid var(--fin-border) !important; background: #fff !important; }
.info-box-icon { border-radius: 14px !important; margin: 8px; }

/* ---------- komponen fintech baru (dashboard) ---------- */
.fin-hero {
  background: linear-gradient(135deg, #2b6bf0 0%, #0b3ba8 70%);
  border-radius: 24px; color: #fff; padding: 24px;
  position: relative; overflow: hidden; box-shadow: 0 16px 40px rgba(11,59,168,.35);
  margin-bottom: 18px;
}
.fin-hero::after {
  content: ''; position: absolute; right: -70px; top: -70px; width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(255,255,255,.25), transparent 70%); border-radius: 50%;
}
.fin-hero .lbl { font-size: 12px; opacity: .8; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.fin-hero .amt { font-size: clamp(26px, 4vw, 38px); font-weight: 800; margin: 4px 0 14px; }
.fin-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.fin-pill-btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none !important;
  background: rgba(255,255,255,.16); color: #fff !important; border: 1px solid rgba(255,255,255,.25);
  padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 13px;
}
.fin-pill-btn.solid { background: #fff; color: var(--fin-primary-dark) !important; border: none; }
.fin-chip-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.fin-chip { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 8px 14px; font-size: 12px; }
.fin-chip b { display: block; font-size: 14px; }

.fin-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.fin-stat {
  background: #fff; border: 1px solid var(--fin-border); border-radius: 20px;
  padding: 16px; box-shadow: var(--fin-shadow); text-decoration: none !important; color: inherit !important;
  display: block; transition: transform .15s;
}
.fin-stat:hover { transform: translateY(-2px); }
.fin-stat .ic { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 10px; }
.fin-stat .v { font-size: 22px; font-weight: 800; }
.fin-stat .t { font-size: 12px; color: var(--fin-muted); font-weight: 600; }

.fin-panel { background: #fff; border: 1px solid var(--fin-border); border-radius: 20px; box-shadow: var(--fin-shadow); padding: 18px; margin-bottom: 18px; }
.fin-panel h5 { font-weight: 800; font-size: 15px; margin: 0 0 12px; }
.fin-kv { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--fin-border); text-decoration: none !important; color: inherit !important; }
.fin-kv:last-child { border-bottom: none; }
.fin-kv .ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px; }
.fin-kv .amt { margin-left: auto; font-weight: 800; font-size: 13.5px; text-align: right; }
.fin-kv small { color: var(--fin-muted); }

.fin-footer { text-align: center; color: var(--fin-muted); font-size: 12px; padding: 18px; }

/* ---------- bottom navbar mobile ala Finza ---------- */
.fin-bottomnav {
  display: none;
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1050;
  background: #fff; border: 1px solid var(--fin-border); border-radius: 24px;
  box-shadow: 0 12px 32px rgba(11,59,168,.22);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.fin-bottomnav .row5 { display: grid; grid-template-columns: repeat(5, 1fr); }
.fin-bnav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700; color: #8ea0c2 !important; text-decoration: none !important;
  padding: 6px 2px; border-radius: 16px; position: relative;
}
.fin-bnav-item i { font-size: 19px; }
.fin-bnav-item.active { color: var(--fin-primary) !important; }
.fin-bnav-item.active::before {
  content: ''; width: 22px; height: 4px; border-radius: 999px;
  background: var(--fin-primary); position: absolute; top: -1px;
}
.fin-bnav-fab {
  width: 54px; height: 54px; border-radius: 50%; margin: -28px auto 0;
  background: linear-gradient(135deg, #1e63e9, #0b3ba8); color: #fff !important;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  box-shadow: 0 10px 22px rgba(30,99,233,.5); border: 4px solid #fff;
}

.fin-overlay { display: none; position: fixed; inset: 0; background: rgba(8,25,60,.5); z-index: 1039; }

/* ---------- login fintech ---------- */
.fin-login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--fin-bg); }
.fin-login-left {
  background: linear-gradient(160deg, #1e63e9 0%, #0b3ba8 65%, #071f56 100%);
  color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.fin-login-left::before { content: ''; position: absolute; width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); top: -140px; right: -140px; }
.fin-login-card {
  background: #fff; padding: 36px 34px; display: flex; flex-direction: column; justify-content: center;
}
.fin-input { position: relative; margin-bottom: 14px; }
.fin-input input {
  width: 100%; border: 1.5px solid var(--fin-border); border-radius: 14px;
  padding: 13px 14px 13px 46px; font-size: 14px; outline: none;
}
.fin-input input:focus { border-color: var(--fin-primary); box-shadow: 0 0 0 3px rgba(30,99,233,.14); }
.fin-input > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--fin-primary); }
.fin-btn-primary {
  width: 100%; border: none; border-radius: 14px; padding: 13px;
  background: linear-gradient(135deg, #1e63e9, #3b82f6); color: #fff;
  font-weight: 800; font-size: 15px; box-shadow: 0 10px 22px rgba(30,99,233,.4); cursor: pointer;
}

/* ---------- Layar Menu mobile ala POS ---------- */
.m-home-head {
  margin: -22px -24px 0;
  background: linear-gradient(160deg, #2b6bf0 0%, #0b3ba8 70%);
  color: #fff; padding: 20px 20px 54px; position: relative; overflow: hidden;
}
.m-home-head::after {
  content: ''; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); border-radius: 50%;
}
.m-home-top { display: flex; align-items: flex-start; justify-content: space-between; position: relative; z-index: 1; }
.m-home-eyebrow { font-size: 12px; opacity: .85; }
.m-home-company { font-size: 20px; font-weight: 800; }
.m-home-icons { display: flex; gap: 10px; }
.m-home-icon {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.22);
  color: #fff !important; display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; text-decoration: none !important;
}
.m-branch {
  display: flex; align-items: center; gap: 10px; position: relative; z-index: 1;
  background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.28);
  color: #fff !important; text-decoration: none !important;
  border-radius: 999px; padding: 10px 18px 10px 10px; margin-top: 16px; font-weight: 700;
}
.m-branch-ic {
  width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #1e63e9;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.m-home-sheet {
  background: #fff; border-radius: 28px 28px 0 0; margin: -32px -24px 0;
  padding: 22px 16px 150px; position: relative; z-index: 2; min-height: 60vh;
}
.m-grid-wrap { max-width: 640px; margin: 0 auto; }
.m-sec-title { font-weight: 800; font-size: 18px; margin: 0 4px 14px; color: #1f2937; }
.m-swipe { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -4px; }
.m-swipe::-webkit-scrollbar { display: none; }
.m-page {
  min-width: 100%; scroll-snap-align: start;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 6px; padding: 2px 4px 8px;
}
.m-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none !important; color: #374151 !important;
  font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.3;
}
.m-ic {
  width: 58px; height: 58px; border-radius: 20px; position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 24px; box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.tile-g { background: #e9f9ef; color: #16a34a; border: 1.5px solid #bfe8cd; }
.tile-o { background: #fef4e2; color: #d97706; border: 1.5px solid #f5d9a8; }
.tile-r { background: #fdeeee; color: #dc2626; border: 1.5px solid #f6c9c9; }
.tile-b { background: #e8f1fe; color: #1e63e9; border: 1.5px solid #bcd6f8; }
.tile-y { background: #fef9e2; color: #ca8a04; border: 1.5px solid #f0e0a8; }
.has-plus b {
  position: absolute; right: -7px; bottom: -7px; width: 24px; height: 24px; border-radius: 50%;
  background: #16a34a; color: #fff; font-size: 15px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff;
}
.tile-y.has-plus b { background: #ca8a04; }
.m-swipe-foot { display: flex; align-items: center; gap: 12px; margin: 12px 4px 0; }
.m-dots { display: flex; gap: 6px; }
.m-dots span { width: 22px; height: 8px; border-radius: 999px; background: #e5e7eb; cursor: pointer; transition: all .2s; }
.m-dots span.on { background: var(--fin-primary); width: 32px; }
.m-swipe-hint { margin-left: auto; color: #9ca3af; font-style: italic; }
.m-buy { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 6px; }

/* ---------- nav bawah 2 pil: Dashboard | Menu (kompak) ---------- */
.fin-dashmenu { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: #eef1f6; border-radius: 999px; padding: 3px; }
.fin-dm {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 4px; border-radius: 999px; font-weight: 800; font-size: 12px;
  color: #4b5563 !important; text-decoration: none !important;
}
.fin-dm i { font-size: 14px; }
.fin-dm.active { background: linear-gradient(135deg, #1e63e9, #3b82f6); color: #fff !important; box-shadow: 0 8px 18px rgba(30,99,233,.4); }

/* tombol tambah-baris versi mobile (disembunyikan di desktop) */
.m-add-row { display: none !important; }

/* ============================================================
   RAPi MOBILE GLOBAL — berlaku di SEMUA halaman (≤576px)
   ============================================================ */
@media (max-width: 576px) {
  /* --- tombol kompak, tidak raksasa --- */
  .card .btn, .content .btn, .modal .btn {
    padding: .42rem .75rem !important;
    font-size: .8rem !important;
    border-radius: 10px !important;
  }
  .card .btn-sm, .content .btn-sm, .table .btn {
    padding: .28rem .55rem !important;
    font-size: .74rem !important;
  }
  .btn i { margin-right: 4px; }

  /* --- baris aksi (Tambah Data, Export, dsb): wrap rapi ke kanan --- */
  .card-header .d-flex, .card-header .d-grid, .card-header .d-md-flex,
  .card-body .d-flex.justify-content-end, .card-body .d-flex.justify-content-between {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: center;
  }
  .card-header .btn { flex: 0 1 auto; margin: 0 !important; }
  .card-header .btn + .btn { margin-left: 0 !important; }

  /* --- form filter: stack penuh + jarak --- */
  .card-header form.row > div, .card-body form.row > div { margin-bottom: 10px; }
  .card-header form label, .card-body form label { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
  .form-control, .custom-select { font-size: 13.5px !important; }

  /* --- kartu & judul halaman --- */
  .card-body { padding: 14px 12px !important; }
  .card-header { padding: 12px !important; }
  .content-header .breadcrumb { font-size: 11px; margin-top: 6px; display: inline-flex; }
  .content-header h1 { font-size: 18px !important; }

  /* --- tabel: font & padding ramping, scroll halus --- */
  .table { font-size: 12.5px !important; margin-bottom: 0; }
  .table th, .table td { padding: .5rem .45rem !important; }
  .table-responsive { -webkit-overflow-scrolling: touch; border: none !important; }
  .badge { font-size: 11px; }

  /* --- DataTables: kontrol susun vertikal, tombol export wrap --- */
  .dataTables_wrapper .row:first-child > div { margin-bottom: 6px; }
  .dataTables_length, .dataTables_filter { text-align: left !important; }
  .dataTables_filter input { width: 100% !important; max-width: 230px; margin-left: 0 !important; }
  .dt-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
  .dt-buttons .btn { margin: 0 !important; }
  .dataTables_paginate { margin-top: 10px; text-align: center !important; }
  .dataTables_paginate .paginate_button { padding: .25em .65em !important; }
  .dataTables_info { text-align: center !important; font-size: 12px; }

  /* --- form create/edit: jarak antar field --- */
  .card-body .form-group { margin-bottom: 12px; }
  .card-body .row > [class*="col-"] { margin-bottom: 2px; }
  .col-form-label { font-size: 13px; padding-bottom: 2px; }

  /* --- modal: hampir full-screen --- */
  .modal-dialog { margin: .5rem !important; max-width: calc(100% - 1rem) !important; }
  .modal-body { padding: 14px 12px !important; }

  /* --- topbar: lebih ramping --- */
  .fin-topbar { padding: 10px 12px; }
  .fin-page-title { font-size: 16px; }
  .fin-page-sub { display: none; }
  .fin-icon-btn, .fin-hamburger, .fin-avatar { width: 38px; height: 38px; border-radius: 12px; }
  .fin-logout { padding: 8px 10px; font-size: 12px; }

  /* --- detail/show: definisi & info-box ramping --- */
  .info-box { margin-bottom: 10px !important; }
  .info-box .info-box-number { font-size: 16px; }
  dl.row dt, dl.row dd { font-size: 13px; }

  /* --- dashboard ringkas --- */
  .fin-hero { padding: 14px !important; border-radius: 16px !important; margin-bottom: 10px !important; }
  .fin-hero .lbl { font-size: 10px; }
  .fin-hero .amt { font-size: 21px !important; margin: 1px 0 8px !important; }
  .fin-pill-btn { padding: 6px 10px !important; font-size: 11px !important; }
  .fin-chip-row { gap: 6px !important; margin-top: 10px !important; }
  .fin-chip { padding: 5px 8px !important; font-size: 10px; border-radius: 11px !important; }
  .fin-chip b { font-size: 11.5px; }
  .content-header { padding: 0 0 10px !important; }
  .content-header .row.mb-2 { display: flex !important; flex-wrap: nowrap !important; align-items: center; margin-bottom: 4px !important; }
  .content-header .row.mb-2 > .col-sm-6 { width: auto !important; max-width: none !important; padding: 0 4px; }
  .content-header .row.mb-2 > .col-sm-6:first-child { flex: 1 1 auto; min-width: 0; }
  .content-header .row.mb-2 > .col-sm-6:last-child { flex: 0 0 auto; }
  .content-header h1 { font-size: 14px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .content-header .breadcrumb { font-size: 9px; padding: 3px 10px; margin-top: 0 !important; }
  .fin-stat-grid { gap: 10px !important; margin-bottom: 12px !important; }
  .fin-stat { padding: 12px !important; border-radius: 16px !important; }
  .fin-stat .ic { width: 36px !important; height: 36px !important; font-size: 15px !important; border-radius: 11px !important; margin-bottom: 8px !important; }
  .fin-stat .v { font-size: 18px !important; }
  .fin-stat .t { font-size: 11px; }
  .fin-panel { padding: 14px 12px !important; border-radius: 16px !important; margin-bottom: 12px !important; }
  .fin-panel h5 { font-size: 13.5px !important; }
  .fin-kv { padding: 8px 0 !important; }
  .fin-kv .ic { width: 34px !important; height: 34px !important; font-size: 13px !important; border-radius: 10px !important; }
  .fin-kv .amt { font-size: 12.5px !important; }
  .fin-kv small { font-size: 11px; }
  #salesChart { max-height: 180px; }

  /* --- header layar Menu: kecil & rapat --- */
  .m-home-head { padding: 14px 14px 44px !important; }
  .m-home-eyebrow { font-size: 10px; }
  .m-home-company { font-size: 16px !important; }
  .m-home-icons { gap: 8px; }
  .m-home-icon { width: 32px !important; height: 32px !important; font-size: 13px !important; }
  .m-branch { gap: 8px !important; padding: 7px 14px 7px 7px !important; margin-top: 12px !important; font-size: 13px; }
  .m-branch-ic { width: 28px !important; height: 28px !important; font-size: 13px !important; }

  /* --- input angka di tabel item: lega & terbaca --- */
  .table input.qty, .table input.row-qty, .table input.qty-input,
  .table input.number-input, .table input.harga_display,
  .table input.diskon_display, .table input.subtotal_display {
    min-width: 70px;
    text-align: center;
    font-size: 14px !important;
    padding: 8px 6px !important;
  }
  .table select.produk-select { min-width: 150px; }
  .table input.satuan { min-width: 60px; text-align: center; }
  /* kolom angka di semua tabel: tidak terpotong di HP */
  .table th { white-space: nowrap; }
  .table td.text-right, .table td.text-center { white-space: nowrap; }

  /* --- tabel item (ada kolom Qty) jadi kartu vertikal --- */
  table.m-item thead { display: none; }
  table.m-item, table.m-item tbody, table.m-item tr, table.m-item td {
    display: block; width: 100% !important;
  }
  table.m-item { background: transparent !important; border: none !important; }
  table.m-item tbody tr {
    background: #fff; border: 1.5px solid var(--fin-border) !important;
    border-radius: 14px; margin-bottom: 10px; padding: 8px 12px;
  }
  table.m-item td { border: none !important; padding: 5px 0 !important; }
  table.m-item td::before {
    content: attr(data-label); display: block;
    font-size: 11px; font-weight: 700; color: var(--fin-muted); margin-bottom: 3px;
  }
  table.m-item td.no-label::before { display: none; }
  table.m-item td[data-hide="1"] { display: none; }
  table.m-item td .form-control { width: 100% !important; font-size: 16px !important; }
  table.m-item td .select2-container { width: 100% !important; }
  table.m-item td:last-child .btn { width: 100%; }
  .m-add-row { display: block !important; width: 100%; margin: 2px 0 12px; }
  /* sembunyikan spinner number di HP agar digit lega */
  .table input[type="number"]::-webkit-outer-spin-button,
  .table input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  .table input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
}

/* tablet kecil: sentuhan ringan */
@media (max-width: 991px) {
  .card-header .d-flex, .card-header .d-grid, .card-header .d-md-flex { flex-wrap: wrap; gap: 8px; }
  .dataTables_filter { text-align: left !important; }
}

/* ---------- responsif ---------- */
@media (max-width: 1100px) {
  .fin-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991px) {
  .fin-sidebar { transform: translateX(-105%); box-shadow: 0 0 60px rgba(0,0,0,.25); }
  body.fin-nav-open .fin-sidebar { transform: translateX(0); }
  body.fin-nav-open .fin-overlay { display: block; }
  .fin-main { margin-left: 0; }
  .fin-hamburger { display: inline-flex; align-items: center; justify-content: center; }
  .fin-content { padding: 16px 14px 120px; }
  .fin-bottomnav { display: block; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-radius: 18px; left: 14px; right: 14px; bottom: 10px; }
  .m-home-head { margin: -16px -14px 0; }
  .m-home-sheet { margin: -32px -14px 0; }
  .fin-login-wrap { grid-template-columns: 1fr; }
  .fin-login-left { display: none; }
  /* kartu login mengambang di HP: beri jarak aman dari tepi layar */
  .fin-login-wrap { display: block; padding: 30px 18px 50px; }
  .fin-login-card {
    border-radius: 26px;
    box-shadow: 0 16px 40px rgba(11,59,168,.18);
    padding: 30px 22px;
    max-width: 430px;
    margin: 0 auto;
  }
  body::before { height: 190px; border-radius: 0 0 26px 26px; }
  .content-header h1 { font-size: 19px !important; }
}
