* { box-sizing: border-box; }
body { margin: 0; background: #f6f7fb; color: #1f2937; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.row { display: flex; flex-wrap: wrap; margin: -.5rem; }
.row > * { padding: .5rem; width: 100%; max-width: 100%; }
.g-2 { margin: -.25rem; }
.g-2 > * { padding: .25rem; }
.g-3 { margin: -.5rem; }
.g-3 > * { padding: .5rem; }
.col-auto { flex: 0 0 auto; width: auto; }
.col-12 { flex: 0 0 auto; width: 100%; }
.d-flex { display: flex !important; }
.d-none { display: none !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.justify-content-between { justify-content: space-between !important; }
.text-end { text-align: right !important; }
.text-center { text-align: center !important; }
.text-muted { color: #6b7280 !important; }
.text-danger { color: #dc3545 !important; }
.fw-semibold { font-weight: 600 !important; }
.small { font-size: .875em; }
.h3 { font-size: 1.75rem; }
.h4 { font-size: 1.5rem; }
.h5 { font-size: 1.25rem; }
.h6 { font-size: 1rem; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-1 { margin-top: .25rem !important; }
.mt-2 { margin-top: .5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.me-auto { margin-right: auto !important; }
.ms-auto { margin-left: auto !important; }
.p-0 { padding: 0 !important; }
.p-3 { padding: 1rem !important; }
.py-2 { padding-top: .5rem !important; padding-bottom: .5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.border { border: 1px solid #e5e7eb !important; }
.border-top { border-top: 1px solid #e5e7eb !important; }
.border-bottom { border-bottom: 1px solid #e5e7eb !important; }
.rounded { border-radius: 8px !important; }
.text-decoration-none { text-decoration: none !important; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 38px; padding: .45rem .8rem; border: 1px solid transparent; border-radius: 6px; background: #fff; color: #1f2937; text-decoration: none; cursor: pointer; font: inherit; }
.btn-sm { min-height: 31px; padding: .25rem .5rem; font-size: .875rem; }
.btn-primary { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.btn-success { background: #198754; border-color: #198754; color: #fff; }
.btn-danger { background: #dc3545; border-color: #dc3545; color: #fff; }
.btn-warning { background: #ffc107; border-color: #ffc107; color: #111827; }
.btn-light { background: #f8fafc; border-color: #e5e7eb; color: #1f2937; }
.btn-outline-primary { border-color: #0d6efd; color: #0d6efd; background: #fff; }
.btn-outline-secondary { border-color: #6b7280; color: #4b5563; background: #fff; }
.btn-outline-danger { border-color: #dc3545; color: #dc3545; background: #fff; }
.btn-group { display: inline-flex; vertical-align: middle; }
.btn-group > .btn { border-radius: 0; }
.btn-group > .btn:first-child { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.btn-group > .btn:last-child { border-top-right-radius: 6px; border-bottom-right-radius: 6px; }
.form-label { display: inline-block; margin-bottom: .35rem; font-weight: 500; }
.form-control, .form-select { display: block; width: 100%; min-height: 40px; padding: .45rem .65rem; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; color: #111827; font: inherit; }
.form-control:focus, .form-select:focus { outline: 2px solid rgba(13,110,253,.18); border-color: #0d6efd; }
.form-check-input { width: 1rem; height: 1rem; }
.input-group { display: flex; width: 100%; }
.input-group .form-control { flex: 1 1 auto; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.alert { position: relative; padding: .85rem 1rem; margin-bottom: 1rem; border: 1px solid transparent; border-radius: 8px; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-success { background: #ecfdf5; border-color: #bbf7d0; color: #166534; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-light { background: #fff; border-color: #e5e7eb; color: #374151; }
.table { width: 100%; margin-bottom: 1rem; color: #1f2937; border-collapse: collapse; vertical-align: top; }
.table th, .table td { padding: .65rem .75rem; border-bottom: 1px solid #e5e7eb; }
.table-sm th, .table-sm td { padding: .35rem .5rem; }
.table-bordered th, .table-bordered td { border: 1px solid #e5e7eb; }
.table-success td { background: #dcfce7; }
.badge { display: inline-block; padding: .35em .55em; border-radius: 999px; font-size: .75em; font-weight: 700; line-height: 1; }
.bg-danger, .text-bg-danger { background: #dc3545 !important; color: #fff !important; }
.text-bg-success { background: #198754 !important; color: #fff !important; }
.text-bg-warning { background: #ffc107 !important; color: #111827 !important; }
.pagination { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; padding-left: 0; }
.page-link { display: block; padding: .4rem .7rem; border: 1px solid #e5e7eb; color: #0d6efd; background: #fff; text-decoration: none; border-radius: 6px; }
.page-item.active .page-link { color: #fff; background: #0d6efd; border-color: #0d6efd; }
.collapse:not(.show) { display: none; }
.dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; z-index: 1000; min-width: 12rem; padding: .5rem 0; margin: .125rem 0 0; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 12px 30px rgba(15,23,42,.08); }
.dropdown-menu.show { display: block; }
.dropdown-menu-end { right: 0; left: auto; }
.dropdown-item { display: block; width: 100%; padding: .5rem 1rem; clear: both; color: #1f2937; text-decoration: none; white-space: nowrap; background: transparent; border: 0; }
.dropdown-item:hover { background: #f3f6fb; color: #0d6efd; }
.offcanvas { position: fixed; bottom: 0; z-index: 1045; display: flex; flex-direction: column; max-width: 100%; visibility: hidden; background: #fff; background-clip: padding-box; outline: 0; transition: transform .25s ease-in-out; }
.offcanvas-start { top: 0; left: 0; width: min(320px, 88vw); border-right: 1px solid #e5e7eb; transform: translateX(-100%); }
.offcanvas.show { transform: none; visibility: visible; }
.offcanvas-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid #e5e7eb; }
.offcanvas-body { flex-grow: 1; padding: 1rem; overflow-y: auto; }
.btn-close { box-sizing: content-box; width: 1em; height: 1em; padding: .25em; color: #000; background: transparent; border: 0; opacity: .65; }
.btn-close:before { content: "x"; font-size: 1.2rem; line-height: 1; }
.btn-close:hover { opacity: 1; }
.app-shell { min-height: 100vh; display: flex; }
.app-sidebar { width: 270px; min-height: 100vh; position: sticky; top: 0; flex-direction: column; background: #ffffff; border-right: 1px solid #e5e7eb; }
.sidebar-brand { min-height: 68px; display: flex; align-items: center; gap: 10px; padding: 0 20px; color: #111827; font-weight: 700; border-bottom: 1px solid #eef2f7; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: #0d6efd; color: #fff; }
.brand-mark img { width: 28px; height: 28px; object-fit: contain; }
.sidebar-nav { padding: 14px 12px; overflow-y: auto; }
.app-sidebar .sidebar-nav { max-height: calc(100vh - 68px); }
.sidebar-nav.mobile { padding-top: 0; }
.sidebar-link { min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 9px 12px; margin-bottom: 4px; border-radius: 8px; color: #4b5563; text-decoration: none; font-size: .94rem; }
.sidebar-link i { width: 20px; text-align: center; font-size: 1rem; }
.sidebar-link:hover { background: #f3f6fb; color: #0d6efd; }
.sidebar-link.active { background: #eaf2ff; color: #0d6efd; font-weight: 600; }
.sidebar-toggle { width: 100%; border: 0; background: transparent; }
.sidebar-sublink { margin-left: 12px; min-height: 38px; font-size: .9rem; }
.app-main { flex: 1; min-width: 0; }
.app-topbar { min-height: 68px; position: sticky; top: 0; z-index: 1010; display: flex; align-items: center; gap: 14px; padding: 0 24px; background: rgba(255,255,255,.96); border-bottom: 1px solid #e5e7eb; backdrop-filter: blur(8px); }
.app-content { padding: 24px; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(to bottom, #0d6efd 0 42%, #ffffff 42% 100%); }
.auth-card { width: min(440px, 100%); background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 28px; box-shadow: 0 18px 45px rgba(15,23,42,.08); }
.page-title { display:flex; justify-content:space-between; gap:16px; align-items:center; margin-bottom:18px; }
.table-wrap { background:#fff; border:1px solid #e5e7eb; border-radius:8px; overflow:auto; }
.table thead th { background:#f1f3f5; color:#374151; border-bottom-color:#d8dee6; }
.stat-card { background:#fff; border:1px solid #e5e7eb; border-radius:8px; padding:18px; height:100%; }
.stat-card-1 { background:#eff6ff; border-color:#bfdbfe; }
.stat-card-2 { background:#ecfdf5; border-color:#bbf7d0; }
.stat-card-3 { background:#fff7ed; border-color:#fed7aa; }
.stat-card-4 { background:#f5f3ff; border-color:#ddd6fe; }
.form-section { background:#fff; border:1px solid #e5e7eb; border-radius:8px; padding:20px; }
.required:after { content:" *"; color:#dc3545; }
.badge-soft { background:#eef2ff; color:#3730a3; }
.app-footer { margin-top: 28px; padding: 16px 0 4px; color:#6b7280; font-size:.88rem; text-align:center; }
.chart-box { position: relative; min-height: 280px; }
@media (min-width: 768px) {
  .col-md-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-md-3 { flex: 0 0 auto; width: 25%; }
  .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-md-6 { flex: 0 0 auto; width: 50%; }
  .col-md-8 { flex: 0 0 auto; width: 66.666667%; }
}
@media (min-width: 992px) {
  .col-lg-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-lg-6 { flex: 0 0 auto; width: 50%; }
  .col-lg-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-lg-12 { flex: 0 0 auto; width: 100%; }
}
@media (max-width: 991px) {
  .app-shell { display: block; }
  .app-topbar { padding: 0 14px; }
  .app-content { padding: 16px; }
  .page-title { align-items: flex-start; flex-direction: column; }
  .table { min-width: 760px; }
  .btn-group { display: inline-flex; flex-wrap: nowrap; }
  .modal-dialog { margin: 8px; }
  .auth-card { padding: 22px; }
  .stat-card .h4 { font-size: 1.1rem; }
}
@media (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-flex { display: flex !important; }
}
