/* ==========================================================================
   SIPP — Presensi Biometrik. Application theme.
   Original stylesheet, sits on top of Bootstrap 4 (MIT), Font Awesome 4 and the
   bundled jQuery plugins, and re-skins them. Brand colour: #0165C7.

   1 Tokens   2 Base   3 Buttons   4 Forms   5 Cards & tables   6 Navigation
   7 Header & layout   8 Page header & side menu   9 Modals & overlays
   10 Plugins (select2, datepicker, datatables, swal, pace)   11 Helpers
   12 Auth screens   13 Responsive
   ========================================================================== */

/* 1 Tokens ----------------------------------------------------------------- */
:root {
  --primary: #0165c7;
  --primary-600: #0156aa;
  --primary-700: #01478f;
  --primary-50: #eaf3fd;
  --primary-100: #d5e7fa;
  --ring: rgba(1, 101, 199, 0.22);

  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --line: #e2e8f1;
  --line-strong: #cbd5e4;
  --ink: #14213a;
  --ink-2: #3b4a63;
  --muted: #66758d;

  --ok: #15803d;
  --ok-bg: #e7f6ec;
  --warn: #b45309;
  --warn-bg: #fef3e2;
  --bad: #c62828;
  --bad-bg: #fdecec;

  --thead-bg: #eef3fa;
  --r-sm: 8px;
  --r: 10px;
  --r-lg: 16px;
  --sh-1: 0 1px 2px rgba(16, 34, 64, 0.06), 0 1px 3px rgba(16, 34, 64, 0.04);
  --sh-2: 0 10px 30px rgba(16, 34, 64, 0.14);
  --gutter: 24px;
}

/* 2 Base ------------------------------------------------------------------- */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.765rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea, optgroup { font-family: inherit; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 700; letter-spacing: -0.01em; }
a { color: var(--primary); text-decoration: none; }
a:hover, a:focus { color: var(--primary-600); text-decoration: none; }
hr { border-top: 1px solid var(--line); }
::selection { background: var(--primary-100); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
small, .small { font-size: 82%; }
.text-muted, .hint-text { color: var(--muted) !important; }
.hint-text { opacity: 1; }
.text-dark { color: var(--ink) !important; }
.text-primary { color: var(--primary) !important; }
.text-danger { color: var(--bad) !important; }
.text-success { color: var(--ok) !important; }
.bg-white { background: var(--surface) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-master-lighter { background: var(--surface-2) !important; }
.semi-bold { font-weight: 600; }
.font-heading, .font-montserrat { font-family: inherit; }
.fs-14 { font-size: 11.9px !important; }
.img-responsive { width: 100%; }
.no-margin { margin: 0 !important; }
.no-padding { padding: 0 !important; }
.no-border { border: 0 !important; }
.inline { display: inline-block; }
.full-width { width: 100% !important; }
.full-height { height: 100%; }
.pull-left { float: left !important; }
.pull-right { float: right !important; }
.clearfix::after { content: ''; display: table; clear: both; }
.hide { display: none !important; }
ul > li, ol > li { padding-left: 0; }
body.disable-scroll, .disable-scroll { overflow: hidden; }

/* 3 Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 34px; /* same height as .form-control */
  font-weight: 600; font-size: 0.7438rem; border-radius: var(--r-sm); padding: 0.34rem 0.85rem; line-height: 1.4;
  border: 1px solid transparent; cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.btn:focus, .btn.focus { box-shadow: 0 0 0 0.2rem var(--ring); outline: 0; }
.btn-block { display: flex; width: 100%; white-space: normal; }
.btn > i.fa { margin-right: 0.4rem; }
.btn-lg { min-height: 40.8px; padding: 0.51rem 1.19rem; font-size: 0.85rem; border-radius: var(--r); }
.btn-sm { min-height: 27.2px; padding: 0.2125rem 0.595rem; font-size: 0.68rem; }
.btn-xs { min-height: 22.1px; padding: 0.1275rem 0.4675rem; font-size: 0.6375rem; border-radius: 6px; }
.btn-cons { min-width: 120px; margin-right: 6px; }
.btn.disabled, .btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary, .btn-complete {
  color: #fff; background-color: var(--primary); border-color: var(--primary);
}
.btn-primary:hover, .btn-primary:focus, .btn-complete:hover, .btn-complete:focus {
  color: #fff; background-color: var(--primary-600); border-color: var(--primary-600);
}
.btn-primary:active, .btn-primary.active, .btn-complete:active, .btn-complete.active, .show > .btn-primary.dropdown-toggle {
  color: #fff; background-color: var(--primary-700) !important; border-color: var(--primary-700) !important;
}
.btn-secondary, .btn-default, .btn-light {
  color: var(--ink-2); background-color: var(--surface); border-color: var(--line-strong);
}
.btn-secondary:hover, .btn-secondary:focus, .btn-default:hover, .btn-default:focus, .btn-light:hover, .btn-light:focus {
  color: var(--primary); background-color: var(--primary-50); border-color: var(--primary);
}
.btn-secondary:active, .btn-secondary.active, .btn-default:active, .btn-default.active, .btn-light:active, .btn-light.active { color: var(--primary); background: var(--primary-100); border-color: var(--primary); }
.btn-success { color: #fff; background-color: #15803d; border-color: #15803d; }
.btn-success:hover, .btn-success:focus { color: #fff; background-color: #116a33; border-color: #116a33; }
.btn-danger { color: #fff; background-color: #c62828; border-color: #c62828; }
.btn-danger:hover, .btn-danger:focus { color: #fff; background-color: #a81f1f; border-color: #a81f1f; }
.btn-warning { color: #3d2600; background-color: #f5a524; border-color: #f5a524; }
.btn-warning:hover { color: #3d2600; background-color: #e0951a; border-color: #e0951a; }
.btn-info { color: #fff; background-color: #0284c7; border-color: #0284c7; }
.btn-info:hover { color: #fff; background-color: #026ba3; border-color: #026ba3; }
.btn-link { color: var(--primary); font-weight: 600; }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); background: transparent; }
.btn-outline-primary:hover { color: #fff; background: var(--primary); border-color: var(--primary); }
.btn-group .btn.active { background: var(--primary-50); color: var(--primary); border-color: var(--primary); font-weight: 700; }
.btn-group > .btn:not(:last-child):not(.dropdown-toggle) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-group > .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.close { color: var(--muted); opacity: 1; font-weight: 400; text-shadow: none; }
.close:hover { color: var(--ink); }

/* 4 Forms ------------------------------------------------------------------ */
label { font-weight: 600; color: var(--ink-2); font-size: 0.697rem; margin-bottom: 0.4rem; }
.form-control {
  height: auto; min-height: 34px; padding: 0.425rem 0.68rem; color: var(--ink); background-color: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); font-size: 0.765rem; box-shadow: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
select.form-control { padding-right: 1.36rem; }
textarea.form-control { min-height: 76.5px; }
.form-control::placeholder { color: var(--muted); opacity: 0.75; }
.form-control:focus { color: var(--ink); background-color: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 0.2rem var(--ring); outline: 0; }
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { color: var(--ink-2); background-color: var(--surface-2); opacity: 1; }
.form-control-sm { min-height: 27.2px; padding: 0.255rem 0.51rem; font-size: 0.697rem; }
.form-group { margin-bottom: 1rem; }
.has-danger .form-control, .form-control.is-invalid { border-color: var(--bad); }
.input-group-addon { background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--muted); border-radius: var(--r-sm); }
.input-group .form-control:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .form-control:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
/* flex input group (the old table-based one stacks long buttons and stretches the row) */
.input-group { display: flex; flex-wrap: nowrap; align-items: stretch; width: 100%; }
.input-group .form-control { flex: 1 1 auto; width: 1%; min-width: 0; float: none; }
.input-group-addon, .input-group-btn { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: stretch; width: auto; white-space: nowrap; font-size: inherit; }
.input-group-addon { align-items: center; padding: 0 0.68rem; }
.input-group-btn > .btn { min-height: 34px; margin: 0; }
.input-group-btn:not(:first-child) > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.input-group-btn:not(:last-child) > .btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group-btn > .btn + .btn { margin-left: 0.4rem; border-radius: var(--r-sm) !important; }

/* labelled field groups (label above the control) */
.form-group-default { padding: 0; margin-bottom: 1rem; border: 0; background: transparent; position: relative; }
.form-group-default > label { display: block; margin: 0 0 0.4rem; color: var(--ink-2); font-size: 0.663rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; opacity: 1; }
.form-group-default > .form-control { width: 100%; }
.form-group-default .form-control.error, .form-group-default.has-error .form-control { border-color: var(--bad); }
.form-group-default.required > label::after { content: ' *'; color: var(--bad); }
.form-group-default-select2 .select2-container { margin: 0; }

/* custom checkbox / radio rows */
.checkbox, .radio { display: flex; align-items: center; gap: 0.55rem; margin: 0; padding-top: 6px; position: relative; }
.checkbox input[type='checkbox'], .radio input[type='radio'] { width: 17px; height: 17px; margin: 0; flex: none; accent-color: var(--primary); cursor: pointer; }
.checkbox label, .radio label { margin: 0; font-weight: 500; font-size: 0.748rem; color: var(--ink-2); cursor: pointer; text-transform: none; letter-spacing: 0; }
.checkbox.check-success input, .radio.radio-success input { accent-color: var(--primary); }

/* 5 Cards & tables --------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); margin-bottom: 1.25rem; }
.card-block, .card-body { padding: 1.25rem 1.4rem; }
.card-header { background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 0.9rem 1.4rem; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.card-title { font-weight: 700; }
.card-default { margin-bottom: 1.25rem; }

.table { color: var(--ink); margin-bottom: 0; }
.table th, .table td { padding: 0.595rem 0.6375rem; vertical-align: middle; border-top: 1px solid var(--line); }
.table thead th { border-bottom: 1px solid var(--line-strong); border-top: 0; vertical-align: middle; }
.table thead tr { background-color: var(--thead-bg); }
.table thead tr th {
  padding: 0.595rem 0.6375rem; font-size: 0.612rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.table thead tr th:first-child { border-top-left-radius: var(--r-sm); }
.table thead tr th:last-child { border-top-right-radius: var(--r-sm); }
.table tbody tr td.td-action { text-align: right; white-space: nowrap; }
.table-hover tbody tr:hover { background-color: var(--primary-50); }
.table-bordered, .table-bordered th, .table-bordered td { border-color: var(--line); }
.table-sm th, .table-sm td { padding: 0.425rem 0.5525rem; }
.table-striped tbody tr:nth-of-type(odd) { background-color: var(--surface-2); }
.table-borderless td, .table-borderless th, table.borderless td, table.borderless th { border: 0; }
.table-responsive { border: 0; }
.td-action a:not(.row-action-btn) { color: var(--muted); }
.td-action a:not(.row-action-btn):hover { color: var(--primary); }
.td-action a:not(.row-action-btn) .fa-pencil, .td-action a:not(.row-action-btn) .fa-edit { color: var(--primary); }
.td-action a:not(.row-action-btn) .fa-times, .td-action a:not(.row-action-btn) .fa-trash { color: var(--bad); }

.badge { font-weight: 600; border-radius: 999px; padding: 0.4em 0.75em; }
.label { display: inline-block; padding: 0.3em 0.7em; border-radius: 999px; font-size: 0.612rem; font-weight: 700; line-height: 1.2; color: var(--ink-2); background: var(--surface-2); }
.label-info { color: var(--primary); background: var(--primary-50); }
.label-success { color: var(--ok); background: var(--ok-bg); }
.label-warning { color: var(--warn); background: var(--warn-bg); }
.label-danger, .label-important { color: var(--bad); background: var(--bad-bg); }
.alert { border: 0; border-radius: var(--r); padding: 0.85rem 1.1rem; }
.alert-success { background: var(--ok-bg); color: var(--ok); }
.alert-danger { background: var(--bad-bg); color: var(--bad); }
.alert-warning { background: var(--warn-bg); color: var(--warn); }
.alert-info { background: var(--primary-50); color: var(--primary); }
.progress { height: 10px; border-radius: 999px; background: var(--line); box-shadow: none; overflow: hidden; }
.progress-bar { background: var(--primary); }
.progress-bar-primary { background: var(--primary); }
.list-group-item { border-color: var(--line); }
.jumbotron { background: var(--surface); border-radius: var(--r-lg); }
.container-xs-height { display: table; padding: 0; width: 100%; }
.row-xs-height { display: table-row; }
.container-xs-height > .row-xs-height > [class*='col-'], .container-xs-height > .row-xs-height > .modal-body { display: table-cell; vertical-align: top; float: none; }

/* 6 Navigation ------------------------------------------------------------- */
.breadcrumb { background: transparent; margin: 0; padding: 0; font-size: 0.68rem; }
.breadcrumb-item + .breadcrumb-item::before { content: '\203A'; color: var(--muted); padding: 0 0.5rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb.breadcrumb-alt > .breadcrumb-item, .breadcrumb.breadcrumb-alt > .breadcrumb-item.active { opacity: 1; }
.nav-tabs { border-bottom: 1px solid var(--line); }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); font-weight: 600; padding: 0.7rem 1rem; }
.nav-tabs .nav-link:hover { color: var(--primary); }
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link { color: var(--primary); border-bottom-color: var(--primary); background: transparent; }
.pagination { margin: 0.6rem 0 0; gap: 4px; flex-wrap: wrap; }
.page-link {
  min-width: 28.9px; padding: 0.34rem 0.5525rem; text-align: center; color: var(--ink-2); font-weight: 600; font-size: 0.697rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm) !important; margin-left: 0;
}
.page-link:hover, .page-link:focus { color: var(--primary); background: var(--primary-50); border-color: var(--primary); }
.page-item.active .page-link { color: #fff; background-color: var(--primary); border-color: var(--primary); }
.page-item.disabled .page-link { color: var(--muted); background: var(--surface-2); opacity: 0.7; }
.dropdown-menu { border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-2); padding: 0.4rem; font-size: 0.748rem; }
.dropdown-item { border-radius: var(--r-sm); padding: 0.5rem 0.75rem; color: var(--ink-2); font-weight: 500; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--primary-50); color: var(--primary); }
.dropdown-menu > li, .dropdown-menu > .dropdown-item { color: var(--ink-2); }

/* table pieces: person cell, row icon actions, toolbar */
.person-cell { display: flex; align-items: center; gap: 0.75rem; min-width: 220px; }
.avatar { display: inline-block; flex: none; width: 37.4px; height: 37.4px; overflow: hidden; border-radius: 50%; background: var(--surface-2) center / contain no-repeat; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.person-name { font-weight: 700; color: var(--ink); line-height: 1.25; }
.person-sub { font-size: 0.663rem; color: var(--muted); }
.row-actions { display: inline-flex; flex-wrap: nowrap; gap: 0.35rem; }
.row-action-btn {
  width: 28.9px; height: 28.9px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--muted); cursor: pointer; transition: all 0.15s;
}
.row-action-btn:hover { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary); }
.row-action-edit:hover { background: var(--primary-50); color: var(--primary); }
.row-action-sync:hover { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.row-action-warn:hover { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.row-action-delete:hover { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.table-pegawai td { vertical-align: middle; }
.table-pegawai td .label { margin: 0 0.3rem 0.3rem 0; white-space: nowrap; }
.toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.toolbar-print { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-left: auto; align-items: center; }
.toolbar-print .form-control { width: 190px; }

.status-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; }
.status-stack .label { margin: 0 !important; }

/* presensi grid (monthly attendance) + detail pop-up */
.presensi-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.1rem; margin-bottom: 0.8rem; font-size: 0.7rem; color: var(--ink-2); }
.presensi-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 0.4rem; border-radius: 50%; vertical-align: 0; }
.presensi-legend .dot-warn { background: var(--warn); }
.presensi-legend .dot-bad { background: var(--bad); }
.presensi-legend .dot-muted { background: var(--line-strong); }
.presensi-legend .text-muted { margin-left: auto; }
.presensi-scroll { max-height: calc(100vh - 230px); overflow: auto; border: 1px solid var(--line); border-radius: var(--r); }
.presensi-grid { border-collapse: separate; border-spacing: 0; margin: 0; }
.presensi-grid th, .presensi-grid td { border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0.3rem 0.4rem; }
.presensi-grid thead th { position: sticky; top: 0; z-index: 3; background: var(--thead-bg); text-align: center; line-height: 1.2; border-radius: 0 !important; }
.presensi-grid thead th .pc-dow { display: block; margin-top: 2px; font-size: 0.5rem; font-weight: 600; letter-spacing: 0.04em; opacity: 0.8; }
.presensi-grid .presensi-pegawai, .presensi-grid thead th:first-child { position: sticky; left: 0; z-index: 2; min-width: 190px; background: var(--surface); text-align: left; box-shadow: 1px 0 0 var(--line-strong); }
.presensi-grid thead th:first-child { z-index: 4; background: var(--thead-bg); }
.presensi-grid tbody tr:hover .presensi-pegawai { background: var(--primary-50); }
.presensi-cell { min-width: 56px; line-height: 1.25; cursor: pointer; transition: box-shadow 0.12s, filter 0.12s; }
.presensi-cell:hover, .presensi-cell:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--primary); filter: brightness(0.97); }
.presensi-cell .pc-time { display: block; font-size: 0.62rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.presensi-cell .pc-code { display: block; font-size: 0.7rem; font-weight: 700; color: var(--ink); margin-top: 1px; }
.presensi-cell .pc-extra { display: block; font-size: 0.55rem; color: var(--muted); }
.presensi-cell .pc-next { color: var(--warn); font-weight: 700; }
.presensi-grid .td-kuning .pc-code { color: var(--warn); }
.presensi-grid .td-merah .pc-code { color: var(--bad); }
.presensi-grid .td-abu { background: var(--surface-2); }
.presensi-grid .td-abu .pc-code, .presensi-grid .td-abu .pc-time { color: var(--muted); }

.pd-head-right { display: flex; align-items: center; gap: 0.7rem; margin-left: auto; }
.pd-status { font-size: 0.7rem; font-weight: 600; color: var(--ink-2); }
.pd-status.is-bad, .pd-note.is-bad { color: var(--warn); }
.modal-header .close { margin: 0; padding: 0.2rem 0.4rem; font-size: 0.85rem; line-height: 1; }
.pd-card { height: 100%; margin-bottom: 0; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.pd-card-title { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pd-time { margin: 0.15rem 0 0.1rem; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.pd-note { font-size: 0.7rem; color: var(--muted); }
.pd-loc { margin-top: 0.7rem; padding-top: 0.6rem; border-top: 1px solid var(--line); font-size: 0.7rem; }
.pd-loc-row { display: flex; flex-wrap: wrap; gap: 0.1rem 0.6rem; margin-bottom: 0.3rem; }
.pd-loc-row > span:first-child { min-width: 78px; color: var(--muted); }
.pd-coord { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--ink); word-break: break-all; }
.pd-coord-link { text-decoration: underline dotted; text-underline-offset: 3px; }
.pd-coord-link:hover { color: var(--primary); }
.pd-map-wrap { margin-top: 1rem; }
.pd-map { position: relative; z-index: 0; height: 240px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.pd-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin: 1rem 0; }
.pd-meta > div { padding: 0.55rem 0.75rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.pd-meta span { display: block; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pd-meta b { font-size: 0.75rem; color: var(--ink); }
.pd-section-title { margin-bottom: 0.4rem; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pd-log-table td, .pd-log-table th { font-size: 0.7rem; }
.pd-tag { margin-left: 0.45rem; font-size: 0.55rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.leaflet-container { font-family: inherit; }
@media (max-width: 767.98px) { .pd-card { margin-bottom: 0.7rem; height: auto; } .pd-meta { grid-template-columns: repeat(2, 1fr); } .presensi-legend .text-muted { margin-left: 0; } }

/* report pages (presensi/*): filter bar, result card, empty state */
.filter-card { margin-bottom: 1rem; }
.filter-card .card-block { padding: 0.9rem 1.2rem; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.filter-field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.filter-field select.form-control:not([size]):not([multiple]) { height: 34px; padding-top: 0; padding-bottom: 0; }
.filter-field label { margin: 0; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.filter-bulan { flex: 0 0 150px; }
.filter-satker { flex: 1 1 260px; }
.filter-nip { flex: 0 1 220px; }
.filter-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-left: auto; }
.report-card .card-block { padding: 1rem 1.2rem; }
.report-card .table td, .report-card .table th { vertical-align: middle; }
.report-card .table thead th { text-align: center; }
.report-card .table tbody tr:hover > td { background-color: var(--primary-50); }
.empty-state { padding: 2.6rem 1rem; text-align: center; color: var(--muted); }
.empty-state i { display: block; margin-bottom: 0.6rem; font-size: 1.6rem; color: var(--line-strong); }
.empty-state b { display: block; margin-bottom: 0.2rem; color: var(--ink-2); font-size: 0.8rem; }
.detail-riwayat h5 { margin: 0; font-size: 0.8rem; }
.detail-riwayat .person-sub { margin-bottom: 0.6rem; }
.detail-riwayat .table td, .detail-riwayat .table th { font-size: 0.68rem; }
.report-scroll { border: 1px solid var(--line); border-radius: var(--r); }
.report-scroll .table { margin: 0; }
.report-scroll .table-bordered, .report-scroll .table-bordered th, .report-scroll .table-bordered td { border-color: var(--line); }
.report-scroll .table-bordered { border: 0; border-collapse: separate; border-spacing: 0; }
.report-scroll .table th:first-child, .report-scroll .table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line-strong); }
.report-scroll .table thead th:first-child { z-index: 2; background: var(--thead-bg); }

/* apel grids (laporan_apel, laporan_apel_khusus): time of attendance per day / per roll call */
.apel-grid td { text-align: center; font-size: 0.68rem; font-variant-numeric: tabular-nums; color: var(--ink); }
.presensi-grid.apel-grid td.td-merah { background: rgba(198, 40, 40, 0.045); }
.presensi-grid.apel-grid td.td-abu { background: var(--surface-2); color: var(--muted); }
.apel-grid td, .apel-grid thead th:not(:first-child) { min-width: 58px; }

/* dashboard apel (public display board) */
.board { max-width: 1400px; margin: 0 auto; padding: 1.5rem var(--gutter); }
.board-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; padding: 1rem 1.5rem; color: #fff; border-radius: var(--r-lg); background: linear-gradient(100deg, var(--primary) 0%, var(--primary-700) 100%); box-shadow: var(--sh-1); }
.board-header h1 { margin: 0; color: #fff; font-size: 1.4rem; }
.board-sub { margin-top: 0.15rem; font-size: 0.72rem; opacity: 0.85; }
.board-logo { height: 54px; width: auto; }
.board-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1.25rem; }
.board-summary > div { padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); }
.board-summary span { display: block; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.board-summary b { font-size: 1.5rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.board-card { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1); }
.board-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.8rem; }
.board-card-head b { color: var(--ink); font-size: 0.85rem; }
.board-card-head span { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.board-card-body { display: flex; align-items: center; gap: 1.1rem; }
.donut { --p: 0; position: relative; flex: none; width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--line) 0); }
.donut::before { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: var(--surface); }
.donut b { position: relative; font-size: 1rem; color: var(--ink); }
.board-legend { list-style: none; margin: 0; padding: 0; font-size: 0.72rem; color: var(--ink-2); }
.board-legend li { padding: 0; margin-bottom: 0.25rem; }
.board-legend b { margin-left: 0.35rem; color: var(--ink); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.board-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 0.4rem; border-radius: 50%; background: var(--line-strong); }
.board-legend i.on { background: var(--primary); }
.board-legend .muted { color: var(--muted); }
.board-table .card-block { padding: 1rem 1.2rem; }
.board-table .table td, .board-table .table th { vertical-align: middle; }
.board-row-sub td { background: var(--surface-2); font-size: 0.7rem; color: var(--ink-2); }
.board-row-sub td:first-child { padding-left: 2rem; }
.pct { display: inline-block; width: 120px; height: 6px; margin-right: 0.5rem; border-radius: 999px; background: var(--line); vertical-align: middle; overflow: hidden; }
.pct span { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
@media (max-width: 767.98px) { .board-summary { grid-template-columns: repeat(2, 1fr); } .board-logo { height: 40px; } }

/* monitoring presensi (map) */
.monitor-map { position: relative; z-index: 0; height: calc(100vh - 360px); min-height: 460px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.presensi-legend .dot-ok { background: var(--primary); }
.datepicker-dropdown { z-index: 1100 !important; }
.monitor-list { height: calc(100vh - 360px); min-height: 460px; overflow-y: auto; }
.mp-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.6rem; }
.mp-list-head .text-muted { font-size: 0.663rem; }
.mp-person { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.mp-person:last-child { border-bottom: 0; }
.mp-person-name { cursor: pointer; line-height: 1.25; }
.mp-person-name b { display: block; color: var(--ink); font-size: 0.75rem; }
.mp-person-name small { color: var(--muted); font-size: 0.663rem; }
.mp-person-name:hover b { color: var(--primary); }
.mp-log { display: grid; grid-template-columns: 8px auto 1fr; align-items: center; gap: 0.5rem; margin-top: 0.3rem; padding: 0.25rem 0.4rem; border-radius: var(--r-sm); font-size: 0.7rem; cursor: pointer; }
.mp-log:hover { background: var(--primary-50); }
.mp-log i { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.mp-log i.dot-bad { background: var(--bad); }
.mp-log i.dot-muted { background: var(--line-strong); }
.mp-log small { color: var(--muted); font-size: 0.63rem; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-none { margin-top: 0.3rem; font-size: 0.68rem; color: var(--muted); }
.mp-picker { position: relative; }
.mp-suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 1100; margin-top: 4px; max-height: 320px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-2); }
.mp-suggest-item { padding: 0.5rem 0.75rem; cursor: pointer; border-bottom: 1px solid var(--line); }
.mp-suggest-item:last-child { border-bottom: 0; }
.mp-suggest-item:hover { background: var(--primary-50); }
.mp-suggest-item b { display: block; color: var(--ink); font-size: 0.75rem; }
.mp-suggest-item small { color: var(--muted); font-size: 0.663rem; }
.mp-person-sub { margin-bottom: 0.4rem; font-size: 0.68rem; color: var(--muted); line-height: 1.45; }
.filter-hari { flex: 0 0 130px; }

/* 7 Header & layout -------------------------------------------------------- */
.container, .container-fluid { width: 100%; max-width: 1760px !important; padding-left: var(--gutter); padding-right: var(--gutter); }
.container-fixed-lg { max-width: 1760px; }
.app-header { position: sticky; top: 0; z-index: 1030; box-shadow: 0 2px 10px rgba(16, 34, 64, 0.12); }
.app-bar { background: linear-gradient(100deg, var(--primary) 0%, var(--primary-600) 100%); color: #fff; }
.app-bar-inner { height: 51px; display: flex; align-items: center; gap: 1rem; padding: 0 var(--gutter); max-width: 1760px; margin: 0 auto; }
.app-brand { display: inline-flex; align-items: center; }
.app-brand img { height: 34px; width: auto; }
.app-bar-tools { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.app-bar-user { font-weight: 600; font-size: 0.7225rem; letter-spacing: 0.01em; }
.app-icon-btn {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 12px;
  background: transparent; color: #fff; font-size: 0.935rem; cursor: pointer; transition: background 0.15s;
}
.app-icon-btn:hover { background: rgba(255, 255, 255, 0.16); }
.app-menu-toggle { display: none; margin-left: -0.4rem; }
.profile-dropdown-toggle { border: 0; background: transparent; padding: 3px; border-radius: 50%; cursor: pointer; line-height: 0; }
.profile-dropdown-toggle:hover { background: rgba(255, 255, 255, 0.16); }
.profile-dropdown-toggle img, .thumbnail-wrapper img { width: 30.6px; height: 30.6px; border-radius: 50%; object-fit: cover; background: #fff; }
.profile-dropdown { min-width: 230px; margin-top: 0.55rem; }
.profile-dropdown .dropdown-item { display: flex; align-items: center; gap: 0.6rem; }
.profile-dropdown .dropdown-item i { width: 18px; text-align: center; color: var(--muted); }

.app-nav { background: var(--surface); border-bottom: 1px solid var(--line); }
.app-nav-inner { max-width: 1760px; margin: 0 auto; padding: 0 var(--gutter); }
.app-menu { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; gap: 0.1rem; }
.app-menu-item { position: relative; padding: 0; list-style: none; }
.app-menu-link {
  position: relative; display: flex; align-items: center; gap: 0.45rem; height: 40.8px; padding: 0 0.8075rem;
  color: var(--ink-2); font-size: 0.731rem; font-weight: 600; white-space: nowrap; transition: color 0.15s, background 0.15s;
}
.app-menu-link::after {
  content: ''; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0; height: 2.55px; border-radius: 3px 3px 0 0;
  background: var(--primary); transform: scaleX(0); transition: transform 0.2s;
}
.app-menu-item.has-sub > .app-menu-link .app-caret { font-size: 0.595rem; opacity: 0.7; transition: transform 0.2s; }
.app-menu-item:hover > .app-menu-link, .app-menu-item.open > .app-menu-link { color: var(--primary); background: var(--primary-50); }
.app-menu-item.active > .app-menu-link { color: var(--primary); }
.app-menu-item.active > .app-menu-link::after { transform: scaleX(1); }
.app-menu-item:hover > .app-menu-link .app-caret, .app-menu-item.open > .app-menu-link .app-caret { transform: rotate(180deg); }
.app-submenu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 240px; margin: 0; padding: 0.4rem; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-2); z-index: 20;
}
.app-menu-item:hover > .app-submenu, .app-menu-item.open > .app-submenu { display: block; }
.app-submenu li { padding: 0; list-style: none; }
.app-submenu a { display: block; padding: 0.4675rem 0.68rem; border-radius: var(--r-sm); color: var(--ink-2); font-size: 0.731rem; font-weight: 500; white-space: nowrap; }
.app-submenu a:hover { background: var(--primary-50); color: var(--primary); }

.page-container { min-height: calc(100vh - 91.8px); display: flex; flex-direction: column; }
.page-content-wrapper { flex: 1; display: flex; flex-direction: column; }
.content { flex: 1; padding: 0 0 1.5rem; }
.content-pad { padding-top: 1.5rem; }
.footer { margin-top: auto; }
.footer .copyright { padding: 1rem 0 1.4rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.663rem; }
.footer .copyright .hint-text, .footer .copyright span { color: var(--muted); }

/* the area under the nav: first block is the page banner, then the work area */
.content > .row:first-child, .content > .row.m-b-20 { max-width: 1760px; margin-left: auto; margin-right: auto; }
.content > .container, .content > .row + .container { margin-left: auto; margin-right: auto; }

/* 8 Page banner & side menu ------------------------------------------------ */
.bg-breadcrumb {
  position: relative; display: flex; align-items: center; gap: 1rem; flex: 0 0 calc(100% - 2 * var(--gutter)); max-width: calc(100% - 2 * var(--gutter));
  margin: var(--gutter) var(--gutter) 0; padding: 0.765rem 1.19rem; min-height: 66.3px; overflow: hidden; border-radius: var(--r-lg);
  background: radial-gradient(520px 220px at 100% -40%, rgba(255, 255, 255, 0.18), transparent 60%), linear-gradient(100deg, var(--primary) 0%, var(--primary-700) 100%);
  box-shadow: var(--sh-1);
}
.row.m-b-20 { margin-left: 0; margin-right: 0; }
.img-breadcrumb { display: none; }
.img-page { float: none; flex: none; height: 39.1px; width: auto; margin: 0; padding: 6.8px; box-sizing: content-box; background: rgba(255, 255, 255, 0.15); border-radius: 14px; }
.page-title-box { margin: 0; padding: 0; min-width: 0; }
.page-title-box h3 { color: #fff; margin: 0 0 0.15rem; font-size: 1.105rem; font-weight: 700; opacity: 1; }
.page-title-box .breadcrumb, .page-title-box .breadcrumb.breadcrumb-alt { padding: 0; margin: 0; }
.page-title-box .breadcrumb a, .page-title-box .breadcrumb-item { color: rgba(255, 255, 255, 0.82); }
.page-title-box .breadcrumb a:hover { color: #fff; }
.page-title-box .breadcrumb-item.active, .page-title-box .breadcrumb-item.active a { color: #fff; font-weight: 600; }
.page-title-box .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, 0.6); }

.menu-sidebar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 0.6rem; width: 100%; height: auto; margin-bottom: 1.25rem; }
.menu-sidebar ul { list-style: none; margin: 0; padding: 0.15rem; }
.menu-sidebar ul li { padding: 0; margin: 2px 0; border: 0; }
.menu-sidebar ul li a { display: block; padding: 0.62rem 0.85rem; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 600; font-size: 0.748rem; line-height: 1.35; transition: background 0.15s, color 0.15s; }
.menu-sidebar ul li:hover > a { background: var(--primary-50); color: var(--primary); }
.menu-sidebar ul li.active > a { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(1, 101, 199, 0.28); }
.menu-sidebar > input.form-control { margin: 0.2rem 0 0.4rem; }

/* 9 Modals & overlays ------------------------------------------------------ */
.modal-content { background: var(--surface); border: 0; border-radius: var(--r-lg); box-shadow: var(--sh-2); }
.modal-header { padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); }
.modal-title { font-weight: 700; font-size: 0.8925rem; }
.modal-body { padding: 1.4rem; }
.modal-footer { padding: 1rem 1.4rem; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.modal-backdrop { background: #06101f; }
.modal-backdrop.show { opacity: 0.55; }
.modal.slide-up .modal-dialog { margin-top: 3rem; }
.modal.slide-right .modal-dialog {
  position: fixed; top: 0; right: 0; bottom: 0; margin: 0; height: 100%; width: min(560px, 100vw); max-width: none;
  transform: translateX(100%); transition: transform 0.3s ease;
}
.modal.slide-right.show .modal-dialog { transform: translateX(0); }
.modal.slide-right .modal-dialog.modal-lg { width: min(760px, 100vw); }
.modal.slide-right .modal-content-wrapper { height: 100%; }
.modal.slide-right .modal-content { height: 100%; border-radius: var(--r-lg) 0 0 var(--r-lg); overflow-x: hidden; overflow-y: auto; }
.modal.slide-right .container-xs-height { table-layout: fixed; }
.modal.slide-right .modal-content > .close { position: absolute; top: 14px; right: 16px; z-index: 3; font-size: 0.935rem; }
.modal.slide-right .modal-body { padding: 1.2rem 1.4rem; }
.modal.right .modal-dialog { position: fixed; margin: 0; right: 0; top: 0; bottom: 0; width: min(560px, 100vw); max-width: none; }
.tooltip-inner { background: var(--ink); border-radius: 6px; font-size: 0.663rem; }
.popover { border-radius: var(--r); border-color: var(--line); box-shadow: var(--sh-2); }

/* 10 Plugins --------------------------------------------------------------- */
/* select2 */
.select2-container { width: 100% !important; }
body > .select2-container { width: auto !important; }
.select2-container--default .select2-selection--single {
  height: 34px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); outline: 0;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 32.3px; padding-left: 0.68rem; padding-right: 1.7rem; color: var(--ink); }
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--muted); }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 32.3px; right: 6px; }
.select2-container--default .select2-selection--single .select2-selection__clear { margin-right: 1.4rem; color: var(--muted); }
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--multiple { border-color: var(--primary); box-shadow: 0 0 0 0.2rem var(--ring); }
.select2-container--default .select2-selection--multiple { min-height: 34px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); }
.select2-container--default .select2-selection--multiple .select2-selection__choice { margin-top: 6px; padding: 1.7px 6.8px; color: var(--primary); background: var(--primary-50); border: 0; border-radius: 6px; font-weight: 600; }
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove { color: var(--primary); margin-right: 6px; }
.select2-dropdown { border: 1px solid var(--line-strong); border-radius: var(--r-sm); box-shadow: var(--sh-2); overflow: hidden; }
.select2-search--dropdown { padding: 8px; }
.select2-search--dropdown .select2-search__field { border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 10px; outline: 0; }
.select2-search--dropdown .select2-search__field:focus { border-color: var(--primary); }
.select2-results__option { padding: 8px 12px; font-size: 0.748rem; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--primary); color: #fff; }
.select2-container--default .select2-results__option[aria-selected='true'] { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.select2-container--default .select2-results__option--highlighted[aria-selected='true'] { background: var(--primary); color: #fff; }
.addon-select { padding: 0; background: transparent; border: 0; }
.addon-select span.select2-container { width: 200px !important; text-align: left; }

/* bootstrap-datepicker / timepicker (plugin hard-codes 13px) */
div.datepicker table tr td, div.datepicker table tr th, div.datepicker table tr td span { font-size: 11.05px; }
div.datepicker { padding: 14px 12px; border-radius: var(--r); box-shadow: var(--sh-2); border: 1px solid var(--line); font-size: 0.7225rem; }
.datepicker table tr td, .datepicker table tr th { border-radius: 8px; }
.datepicker table tr td.day:hover, .datepicker table tr td span:hover, .datepicker table tr th.prev:hover, .datepicker table tr th.next:hover, .datepicker table tr th.datepicker-switch:hover { background: var(--primary-50); }
.datepicker table tr td.active, .datepicker table tr td.active:hover, .datepicker table tr td.active.disabled, .datepicker table tr td.active.disabled:hover,
.datepicker table tr td span.active, .datepicker table tr td span.active:hover { background: var(--primary) !important; color: #fff; text-shadow: none; }
.datepicker table tr td.today, .datepicker table tr td.today:hover { background: var(--warn-bg); color: var(--warn); }
.bootstrap-timepicker-widget a.btn, .bootstrap-timepicker-widget input { border-radius: 6px; }

/* datatables */
.dataTables_wrapper { font-size: 0.7225rem; }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select { border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 0.255rem 0.51rem; outline: 0; }
.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--primary); box-shadow: 0 0 0 0.2rem var(--ring); }
table.dataTable thead th, table.dataTable thead td { border-bottom: 1px solid var(--line-strong); }
table.dataTable.no-footer { border-bottom: 1px solid var(--line); }
.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { color: #fff !important; background: var(--primary) !important; border-color: var(--primary) !important; border-radius: var(--r-sm); }

/* sweetalert (its CSS is injected by the plugin; sizes are 85% of the plugin defaults) */
.swal-title { font-size: 22.95px; }
.swal-text { font-size: 13.6px; }
.swal-button { font-size: 11.9px; }
.swal-modal { border-radius: var(--r-lg); }
.swal-title { color: var(--ink); font-weight: 700; }
.swal-text { color: var(--ink-2); }
.swal-button { border-radius: var(--r-sm); font-weight: 600; background-color: var(--primary); }
.swal-button:not([disabled]):hover { background-color: var(--primary-600); }
.swal-button--cancel { color: var(--ink-2); background-color: var(--surface-2); }
.swal-button--cancel:not([disabled]):hover { background-color: var(--line); }
.swal-button--danger { background-color: #c62828; }
.swal-button:focus { box-shadow: 0 0 0 0.2rem var(--ring); }

/* page loader, scrollbars, jstree */
.pace .pace-progress { background: var(--primary); height: 3px; }
.pace .pace-activity { border-top-color: var(--primary); border-left-color: var(--primary); }
.scroll-wrapper > .scroll-element .scroll-bar { background-color: var(--line-strong); }
.jstree-default .jstree-clicked { background: var(--primary-50); box-shadow: none; color: var(--primary); }
.jstree-default .jstree-hovered { background: var(--surface-2); box-shadow: none; }
.tree-demo { max-width: 100%; }


/* 11 Helpers ---------------------------------------------------------------- */
/* spacing: m|p - t|b|l|r - px, plus sm- variants (<768px) */
.m-t-0 { margin-top: 0px !important; }
.m-t-5 { margin-top: 5px !important; }
.m-t-10 { margin-top: 10px !important; }
.m-t-15 { margin-top: 15px !important; }
.m-t-20 { margin-top: 20px !important; }
.m-t-25 { margin-top: 25px !important; }
.m-t-30 { margin-top: 30px !important; }
.m-t-40 { margin-top: 40px !important; }
.m-t-50 { margin-top: 50px !important; }
.m-b-0 { margin-bottom: 0px !important; }
.m-b-5 { margin-bottom: 5px !important; }
.m-b-10 { margin-bottom: 10px !important; }
.m-b-15 { margin-bottom: 15px !important; }
.m-b-20 { margin-bottom: 20px !important; }
.m-b-25 { margin-bottom: 25px !important; }
.m-b-30 { margin-bottom: 30px !important; }
.m-b-40 { margin-bottom: 40px !important; }
.m-b-50 { margin-bottom: 50px !important; }
.m-l-0 { margin-left: 0px !important; }
.m-l-5 { margin-left: 5px !important; }
.m-l-10 { margin-left: 10px !important; }
.m-l-15 { margin-left: 15px !important; }
.m-l-20 { margin-left: 20px !important; }
.m-l-25 { margin-left: 25px !important; }
.m-l-30 { margin-left: 30px !important; }
.m-l-40 { margin-left: 40px !important; }
.m-l-50 { margin-left: 50px !important; }
.m-r-0 { margin-right: 0px !important; }
.m-r-5 { margin-right: 5px !important; }
.m-r-10 { margin-right: 10px !important; }
.m-r-15 { margin-right: 15px !important; }
.m-r-20 { margin-right: 20px !important; }
.m-r-25 { margin-right: 25px !important; }
.m-r-30 { margin-right: 30px !important; }
.m-r-40 { margin-right: 40px !important; }
.m-r-50 { margin-right: 50px !important; }
.p-t-0 { padding-top: 0px !important; }
.p-t-5 { padding-top: 5px !important; }
.p-t-10 { padding-top: 10px !important; }
.p-t-15 { padding-top: 15px !important; }
.p-t-20 { padding-top: 20px !important; }
.p-t-25 { padding-top: 25px !important; }
.p-t-30 { padding-top: 30px !important; }
.p-t-40 { padding-top: 40px !important; }
.p-t-50 { padding-top: 50px !important; }
.p-b-0 { padding-bottom: 0px !important; }
.p-b-5 { padding-bottom: 5px !important; }
.p-b-10 { padding-bottom: 10px !important; }
.p-b-15 { padding-bottom: 15px !important; }
.p-b-20 { padding-bottom: 20px !important; }
.p-b-25 { padding-bottom: 25px !important; }
.p-b-30 { padding-bottom: 30px !important; }
.p-b-40 { padding-bottom: 40px !important; }
.p-b-50 { padding-bottom: 50px !important; }
.p-l-0 { padding-left: 0px !important; }
.p-l-5 { padding-left: 5px !important; }
.p-l-10 { padding-left: 10px !important; }
.p-l-15 { padding-left: 15px !important; }
.p-l-20 { padding-left: 20px !important; }
.p-l-25 { padding-left: 25px !important; }
.p-l-30 { padding-left: 30px !important; }
.p-l-40 { padding-left: 40px !important; }
.p-l-50 { padding-left: 50px !important; }
.p-r-0 { padding-right: 0px !important; }
.p-r-5 { padding-right: 5px !important; }
.p-r-10 { padding-right: 10px !important; }
.p-r-15 { padding-right: 15px !important; }
.p-r-20 { padding-right: 20px !important; }
.p-r-25 { padding-right: 25px !important; }
.p-r-30 { padding-right: 30px !important; }
.p-r-40 { padding-right: 40px !important; }
.p-r-50 { padding-right: 50px !important; }
@media (max-width: 767.98px) {
  .sm-m-t-0 { margin-top: 0px !important; }
  .sm-m-t-5 { margin-top: 5px !important; }
  .sm-m-t-10 { margin-top: 10px !important; }
  .sm-m-t-15 { margin-top: 15px !important; }
  .sm-m-t-20 { margin-top: 20px !important; }
  .sm-m-b-0 { margin-bottom: 0px !important; }
  .sm-m-b-5 { margin-bottom: 5px !important; }
  .sm-m-b-10 { margin-bottom: 10px !important; }
  .sm-m-b-15 { margin-bottom: 15px !important; }
  .sm-m-b-20 { margin-bottom: 20px !important; }
  .sm-m-l-0 { margin-left: 0px !important; }
  .sm-m-l-5 { margin-left: 5px !important; }
  .sm-m-l-10 { margin-left: 10px !important; }
  .sm-m-l-15 { margin-left: 15px !important; }
  .sm-m-l-20 { margin-left: 20px !important; }
  .sm-m-r-0 { margin-right: 0px !important; }
  .sm-m-r-5 { margin-right: 5px !important; }
  .sm-m-r-10 { margin-right: 10px !important; }
  .sm-m-r-15 { margin-right: 15px !important; }
  .sm-m-r-20 { margin-right: 20px !important; }
  .sm-p-t-0 { padding-top: 0px !important; }
  .sm-p-t-5 { padding-top: 5px !important; }
  .sm-p-t-10 { padding-top: 10px !important; }
  .sm-p-t-15 { padding-top: 15px !important; }
  .sm-p-t-20 { padding-top: 20px !important; }
  .sm-p-b-0 { padding-bottom: 0px !important; }
  .sm-p-b-5 { padding-bottom: 5px !important; }
  .sm-p-b-10 { padding-bottom: 10px !important; }
  .sm-p-b-15 { padding-bottom: 15px !important; }
  .sm-p-b-20 { padding-bottom: 20px !important; }
  .sm-p-l-0 { padding-left: 0px !important; }
  .sm-p-l-5 { padding-left: 5px !important; }
  .sm-p-l-10 { padding-left: 10px !important; }
  .sm-p-l-15 { padding-left: 15px !important; }
  .sm-p-l-20 { padding-left: 20px !important; }
  .sm-p-r-0 { padding-right: 0px !important; }
  .sm-p-r-5 { padding-right: 5px !important; }
  .sm-p-r-10 { padding-right: 10px !important; }
  .sm-p-r-15 { padding-right: 15px !important; }
  .sm-p-r-20 { padding-right: 20px !important; }
}

/* 12 Auth screens ---------------------------------------------------------- */
.auth-shell { min-height: 100vh; display: flex; background: var(--surface); }
.auth-brand {
  flex: 1 1 52%; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 2.5rem 3.5rem; color: #fff;
  background: radial-gradient(900px 500px at 85% 110%, rgba(255, 255, 255, 0.1), transparent 60%), linear-gradient(170deg, #0156aa 0%, #013f80 100%);
}
/* the whole picture at its natural shape across the top, fading into the brand blue underneath */
.auth-brand::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 2048 / 1001;
  background: url('../../image/login_bg.jpg') center / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 100%); mask-image: linear-gradient(180deg, #000 58%, transparent 100%);
}
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand-logo { width: 100%; max-width: 380px; height: auto; }
.auth-brand-copy { max-width: 520px; }
.auth-brand-badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.8rem; border-radius: 999px; background: rgba(255, 255, 255, 0.16); font-size: 0.6375rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.auth-brand-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #7dd3fc; }
.auth-brand-title { margin: 1.1rem 0 0.8rem; color: #fff; font-size: 1.785rem; line-height: 1.2; font-weight: 800; }
.auth-brand-desc { opacity: 0.88; font-size: 0.833rem; line-height: 1.65; margin: 0; }
.auth-brand-footer { font-size: 0.68rem; opacity: 0.7; }
.auth-panel { flex: 1 1 48%; display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--surface); }
.auth-card { width: 100%; max-width: 400px; }
.auth-mobile-brand { display: block; margin-bottom: 1.5rem; padding: 0.9rem 1.1rem; border-radius: var(--r); background: linear-gradient(100deg, var(--primary), var(--primary-700)); }
.auth-mobile-brand img { height: 40px; width: auto; max-width: 100%; }
.auth-card h1 { font-size: 1.4875rem; font-weight: 800; margin: 0 0 0.3rem; }
.auth-sub { color: var(--muted); margin: 0 0 1.4rem; }
.auth-alert { padding: 0.7rem 0.95rem; margin-bottom: 1rem; border-radius: var(--r); background: var(--bad-bg); color: var(--bad); font-weight: 600; font-size: 0.731rem; }
.auth-field { margin-bottom: 1rem; }
.auth-field label { display: block; margin-bottom: 0.4rem; font-weight: 600; font-size: 0.714rem; color: var(--ink-2); }
.auth-input-wrap { position: relative; }
.auth-input-wrap > i { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.auth-input {
  width: 100%; height: 40.8px; padding: 0 0.765rem 0 2.21rem; background: var(--surface-2); color: var(--ink); font-size: 0.8075rem;
  border: 1px solid var(--line-strong); border-radius: var(--r); transition: all 0.15s;
}
.auth-input:focus { outline: 0; background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 0.22rem var(--ring); }
.auth-input.text-center { padding-left: 0.765rem; letter-spacing: 0.4em; font-size: 1.02rem; font-weight: 700; }
.auth-error { color: var(--bad); font-size: 0.68rem; margin-top: 0.3rem; display: block; }
.btn-auth {
  width: 100%; height: 42.5px; border: 0; border-radius: var(--r); background: var(--primary); color: #fff; font-weight: 700; font-size: 0.8075rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; cursor: pointer; transition: background 0.15s, box-shadow 0.15s;
}
.btn-auth:hover { background: var(--primary-600); box-shadow: 0 8px 20px rgba(1, 101, 199, 0.35); color: #fff; }
.btn-auth-light { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-strong); margin-top: 0.7rem; font-size: 0.7225rem; font-weight: 600; }
.btn-auth-light:hover { background: var(--primary-50); color: var(--primary); box-shadow: none; }
.qr-container svg { width: 180px; height: 180px; margin: 0 auto; display: block; }
.secret-key { display: inline-block; padding: 6px 12px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.9px; letter-spacing: 2px; background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: 6px; color: var(--ink); }

/* print: keep the content only */
@media print {
  .app-header, .menu-sidebar, .footer, .bg-breadcrumb { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; }
}

/* 13 Responsive ------------------------------------------------------------ */
@media (max-width: 991.98px) {
  :root { --gutter: 16px; }
  .app-menu-toggle { display: inline-flex; }
  .app-bar-user { display: none; }
  .app-nav { display: none; max-height: calc(100vh - 60px); overflow-y: auto; }
  .app-nav.open { display: block; }
  .app-nav-inner { padding: 0.425rem var(--gutter) 0.68rem; }
  .app-menu { flex-direction: column; flex-wrap: nowrap; gap: 0; }
  .app-menu-link { height: 37.4px; border-radius: var(--r-sm); }
  .app-menu-link::after { display: none; }
  .app-submenu { position: static; min-width: 0; margin: 0 0 0.4rem; padding: 0.3rem; border: 0; box-shadow: none; background: var(--surface-2); }
  .app-menu-item:hover > .app-submenu { display: none; }
  .app-menu-item.open > .app-submenu { display: block; }
  .page-container { min-height: calc(100vh - 51px); }
  .auth-brand { display: none; }
  .auth-mobile-brand { overflow: hidden; }
  .auth-mobile-brand::before { content: ''; display: block; aspect-ratio: 2048 / 1001; margin: -0.9rem -1.1rem 0.9rem; background: url('../../image/login_bg.jpg') center / cover no-repeat; }
  .menu-sidebar { margin-bottom: 1rem; }
}
@media (max-width: 767.98px) {
  .bg-breadcrumb { padding: 0.6375rem 0.85rem; }
  .page-title-box h3 { font-size: 0.935rem; }
  .card-block, .card-body { padding: 1rem; }
  .sm-text-center { text-align: center !important; }
  .sm-pull-reset { float: none !important; }
  .sm-pull-bottom { position: static; }
  .btn-cons { min-width: 0; }
  .modal.slide-right .modal-dialog, .modal.slide-right .modal-dialog.modal-lg { width: 100vw; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
