/* =====================================================
   V3.1.3 CONSOLIDATED STYLESHEET
   Historical rules are kept in cascade order to avoid visual regressions.
   Redundant style wrappers were removed; V3 rules remain authoritative.
===================================================== */


:root {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --navy: #071827;
  --navy-2: #0b253c;
  --navy-3: #123550;
  --blue: #1479ff;
  --cyan: #11b7cb;
  --gold: #d3a044;
  --gold-soft: #fff6df;
  --text: #172134;
  --muted: #768397;
  --border: #e4eaf0;
  --green: #14a777;
  --red: #df4b58;
  --orange: #ee9736;
  --shadow: 0 14px 38px rgba(7, 24, 39, .08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}


/* =============================
   AUTH / CHECK-IN
============================= */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 50px;
  color: white;
  background:
    radial-gradient(circle at 22% 18%, rgba(20,121,255,.25), transparent 28%),
    radial-gradient(circle at 76% 75%, rgba(211,160,68,.17), transparent 24%),
    linear-gradient(145deg, #061523, #0b2944);
}

.auth-visual::before,
.auth-visual::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

.auth-visual::before {
  width: 520px;
  height: 520px;
  right: -170px;
  top: -180px;
}

.auth-visual::after {
  width: 300px;
  height: 300px;
  left: -140px;
  bottom: -90px;
}

.visual-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 2;
}

.visual-brand .brand-mark {
  width: 50px;
  height: 50px;
}

.visual-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.visual-copy .eyebrow {
  display: inline-flex;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 30px;
  color: #c9d7e6;
  font-size: 10px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.visual-copy h1 {
  margin: 20px 0 15px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -2.5px;
}

.visual-copy h1 span {
  color: #e8be65;
}

.visual-copy p {
  max-width: 560px;
  margin: 0;
  color: #a7bbcc;
  line-height: 1.8;
  font-size: 14px;
}

.auth-panel {
  min-height: 100vh;
  padding: 40px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: min(410px, 100%);
}

.auth-card .mobile-logo {
  display: none;
  margin-bottom: 28px;
}

.auth-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -.8px;
}

.auth-card > p {
  margin: 0 0 30px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  margin-bottom: 8px;
  color: #526074;
  font-size: 11px;
  font-weight: 700;
}

.auth-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #dfe5ec;
  border-radius: 11px;
  outline: none;
  font-size: 13px;
}

.auth-input:focus {
  border-color: #559aff;
  box-shadow: 0 0 0 4px rgba(20,121,255,.07);
}

.auth-submit {
  width: 100%;
  min-height: 49px;
  margin-top: 7px;
}

.login-note {
  margin-top: 18px;
  padding: 13px 14px;
  border-radius: 11px;
  background: #f8fafc;
  color: #778497;
  font-size: 11px;
  line-height: 1.6;
}


/* =============================
   APP LAYOUT
============================= */

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 270px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 23px 16px;
  color: white;
  background:
    radial-gradient(circle at 20% 8%, rgba(20,121,255,.12), transparent 26%),
    linear-gradient(180deg, #061726, #0a2238);
  border-right: 1px solid rgba(255,255,255,.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 24px;
}

.brand-mark {
  width: 43px;
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, #1479ff, #14b5cc);
  box-shadow: 0 10px 24px rgba(20,121,255,.22);
}

.brand-mark span {
  font-size: 25px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong {
  font-size: 16px;
  letter-spacing: 2px;
}

.brand-copy small {
  margin-top: 6px;
  color: #819ab0;
  font-size: 9px;
  letter-spacing: 2.3px;
}

.nav-label {
  margin: 12px 11px 7px;
  color: #58738a;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-item {
  width: 100%;
  min-height: 43px;
  padding: 0 13px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #91a9bd;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  transition: .18s;
}

.nav-item:hover {
  color: white;
  background: rgba(255,255,255,.05);
}

.nav-item.active {
  color: white;
  background: linear-gradient(90deg, rgba(20,121,255,.2), rgba(17,183,203,.08));
  box-shadow: inset 3px 0 0 var(--gold);
}

.nav-item span.material-symbols-rounded {
  font-size: 20px;
}

.sidebar-user {
  margin-top: auto;
  padding: 14px;
  border-radius: 13px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.05);
}

.sidebar-user strong {
  display: block;
  font-size: 12px;
}

.sidebar-user small {
  display: block;
  margin-top: 4px;
  color: #7f9ab0;
  font-size: 10px;
}

.sidebar-user button {
  width: 100%;
  margin-top: 12px;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  color: #b7c8d6;
  font-size: 10px;
}

.main {
  width: calc(100% - 270px);
  min-height: 100vh;
  margin-left: 270px;
}

.topbar {
  min-height: 84px;
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 32px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 13px;
}

.topbar h1 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -.5px;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
}

.role-chip,
.system-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 30px;
  font-size: 10px;
  font-weight: 700;
}

.role-chip {
  background: var(--gold-soft);
  color: #93691f;
}

.system-chip {
  background: #ebf9f4;
  color: #278167;
}

.system-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16ae7c;
  box-shadow: 0 0 0 4px rgba(22,174,124,.1);
}

.mobile-menu {
  display: none;
  padding: 0;
  border: 0;
  background: transparent;
}

.content {
  max-width: 1700px;
  margin: auto;
  padding: 28px 32px 50px;
}


/* =============================
   GENERIC UI
============================= */

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 21px;
}

.page-heading h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.4px;
}

.page-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  transition: .18s;
}

.btn .material-symbols-rounded {
  font-size: 18px;
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, #1479ff, #116ad9);
  box-shadow: 0 8px 20px rgba(20,121,255,.19);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-dark {
  color: white;
  background: var(--navy);
}

.btn-light {
  color: #405066;
  background: white;
  border: 1px solid var(--border);
}

.btn-danger {
  color: #c84551;
  background: #fff0f1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.stat-card {
  min-height: 112px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 17px;
  background: white;
  border: 1px solid rgba(226,232,240,.88);
  box-shadow: 0 8px 22px rgba(7,24,39,.04);
}

.stat-icon {
  width: 49px;
  height: 49px;
  flex: 0 0 49px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.blue {
  color: #1479ff;
  background: #edf5ff;
}

.stat-icon.green {
  color: #149a70;
  background: #ecfaf5;
}

.stat-icon.gold {
  color: #a9781f;
  background: #fff7e6;
}

.stat-icon.cyan {
  color: #118fa1;
  background: #ebfafc;
}

.stat-icon.purple {
  color: #7358c9;
  background: #f0edfb;
}

.stat-icon.red {
  color: #c84a55;
  background: #fff0f1;
}

.stat-card small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.stat-card h3 {
  margin: 6px 0 0;
  font-size: 21px;
  letter-spacing: -.7px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 18px;
}

.panel {
  overflow: hidden;
  border-radius: var(--radius);
  background: white;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(7,24,39,.035);
}

.panel-header {
  min-height: 61px;
  padding: 15px 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.panel-header h3 {
  margin: 0;
  font-size: 13px;
}

.panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.panel-body {
  padding: 18px 19px;
}

.finance-summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.finance-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.finance-line span {
  color: var(--muted);
  font-size: 10px;
}

.finance-line strong {
  font-size: 13px;
}

.finance-line.in strong {
  color: var(--green);
}

.finance-line.out strong {
  color: var(--red);
}

.finance-total {
  margin-top: 1px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.finance-total strong {
  font-size: 19px;
}

.progress {
  width: 100%;
  height: 7px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 8px;
  background: #eef2f5;
}

.progress-bar {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, #1479ff, #12b6ca);
}

.table-toolbar {
  min-height: 64px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  border-bottom: 1px solid var(--border);
}

.search-box {
  width: min(360px, 100%);
  min-height: 39px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid #e4e9ef;
  background: #f8fafc;
}

.search-box span {
  color: #8b97a8;
  font-size: 18px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.data-table th {
  padding: 12px 14px;
  text-align: left;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  color: #7d8999;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .55px;
  text-transform: uppercase;
}

.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf0f4;
  color: #465267;
  font-size: 10.5px;
}

.data-table tbody tr:hover td {
  background: #fbfcfe;
}

.table-name {
  color: #172134;
  font-weight: 700;
}

.row-actions {
  display: flex;
  gap: 5px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f6fa;
  color: #65748a;
}

.btn-icon:hover {
  color: var(--blue);
  background: #eaf3ff;
}

.btn-icon.delete:hover {
  color: var(--red);
  background: #fff0f1;
}

.btn-icon.gold:hover {
  color: #9a6f21;
  background: #fff6df;
}

.btn-icon span {
  font-size: 17px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 800;
}

.badge.green {
  color: #16775a;
  background: #eaf8f3;
}

.badge.red {
  color: #c14751;
  background: #fff0f1;
}

.badge.blue {
  color: #1266c7;
  background: #eaf3ff;
}

.badge.gold {
  color: #966d22;
  background: #fff6df;
}

.badge.gray {
  color: #687587;
  background: #edf0f3;
}

.badge.purple {
  color: #6e54be;
  background: #f0ecfb;
}


/* =============================
   ORG CHART
============================= */

.org-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 13px;
}

.org-card {
  position: relative;
  padding: 17px;
  border-radius: 15px;
  background: white;
  border: 1px solid var(--border);
  box-shadow: 0 7px 20px rgba(7,24,39,.035);
}

.org-order {
  position: absolute;
  top: 14px;
  right: 14px;
  color: #a0aab7;
  font-size: 9px;
  font-weight: 800;
}

.org-avatar {
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1977e9;
  background: #edf5ff;
}

.org-avatar span {
  font-size: 21px;
}

.org-card h3 {
  margin: 0;
  font-size: 13px;
}

.org-card .org-role {
  margin-top: 5px;
  color: #9c7228;
  font-size: 10px;
  font-weight: 700;
}

.org-card .org-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}


/* =============================
   MODAL / FORM
============================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5,17,29,.61);
  backdrop-filter: blur(4px);
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 20px;
  background: white;
  box-shadow: 0 30px 80px rgba(0,0,0,.26);
}

.modal.small {
  width: min(500px, 100%);
}

.modal-header {
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  font-size: 17px;
}

.modal-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.modal-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #647289;
  background: #f2f5f8;
}

.modal-body {
  padding: 21px 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  color: #48586d;
  font-size: 10px;
  font-weight: 800;
}

.form-control {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #dfe5ec;
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: white;
  font-size: 11px;
}

.form-control:focus {
  border-color: #579bff;
  box-shadow: 0 0 0 3px rgba(20,121,255,.07);
}

textarea.form-control {
  min-height: 90px;
  resize: vertical;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}


/* =============================
   QR / MEMBER CARD
============================= */

.qr-card {
  padding: 15px;
  text-align: center;
}

.qr-card img {
  width: min(280px, 100%);
  padding: 10px;
  border-radius: 16px;
  background: white;
  border: 1px solid var(--border);
}

.qr-card h3 {
  margin: 14px 0 5px;
}

.qr-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.qr-link {
  margin-top: 14px;
  padding: 11px;
  overflow-wrap: anywhere;
  border-radius: 10px;
  background: #f7f9fc;
  color: #68758a;
  font-size: 9px;
  line-height: 1.6;
}

.member-card {
  width: 100%;
  min-height: 245px;
  padding: 25px;
  position: relative;
  overflow: hidden;
  border-radius: 19px;
  color: white;
  background:
    radial-gradient(circle at 85% 20%, rgba(211,160,68,.18), transparent 23%),
    radial-gradient(circle at 10% 95%, rgba(20,121,255,.26), transparent 28%),
    linear-gradient(135deg, #071827, #0b2a45);
}

.member-card::after {
  content: "";
  width: 210px;
  height: 210px;
  position: absolute;
  right: -90px;
  bottom: -100px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 50%;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.card-org {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-org .brand-mark {
  width: 38px;
  height: 38px;
}

.card-org strong {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
}

.card-org small {
  display: block;
  margin-top: 4px;
  color: #87a1b7;
  font-size: 8px;
  letter-spacing: 1.7px;
}

.card-type {
  color: #e6bd68;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.member-card h2 {
  margin: 34px 0 5px;
  font-size: 24px;
  letter-spacing: -.7px;
}

.member-card .nta {
  color: #a8bfd1;
  font-size: 10px;
}

.card-bottom {
  position: absolute;
  left: 25px;
  right: 25px;
  bottom: 22px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.card-bottom div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.card-bottom small {
  color: #728ea5;
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: .8px;
}

.card-bottom strong {
  font-size: 9px;
  font-weight: 600;
}


/* =============================
   LOADING / EMPTY / TOAST
============================= */

.loading {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
}

.spinner {
  width: 35px;
  height: 35px;
  margin-bottom: 13px;
  border: 4px solid #e7ebf0;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-state span {
  color: #bdc7d1;
  font-size: 41px;
}

.empty-state h3 {
  margin: 10px 0 5px;
  color: #536174;
  font-size: 13px;
}

.empty-state p {
  margin: 0;
  font-size: 10px;
}

.toast-container {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  min-width: 270px;
  max-width: 380px;
  padding: 13px 15px;
  border-radius: 10px;
  color: white;
  background: #0b2236;
  box-shadow: 0 15px 35px rgba(0,0,0,.2);
  font-size: 10px;
}

.toast.error {
  background: #b73a45;
}

.setup-card {
  width: min(480px, 100%);
  margin: 70px auto;
  padding: 36px;
  border-radius: 20px;
  text-align: center;
  background: white;
  box-shadow: var(--shadow);
}

.setup-icon {
  width: 64px;
  height: 64px;
  margin: auto;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, #1479ff, #13b7ca);
}

.setup-card h2 {
  margin: 20px 0 9px;
}

.setup-card p {
  margin: 0 0 21px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}


/* =============================
   RESPONSIVE
============================= */

@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .org-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }

  .auth-panel {
    padding: 25px;
  }

  .auth-card .mobile-logo {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: .24s;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    width: 100%;
    margin-left: 0;
  }

  .mobile-menu {
    display: flex;
  }

  .content {
    padding: 22px 16px 40px;
  }

  .topbar {
    padding: 15px 17px;
  }

  .system-chip {
    display: none;
  }
}

@media (max-width: 620px) {
  .stats-grid,
  .org-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.full,
  .form-actions {
    grid-column: 1;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .role-chip {
    display: none;
  }
}

/* =====================================================
   V2.5.3.1 STABLE RESPONSIVE + POPUP TOAST
   Scoped additions only; core layout/render is untouched.
===================================================== */

.toast-container {
  right: 20px;
  bottom: 20px;
  width: min(390px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}

.toast {
  width: 100%;
  min-width: 0;
  max-width: none;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(5,17,29,.22);
  font-size: 11px;
  line-height: 1.55;
  animation: sakaToastIn .22s ease-out;
  pointer-events: auto;
}

.toast.success { background: #0b5d4a; }
.toast.error   { background: #a93440; }
.toast.warning { background: #8a641f; }

.toast-icon {
  flex: 0 0 auto;
  margin-top: 1px;
  font-size: 21px;
}

.toast-message {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.toast-close {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

.toast-close:hover { background: rgba(255,255,255,.18); }

@keyframes sakaToastIn {
  from { transform: translateY(12px) scale(.985); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* Tablet */
@media (max-width: 820px) {
  .sidebar { width: min(300px, 86vw); }

  .topbar {
    min-height: 70px;
    gap: 10px;
  }

  .topbar-left { min-width: 0; }
  .topbar-left > div:last-child { min-width: 0; }
  .topbar h1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .content { width: 100%; }

  .panel-header,
  .table-toolbar {
    flex-wrap: wrap;
  }

  .modal-backdrop { padding: 14px; }
  .modal { max-height: calc(100vh - 28px); }

  .data-table th,
  .data-table td { padding: 12px; }
}

/* Mobile */
@media (max-width: 620px) {
  .content { padding: 18px 12px 34px; }
  .topbar { padding: 13px 12px; }
  .topbar h1 { font-size: 18px; }

  .page-heading { gap: 12px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1 1 150px; }

  .panel-header,
  .panel-body,
  .table-toolbar { padding-left: 14px; padding-right: 14px; }

  .data-table { min-width: 640px; }
  .row-actions { gap: 7px; }
  .btn-icon {
    width: 40px;
    height: 40px;
  }

  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal,
  .modal.small {
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
  }

  .modal-header { padding: 17px 16px; }
  .modal-body { padding: 17px 16px 22px; }

  .auth-panel { padding: 22px 18px; }

  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
}

/* Small phones */
@media (max-width: 420px) {
  .stats-grid { gap: 10px; }
  .stat-card { min-height: 96px; padding: 14px; }
  .stat-icon { width: 44px; height: 44px; flex-basis: 44px; }

  .btn { min-height: 44px; }
  .auth-input,
  .form-group input,
  .form-group select,
  .form-group textarea { font-size: 16px; }

  .toast { padding: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
  .sidebar,
  .btn,
  .nav-item { transition: none; }
}

/* =====================================================
   V2.8.0 STABILITY / ACCESSIBILITY
===================================================== */

body.modal-open {
  overflow: hidden;
}

.btn:disabled,
.btn-icon:disabled,
.modal-close:disabled {
  cursor: not-allowed;
  opacity: .62;
  transform: none;
  box-shadow: none;
}

.btn-success {
  color: #ffffff;
  background: linear-gradient(135deg, #14a777, #108863);
  box-shadow: 0 8px 20px rgba(20, 167, 119, .18);
}

.btn-warning {
  color: #7a5418;
  background: #fff4d9;
  border: 1px solid #f0ddb0;
}

.maintenance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.maintenance-result {
  margin-top: 18px;
}

.maintenance-result pre {
  max-height: 440px;
  margin: 0;
  padding: 15px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  color: #425168;
  font: 11px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.toast.info {
  background: #235b85;
}

.modal-backdrop[aria-hidden="true"] {
  pointer-events: none;
}

.modal-backdrop.show[aria-hidden="false"] {
  pointer-events: auto;
}

@media (max-width: 620px) {
  .maintenance-actions .btn {
    flex: 1 1 150px;
  }
}


/* =====================================================
   V2.8.0 EXCEL DATABASE IMPORT
===================================================== */

.excel-import-panel {
  margin-top: 18px;
}

.excel-import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .9fr);
  gap: 16px;
}

.excel-import-drop {
  min-height: 128px;
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  border: 1px dashed #b9c9da;
  border-radius: 14px;
  background: #f8fbfe;
}

.excel-import-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #1479ff;
  background: #eaf3ff;
  font-size: 25px;
}

.excel-import-drop strong,
.excel-import-notes strong {
  display: block;
  font-size: 12px;
}

.excel-import-drop p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.excel-file-input {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  color: #465267;
  font-size: 11px;
}

.excel-import-notes {
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
}

.excel-import-notes ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

.excel-import-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.excel-import-summary {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
}

.excel-import-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 11px;
}

.excel-import-summary-head span {
  color: var(--muted);
  font-size: 10px;
}

.excel-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.excel-report-card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #ffffff;
}

.excel-report-card > strong {
  font-size: 11px;
}

.excel-report-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.excel-report-stats span {
  padding: 4px 7px;
  border-radius: 20px;
  background: #eef4f8;
  color: #5c6b7f;
  font-size: 9px;
}

.excel-report-stats span.is-error {
  color: #b43d49;
  background: #fff0f1;
}


.excel-import-warnings {
  margin-top: 9px;
  color: #7a641f;
  font-size: 9.5px;
}

.excel-import-warnings summary {
  cursor: pointer;
  font-weight: 700;
}

.excel-import-warnings ul {
  margin: 8px 0 0;
  padding-left: 17px;
  line-height: 1.6;
}

.excel-import-errors {
  margin-top: 9px;
  color: #7b5960;
  font-size: 9.5px;
}

.excel-import-errors summary {
  cursor: pointer;
  font-weight: 700;
}

.excel-import-errors ul {
  margin: 8px 0 0;
  padding-left: 17px;
  line-height: 1.6;
}

@media (max-width: 820px) {
  .excel-import-grid,
  .excel-report-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .excel-import-actions .btn,
  .excel-import-panel .panel-header .btn {
    width: 100%;
  }

  .excel-import-summary-head {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* =====================================================
   V2.8.5 PAGINATION + ABSENSI PER PERTEMUAN
===================================================== */
.table-toolbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.table-version {
  color: #8994a4;
  font-size: 9px;
  white-space: nowrap;
}

.pagination-bar {
  min-height: 62px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #fff;
}

.pagination-summary {
  color: var(--muted);
  font-size: 10px;
}

.pagination-summary strong {
  color: var(--text);
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.page-size-control,
.absensi-view-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #65748a;
  font-size: 10px;
  font-weight: 700;
}

.page-size-control select,
.absensi-view-control select {
  min-height: 34px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
}

.absensi-view-control > .material-symbols-rounded {
  font-size: 18px;
  color: var(--blue);
}

.pagination-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #536174;
}

.pagination-btn:hover:not(:disabled) {
  color: var(--blue);
  border-color: #bcd5fb;
  background: #f3f8ff;
}

.pagination-btn:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.pagination-btn .material-symbols-rounded {
  font-size: 20px;
}

.pagination-page,
.page-size-static {
  color: #536174;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.meeting-page-banner {
  margin: 14px 14px 0;
  padding: 13px 15px;
  border: 1px solid #dbe8f7;
  border-radius: 12px;
  background: linear-gradient(135deg, #f7fbff, #fbfdff);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.meeting-page-banner > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meeting-page-label {
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.meeting-page-banner strong {
  font-size: 12px;
  color: var(--text);
}

.meeting-page-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #617086;
  font-size: 10px;
  white-space: nowrap;
}

.meeting-page-meta .material-symbols-rounded {
  font-size: 17px;
  color: var(--blue);
}

.meeting-page-count {
  padding-left: 8px;
  border-left: 1px solid #d9e3ee;
}

@media (max-width: 820px) {
  .pagination-bar,
  .meeting-page-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-controls {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .table-toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .meeting-page-meta {
    white-space: normal;
  }
}

@media (max-width: 620px) {
  .pagination-bar {
    padding: 12px;
  }

  .page-size-control span:first-child,
  .page-size-static {
    display: none;
  }

  .pagination-page {
    min-width: 72px;
    text-align: center;
  }
}


/* =====================================================
   V2.9.0 OPERATIONAL DASHBOARD
===================================================== */
.dashboard-heading { align-items: center; }
.dashboard-date {
  display: inline-block;
  margin-bottom: 6px;
  color: #8a96a7;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .75px;
  text-transform: uppercase;
}

.dashboard-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: -5px 0 18px;
}

.dashboard-quick-action {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  color: #435269;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(7,24,39,.025);
}
.dashboard-quick-action:hover { border-color: #cbd8e5; background: #f9fbfd; }
.dashboard-quick-action .material-symbols-rounded { color: var(--blue); font-size: 18px; }

.dashboard-kpi-grid { margin-bottom: 18px; }
.stat-card-clickable { cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.stat-card-clickable:hover,
.stat-card-clickable:focus-visible {
  transform: translateY(-2px);
  border-color: #d6e0ea;
  box-shadow: 0 14px 30px rgba(7,24,39,.075);
  outline: none;
}
.stat-card-copy { min-width: 0; }
.stat-card-copy h3 { overflow-wrap: anywhere; }
.stat-card-copy p {
  margin: 5px 0 0;
  color: #8995a6;
  font-size: 9px;
  line-height: 1.45;
  text-transform: none;
}

.dashboard-section-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}
.dashboard-section-grid.primary { grid-template-columns: 1.05fr .95fr; }
.dashboard-section-grid.secondary { grid-template-columns: 1fr 1fr; }
.dashboard-panel { min-width: 0; }
.dashboard-panel .panel-body { min-height: 100%; }
.btn-compact { min-height: 33px; padding: 0 10px; font-size: 9px; }
.dashboard-panel-total {
  padding: 5px 9px;
  border-radius: 20px;
  background: #edf5ff;
  color: #176acb;
  font-size: 9px;
  font-weight: 800;
}

.dashboard-eyebrow {
  color: #8995a7;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}
.last-meeting-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.last-meeting-head h3 { margin: 5px 0 4px; font-size: 17px; letter-spacing: -.35px; }
.last-meeting-head p { margin: 0; color: var(--muted); font-size: 9.5px; }
.meeting-rate { text-align: right; }
.meeting-rate strong { display: block; color: var(--green); font-size: 25px; line-height: 1; }
.meeting-rate span { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }

.meeting-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-top: 18px;
}
.meeting-mini-stat {
  min-width: 0;
  padding: 11px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
}
.meeting-mini-stat > .material-symbols-rounded { font-size: 19px; }
.meeting-mini-stat strong { display: block; font-size: 15px; }
.meeting-mini-stat span:not(.material-symbols-rounded) { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }
.meeting-mini-stat.green > .material-symbols-rounded { color: var(--green); }
.meeting-mini-stat.blue > .material-symbols-rounded { color: var(--blue); }
.meeting-mini-stat.gold > .material-symbols-rounded { color: #ad7c25; }
.meeting-mini-stat.red > .material-symbols-rounded { color: var(--red); }

.dashboard-link-button {
  margin-top: 13px;
  padding: 0;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  color: #2879d8;
  font-size: 9px;
  font-weight: 800;
}
.dashboard-link-button .material-symbols-rounded { font-size: 15px; }

.dashboard-notice {
  padding: 13px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: 12px;
  border: 1px solid #e6ebf0;
  background: #f8fafc;
}
.dashboard-notice > .material-symbols-rounded { font-size: 21px; }
.dashboard-notice strong { display: block; font-size: 10px; }
.dashboard-notice span:not(.material-symbols-rounded) { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.dashboard-notice.success { background: #eef9f5; border-color: #d8eee6; }
.dashboard-notice.success > .material-symbols-rounded { color: var(--green); }
.dashboard-notice.neutral > .material-symbols-rounded { color: #758397; }

.agenda-list { display: flex; flex-direction: column; }
.agenda-item {
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid #edf1f4;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  background: #fff;
  text-align: left;
}
.agenda-item:last-child { border-bottom: 0; }
.agenda-item:hover { background: #fbfcfe; }
.agenda-date-box {
  width: 44px;
  min-height: 47px;
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #edf5ff;
  color: #146ecf;
}
.agenda-date-box strong { font-size: 15px; line-height: 1; }
.agenda-date-box span { margin-top: 3px; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.agenda-copy { min-width: 0; }
.agenda-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #263449; font-size: 10px; }
.agenda-copy span { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 8.5px; }
.agenda-copy small { display: block; margin-top: 4px; color: #2474cf; font-size: 8px; font-weight: 700; }

.attendance-trend-list { display: flex; flex-direction: column; gap: 12px; }
.attendance-trend-row { display: grid; grid-template-columns: minmax(120px, .85fr) minmax(100px, 1.4fr) 44px; gap: 10px; align-items: center; }
.trend-label { min-width: 0; }
.trend-label strong { display: block; font-size: 9px; }
.trend-label span { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 8px; }
.trend-track { height: 7px; overflow: hidden; border-radius: 8px; background: #edf1f5; }
.trend-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, #1479ff, #14a777); }
.trend-fill.is-libur { background: #a7b1bd; }
.trend-value { text-align: right; font-size: 9px; }

.monthly-finance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 17px; }
.monthly-finance-grid > div { padding: 11px; border: 1px solid #edf1f5; border-radius: 11px; background: #fafbfd; }
.monthly-finance-grid span { display: block; color: var(--muted); font-size: 8px; }
.monthly-finance-grid strong { display: block; margin-top: 5px; font-size: 11px; overflow-wrap: anywhere; }
.is-positive { color: var(--green) !important; }
.is-negative { color: var(--red) !important; }
.dashboard-subtitle { margin: 0 0 8px; color: #7c899b; font-size: 8px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
.transaction-list { display: flex; flex-direction: column; }
.transaction-item { padding: 9px 0; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 9px; align-items: center; border-bottom: 1px solid #eef1f4; }
.transaction-item:last-child { border-bottom: 0; }
.transaction-icon { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.transaction-icon.in { color: var(--green); background: #ebf8f3; }
.transaction-icon.out { color: var(--red); background: #fff0f1; }
.transaction-icon .material-symbols-rounded { font-size: 16px; }
.transaction-copy { min-width: 0; }
.transaction-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.transaction-copy span { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }
.transaction-value { font-size: 9px; white-space: nowrap; }
.transaction-value.in { color: var(--green); }
.transaction-value.out { color: var(--red); }

.krida-list { display: flex; flex-direction: column; gap: 13px; }
.krida-row-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.krida-row-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4a586d; font-size: 9px; }
.krida-row-head strong { font-size: 9px; }
.krida-track { height: 7px; overflow: hidden; border-radius: 8px; background: #edf1f5; }
.krida-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, #1479ff, #11b7cb); }
.member-status-strip { margin-top: 17px; padding-top: 13px; border-top: 1px solid #edf1f4; display: flex; flex-wrap: wrap; gap: 8px 14px; }
.member-status-strip span { color: var(--muted); font-size: 8px; }
.member-status-strip strong { color: #334158; font-size: 9px; }

.attention-list { display: flex; flex-direction: column; gap: 8px; }
.attention-item {
  width: 100%;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid #e8edf2;
  border-radius: 11px;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) 18px;
  gap: 9px;
  align-items: center;
  background: #fafbfd;
  text-align: left;
}
.attention-item:hover { background: #f7f9fc; }
.attention-item > .material-symbols-rounded:first-child { width: 31px; height: 31px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.attention-item.warning > .material-symbols-rounded:first-child { color: #a77925; background: #fff6e4; }
.attention-item.danger > .material-symbols-rounded:first-child { color: #bd4650; background: #fff0f1; }
.attention-item.neutral > .material-symbols-rounded:first-child { color: #64758a; background: #eef2f5; }
.attention-item strong { display: inline-block; margin-right: 5px; color: #263449; font-size: 11px; }
.attention-item span:not(.material-symbols-rounded) { color: var(--muted); font-size: 8.5px; }
.attention-arrow { color: #a3adba; font-size: 17px !important; }

.dashboard-empty { min-height: 105px; padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.dashboard-empty .material-symbols-rounded { color: #b5bfca; font-size: 30px; }
.dashboard-empty p { margin: 7px 0 0; font-size: 9px; }

@media (max-width: 1180px) {
  .dashboard-section-grid.primary,
  .dashboard-section-grid.secondary { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .dashboard-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .meeting-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .dashboard-kpi-grid { grid-template-columns: 1fr; }
  .dashboard-quick-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .dashboard-quick-action { justify-content: center; }
  .last-meeting-head { flex-direction: column; }
  .meeting-rate { text-align: left; }
  .monthly-finance-grid { grid-template-columns: 1fr; }
  .attendance-trend-row { grid-template-columns: 92px minmax(80px, 1fr) 38px; gap: 7px; }
  .agenda-item { grid-template-columns: 44px minmax(0,1fr); }
  .agenda-item > div:last-child { display: none; }
}


/* =====================================================
   V3.0.0 RESPONSIVE PROFESSIONAL UI / UX SYSTEM
   Desktop, tablet, mobile-first interaction refinements
===================================================== */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #eef3f8;
  --navy: #071827;
  --navy-2: #0a2439;
  --navy-3: #123b5c;
  --blue: #2563eb;
  --blue-2: #1d4ed8;
  --cyan: #06b6d4;
  --gold: #d7a94b;
  --gold-soft: #fff8e8;
  --text: #162033;
  --text-strong: #0f172a;
  --muted: #718096;
  --muted-2: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #d4dde8;
  --green: #0f9f73;
  --red: #d9475a;
  --orange: #e98932;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .035);
  --shadow-sm: 0 7px 22px rgba(15, 23, 42, .055);
  --shadow: 0 18px 48px rgba(15, 23, 42, .075);
  --shadow-lg: 0 30px 80px rgba(7, 24, 39, .18);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius: 18px;
  --radius-lg: 24px;
  --sidebar-w: 280px;
  --sidebar-w-collapsed: 88px;
  --topbar-h: 76px;
  --mobile-nav-h: 72px;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 8%, rgba(37, 99, 235, .045), transparent 28%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

button, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .18);
  outline-offset: 2px;
}

/* ---------- App shell ---------- */
.app {
  display: block;
  min-height: 100vh;
  background: transparent;
}

.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 800;
  padding: 18px 14px 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #d9e5ef;
  background:
    radial-gradient(circle at 18% 2%, rgba(37, 99, 235, .17), transparent 28%),
    radial-gradient(circle at 88% 88%, rgba(6, 182, 212, .09), transparent 26%),
    linear-gradient(180deg, #071827 0%, #081d2f 52%, #071827 100%);
  border-right: 1px solid rgba(255,255,255,.055);
  box-shadow: 14px 0 42px rgba(7, 24, 39, .06);
  transition: width .24s ease, transform .24s ease;
}

.sidebar-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.brand,
.brand-button {
  min-width: 0;
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.brand-button { cursor: pointer; }

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, #2563eb, #08a8c5);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .25), inset 0 1px 0 rgba(255,255,255,.16);
}

.brand-mark span { font-size: 23px; }

.brand-copy {
  min-width: 0;
  transition: opacity .18s ease, transform .18s ease;
}

.brand-copy strong {
  font-size: 15px;
  letter-spacing: 2.4px;
}

.brand-copy small {
  margin-top: 6px;
  color: #7894a9;
  font-size: 8px;
  letter-spacing: 2.1px;
}

.sidebar-mobile-close {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 11px;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.055);
  color: #cbd8e3;
}

.sidebar-nav-scroll {
  min-height: 0;
  flex: 1 1 auto;
  margin: 12px -2px 0;
  padding: 0 2px 16px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
}

.nav-section + .nav-section { margin-top: 18px; }

.nav-label {
  margin: 0 10px 8px;
  color: #5f7e95;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.25px;
  transition: opacity .18s ease;
}

.nav { gap: 5px; }

.nav-item {
  min-height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  color: #91a9bb;
  font-size: 11px;
  font-weight: 650;
  gap: 11px;
  position: relative;
  overflow: hidden;
}

.nav-item::after {
  content: "";
  width: 3px;
  height: 22px;
  position: absolute;
  left: 0;
  top: 50%;
  border-radius: 0 4px 4px 0;
  background: transparent;
  transform: translateY(-50%);
}

.nav-item:hover {
  color: #f7fbff;
  background: rgba(255,255,255,.055);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(37,99,235,.24), rgba(6,182,212,.075));
  box-shadow: none;
}

.nav-item.active::after { background: #e4b95c; }

.nav-icon {
  width: 24px;
  flex: 0 0 24px;
  text-align: center;
  font-size: 20px !important;
}

.nav-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity .18s ease, width .18s ease;
}

.sidebar-bottom {
  padding-top: 11px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.sidebar-collapse {
  width: 100%;
  min-height: 38px;
  margin-bottom: 9px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: #6f8ba0;
  font-size: 9px;
  font-weight: 700;
  text-align: left;
}

.sidebar-collapse:hover { color: #dce7ef; background: rgba(255,255,255,.045); }
.sidebar-collapse .material-symbols-rounded { font-size: 18px; }

.sidebar-user {
  min-height: 58px;
  margin: 0;
  padding: 9px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 9px;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.055);
}

.user-avatar,
.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #1f5fd4, #0ba7c2);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .5px;
}

.sidebar-user-copy { min-width: 0; }
.sidebar-user-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: #eef6fb;
}
.sidebar-user-copy small { margin-top: 3px; color: #6f8ba0; font-size: 8px; }

.sidebar-logout {
  width: 34px !important;
  height: 34px;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 10px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.055) !important;
  color: #91a9bb !important;
}
.sidebar-logout:hover { color: #fff !important; background: rgba(217,71,90,.16) !important; }
.sidebar-logout .material-symbols-rounded { font-size: 18px; }

.sidebar-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 790;
  border: 0;
  background: rgba(5, 17, 29, .52);
  backdrop-filter: blur(4px);
}

.main {
  width: auto;
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--sidebar-w);
  transition: margin-left .24s ease;
}

.app.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
.app.sidebar-collapsed .main { margin-left: var(--sidebar-w-collapsed); }
.app.sidebar-collapsed .brand-copy,
.app.sidebar-collapsed .nav-label,
.app.sidebar-collapsed .nav-text,
.app.sidebar-collapsed .sidebar-collapse span:last-child,
.app.sidebar-collapsed .sidebar-user-copy { opacity: 0; width: 0; pointer-events: none; }
.app.sidebar-collapsed .sidebar-head { justify-content: center; }
.app.sidebar-collapsed .brand-button { justify-content: center; }
.app.sidebar-collapsed .nav-item { justify-content: center; padding-inline: 0; }
.app.sidebar-collapsed .sidebar-collapse { justify-content: center; padding: 0; }
.app.sidebar-collapsed .sidebar-collapse .material-symbols-rounded { transform: rotate(180deg); }
.app.sidebar-collapsed .sidebar-user { grid-template-columns: 1fr; justify-items: center; padding: 8px 5px; }
.app.sidebar-collapsed .sidebar-logout { display: none; }

/* ---------- Top bar ---------- */
.topbar {
  min-height: var(--topbar-h);
  padding: 12px clamp(18px, 2.2vw, 32px);
  position: sticky;
  top: 0;
  z-index: 600;
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid rgba(226,232,240,.9);
  backdrop-filter: blur(18px) saturate(150%);
}

.topbar-left { min-width: 0; gap: 12px; }
.topbar-title-wrap { min-width: 0; }
.topbar-kicker {
  display: block;
  margin-bottom: 3px;
  color: #8a98aa;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.topbar h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-strong);
  font-size: 20px;
  letter-spacing: -.55px;
}
.topbar-right { gap: 8px; }

.icon-button,
.topbar-action {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.88);
  color: #5b687b;
  box-shadow: var(--shadow-xs);
}
.icon-button:hover,
.topbar-action:hover { color: var(--blue); border-color: #c8d9f2; background: #f7faff; }
.icon-button .material-symbols-rounded,
.topbar-action .material-symbols-rounded { font-size: 20px; }

.mobile-menu { display: none; }

.system-chip {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #d9eee7;
  background: #eff9f5;
  color: #25806a;
  font-size: 9px;
}

.profile-chip {
  min-height: 44px;
  max-width: 220px;
  padding: 4px 10px 4px 4px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-xs);
}
.profile-copy { min-width: 0; }
.profile-copy strong,
.profile-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { color: #263449; font-size: 9.5px; }
.profile-copy small { margin-top: 2px; color: #8995a7; font-size: 7.5px; }

/* ---------- Main content ---------- */
.content {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: clamp(20px, 2.4vw, 34px) clamp(18px, 2.4vw, 34px) 58px;
}

.page-heading {
  align-items: center;
  margin-bottom: 20px;
}
.page-heading h2 {
  color: var(--text-strong);
  font-size: clamp(20px, 2vw, 25px);
  letter-spacing: -.65px;
}
.page-heading p {
  margin-top: 6px;
  color: #7c899b;
  font-size: 10px;
  line-height: 1.55;
}

.page-actions { gap: 9px; }

.btn {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 11px;
  font-size: 10.5px;
  letter-spacing: .02px;
  box-shadow: none;
}
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 8px 20px rgba(37,99,235,.18);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(37,99,235,.22); }
.btn-light { background: #fff; border: 1px solid var(--border); }
.btn-light:hover { border-color: #cad8e8; background: #f9fbfd; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

.panel {
  border-radius: 18px;
  border: 1px solid rgba(226,232,240,.92);
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow-sm);
}
.panel-header {
  min-height: 66px;
  padding: 15px 18px;
  border-bottom-color: #e9eef4;
}
.panel-header h3 { color: #263449; font-size: 12px; }
.panel-header p { color: #8995a7; font-size: 8.5px; }
.panel-body { padding: 18px; }

.table-toolbar {
  min-height: 66px;
  padding: 12px 16px;
  gap: 12px;
  background: linear-gradient(180deg, #ffffff, #fcfdff);
}
.search-box {
  width: min(420px, 100%);
  min-height: 42px;
  border-color: #dde5ed;
  border-radius: 11px;
  background: #f7f9fc;
}
.search-box:focus-within {
  border-color: #aac8f5;
  box-shadow: 0 0 0 4px rgba(37,99,235,.07);
  background: #fff;
}
.search-box input { font-size: 10.5px; }
.table-version { color: #a1acba; }

.data-table th {
  padding: 12px 14px;
  background: #f7f9fc;
  color: #7a8798;
  font-size: 8.5px;
  letter-spacing: .65px;
}
.data-table td {
  padding: 13px 14px;
  color: #48566a;
  font-size: 10px;
  border-bottom-color: #edf1f5;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #fafcff; }

.row-actions { gap: 6px; }
.btn-icon {
  width: 34px;
  height: 34px;
  border: 1px solid #e7edf3;
  border-radius: 9px;
  background: #f8fafc;
}
.btn-icon:hover { border-color: #cbdcf3; }

.badge { padding: 5px 9px; font-size: 8.5px; }

/* ---------- Dashboard refinement ---------- */
.dashboard-heading { margin-bottom: 16px; }
.dashboard-date { font-size: 9px; }
.dashboard-quick-actions {
  margin-bottom: 18px;
  gap: 9px;
}
.dashboard-quick-action {
  min-height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.95);
  box-shadow: var(--shadow-xs);
}
.dashboard-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.dashboard-kpi-grid .stat-card {
  min-height: 116px;
  padding: 17px;
  border-radius: 17px;
  border-color: #e4eaf1;
  box-shadow: var(--shadow-sm);
}
.dashboard-section-grid { gap: 16px; }
.dashboard-panel { border-radius: 18px; }
.meeting-mini-stat { border-radius: 12px; }
.agenda-item { min-height: 70px; }
.attention-item { min-height: 52px; }

/* ---------- Forms / modal ---------- */
.modal-backdrop {
  padding: 22px;
  background: rgba(5, 17, 29, .55);
  backdrop-filter: blur(8px);
}
.modal {
  width: min(820px, 100%);
  max-height: min(90vh, 920px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}
.modal.small { width: min(520px, 100%); }
.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 19px 21px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
}
.modal-header h2 { color: var(--text-strong); font-size: 17px; }
.modal-header p { color: #8491a2; font-size: 9px; }
.modal-close {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: #f7f9fc;
}
.modal-body { padding: 20px 21px 23px; }
.form-grid { gap: 16px; }
.form-group { gap: 7px; }
.form-group label { color: #516075; font-size: 9.5px; }
.form-control {
  min-height: 44px;
  padding: 10px 12px;
  border-color: #dbe3ec;
  border-radius: 11px;
  font-size: 10.5px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.form-control:hover { border-color: #cbd6e2; }
.form-control:focus {
  border-color: #91b8f4;
  box-shadow: 0 0 0 4px rgba(37,99,235,.075);
}
textarea.form-control { min-height: 104px; }
.form-actions {
  margin-top: 3px;
  padding-top: 14px;
  border-top: 1px solid #edf1f5;
}

/* ---------- Auth / public check-in ---------- */
.auth-shell { min-height: 100dvh; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); }
.auth-visual {
  padding: clamp(36px, 5vw, 72px);
  background:
    radial-gradient(circle at 16% 12%, rgba(37,99,235,.34), transparent 28%),
    radial-gradient(circle at 78% 78%, rgba(6,182,212,.16), transparent 24%),
    linear-gradient(145deg, #061522 0%, #09263d 55%, #071827 100%);
}
.visual-copy { max-width: 680px; }
.visual-copy h1 { font-size: clamp(40px, 5vw, 68px); letter-spacing: -3px; }
.visual-copy h1 span { color: #f0c66d; }
.auth-panel {
  padding: clamp(24px, 4vw, 52px);
  background: #fff;
}
.auth-card { width: min(440px, 100%); }
.auth-card h2 { font-size: 29px; }
.auth-input {
  min-height: 50px;
  border-radius: 12px;
  background: #fbfcfe;
  font-size: 13px;
}
.auth-input:focus { background: #fff; }
.auth-submit { min-height: 50px; }
.login-note { border: 1px solid #edf1f5; background: #f8fafc; }

/* ---------- Pagination ---------- */
.pagination-bar {
  min-height: 64px;
  padding: 12px 16px;
  background: #fcfdff;
}
.pagination-btn,
.page-size-control select,
.absensi-view-control select {
  min-height: 36px;
  border-radius: 10px;
}
.pagination-btn { width: 36px; height: 36px; }

/* ---------- Mobile bottom nav ---------- */
.mobile-bottom-nav { display: none; }

/* =====================================================
   TABLET / MOBILE
===================================================== */
@media (max-width: 1100px) {
  .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content { padding-inline: 22px; }
}

@media (max-width: 900px) {
  :root { --topbar-h: 68px; }

  body.mobile-nav-open { overflow: hidden; }

  .sidebar {
    width: min(320px, 86vw) !important;
    transform: translateX(-104%);
    z-index: 1200;
    padding-top: max(14px, env(safe-area-inset-top));
    box-shadow: 24px 0 65px rgba(3, 14, 24, .25);
  }
  .sidebar.open { transform: translateX(0); }
  body.mobile-nav-open .sidebar-scrim { display: block; }
  .sidebar-mobile-close { display: inline-flex; }
  .sidebar-collapse { display: none; }
  .sidebar-user { margin-bottom: max(0px, env(safe-area-inset-bottom)); }

  .app.sidebar-collapsed .sidebar { width: min(320px, 86vw) !important; }
  .app.sidebar-collapsed .brand-copy,
  .app.sidebar-collapsed .nav-label,
  .app.sidebar-collapsed .nav-text,
  .app.sidebar-collapsed .sidebar-user-copy { opacity: 1; width: auto; pointer-events: auto; }
  .app.sidebar-collapsed .sidebar-head { justify-content: space-between; }
  .app.sidebar-collapsed .brand-button { justify-content: flex-start; }
  .app.sidebar-collapsed .nav-item { justify-content: flex-start; padding: 0 12px; }
  .app.sidebar-collapsed .sidebar-user { grid-template-columns: 36px minmax(0,1fr) 34px; justify-items: stretch; }
  .app.sidebar-collapsed .sidebar-logout { display: flex; }

  .main,
  .app.sidebar-collapsed .main {
    width: 100%;
    margin-left: 0;
  }

  .topbar {
    min-height: var(--topbar-h);
    padding: 10px 15px;
    padding-top: max(10px, env(safe-area-inset-top));
  }
  .mobile-menu { display: inline-flex; }
  .topbar-kicker { display: none; }
  .topbar h1 { font-size: 18px; }
  .profile-chip { max-width: 44px; padding: 4px; border-radius: 13px; }
  .profile-copy { display: none; }
  .system-chip { display: none; }

  .content {
    max-width: none;
    padding: 18px 15px calc(var(--mobile-nav-h) + 30px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom));
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 700;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
    background: rgba(255,255,255,.95);
    border-top: 1px solid rgba(226,232,240,.95);
    box-shadow: 0 -14px 34px rgba(15,23,42,.075);
    backdrop-filter: blur(18px) saturate(150%);
  }
  .mobile-nav-item {
    min-width: 0;
    min-height: 54px;
    padding: 5px 2px;
    border: 0;
    border-radius: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    color: #8390a1;
    font-size: 8px;
    font-weight: 700;
  }
  .mobile-nav-item .material-symbols-rounded { font-size: 21px; }
  .mobile-nav-item.active {
    color: var(--blue);
    background: #edf4ff;
  }

  .page-heading { gap: 12px; }
  .page-heading h2 { font-size: 21px; }
  .page-heading p { font-size: 9.5px; }

  .dashboard-section-grid.primary,
  .dashboard-section-grid.secondary { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .content { padding-inline: 12px; }

  .page-heading,
  .management-heading {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 14px;
  }
  .page-actions { width: 100%; }
  .page-actions .btn { width: 100%; min-height: 46px; }

  .panel { border-radius: 16px; }
  .panel-header { padding: 14px; }
  .panel-body { padding: 14px; }

  .table-toolbar {
    padding: 12px;
    align-items: stretch;
    flex-direction: column;
  }
  .search-box { width: 100%; min-height: 44px; }
  .table-toolbar-right {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  /* Tables become touch-friendly data cards on mobile */
  .responsive-table-wrap {
    padding: 2px 10px 10px;
    overflow: visible;
    background: #f7f9fc;
  }
  .responsive-table-wrap .data-table,
  .responsive-table-wrap .data-table tbody,
  .responsive-table-wrap .data-table tr,
  .responsive-table-wrap .data-table td {
    width: 100%;
    display: block;
  }
  .responsive-table-wrap .data-table {
    min-width: 0 !important;
    white-space: normal;
  }
  .responsive-table-wrap .data-table thead { display: none; }
  .responsive-table-wrap .data-table tbody tr {
    margin: 10px 0;
    overflow: hidden;
    border: 1px solid #e3e9f0;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(15,23,42,.035);
  }
  .responsive-table-wrap .data-table tbody tr:hover td { background: transparent; }
  .responsive-table-wrap .data-table td {
    min-height: 41px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    color: #3f4d61;
    text-align: right;
    overflow-wrap: anywhere;
  }
  .responsive-table-wrap .data-table td:last-child { border-bottom: 0; }
  .responsive-table-wrap .data-table td::before {
    content: attr(data-label);
    flex: 0 0 34%;
    color: #8b97a8;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .45px;
    text-align: left;
    text-transform: uppercase;
  }
  .responsive-table-wrap .data-table td[colspan] {
    display: block;
    padding: 0;
    text-align: center;
  }
  .responsive-table-wrap .data-table td[colspan]::before { display: none; }
  .responsive-table-wrap .table-name { font-size: 11px; }
  .responsive-table-wrap .row-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .responsive-table-wrap .btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
  }
  .pagination-summary { text-align: center; }
  .pagination-controls { justify-content: center; flex-wrap: wrap; }
  .page-size-control,
  .absensi-view-control { flex: 1 1 150px; justify-content: center; }
  .page-size-control select,
  .absensi-view-control select { min-height: 40px; }
  .pagination-btn { width: 40px; height: 40px; }

  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .modal,
  .modal.small {
    width: 100%;
    max-height: min(92dvh, 900px);
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
  }
  .modal-header {
    padding: 16px 16px 14px;
    border-radius: 24px 24px 0 0;
  }
  .modal-body { padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); }
  .modal-close { width: 40px; height: 40px; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .form-group.full,
  .form-actions { grid-column: 1; }
  .form-control,
  .auth-input { min-height: 48px; font-size: 16px; }
  textarea.form-control { min-height: 112px; }
  .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 1;
    margin-inline: -16px;
    margin-bottom: calc(-20px - env(safe-area-inset-bottom));
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
  }
  .form-actions .btn { min-height: 46px; flex: 1; }

  .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dashboard-kpi-grid .stat-card { min-height: 108px; padding: 13px; }
  .dashboard-quick-actions {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
  }
  .dashboard-quick-actions::-webkit-scrollbar { display: none; }
  .dashboard-quick-action {
    flex: 0 0 auto;
    min-width: 142px;
    scroll-snap-align: start;
  }
  .meeting-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .last-meeting-head { flex-direction: column; }
  .meeting-rate { text-align: left; }
  .monthly-finance-grid { grid-template-columns: 1fr; }
  .attendance-trend-row { grid-template-columns: 90px minmax(0, 1fr) 38px; gap: 7px; }
  .agenda-item { grid-template-columns: 44px minmax(0, 1fr); padding: 11px 13px; }
  .agenda-item > div:last-child { display: none; }

  .org-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .auth-shell {
    display: block;
    min-height: 100dvh;
    background:
      radial-gradient(circle at 16% 8%, rgba(37,99,235,.18), transparent 26%),
      linear-gradient(180deg, #071827 0, #0a263c 34%, #f5f7fb 34%, #f5f7fb 100%);
  }
  .auth-visual { display: none; }
  .auth-panel {
    min-height: 100dvh;
    padding: max(28px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
    align-items: center;
    background: transparent;
  }
  .auth-card {
    width: 100%;
    padding: 24px 20px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 22px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 24px 65px rgba(7,24,39,.18);
  }
  .auth-card .mobile-logo { display: flex; margin-bottom: 24px; }
  .auth-card h2 { font-size: 25px; }
  .auth-card > p { margin-bottom: 24px; }
  .login-note { font-size: 9px; }

  .toast-container {
    left: 10px;
    right: 10px;
    bottom: calc(var(--mobile-nav-h) + 12px + env(safe-area-inset-bottom));
    width: auto;
  }
  .toast { border-radius: 14px; }
}

@media (max-width: 420px) {
  .content { padding-inline: 10px; }
  .topbar { padding-inline: 10px; }
  .topbar h1 { font-size: 17px; }
  .topbar-action { display: none; }

  .dashboard-kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dashboard-kpi-grid .stat-card { min-height: 102px; padding: 11px; gap: 9px; }
  .dashboard-kpi-grid .stat-icon { width: 40px; height: 40px; flex-basis: 40px; }
  .dashboard-kpi-grid .stat-card h3 { font-size: 17px; }

  .mobile-bottom-nav { padding-inline: 4px; gap: 0; }
  .mobile-nav-item { font-size: 7.5px; }
  .mobile-nav-item .material-symbols-rounded { font-size: 20px; }

  .page-size-control { flex-basis: 110px; }
  .pagination-page { min-width: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* =====================================================
   V3.0.1 MOBILE DEVICE FALLBACK
   Forces the real mobile shell when a phone browser reports
   a desktop-like viewport (for example ~980px / Desktop site).
===================================================== */
html.saka-mobile,
html.saka-mobile body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

html.saka-mobile body.mobile-nav-open { overflow: hidden; }

html.saka-mobile .app {
  width: 100%;
  min-width: 0;
  display: block;
  padding: 0;
}

html.saka-mobile .sidebar,
html.saka-mobile .app.sidebar-collapsed .sidebar {
  width: min(320px, 88vw) !important;
  max-width: 88vw;
  transform: translateX(-104%) !important;
  z-index: 1200;
  padding-top: max(14px, env(safe-area-inset-top));
  box-shadow: 24px 0 65px rgba(3,14,24,.25);
}

html.saka-mobile .sidebar.open {
  transform: translateX(0) !important;
}

html.saka-mobile body.mobile-nav-open .sidebar-scrim { display: block; }
html.saka-mobile .sidebar-mobile-close { display: inline-flex; }
html.saka-mobile .sidebar-collapse { display: none !important; }

html.saka-mobile .app.sidebar-collapsed .brand-copy,
html.saka-mobile .app.sidebar-collapsed .nav-label,
html.saka-mobile .app.sidebar-collapsed .nav-text,
html.saka-mobile .app.sidebar-collapsed .sidebar-user-copy {
  opacity: 1;
  width: auto;
  pointer-events: auto;
}

html.saka-mobile .app.sidebar-collapsed .sidebar-head { justify-content: space-between; }
html.saka-mobile .app.sidebar-collapsed .brand-button { justify-content: flex-start; }
html.saka-mobile .app.sidebar-collapsed .nav-item { justify-content: flex-start; padding: 0 12px; }
html.saka-mobile .app.sidebar-collapsed .sidebar-user {
  grid-template-columns: 36px minmax(0,1fr) 34px;
  justify-items: stretch;
}
html.saka-mobile .app.sidebar-collapsed .sidebar-logout { display: flex; }

html.saka-mobile .main,
html.saka-mobile .app.sidebar-collapsed .main {
  width: 100% !important;
  min-width: 0;
  margin-left: 0 !important;
}

html.saka-mobile .topbar {
  min-height: 66px;
  padding: 9px 12px;
  padding-top: max(9px, env(safe-area-inset-top));
}
html.saka-mobile .mobile-menu { display: inline-flex !important; }
html.saka-mobile .topbar-kicker,
html.saka-mobile .system-chip,
html.saka-mobile .profile-copy { display: none !important; }
html.saka-mobile .topbar h1 { font-size: 18px; }
html.saka-mobile .profile-chip {
  max-width: 44px;
  padding: 4px;
  border-radius: 13px;
}

html.saka-mobile .content {
  width: 100%;
  max-width: none;
  padding: 16px 12px calc(var(--mobile-nav-h) + 28px + env(safe-area-inset-bottom));
}

html.saka-mobile .mobile-bottom-nav {
  height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom));
  padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 700;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 2px;
  background: rgba(255,255,255,.96);
  border-top: 1px solid rgba(226,232,240,.96);
  box-shadow: 0 -14px 34px rgba(15,23,42,.08);
  backdrop-filter: blur(18px) saturate(150%);
}

html.saka-mobile .mobile-nav-item {
  min-width: 0;
  min-height: 54px;
  padding: 5px 1px;
  border: 0;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  color: #8390a1;
  font-size: 8px;
  font-weight: 700;
}
html.saka-mobile .mobile-nav-item .material-symbols-rounded { font-size: 21px; }
html.saka-mobile .mobile-nav-item.active { color: var(--blue); background: #edf4ff; }

html.saka-mobile .page-heading,
html.saka-mobile .management-heading {
  align-items: stretch;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 14px;
}
html.saka-mobile .page-heading h2 { font-size: 21px; }
html.saka-mobile .page-heading p { font-size: 9.5px; }
html.saka-mobile .page-actions { width: 100%; }
html.saka-mobile .page-actions .btn { width: 100%; min-height: 46px; }

html.saka-mobile .dashboard-kpi-grid {
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 9px;
}
html.saka-mobile .dashboard-kpi-grid .stat-card { min-height: 104px; padding: 12px; gap: 9px; }
html.saka-mobile .dashboard-kpi-grid .stat-icon { width: 42px; height: 42px; flex-basis: 42px; }
html.saka-mobile .dashboard-kpi-grid .stat-card h3 { font-size: 18px; }
html.saka-mobile .dashboard-section-grid.primary,
html.saka-mobile .dashboard-section-grid.secondary { grid-template-columns: 1fr; }
html.saka-mobile .meeting-stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
html.saka-mobile .monthly-finance-grid { grid-template-columns: 1fr; }
html.saka-mobile .last-meeting-head { flex-direction: column; }
html.saka-mobile .meeting-rate { text-align: left; }

html.saka-mobile .dashboard-quick-actions {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding-bottom: 2px;
}
html.saka-mobile .dashboard-quick-actions::-webkit-scrollbar { display: none; }
html.saka-mobile .dashboard-quick-action { flex: 0 0 auto; min-width: 142px; }

html.saka-mobile .panel { border-radius: 16px; }
html.saka-mobile .panel-header,
html.saka-mobile .panel-body { padding-left: 13px; padding-right: 13px; }
html.saka-mobile .table-toolbar {
  padding: 12px;
  align-items: stretch;
  flex-direction: column;
}
html.saka-mobile .search-box { width: 100%; min-height: 44px; }
html.saka-mobile .table-toolbar-right {
  width: 100%;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* Force management tables into data cards even if viewport reports desktop width. */
html.saka-mobile .responsive-table-wrap {
  padding: 2px 9px 10px;
  overflow: visible;
  background: #f7f9fc;
}
html.saka-mobile .responsive-table-wrap .data-table,
html.saka-mobile .responsive-table-wrap .data-table tbody,
html.saka-mobile .responsive-table-wrap .data-table tr,
html.saka-mobile .responsive-table-wrap .data-table td {
  width: 100%;
  display: block;
}
html.saka-mobile .responsive-table-wrap .data-table {
  min-width: 0 !important;
  white-space: normal;
}
html.saka-mobile .responsive-table-wrap .data-table thead { display: none; }
html.saka-mobile .responsive-table-wrap .data-table tbody tr {
  margin: 9px 0;
  overflow: hidden;
  border: 1px solid #e3e9f0;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(15,23,42,.04);
}
html.saka-mobile .responsive-table-wrap .data-table tbody tr:hover td { background: transparent; }
html.saka-mobile .responsive-table-wrap .data-table td {
  min-height: 41px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #eef2f6;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}
html.saka-mobile .responsive-table-wrap .data-table td:last-child { border-bottom: 0; }
html.saka-mobile .responsive-table-wrap .data-table td::before {
  content: attr(data-label);
  flex: 0 0 34%;
  color: #8b97a8;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .45px;
  text-align: left;
  text-transform: uppercase;
}
html.saka-mobile .responsive-table-wrap .data-table td[colspan] { display: block; padding: 0; text-align: center; }
html.saka-mobile .responsive-table-wrap .data-table td[colspan]::before { display: none; }
html.saka-mobile .responsive-table-wrap .row-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
html.saka-mobile .responsive-table-wrap .btn-icon { width: 40px; height: 40px; border-radius: 11px; }

html.saka-mobile .pagination-bar,
html.saka-mobile .meeting-page-banner {
  align-items: stretch;
  flex-direction: column;
  padding: 12px;
}
html.saka-mobile .pagination-summary { text-align: center; }
html.saka-mobile .pagination-controls { justify-content: center; flex-wrap: wrap; }

/* Mobile forms are always a bottom sheet. */
html.saka-mobile .modal-backdrop {
  padding: 0;
  align-items: flex-end;
}
html.saka-mobile .modal,
html.saka-mobile .modal.small {
  width: 100%;
  max-width: none;
  max-height: min(92dvh, 900px);
  border-radius: 24px 24px 0 0;
  border-bottom: 0;
}
html.saka-mobile .modal-header { padding: 16px 16px 14px; border-radius: 24px 24px 0 0; }
html.saka-mobile .modal-body { padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); }
html.saka-mobile .form-grid { grid-template-columns: 1fr; gap: 14px; }
html.saka-mobile .form-group.full,
html.saka-mobile .form-actions { grid-column: 1; }
html.saka-mobile .form-control,
html.saka-mobile .auth-input { min-height: 48px; font-size: 16px; }
html.saka-mobile textarea.form-control { min-height: 112px; }
html.saka-mobile .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin-inline: -16px;
  margin-bottom: calc(-20px - env(safe-area-inset-bottom));
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
}
html.saka-mobile .form-actions .btn { min-height: 46px; flex: 1; }

/* Login/public check-in fallback for desktop-site mode. */
html.saka-mobile .auth-shell {
  display: block;
  min-height: 100dvh;
  grid-template-columns: 1fr;
  background:
    radial-gradient(circle at 16% 8%, rgba(37,99,235,.18), transparent 26%),
    linear-gradient(180deg, #071827 0, #0a263c 30%, #f5f7fb 30%, #f5f7fb 100%);
}
html.saka-mobile .auth-visual { display: none !important; }
html.saka-mobile .auth-panel {
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) 15px max(24px, env(safe-area-inset-bottom));
  align-items: center;
  background: transparent;
}
html.saka-mobile .auth-card {
  width: 100%;
  max-width: 440px;
  padding: 24px 20px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 22px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 24px 65px rgba(7,24,39,.18);
}
html.saka-mobile .auth-card .mobile-logo { display: flex; margin-bottom: 24px; }

html.saka-mobile .toast-container {
  left: 10px;
  right: 10px;
  bottom: calc(var(--mobile-nav-h) + 12px + env(safe-area-inset-bottom));
  width: auto;
}


/* =====================================================
   V3.0.2 TRUE MOBILE / TABLET / DESKTOP MODES
   - Mobile: native-app visual language
   - Tablet: off-canvas navigation, roomy content
   - Desktop: respects browser Desktop Site
===================================================== */

/* ---------- TABLET CLASS FALLBACK (works beyond CSS breakpoint) ---------- */
html.saka-tablet,
html.saka-tablet body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
html.saka-tablet .sidebar,
html.saka-tablet .app.sidebar-collapsed .sidebar {
  width: min(320px, 78vw) !important;
  transform: translateX(-104%);
  z-index: 1200;
  box-shadow: 24px 0 65px rgba(3,14,24,.22);
}
html.saka-tablet .sidebar.open { transform: translateX(0); }
html.saka-tablet body.mobile-nav-open .sidebar-scrim { display: block; }
html.saka-tablet .sidebar-mobile-close { display: inline-flex; }
html.saka-tablet .sidebar-collapse { display: none !important; }
html.saka-tablet .main,
html.saka-tablet .app.sidebar-collapsed .main {
  width: 100% !important;
  margin-left: 0 !important;
}
html.saka-tablet .mobile-menu { display: inline-flex !important; }
html.saka-tablet .mobile-bottom-nav { display: none !important; }
html.saka-tablet .content { max-width: none; padding-inline: 22px; }
html.saka-tablet .dashboard-section-grid.primary,
html.saka-tablet .dashboard-section-grid.secondary { grid-template-columns: 1fr; }

/* ---------- TRUE MOBILE APP SHELL ---------- */
html.saka-mobile {
  --mobile-native-bg: #f4f7fb;
  --mobile-card-radius: 20px;
  --mobile-nav-float-h: 66px;
}
html.saka-mobile body {
  background: var(--mobile-native-bg);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
html.saka-mobile .app,
html.saka-mobile .main {
  background: var(--mobile-native-bg);
}

/* Compact native app bar, not a shrunken desktop header */
html.saka-mobile .topbar {
  min-height: 58px;
  padding: 7px 10px;
  padding-top: max(7px, env(safe-area-inset-top));
  border-bottom: 0;
  background: rgba(244,247,251,.94);
  box-shadow: none;
  backdrop-filter: blur(20px) saturate(160%);
}
html.saka-mobile .topbar-left { gap: 8px; min-width: 0; }
html.saka-mobile .topbar-title-wrap { min-width: 0; }
html.saka-mobile .topbar h1 {
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.45px;
}
html.saka-mobile .mobile-menu,
html.saka-mobile .icon-button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e7edf4;
  box-shadow: 0 3px 12px rgba(15,23,42,.045);
}
html.saka-mobile .topbar-action { display: none !important; }
html.saka-mobile .profile-chip {
  width: 42px;
  height: 42px;
  max-width: 42px;
  padding: 3px;
  border: 1px solid #e7edf4;
  background: #fff;
  box-shadow: 0 3px 12px rgba(15,23,42,.045);
}
html.saka-mobile .profile-avatar { width: 34px; height: 34px; }

/* Main mobile canvas */
html.saka-mobile .content {
  padding: 8px 10px calc(96px + env(safe-area-inset-bottom));
}
html.saka-mobile .page-heading,
html.saka-mobile .management-heading {
  margin: 4px 2px 12px;
  padding: 0;
}
html.saka-mobile .page-heading h2 { font-size: 22px; line-height: 1.16; letter-spacing: -.7px; }
html.saka-mobile .page-heading p { margin-top: 5px; font-size: 10px; line-height: 1.45; }
html.saka-mobile .dashboard-date {
  display: inline-flex;
  margin-top: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eaf1fb;
  color: #64758a;
  font-size: 9px;
  font-weight: 700;
}

/* Quick actions behave like app shortcuts */
html.saka-mobile .dashboard-quick-actions {
  margin: 0 -10px 12px;
  padding: 0 10px 3px;
  gap: 8px;
  display: flex !important;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}
html.saka-mobile .dashboard-quick-action {
  flex: 0 0 auto;
  min-width: auto;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid #e3eaf2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(15,23,42,.035);
  scroll-snap-align: start;
}

/* KPI is a horizontal mobile carousel instead of desktop-style 2xN tiles */
html.saka-mobile .dashboard-kpi-grid {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 9px;
  margin: 0 -10px 14px;
  padding: 0 10px 5px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
html.saka-mobile .dashboard-kpi-grid::-webkit-scrollbar { display: none; }
html.saka-mobile .dashboard-kpi-grid .stat-card {
  flex: 0 0 154px;
  min-height: 96px;
  padding: 12px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 7px 22px rgba(15,23,42,.065);
  scroll-snap-align: start;
}
html.saka-mobile .dashboard-kpi-grid .stat-icon {
  width: 39px;
  height: 39px;
  flex-basis: 39px;
  border-radius: 12px;
}
html.saka-mobile .dashboard-kpi-grid .stat-card small { font-size: 7.5px; letter-spacing: .35px; }
html.saka-mobile .dashboard-kpi-grid .stat-card h3 { margin-top: 4px; font-size: 17px; }
html.saka-mobile .dashboard-kpi-grid .stat-card p { font-size: 8px; }

/* Dashboard sections become clean app cards */
html.saka-mobile .dashboard-section-grid {
  display: block !important;
  margin: 0;
}
html.saka-mobile .dashboard-panel,
html.saka-mobile .panel {
  margin-bottom: 11px;
  border: 0;
  border-radius: var(--mobile-card-radius);
  background: #fff;
  box-shadow: 0 5px 20px rgba(15,23,42,.055);
}
html.saka-mobile .panel-header {
  min-height: 54px;
  padding: 14px 14px 11px;
  border-bottom: 1px solid #f0f3f7;
}
html.saka-mobile .panel-header h3 { font-size: 13px; letter-spacing: -.2px; }
html.saka-mobile .panel-header p { font-size: 8.5px; }
html.saka-mobile .panel-body { padding: 13px 14px 15px; }
html.saka-mobile .meeting-stats-grid { gap: 7px; }
html.saka-mobile .meeting-mini-stat { padding: 10px; border-radius: 14px; }
html.saka-mobile .attention-item { border-radius: 14px; }

/* Management pages feel like mobile lists */
html.saka-mobile .table-toolbar {
  margin: 0;
  padding: 10px;
  border-bottom: 0;
  background: #fff;
  border-radius: var(--mobile-card-radius) var(--mobile-card-radius) 0 0;
}
html.saka-mobile .search-box {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  background: #f1f4f8;
}
html.saka-mobile .search-box input { font-size: 14px; }
html.saka-mobile .responsive-table-wrap {
  padding: 1px 8px 8px;
  background: #fff;
}
html.saka-mobile .responsive-table-wrap .data-table tbody tr {
  margin: 8px 0;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  box-shadow: 0 3px 12px rgba(15,23,42,.035);
}
html.saka-mobile .responsive-table-wrap .data-table td {
  min-height: 43px;
  padding: 10px 12px;
}
html.saka-mobile .responsive-table-wrap .data-table td::before {
  flex-basis: 31%;
  font-size: 7.5px;
}
html.saka-mobile .pagination-bar {
  margin-top: 0;
  border-top: 1px solid #f0f3f7;
  border-radius: 0 0 var(--mobile-card-radius) var(--mobile-card-radius);
  background: #fff;
}

/* Floating native bottom navigation */
html.saka-mobile .mobile-bottom-nav {
  left: 8px;
  right: 8px;
  bottom: max(8px, env(safe-area-inset-bottom));
  width: auto;
  height: var(--mobile-nav-float-h);
  padding: 6px;
  border: 1px solid rgba(218,226,235,.96);
  border-radius: 22px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 14px 40px rgba(15,23,42,.16);
  overflow: hidden;
}
html.saka-mobile .mobile-nav-item {
  min-height: 52px;
  border-radius: 16px;
  font-size: 8px;
  gap: 2px;
}
html.saka-mobile .mobile-nav-item .material-symbols-rounded {
  font-size: 22px;
  transition: transform .16s ease;
}
html.saka-mobile .mobile-nav-item.active {
  color: #1769dc;
  background: #edf4ff;
}
html.saka-mobile .mobile-nav-item.active .material-symbols-rounded { transform: translateY(-1px); }

/* Drawer feels like a mobile navigation sheet */
html.saka-mobile .sidebar,
html.saka-mobile .app.sidebar-collapsed .sidebar {
  width: min(304px, 86vw) !important;
  max-width: 86vw;
  border-radius: 0 24px 24px 0;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #071827 0%, #0b253c 100%);
}
html.saka-mobile .sidebar-head { min-height: 54px; }
html.saka-mobile .nav-item { min-height: 46px; border-radius: 13px; }

/* Mobile modal: unmistakable bottom sheet */
html.saka-mobile .modal-backdrop { background: rgba(7,24,39,.46); backdrop-filter: blur(3px); }
html.saka-mobile .modal,
html.saka-mobile .modal.small {
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -18px 55px rgba(7,24,39,.22);
}
html.saka-mobile .modal::before {
  content: '';
  display: block;
  width: 44px;
  height: 5px;
  margin: 8px auto 0;
  border-radius: 999px;
  background: #dbe2ea;
}

/* Very narrow phones */
@media (max-width: 390px) {
  html.saka-mobile .dashboard-kpi-grid .stat-card { flex-basis: 146px; }
  html.saka-mobile .mobile-nav-item { font-size: 7.5px; }
  html.saka-mobile .mobile-nav-item .material-symbols-rounded { font-size: 21px; }
}


/* =====================================================
   V3.1.0 USER-SELECTABLE DISPLAY MODES
   - Auto / Mobile / Desktop from sidebar menu
   - Mobile typography enlarged for desktop-like readability
   - Desktop class overrides narrow-screen media queries
===================================================== */

.display-mode-nav { position: relative; }
.display-mode-mini {
  margin-left: auto;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: #8eacc2;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .45px;
}
.app.sidebar-collapsed .display-mode-mini { display: none; }

.display-mode-panel { display: flex; flex-direction: column; gap: 14px; }
.display-mode-current {
  padding: 14px;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  gap: 11px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}
.display-mode-current > .material-symbols-rounded {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--blue);
  background: #eaf2ff;
  font-size: 22px;
}
.display-mode-current small {
  display: block;
  color: #8a96a7;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .7px;
}
.display-mode-current strong { display: block; margin-top: 2px; font-size: 14px; }
.display-mode-current p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }

.display-mode-options { display: grid; gap: 9px; }
.display-mode-option {
  width: 100%;
  min-height: 68px;
  padding: 11px 12px;
  border: 1px solid #e3e9f0;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 24px;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: var(--text);
  text-align: left;
}
.display-mode-option:hover { border-color: #bdd0ec; background: #f9fbff; }
.display-mode-option.selected {
  border-color: #9ebff0;
  background: #f1f6ff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.06);
}
.display-mode-option-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: #eef3f8;
  color: #586a80;
  font-size: 20px;
}
.display-mode-option.selected .display-mode-option-icon { background: #e4efff; color: var(--blue); }
.display-mode-option-copy { min-width: 0; }
.display-mode-option-copy strong { display: block; font-size: 11.5px; }
.display-mode-option-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 9.5px; line-height: 1.45; }
.display-mode-check { color: #a7b1bd; font-size: 20px; }
.display-mode-option.selected .display-mode-check { color: var(--blue); }
.display-mode-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 10px 11px;
  border-radius: 11px;
  background: #fff8e9;
  color: #80642b;
  font-size: 9px;
  line-height: 1.5;
}
.display-mode-note .material-symbols-rounded { flex: 0 0 auto; font-size: 17px; }

/* TRUE DESKTOP LOCK.
   This wins over @media max-width rules when JS decides/forces desktop. */
html.saka-desktop,
html.saka-desktop body {
  min-width: 1024px;
  overflow-x: auto;
}
html.saka-desktop .app { min-width: 1024px; display: block; }
html.saka-desktop .sidebar,
html.saka-desktop .app.sidebar-collapsed .sidebar {
  transform: none !important;
  max-width: none;
  border-radius: 0;
}
html.saka-desktop .sidebar { width: var(--sidebar-w) !important; }
html.saka-desktop .app.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed) !important; }
html.saka-desktop .main {
  width: auto !important;
  margin-left: var(--sidebar-w) !important;
}
html.saka-desktop .app.sidebar-collapsed .main { margin-left: var(--sidebar-w-collapsed) !important; }
html.saka-desktop .mobile-menu,
html.saka-desktop .mobile-bottom-nav,
html.saka-desktop .sidebar-mobile-close,
html.saka-desktop .sidebar-scrim { display: none !important; }
html.saka-desktop .sidebar-collapse { display: flex !important; }
html.saka-desktop .topbar {
  min-height: var(--topbar-h);
  padding: 12px clamp(18px,2.2vw,32px);
}
html.saka-desktop .topbar-kicker { display: block !important; }
html.saka-desktop .system-chip { display: inline-flex !important; }
html.saka-desktop .profile-chip {
  width: auto;
  height: auto;
  max-width: 220px;
  padding: 4px 10px 4px 4px;
}
html.saka-desktop .profile-copy { display: block !important; }
html.saka-desktop .content {
  width: 100%;
  max-width: 1680px;
  padding: clamp(20px,2.4vw,34px) clamp(18px,2.4vw,34px) 58px;
}
html.saka-desktop .page-heading,
html.saka-desktop .management-heading {
  display: flex;
  align-items: center;
  flex-direction: row;
}
html.saka-desktop .page-actions { width: auto; }
html.saka-desktop .page-actions .btn { width: auto; min-height: 42px; }
html.saka-desktop .dashboard-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
}
html.saka-desktop .dashboard-section-grid.primary { display: grid !important; grid-template-columns: 1.05fr .95fr !important; }
html.saka-desktop .dashboard-section-grid.secondary { display: grid !important; grid-template-columns: 1fr 1fr !important; }
html.saka-desktop .table-toolbar {
  display: flex;
  align-items: center;
  flex-direction: row;
}
html.saka-desktop .search-box { width: min(420px,100%); }
html.saka-desktop .table-toolbar-right { width: auto; justify-content: flex-end; }
html.saka-desktop .responsive-table-wrap {
  padding: 0;
  overflow-x: auto;
  background: transparent;
}
html.saka-desktop .responsive-table-wrap .data-table { display: table !important; width: 100% !important; min-width: 0; white-space: nowrap; }
html.saka-desktop .responsive-table-wrap .data-table thead { display: table-header-group !important; }
html.saka-desktop .responsive-table-wrap .data-table tbody { display: table-row-group !important; width: auto !important; }
html.saka-desktop .responsive-table-wrap .data-table tr {
  display: table-row !important;
  width: auto !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none !important;
}
html.saka-desktop .responsive-table-wrap .data-table td {
  display: table-cell !important;
  width: auto !important;
  min-height: 0;
  padding: 13px 14px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  white-space: nowrap;
}
html.saka-desktop .responsive-table-wrap .data-table td::before { display: none !important; }
html.saka-desktop .responsive-table-wrap .row-actions { width: auto; justify-content: flex-start; flex-wrap: nowrap; }
html.saka-desktop .responsive-table-wrap .btn-icon { width: 34px; height: 34px; border-radius: 9px; }
html.saka-desktop .pagination-bar { flex-direction: row; align-items: center; }
html.saka-desktop .pagination-summary { text-align: left; }
html.saka-desktop .pagination-controls { justify-content: flex-end; flex-wrap: nowrap; }
html.saka-desktop .form-grid { grid-template-columns: repeat(2,1fr); }
html.saka-desktop .form-group.full,
html.saka-desktop .form-actions { grid-column: 1 / -1; }
html.saka-desktop .modal-backdrop { padding: 22px; align-items: center; }
html.saka-desktop .modal,
html.saka-desktop .modal.small { border-radius: 24px; max-height: min(90vh,920px); }
html.saka-desktop .modal { width: min(820px,100%); }
html.saka-desktop .modal.small { width: min(520px,100%); }
html.saka-desktop .modal::before { display: none !important; }
html.saka-desktop .form-actions {
  position: static;
  margin: 3px 0 0;
  padding: 14px 0 0;
  background: transparent;
  backdrop-filter: none;
}
html.saka-desktop .auth-shell {
  min-width: 1024px;
  display: grid;
  grid-template-columns: minmax(0,1.05fr) minmax(420px,.95fr);
  background: transparent;
}
html.saka-desktop .auth-visual { display: flex !important; }
html.saka-desktop .auth-panel { background: #fff; }
html.saka-desktop .auth-card {
  width: min(440px,100%);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
html.saka-desktop .auth-card .mobile-logo { display: none !important; }

/* Readable mobile typography: mobile layout, desktop-like text density. */
html.saka-mobile body { font-size: 14px; }
html.saka-mobile .topbar h1 { font-size: 18px; }
html.saka-mobile .page-heading h2 { font-size: 23px; }
html.saka-mobile .page-heading p { font-size: 12px; line-height: 1.55; }
html.saka-mobile .dashboard-date { font-size: 10px; }
html.saka-mobile .btn { font-size: 12px; }
html.saka-mobile .dashboard-quick-action { min-height: 46px; font-size: 11.5px; }
html.saka-mobile .dashboard-kpi-grid .stat-card { flex-basis: 174px; min-height: 108px; }
html.saka-mobile .dashboard-kpi-grid .stat-card small { font-size: 9px; }
html.saka-mobile .dashboard-kpi-grid .stat-card h3 { font-size: 19px; }
html.saka-mobile .dashboard-kpi-grid .stat-card p { font-size: 10px; line-height: 1.45; }
html.saka-mobile .panel-header h3 { font-size: 14px; }
html.saka-mobile .panel-header p { font-size: 10.5px; line-height: 1.4; }
html.saka-mobile .last-meeting-head h3 { font-size: 17px; }
html.saka-mobile .last-meeting-head p { font-size: 11px; }
html.saka-mobile .meeting-rate span { font-size: 10px; }
html.saka-mobile .meeting-mini-stat strong { font-size: 16px; }
html.saka-mobile .meeting-mini-stat span:not(.material-symbols-rounded) { font-size: 10px; }
html.saka-mobile .dashboard-link-button { font-size: 11px; }
html.saka-mobile .dashboard-notice strong { font-size: 12px; }
html.saka-mobile .dashboard-notice span:not(.material-symbols-rounded) { font-size: 10.5px; }
html.saka-mobile .agenda-copy strong { font-size: 12px; }
html.saka-mobile .agenda-copy span { font-size: 10.5px; }
html.saka-mobile .agenda-copy small { font-size: 9.5px; }
html.saka-mobile .trend-label strong { font-size: 10.5px; }
html.saka-mobile .trend-label span,
html.saka-mobile .trend-value { font-size: 9.5px; }
html.saka-mobile .monthly-finance-grid span { font-size: 10px; }
html.saka-mobile .monthly-finance-grid strong { font-size: 12px; }
html.saka-mobile .dashboard-subtitle { font-size: 9.5px; }
html.saka-mobile .transaction-copy strong,
html.saka-mobile .transaction-value { font-size: 11px; }
html.saka-mobile .transaction-copy span { font-size: 9.5px; }
html.saka-mobile .krida-row-head span,
html.saka-mobile .krida-row-head strong { font-size: 10.5px; }
html.saka-mobile .member-status-strip span { font-size: 9.5px; }
html.saka-mobile .member-status-strip strong { font-size: 10.5px; }
html.saka-mobile .attention-item strong { font-size: 12px; }
html.saka-mobile .attention-item span:not(.material-symbols-rounded) { font-size: 10px; }
html.saka-mobile .dashboard-empty p { font-size: 10.5px; }
html.saka-mobile .search-box input { font-size: 15px; }
html.saka-mobile .table-version { font-size: 9px; }
html.saka-mobile .responsive-table-wrap .data-table td { font-size: 12px; line-height: 1.45; }
html.saka-mobile .responsive-table-wrap .data-table td::before { flex-basis: 34%; font-size: 9px; line-height: 1.35; }
html.saka-mobile .responsive-table-wrap .table-name { font-size: 12.5px; }
html.saka-mobile .badge { font-size: 10px; }
html.saka-mobile .pagination-summary,
html.saka-mobile .pagination-page,
html.saka-mobile .page-size-control,
html.saka-mobile .absensi-view-control { font-size: 10.5px; }
html.saka-mobile .mobile-nav-item { font-size: 9.5px; }
html.saka-mobile .nav-item { min-height: 48px; font-size: 12px; }
html.saka-mobile .nav-label { font-size: 9px; }
html.saka-mobile .sidebar-user-copy strong { font-size: 11.5px; }
html.saka-mobile .sidebar-user-copy small { font-size: 9.5px; }
html.saka-mobile .display-mode-mini { font-size: 8px; }
html.saka-mobile .display-mode-current small { font-size: 9px; }
html.saka-mobile .display-mode-current strong { font-size: 15px; }
html.saka-mobile .display-mode-current p { font-size: 11px; }
html.saka-mobile .display-mode-option { min-height: 76px; }
html.saka-mobile .display-mode-option-copy strong { font-size: 13px; }
html.saka-mobile .display-mode-option-copy small { font-size: 11px; }
html.saka-mobile .display-mode-note { font-size: 10.5px; }
html.saka-mobile .toast { font-size: 12px; }

@media (max-width: 390px) {
  html.saka-mobile .dashboard-kpi-grid .stat-card { flex-basis: 166px; }
}


/* =====================================================
   V3.1.1 MOBILE SCROLL + READABILITY HOTFIX
   - Mobile uses .main as the deterministic vertical scroll container
   - Prevents stale body scroll-lock from freezing the page
   - Larger typography for phones and forced-Mobile on wide CSS viewports
===================================================== */

/* Deterministic mobile scrolling. This avoids Android/Chrome cases where
   document/body scrolling is frozen by a stale modal/drawer lock. */
html.saka-mobile,
html.saka-mobile body {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

html.saka-mobile .app {
  width: 100% !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  overflow: hidden !important;
}

html.saka-mobile .main,
html.saka-mobile .app.sidebar-collapsed .main {
  width: 100% !important;
  height: 100dvh !important;
  min-height: 0 !important;
  margin-left: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
  touch-action: pan-y pinch-zoom;
  scroll-behavior: smooth;
}

html.saka-mobile body.modal-open .main,
html.saka-mobile body.mobile-nav-open .main {
  overflow-y: hidden !important;
  touch-action: none;
}

html.saka-mobile .content {
  min-height: calc(100dvh - 58px);
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

/* Mobile text should read like a normal app, not a scaled desktop miniature. */
html.saka-mobile body { font-size: 15px; }
html.saka-mobile .topbar h1 { font-size: 19px; }
html.saka-mobile .page-heading h2 { font-size: 24px; }
html.saka-mobile .page-heading p { font-size: 13px; line-height: 1.55; }
html.saka-mobile .dashboard-date { font-size: 11px; }
html.saka-mobile .btn { min-height: 46px; font-size: 13px; }
html.saka-mobile .dashboard-quick-action { min-height: 48px; font-size: 12.5px; }
html.saka-mobile .dashboard-kpi-grid .stat-card { flex-basis: 190px; min-height: 116px; }
html.saka-mobile .dashboard-kpi-grid .stat-card small { font-size: 10px; }
html.saka-mobile .dashboard-kpi-grid .stat-card h3 { font-size: 21px; }
html.saka-mobile .dashboard-kpi-grid .stat-card p { font-size: 11px; line-height: 1.45; }
html.saka-mobile .panel-header h3 { font-size: 15px; }
html.saka-mobile .panel-header p { font-size: 11.5px; line-height: 1.45; }
html.saka-mobile .last-meeting-head h3 { font-size: 18px; }
html.saka-mobile .last-meeting-head p { font-size: 12px; }
html.saka-mobile .meeting-rate strong { font-size: 28px; }
html.saka-mobile .meeting-rate span { font-size: 11px; }
html.saka-mobile .meeting-mini-stat strong { font-size: 17px; }
html.saka-mobile .meeting-mini-stat span:not(.material-symbols-rounded) { font-size: 11px; }
html.saka-mobile .dashboard-link-button { font-size: 12px; }
html.saka-mobile .dashboard-notice strong { font-size: 13px; }
html.saka-mobile .dashboard-notice span:not(.material-symbols-rounded) { font-size: 11.5px; }
html.saka-mobile .agenda-copy strong { font-size: 13px; }
html.saka-mobile .agenda-copy span { font-size: 11.5px; }
html.saka-mobile .agenda-copy small { font-size: 10.5px; }
html.saka-mobile .trend-label strong { font-size: 11.5px; }
html.saka-mobile .trend-label span,
html.saka-mobile .trend-value { font-size: 10.5px; }
html.saka-mobile .monthly-finance-grid span { font-size: 11px; }
html.saka-mobile .monthly-finance-grid strong { font-size: 13.5px; }
html.saka-mobile .dashboard-subtitle { font-size: 10.5px; }
html.saka-mobile .transaction-copy strong,
html.saka-mobile .transaction-value { font-size: 12px; }
html.saka-mobile .transaction-copy span { font-size: 10.5px; }
html.saka-mobile .krida-row-head span,
html.saka-mobile .krida-row-head strong { font-size: 11.5px; }
html.saka-mobile .member-status-strip span { font-size: 10.5px; }
html.saka-mobile .member-status-strip strong { font-size: 11.5px; }
html.saka-mobile .attention-item strong { font-size: 13px; }
html.saka-mobile .attention-item span:not(.material-symbols-rounded) { font-size: 11px; }
html.saka-mobile .dashboard-empty p { font-size: 11.5px; }
html.saka-mobile .responsive-table-wrap .data-table td { font-size: 13px; line-height: 1.5; }
html.saka-mobile .responsive-table-wrap .data-table td::before { flex-basis: 35%; font-size: 10px; line-height: 1.4; }
html.saka-mobile .responsive-table-wrap .table-name { font-size: 13.5px; }
html.saka-mobile .badge { font-size: 11px; padding: 6px 10px; }
html.saka-mobile .pagination-summary,
html.saka-mobile .pagination-page,
html.saka-mobile .page-size-control,
html.saka-mobile .absensi-view-control { font-size: 11.5px; }
html.saka-mobile .mobile-nav-item { font-size: 10.5px; }
html.saka-mobile .mobile-nav-item .material-symbols-rounded { font-size: 24px; }
html.saka-mobile .nav-item { min-height: 50px; font-size: 13px; }
html.saka-mobile .nav-label { font-size: 10px; }
html.saka-mobile .sidebar-user-copy strong { font-size: 12.5px; }
html.saka-mobile .sidebar-user-copy small { font-size: 10.5px; }

/* When a physical phone still exposes a desktop-like CSS viewport
   (commonly ~900-1000px inside Apps Script/Chrome), enlarge components
   in both AUTO and forced-Mobile modes so the phone does not look zoomed-out. */
@media (min-width: 721px) {
  html.saka-mobile .content {
    padding: 12px 18px calc(112px + env(safe-area-inset-bottom));
  }
  html.saka-mobile .topbar h1 { font-size: 22px; }
  html.saka-mobile .page-heading h2 { font-size: 29px; }
  html.saka-mobile .page-heading p { font-size: 15px; }
  html.saka-mobile .dashboard-date { font-size: 12px; }
  html.saka-mobile .dashboard-quick-action {
    min-height: 54px;
    padding-inline: 18px;
    font-size: 14px;
  }
  html.saka-mobile .dashboard-kpi-grid .stat-card {
    flex-basis: 290px;
    min-height: 138px;
    padding: 16px;
  }
  html.saka-mobile .dashboard-kpi-grid .stat-card small { font-size: 12px; }
  html.saka-mobile .dashboard-kpi-grid .stat-card h3 { font-size: 25px; }
  html.saka-mobile .dashboard-kpi-grid .stat-card p { font-size: 13px; }
  html.saka-mobile .panel-header { padding: 18px; }
  html.saka-mobile .panel-body { padding: 18px; }
  html.saka-mobile .panel-header h3 { font-size: 17px; }
  html.saka-mobile .panel-header p { font-size: 13px; }
  html.saka-mobile .meeting-mini-stat strong { font-size: 20px; }
  html.saka-mobile .meeting-mini-stat span:not(.material-symbols-rounded) { font-size: 13px; }
  html.saka-mobile .agenda-copy strong { font-size: 15px; }
  html.saka-mobile .agenda-copy span { font-size: 13px; }
  html.saka-mobile .agenda-copy small { font-size: 12px; }
  html.saka-mobile .trend-label strong,
  html.saka-mobile .trend-value { font-size: 13px; }
  html.saka-mobile .trend-label span { font-size: 12px; }
  html.saka-mobile .transaction-copy strong,
  html.saka-mobile .transaction-value { font-size: 14px; }
  html.saka-mobile .transaction-copy span { font-size: 12px; }
  html.saka-mobile .krida-row-head span,
  html.saka-mobile .krida-row-head strong { font-size: 13px; }
  html.saka-mobile .mobile-nav-item { font-size: 13px; }
  html.saka-mobile .mobile-nav-item .material-symbols-rounded { font-size: 27px; }
  html.saka-mobile .responsive-table-wrap .data-table td { font-size: 15px; }
  html.saka-mobile .responsive-table-wrap .data-table td::before { font-size: 11px; }
}


/* =====================================================
   V3.1.2 MOBILE SIDEBAR SCROLL + MODE DETECTION SUPPORT
   - Drawer selalu memiliki tinggi viewport yang deterministik
   - Header/footer drawer tetap, daftar menu menjadi satu-satunya scroller
   - Touch scrolling dipaksa aktif di Android/iOS
   - Aturan diletakkan terakhir agar menjadi otoritas cascade mobile/tablet
===================================================== */

html.saka-mobile .sidebar,
html.saka-mobile .app.sidebar-collapsed .sidebar,
html.saka-tablet .sidebar,
html.saka-tablet .app.sidebar-collapsed .sidebar {
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  overscroll-behavior: contain;
}

html.saka-mobile .sidebar-head,
html.saka-tablet .sidebar-head,
html.saka-mobile .sidebar-bottom,
html.saka-tablet .sidebar-bottom {
  flex: 0 0 auto !important;
  min-width: 0;
}

html.saka-mobile .sidebar-nav-scroll,
html.saka-tablet .sidebar-nav-scroll {
  position: relative;
  flex: 1 1 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y !important;
  pointer-events: auto !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

html.saka-mobile .sidebar-nav-scroll::-webkit-scrollbar,
html.saka-tablet .sidebar-nav-scroll::-webkit-scrollbar {
  width: 4px;
}

html.saka-mobile .sidebar-nav-scroll::-webkit-scrollbar-track,
html.saka-tablet .sidebar-nav-scroll::-webkit-scrollbar-track {
  background: transparent;
}

html.saka-mobile .sidebar-nav-scroll::-webkit-scrollbar-thumb,
html.saka-tablet .sidebar-nav-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.18);
  border-radius: 999px;
}

/* Saat drawer terbuka, main content memang dikunci, tetapi drawer sendiri
   tetap menerima gesture pan-y melalui .sidebar-nav-scroll. */
html.saka-mobile body.mobile-nav-open .sidebar,
html.saka-tablet body.mobile-nav-open .sidebar {
  touch-action: manipulation;
}

html.saka-mobile body.mobile-nav-open .sidebar-nav-scroll,
html.saka-tablet body.mobile-nav-open .sidebar-nav-scroll {
  overflow-y: auto !important;
  touch-action: pan-y !important;
}

/* Pastikan item paling bawah tidak tertutup safe-area / browser toolbar. */
html.saka-mobile .sidebar-nav-scroll .nav-section:last-child,
html.saka-tablet .sidebar-nav-scroll .nav-section:last-child {
  margin-bottom: 8px;
}


/* =====================================================
   V3.1.3 APPS SCRIPT MOBILE VIEWPORT SAFEGUARD
   - doGet().addMetaTag(viewport) is the primary fix
   - This CSS is a fallback for Android/WebView containers that still expose
     a wide CSS viewport while JS correctly marks the device as saka-mobile
===================================================== */

@media (min-width: 721px) {
  html.saka-mobile body {
    font-size: 18px !important;
  }

  html.saka-mobile .topbar {
    min-height: 72px;
    padding: 10px 18px;
  }

  html.saka-mobile .topbar h1 {
    font-size: 24px !important;
  }

  html.saka-mobile .page-heading h2 {
    font-size: 32px !important;
  }

  html.saka-mobile .page-heading p {
    font-size: 16px !important;
    line-height: 1.55;
  }

  html.saka-mobile .dashboard-date {
    font-size: 13px !important;
  }

  html.saka-mobile .btn,
  html.saka-mobile .dashboard-quick-action {
    min-height: 56px;
    font-size: 15px !important;
  }

  html.saka-mobile .dashboard-kpi-grid .stat-card {
    flex-basis: 310px;
    min-height: 148px;
    padding: 18px;
  }

  html.saka-mobile .dashboard-kpi-grid .stat-card small {
    font-size: 13px !important;
  }

  html.saka-mobile .dashboard-kpi-grid .stat-card h3 {
    font-size: 28px !important;
  }

  html.saka-mobile .dashboard-kpi-grid .stat-card p {
    font-size: 14px !important;
  }

  html.saka-mobile .panel-header h3 {
    font-size: 19px !important;
  }

  html.saka-mobile .panel-header p,
  html.saka-mobile .last-meeting-head p {
    font-size: 14px !important;
  }

  html.saka-mobile .last-meeting-head h3 {
    font-size: 21px !important;
  }

  html.saka-mobile .meeting-mini-stat strong {
    font-size: 22px !important;
  }

  html.saka-mobile .meeting-mini-stat span:not(.material-symbols-rounded),
  html.saka-mobile .agenda-copy span,
  html.saka-mobile .transaction-copy span {
    font-size: 14px !important;
  }

  html.saka-mobile .agenda-copy strong,
  html.saka-mobile .transaction-copy strong,
  html.saka-mobile .transaction-value,
  html.saka-mobile .krida-row-head span,
  html.saka-mobile .krida-row-head strong {
    font-size: 16px !important;
  }

  html.saka-mobile .mobile-nav-item {
    font-size: 14px !important;
  }

  html.saka-mobile .mobile-nav-item .material-symbols-rounded {
    font-size: 29px !important;
  }

  html.saka-mobile .nav-item {
    min-height: 56px;
    font-size: 15px !important;
  }

  html.saka-mobile .nav-label {
    font-size: 11px !important;
  }

  html.saka-mobile .responsive-table-wrap .data-table td {
    font-size: 16px !important;
  }

  html.saka-mobile .responsive-table-wrap .data-table td::before {
    font-size: 12px !important;
  }
}


/* =====================================================
   V3.1.4 MOBILE UI POLISH
   - Dashboard hierarchy dibuat lebih ringkas dan konsisten
   - Quick actions menjadi grid 2x2
   - KPI menjadi grid 2 kolom agar tidak ada kartu setengah terlihat
   - Panel, tren, finance, table-card, pagination, drawer dan bottom nav dirapikan
   - Desktop/tablet tidak diubah
===================================================== */

@media (max-width: 720px) {
  html.saka-mobile {
    --m-gap: 10px;
    --m-gap-lg: 14px;
    --m-radius: 17px;
    --m-border: #e7edf4;
    --m-shadow: 0 5px 18px rgba(15, 23, 42, .055);
  }

  html.saka-mobile body {
    font-size: 15px;
    background: #f4f7fb;
  }

  /* ---------- Top app bar ---------- */
  html.saka-mobile .topbar {
    min-height: 60px;
    padding: 8px 11px;
    padding-top: max(8px, env(safe-area-inset-top));
    gap: 8px;
    background: rgba(244, 247, 251, .96);
    border-bottom: 1px solid rgba(226, 232, 240, .65);
    box-shadow: 0 2px 12px rgba(15, 23, 42, .025);
  }

  html.saka-mobile .topbar-left,
  html.saka-mobile .topbar-right {
    gap: 7px;
  }

  html.saka-mobile .mobile-menu,
  html.saka-mobile .profile-chip {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 12px;
  }

  html.saka-mobile .profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  html.saka-mobile .topbar h1 {
    max-width: 62vw;
    font-size: 18px;
    line-height: 1.15;
    letter-spacing: -.35px;
  }

  /* ---------- Main canvas ---------- */
  html.saka-mobile .content {
    padding: 10px 11px calc(94px + env(safe-area-inset-bottom));
  }

  html.saka-mobile .page-heading,
  html.saka-mobile .management-heading {
    margin: 2px 1px 13px;
    gap: 8px;
  }

  html.saka-mobile .page-heading h2 {
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -.55px;
  }

  html.saka-mobile .page-heading p {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.48;
  }

  html.saka-mobile .dashboard-date {
    margin: 0 0 7px;
    padding: 5px 8px;
    font-size: 9.5px;
    line-height: 1;
  }

  /* Tombol database di dashboard tidak perlu memenuhi satu baris penuh. */
  html.saka-mobile .dashboard-heading .page-actions {
    width: auto;
    align-self: flex-start;
  }

  html.saka-mobile .dashboard-heading .page-actions .btn {
    width: auto;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 11px;
    font-size: 11px;
  }

  /* ---------- Quick actions: fixed 2 x 2 ---------- */
  html.saka-mobile .dashboard-quick-actions {
    width: 100%;
    margin: 0 0 13px;
    padding: 0;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    scroll-snap-type: none;
  }

  html.saka-mobile .dashboard-quick-action {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0 11px;
    justify-content: flex-start;
    gap: 8px;
    border: 1px solid var(--m-border);
    border-radius: 14px;
    font-size: 11.5px;
    line-height: 1.2;
    white-space: normal;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .035);
  }

  html.saka-mobile .dashboard-quick-action .material-symbols-rounded {
    flex: 0 0 auto;
    font-size: 20px;
  }

  /* ---------- KPI: 2 columns, no horizontal clipping ---------- */
  html.saka-mobile .dashboard-kpi-grid {
    width: 100%;
    margin: 0 0 13px;
    padding: 0;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px;
    overflow: visible;
    scroll-snap-type: none;
  }

  html.saka-mobile .dashboard-kpi-grid .stat-card {
    width: 100%;
    min-width: 0;
    min-height: 116px;
    padding: 12px;
    gap: 9px;
    align-items: flex-start;
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    box-shadow: var(--m-shadow);
  }

  html.saka-mobile .dashboard-kpi-grid .stat-icon {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    border-radius: 12px;
  }

  html.saka-mobile .dashboard-kpi-grid .stat-icon .material-symbols-rounded {
    font-size: 20px;
  }

  html.saka-mobile .dashboard-kpi-grid .stat-card-copy {
    width: 100%;
    min-width: 0;
  }

  html.saka-mobile .dashboard-kpi-grid .stat-card small {
    font-size: 8.5px;
    line-height: 1.25;
    letter-spacing: .25px;
  }

  html.saka-mobile .dashboard-kpi-grid .stat-card h3 {
    margin-top: 5px;
    font-size: clamp(18px, 5.1vw, 21px);
    line-height: 1.12;
    letter-spacing: -.45px;
    overflow-wrap: anywhere;
  }

  html.saka-mobile .dashboard-kpi-grid .stat-card p {
    margin-top: 5px;
    font-size: 9.5px;
    line-height: 1.35;
  }

  /* ---------- Dashboard panels ---------- */
  html.saka-mobile .dashboard-section-grid {
    margin: 0;
  }

  html.saka-mobile .dashboard-panel,
  html.saka-mobile .panel {
    margin-bottom: 11px;
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    box-shadow: var(--m-shadow);
    overflow: hidden;
  }

  html.saka-mobile .panel-header {
    min-height: 0;
    padding: 13px 13px 11px;
    gap: 9px;
    align-items: center;
  }

  html.saka-mobile .panel-header > div:first-child {
    min-width: 0;
  }

  html.saka-mobile .panel-header h3 {
    font-size: 14px;
    line-height: 1.25;
  }

  html.saka-mobile .panel-header p {
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.4;
  }

  html.saka-mobile .panel-header .btn-compact {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 10px;
  }

  html.saka-mobile .panel-body {
    padding: 13px;
  }

  /* ---------- Last meeting ---------- */
  html.saka-mobile .last-meeting-head {
    gap: 10px;
  }

  html.saka-mobile .last-meeting-head h3 {
    margin-top: 4px;
    font-size: 17px;
  }

  html.saka-mobile .last-meeting-head p {
    font-size: 10.5px;
    line-height: 1.4;
  }

  html.saka-mobile .meeting-rate {
    padding: 8px 10px;
    border-radius: 12px;
    background: #f0faf6;
  }

  html.saka-mobile .meeting-rate strong {
    font-size: 24px;
  }

  html.saka-mobile .meeting-rate span {
    font-size: 9.5px;
  }

  html.saka-mobile .meeting-stats-grid {
    margin-top: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  html.saka-mobile .meeting-mini-stat {
    min-height: 57px;
    padding: 9px 10px;
    border-radius: 13px;
  }

  html.saka-mobile .meeting-mini-stat strong {
    font-size: 16px;
  }

  html.saka-mobile .meeting-mini-stat span:not(.material-symbols-rounded) {
    font-size: 9.5px;
  }

  html.saka-mobile .dashboard-link-button {
    margin-top: 11px;
    min-height: 34px;
    font-size: 10.5px;
  }

  /* ---------- Agenda ---------- */
  html.saka-mobile .agenda-item {
    min-height: 68px;
    padding: 10px 12px;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 9px;
  }

  html.saka-mobile .agenda-date-box {
    width: 42px;
    min-height: 45px;
    border-radius: 11px;
  }

  html.saka-mobile .agenda-copy strong {
    font-size: 12px;
    line-height: 1.35;
  }

  html.saka-mobile .agenda-copy span {
    font-size: 10px;
  }

  html.saka-mobile .agenda-copy small {
    font-size: 9px;
  }

  html.saka-mobile .dashboard-empty {
    min-height: 86px;
    padding: 14px;
  }

  /* ---------- Attendance trend ---------- */
  html.saka-mobile .attendance-trend-list {
    gap: 10px;
  }

  html.saka-mobile .attendance-trend-row {
    grid-template-columns: 82px minmax(0, 1fr) 34px;
    gap: 8px;
  }

  html.saka-mobile .trend-label strong {
    font-size: 10px;
  }

  html.saka-mobile .trend-label span {
    margin-top: 2px;
    font-size: 9px;
  }

  html.saka-mobile .trend-value {
    font-size: 9.5px;
  }

  html.saka-mobile .trend-track {
    height: 7px;
  }

  /* ---------- Finance ---------- */
  html.saka-mobile .monthly-finance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }

  html.saka-mobile .monthly-finance-grid > div {
    min-width: 0;
    padding: 10px;
    border-radius: 12px;
  }

  html.saka-mobile .monthly-finance-grid > div:nth-child(3) {
    grid-column: 1 / -1;
  }

  html.saka-mobile .monthly-finance-grid span {
    font-size: 9.5px;
  }

  html.saka-mobile .monthly-finance-grid strong {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.25;
  }

  html.saka-mobile .dashboard-subtitle {
    margin-bottom: 5px;
    font-size: 9px;
  }

  html.saka-mobile .transaction-item {
    min-height: 52px;
    padding: 9px 0;
    grid-template-columns: 31px minmax(0, 1fr) auto;
    gap: 8px;
  }

  html.saka-mobile .transaction-copy strong,
  html.saka-mobile .transaction-value {
    font-size: 10.5px;
  }

  html.saka-mobile .transaction-copy span {
    font-size: 9px;
  }

  /* ---------- Member composition / attention ---------- */
  html.saka-mobile .krida-list {
    gap: 11px;
  }

  html.saka-mobile .krida-row-head span,
  html.saka-mobile .krida-row-head strong {
    font-size: 10px;
  }

  html.saka-mobile .member-status-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  html.saka-mobile .member-status-strip span {
    padding: 7px 5px;
    border-radius: 10px;
    background: #f7f9fc;
    text-align: center;
    font-size: 8.5px;
  }

  html.saka-mobile .member-status-strip strong {
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
  }

  html.saka-mobile .attention-list {
    gap: 7px;
  }

  html.saka-mobile .attention-item {
    min-height: 54px;
    padding: 9px;
    grid-template-columns: 32px minmax(0, 1fr) 18px;
    border-radius: 13px;
  }

  html.saka-mobile .attention-item strong {
    font-size: 11.5px;
  }

  html.saka-mobile .attention-item span:not(.material-symbols-rounded) {
    font-size: 9.5px;
    line-height: 1.35;
  }

  /* ---------- Management pages ---------- */
  html.saka-mobile .management-heading .page-actions {
    margin-top: 2px;
  }

  html.saka-mobile .management-heading .page-actions .btn {
    min-height: 44px;
    border-radius: 13px;
  }

  html.saka-mobile .table-toolbar {
    padding: 9px;
    gap: 8px;
  }

  html.saka-mobile .search-box {
    min-height: 44px;
    padding: 0 11px;
    border: 1px solid #e7edf4;
    border-radius: 13px;
    background: #f5f7fa;
  }

  html.saka-mobile .search-box input {
    font-size: 14px;
  }

  html.saka-mobile .table-toolbar-right {
    align-items: center;
    justify-content: space-between;
  }

  html.saka-mobile .responsive-table-wrap {
    padding: 0 8px 8px;
  }

  html.saka-mobile .responsive-table-wrap .data-table tbody tr {
    margin: 8px 0;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .03);
  }

  html.saka-mobile .responsive-table-wrap .data-table td {
    min-height: 42px;
    padding: 10px 11px;
    gap: 11px;
    font-size: 12px;
    line-height: 1.4;
  }

  html.saka-mobile .responsive-table-wrap .data-table td::before {
    flex: 0 0 36%;
    font-size: 8.5px;
    line-height: 1.35;
  }

  html.saka-mobile .responsive-table-wrap .table-name {
    font-size: 12.5px;
  }

  html.saka-mobile .badge {
    padding: 5px 8px;
    font-size: 9.5px;
  }

  html.saka-mobile .responsive-table-wrap .row-actions {
    gap: 6px;
  }

  html.saka-mobile .responsive-table-wrap .btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  /* ---------- Pagination ---------- */
  html.saka-mobile .pagination-bar {
    padding: 10px;
    gap: 9px;
  }

  html.saka-mobile .pagination-summary {
    font-size: 10px;
  }

  html.saka-mobile .pagination-controls {
    width: 100%;
    justify-content: center;
    gap: 6px;
  }

  html.saka-mobile .pagination-btn {
    width: 38px;
    height: 38px;
  }

  html.saka-mobile .pagination-page,
  html.saka-mobile .page-size-control,
  html.saka-mobile .absensi-view-control {
    font-size: 10px;
  }

  /* ---------- Forms / bottom sheet ---------- */
  html.saka-mobile .modal,
  html.saka-mobile .modal.small {
    max-height: 91dvh;
    border-radius: 22px 22px 0 0;
  }

  html.saka-mobile .modal-header {
    padding: 14px 15px 12px;
  }

  html.saka-mobile .modal-header h2 {
    font-size: 17px;
  }

  html.saka-mobile .modal-header p {
    font-size: 10px;
  }

  html.saka-mobile .modal-body {
    padding: 14px 15px calc(18px + env(safe-area-inset-bottom));
  }

  html.saka-mobile .form-grid {
    gap: 12px;
  }

  html.saka-mobile .form-group label {
    font-size: 10px;
  }

  html.saka-mobile .form-control,
  html.saka-mobile .auth-input {
    min-height: 48px;
    border-radius: 12px;
    font-size: 16px;
  }

  /* ---------- Drawer ---------- */
  html.saka-mobile .sidebar,
  html.saka-mobile .app.sidebar-collapsed .sidebar {
    width: min(304px, 88vw) !important;
    max-width: 88vw;
    padding-inline: 11px;
    border-radius: 0 22px 22px 0;
  }

  html.saka-mobile .sidebar-head {
    padding-bottom: 11px;
  }

  html.saka-mobile .sidebar-nav-scroll {
    margin-top: 9px;
  }

  html.saka-mobile .nav-section + .nav-section {
    margin-top: 14px;
  }

  html.saka-mobile .nav-label {
    margin-bottom: 6px;
    font-size: 9px;
  }

  html.saka-mobile .nav-item {
    min-height: 48px;
    padding: 0 11px;
    border-radius: 12px;
    font-size: 12.5px;
  }

  html.saka-mobile .sidebar-user {
    min-height: 56px;
    padding: 8px;
  }

  /* ---------- Bottom navigation ---------- */
  html.saka-mobile .mobile-bottom-nav {
    left: 9px;
    right: 9px;
    bottom: max(8px, env(safe-area-inset-bottom));
    height: 66px;
    padding: 5px;
    gap: 2px;
    border-radius: 20px;
    border-color: #dfe6ee;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .14);
  }

  html.saka-mobile .mobile-nav-item {
    min-height: 54px;
    padding: 4px 1px;
    gap: 2px;
    border-radius: 15px;
    font-size: 9px;
    line-height: 1.1;
  }

  html.saka-mobile .mobile-nav-item .material-symbols-rounded {
    font-size: 22px;
  }

  html.saka-mobile .mobile-nav-item.active {
    background: #edf4ff;
  }
}

/* Poco F4 GT / very narrow phones: keep two-column dashboard but trim text.
   This avoids switching between layouts and keeps the visual rhythm stable. */
@media (max-width: 380px) {
  html.saka-mobile .dashboard-kpi-grid {
    gap: 7px;
  }

  html.saka-mobile .dashboard-kpi-grid .stat-card {
    padding: 10px;
    min-height: 112px;
  }

  html.saka-mobile .dashboard-kpi-grid .stat-card h3 {
    font-size: 18px;
  }

  html.saka-mobile .dashboard-quick-action {
    padding-inline: 9px;
    font-size: 10.5px;
  }
}

/* Landscape / wide CSS viewport on a phone: preserve the polished layout
   without the oversized 3.1.3 emergency fallback. */
@media (min-width: 721px) and (max-width: 1100px) {
  html.saka-mobile .content {
    max-width: 760px;
    margin-inline: auto;
    padding: 14px 18px calc(100px + env(safe-area-inset-bottom));
  }

  html.saka-mobile .dashboard-quick-actions,
  html.saka-mobile .dashboard-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }

  html.saka-mobile .dashboard-kpi-grid .stat-card {
    width: 100%;
    min-width: 0;
    flex-basis: auto;
  }

  html.saka-mobile .dashboard-section-grid {
    max-width: 100%;
  }
}


/* =====================================================
   V3.1.5 AUTOMATIC MEMBER NTA
   - Informasi NTA otomatis pada form anggota
   - Tanggal pelantikan tampil kondisional
===================================================== */
.member-nta-auto-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid #dce9f8;
  border-radius: 13px;
  background: #f5f9ff;
  color: #465a72;
}

.member-nta-auto-note > .material-symbols-rounded {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #e7f0ff;
  color: var(--blue);
  font-size: 19px;
}

.member-nta-auto-note strong {
  display: block;
  color: #23344b;
  font-size: 11px;
}

.member-nta-auto-note span:not(.material-symbols-rounded) {
  display: block;
  margin-top: 3px;
  color: #708096;
  font-size: 9.5px;
  line-height: 1.5;
}

.form-help {
  display: block;
  margin-top: 1px;
  color: #8a97a8;
  font-size: 9px;
  line-height: 1.45;
}

.member-inauguration-field[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  html.saka-mobile .member-nta-auto-note {
    padding: 12px;
    gap: 10px;
    border-radius: 14px;
  }

  html.saka-mobile .member-nta-auto-note strong {
    font-size: 13px;
  }

  html.saka-mobile .member-nta-auto-note span:not(.material-symbols-rounded) {
    font-size: 11px;
    line-height: 1.45;
  }

  html.saka-mobile .form-help {
    font-size: 10.5px;
  }

  html.saka-mobile .member-status-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  html.saka-mobile .member-status-strip span {
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid #edf1f5;
    border-radius: 11px;
    background: #fafbfd;
  }
}


/* =====================================================
   V3.1.6 DESKTOP VERTICAL SCROLL HOTFIX
   - Desktop document kembali menjadi scroll container normal
   - Mengalahkan sisa height/overflow lock dari mode mobile
   - Modal desktop tetap dapat scroll dan tetap mengunci background
   - Sidebar desktop memiliki scroll internal sendiri bila menu panjang
===================================================== */

html.saka-desktop {
  height: auto !important;
  min-height: 100% !important;
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  overscroll-behavior-y: auto !important;
}

html.saka-desktop body {
  height: auto !important;
  min-height: 100vh !important;
  max-height: none !important;
  position: static !important;
  touch-action: auto !important;
}

/* Normal desktop page harus selalu dapat scroll vertikal. */
html.saka-desktop body:not(.modal-open) {
  overflow-y: auto !important;
}

/* Saat modal benar-benar terbuka, background tetap dikunci. */
html.saka-desktop body.modal-open {
  overflow: hidden !important;
}

html.saka-desktop .app {
  height: auto !important;
  min-height: 100vh !important;
  max-height: none !important;
  overflow: visible !important;
}

html.saka-desktop .main,
html.saka-desktop .app.sidebar-collapsed .main {
  height: auto !important;
  min-height: 100vh !important;
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  touch-action: auto !important;
  overscroll-behavior-y: auto !important;
}

html.saka-desktop .content {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Sidebar tetap fixed, tetapi daftar menu di dalamnya boleh scroll sendiri. */
html.saka-desktop .sidebar,
html.saka-desktop .app.sidebar-collapsed .sidebar {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

html.saka-desktop .sidebar-nav-scroll {
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  touch-action: pan-y !important;
}

/* Form/modal desktop dapat di-scroll bila isinya lebih tinggi dari layar. */
html.saka-desktop .modal,
html.saka-desktop .modal.small {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

html.saka-desktop .modal-body {
  overflow: visible !important;
}


/* =====================================================
   V3.1.7 DETERMINISTIC DESKTOP SCROLL
   - .main menjadi satu-satunya scroll container vertikal desktop
   - Wheel mouse/trackpad tidak lagi bergantung pada document/iframe
   - Topbar sticky tetap bekerja di dalam .main
   - Sidebar tetap fixed dan mempunyai scroll internal
===================================================== */

html.saka-desktop,
html.saka-desktop body {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
  overscroll-behavior: none;
}

html.saka-desktop .app {
  width: 100% !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 0 !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}

html.saka-desktop .main,
html.saka-desktop .app.sidebar-collapsed .main {
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 0 !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: auto !important;
  touch-action: auto !important;
  scrollbar-gutter: stable;
  scroll-behavior: auto;
}

/* Konten mengikuti tinggi alaminya sehingga .main punya area scroll nyata. */
html.saka-desktop .content {
  height: auto !important;
  min-height: calc(100vh - var(--topbar-h)) !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Modal yang terbuka mengunci background (.main), bukan document. */
html.saka-desktop body.modal-open .main,
html.saka-desktop body.modal-open .app.sidebar-collapsed .main {
  overflow-y: hidden !important;
}

/* Modal sendiri tetap dapat di-scroll dengan wheel mouse. */
html.saka-desktop .modal,
html.saka-desktop .modal.small {
  max-height: min(90vh, 920px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
}

/* Sidebar fixed; hanya daftar menunya yang bergulir. */
html.saka-desktop .sidebar,
html.saka-desktop .app.sidebar-collapsed .sidebar {
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}

html.saka-desktop .sidebar-nav-scroll {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
}


/* =====================================================
   V3.1.8 KEGIATAN PJ COMBO + DOKUMENTASI
===================================================== */
.kegiatan-detail-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.kegiatan-detail-section {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.kegiatan-detail-section-head {
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fbfcfe;
}

.kegiatan-detail-section-head h3 {
  margin: 3px 0 0;
  color: var(--text-strong);
  font-size: 14px;
}

.kegiatan-detail-section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.kegiatan-detail-eyebrow {
  color: var(--blue);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .8px;
}

.kegiatan-attendance-table {
  max-height: 330px;
  overflow: auto;
}

.documentation-upload-box {
  margin: 14px;
  padding: 13px;
  border: 1px dashed #c8d8e9;
  border-radius: 14px;
  background: #f8fbff;
}

.documentation-upload-input {
  position: relative;
  min-height: 66px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
}

.documentation-upload-input > .material-symbols-rounded {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: #e8f1ff;
  color: var(--blue);
  font-size: 21px;
}

.documentation-upload-input strong {
  display: block;
  color: #263449;
  font-size: 11.5px;
}

.documentation-upload-input span:not(.material-symbols-rounded) {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}

.documentation-upload-input input[type="file"] {
  width: min(270px, 100%);
  color: #58677a;
  font-size: 10px;
}

.documentation-upload-actions {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid #e5edf6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.documentation-upload-actions > span {
  color: #738197;
  font-size: 9.5px;
}

.documentation-progress {
  margin-top: 10px;
}

.documentation-progress-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #68778b;
  font-size: 9.5px;
}

.documentation-progress-line strong {
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #34445a;
}

.documentation-progress-line.success strong { color: var(--green); }

.documentation-gallery {
  padding: 0 14px 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.documentation-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e5ebf2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15,23,42,.04);
}

.documentation-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef2f6;
}

.documentation-image-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity .18s ease;
}

.documentation-image-wrap img.loaded { opacity: 1; }

.documentation-image-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #8996a7;
  font-size: 9px;
}

.documentation-image-loading .spinner {
  width: 25px;
  height: 25px;
  margin: 0;
  border-width: 3px;
}

.documentation-image-loading > .material-symbols-rounded { font-size: 27px; }

.documentation-card-body {
  min-height: 52px;
  padding: 8px 9px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 32px;
  align-items: center;
  gap: 7px;
}

.documentation-card-copy { min-width: 0; }
.documentation-card-copy strong,
.documentation-card-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.documentation-card-copy strong { color: #344258; font-size: 9.5px; }
.documentation-card-copy span { margin-top: 3px; color: #8a97a8; font-size: 8px; }

.documentation-empty {
  grid-column: 1 / -1;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  color: var(--muted);
}

.documentation-empty > .material-symbols-rounded {
  color: #b2bdca;
  font-size: 34px;
}
.documentation-empty strong { margin-top: 7px; color: #58667a; font-size: 11px; }
.documentation-empty p { margin: 4px 0 0; font-size: 9.5px; }

@media (max-width: 720px) {
  html.saka-mobile .kegiatan-detail-stack { gap: 12px; }
  html.saka-mobile .kegiatan-detail-section { border-radius: 15px; }
  html.saka-mobile .kegiatan-detail-section-head { padding: 12px; }
  html.saka-mobile .kegiatan-detail-section-head h3 { font-size: 14px; }
  html.saka-mobile .kegiatan-detail-section-head p { font-size: 10px; }
  html.saka-mobile .kegiatan-attendance-table { max-height: 300px; }

  html.saka-mobile .documentation-upload-box {
    margin: 10px;
    padding: 10px;
    border-radius: 13px;
  }
  html.saka-mobile .documentation-upload-input {
    grid-template-columns: 38px minmax(0,1fr);
    padding: 6px;
  }
  html.saka-mobile .documentation-upload-input input[type="file"] {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 42px;
    padding: 7px;
    border: 1px solid #dfe7ef;
    border-radius: 10px;
    background: #fff;
    font-size: 11px;
  }
  html.saka-mobile .documentation-upload-actions {
    align-items: stretch;
    flex-direction: column;
  }
  html.saka-mobile .documentation-upload-actions .btn { width: 100%; }
  html.saka-mobile .documentation-gallery {
    padding: 0 10px 10px;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
  }
  html.saka-mobile .documentation-card-body {
    grid-template-columns: minmax(0,1fr) 36px;
    padding: 8px;
  }
  html.saka-mobile .documentation-card-copy strong { font-size: 10px; }
  html.saka-mobile .documentation-card-copy span { font-size: 8.5px; }
}

@media (max-width: 390px) {
  html.saka-mobile .documentation-gallery { grid-template-columns: 1fr 1fr; gap: 7px; }
}

/* V3.2.4: pencatatan inventaris per kegiatan */
.inventory-page-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #66758a;
  font-size: 9.5px;
}
.inventory-page-note .material-symbols-rounded { color: var(--blue); font-size: 16px; }
.inventory-usage-count {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef5ff;
  color: #2c68b4;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
.inventory-dashboard-summary { display: flex; flex-direction: column; gap: 14px; }
.inventory-summary-total {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 13px;
  background: linear-gradient(135deg, #f2f7ff, #fbfdff);
  border: 1px solid #e3edf9;
}
.inventory-summary-total > .material-symbols-rounded { color: var(--blue); font-size: 25px; }
.inventory-summary-total strong { display: block; color: var(--text-strong); font-size: 20px; line-height: 1; }
.inventory-summary-total span:not(.material-symbols-rounded) { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.inventory-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.inventory-summary-grid > div { padding: 9px 8px; border: 1px solid #edf1f5; border-radius: 10px; background: #fff; }
.inventory-summary-grid strong { display: block; color: var(--text-strong); font-size: 14px; }
.inventory-summary-grid span { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.activity-inventory-form { padding: 14px; background: #fbfdff; border-bottom: 1px solid var(--border); }
.inventory-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.inventory-field-full { grid-column: 1 / -1; }
.inventory-form-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.activity-inventory-list { padding: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.activity-inventory-card { min-width: 0; overflow: hidden; border: 1px solid #e3eaf2; border-radius: 14px; background: #fff; box-shadow: 0 4px 14px rgba(15,23,42,.035); }
.activity-inventory-card-head { padding: 12px 13px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; border-bottom: 1px solid #edf1f5; }
.activity-inventory-card-head h4 { margin: 4px 0 0; color: var(--text-strong); font-size: 12px; }
.activity-inventory-compare { padding: 10px 12px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
.inventory-quantity-block { padding: 8px; border-radius: 10px; background: #f7fafc; }
.inventory-quantity-block.is-used { background: #fff8e8; }
.inventory-quantity-block span, .inventory-quantity-block small { display: block; color: var(--muted); font-size: 8px; }
.inventory-quantity-block strong { display: block; margin: 4px 0 2px; color: var(--text-strong); font-size: 12px; }
.activity-inventory-photos { padding: 0 12px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inventory-photo-box { min-width: 0; overflow: hidden; border: 1px solid #e6ecf2; border-radius: 11px; background: #fcfdff; }
.inventory-photo-preview { position: relative; aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; overflow: hidden; background: #eef3f7; color: #9aa8b8; }
.inventory-photo-preview > .material-symbols-rounded { font-size: 24px; }
.inventory-photo-preview small { font-size: 8px; }
.inventory-photo-preview img { width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.inventory-photo-preview img.loaded { opacity: 1; }
.inventory-photo-copy { padding: 7px 8px 4px; }
.inventory-photo-copy strong, .inventory-photo-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inventory-photo-copy strong { color: var(--text-strong); font-size: 9px; }
.inventory-photo-copy span { margin-top: 2px; color: var(--muted); font-size: 7.5px; }
.inventory-photo-upload { width: calc(100% - 16px); margin: 5px 8px 8px; justify-content: center; min-height: 30px; font-size: 8.5px; }
.inventory-photo-upload .material-symbols-rounded { font-size: 15px; }
.inventory-photo-input { display: none; }
.activity-inventory-note { margin: 0; padding: 0 12px 12px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.inventory-empty-state { grid-column: 1 / -1; min-height: 120px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.inventory-empty-state > .material-symbols-rounded { color: #aab8c7; font-size: 32px; }
.inventory-empty-state strong { margin-top: 7px; color: #536277; font-size: 11px; }
.inventory-empty-state p { max-width: 460px; margin: 4px 0 0; font-size: 9.5px; line-height: 1.5; }

@media (max-width: 820px) {
  .inventory-form-grid, .activity-inventory-list { grid-template-columns: 1fr; }
  .inventory-field-full { grid-column: 1; }
  .inventory-page-note { width: 100%; white-space: normal; line-height: 1.4; }
}

@media (max-width: 620px) {
  .inventory-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-inventory-photos { gap: 6px; padding-inline: 9px; }
  .activity-inventory-compare { padding-inline: 9px; gap: 5px; }
}


/* =====================================================
   V3.1.9 ACTIVITY REPORT / PDF WORKSPACE
===================================================== */
.kegiatan-report-shell { display: flex; flex-direction: column; gap: 16px; }
.report-overview-card {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #dce6f0;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}
.report-overview-card h3 { margin: 4px 0 3px; font-size: 17px; }
.report-overview-card p { margin: 0; color: var(--muted); font-size: 10px; }
.report-overview-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.kegiatan-report-form { display: flex; flex-direction: column; gap: 14px; }
.report-section-card { border: 1px solid #e6ebf1; border-radius: 15px; overflow: hidden; background: #fff; }
.report-form-grid { padding: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.report-field { min-width: 0; display: flex; flex-direction: column; gap: 6px; color: #526074; font-size: 9.5px; font-weight: 800; }
.report-field-full { grid-column: 1 / -1; }
.report-field textarea.form-control { min-height: 88px; resize: vertical; }
.report-attendance-summary { padding: 14px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.report-summary-box { min-width: 0; padding: 10px; display: flex; align-items: center; gap: 8px; border-radius: 12px; background: #f8fafc; border: 1px solid #edf1f5; }
.report-summary-box > .material-symbols-rounded { color: var(--blue); font-size: 20px; }
.report-summary-box strong { display: block; font-size: 15px; }
.report-summary-box span:not(.material-symbols-rounded) { display: block; margin-top: 2px; color: var(--muted); font-size: 8.5px; }
.report-schedule-head { align-items: center; }
.report-schedule-list { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.report-schedule-row { display: grid; grid-template-columns: 105px 16px 105px minmax(0, 1fr) 38px; gap: 7px; align-items: center; }
.report-schedule-dash { text-align: center; color: #9aa6b5; font-weight: 800; }
.report-schedule-row .form-control { min-height: 40px; }
.report-finance-summary { padding: 12px 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.report-finance-summary span { padding: 9px 10px; border-radius: 10px; background: #f8fafc; color: var(--muted); font-size: 8.5px; }
.report-finance-summary strong { display: block; margin-top: 3px; color: #334158; font-size: 11px; }
.report-finance-table { border-top: 1px solid #edf1f5; }
.report-save-actions { padding: 0 14px 14px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.documentation-card-report-body { display: flex; flex-direction: column; gap: 10px; }
.documentation-report-meta { width: 100%; display: grid; grid-template-columns: 74px minmax(0,1fr) auto 38px; gap: 7px; align-items: end; }
.documentation-report-meta label { min-width: 0; display: flex; flex-direction: column; gap: 4px; color: #7b8797; font-size: 8px; font-weight: 700; }
.documentation-order-input, .documentation-caption-input { width: 100%; min-height: 34px; padding: 7px 9px; border: 1px solid #dde5ed; border-radius: 9px; outline: none; font: inherit; color: var(--text); background: #fff; }
.documentation-caption-label { min-width: 0; }

@media (max-width: 900px) {
  .report-attendance-summary { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .report-finance-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 720px) {
  html.saka-mobile .report-overview-card { padding: 13px; align-items: stretch; flex-direction: column; }
  html.saka-mobile .report-overview-actions { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  html.saka-mobile .report-overview-actions .btn { width: 100%; min-height: 42px; }
  html.saka-mobile .report-form-grid { grid-template-columns: 1fr; padding: 12px; gap: 10px; }
  html.saka-mobile .report-field-full { grid-column: 1; }
  html.saka-mobile .report-attendance-summary { padding: 12px; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  html.saka-mobile .report-summary-box { padding: 9px; }
  html.saka-mobile .report-schedule-row { grid-template-columns: minmax(0,1fr) 12px minmax(0,1fr) 38px; }
  html.saka-mobile .report-schedule-text { grid-column: 1 / 4; grid-row: 2; }
  html.saka-mobile .report-schedule-row .btn-icon { grid-column: 4; grid-row: 1 / 3; }
  html.saka-mobile .report-finance-summary { padding: 10px 12px; grid-template-columns: repeat(2,minmax(0,1fr)); }
  html.saka-mobile .report-save-actions { padding: 0 12px 12px; display: grid; grid-template-columns: 1fr; }
  html.saka-mobile .report-save-actions .btn { width: 100%; }
  html.saka-mobile .report-finance-table { overflow-x: auto; }
  html.saka-mobile .report-finance-table .data-table { min-width: 760px !important; display: table !important; }
  html.saka-mobile .report-finance-table .data-table thead { display: table-header-group !important; }
  html.saka-mobile .report-finance-table .data-table tbody { display: table-row-group !important; }
  html.saka-mobile .report-finance-table .data-table tr { display: table-row !important; }
  html.saka-mobile .report-finance-table .data-table td { display: table-cell !important; width: auto !important; text-align: left; white-space: nowrap; }
  html.saka-mobile .report-finance-table .data-table td::before { display: none !important; }
  html.saka-mobile .documentation-report-meta { grid-template-columns: 64px minmax(0,1fr) 38px; }
  html.saka-mobile .documentation-report-meta .btn.btn-light { grid-column: 1 / 3; grid-row: 2; width: 100%; }
  html.saka-mobile .documentation-report-meta .btn-icon.delete { grid-column: 3; grid-row: 1 / 3; align-self: stretch; height: auto; min-height: 38px; }
}


/* Loading 3.2.2: tampil sejak HTML pertama, tanpa aset eksternal. */
.system-loading {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  padding: 24px;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at top, #e9f2fc, #f3f6fa 65%);
}
.system-loading-card {
  width: min(100%, 440px);
  padding: 40px 32px 32px;
  border: 1px solid #e4eaf0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(7,24,39,.07);
  text-align: center;
  color: #172134;
}
.system-loading-emblem {
  width: 68px;
  height: 68px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #ebbc61;
  background: linear-gradient(145deg, #071827, #123550);
}
.system-loading-brand {
  margin: 0 0 14px;
  color: #395775;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}
.system-loading-card h1 {
  margin: 0;
  font-size: clamp(22px, 5vw, 28px);
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: -.6px;
}
.system-loading-description {
  margin: 10px 0 28px;
  color: #607287;
  font-size: 14px;
  line-height: 1.6;
}
.system-loading-track {
  height: 6px;
  overflow: hidden;
  border-radius: 20px;
  background: #e9eff7;
}
.system-loading-track > span {
  display: block;
  width: 32%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1479ff, #11b7cb);
  animation: sakaLoadingTravel 1.65s ease-in-out infinite;
}
.system-loading-status {
  margin: 18px 0 8px;
  min-height: 40px;
  color: #496079;
  font-size: 13px;
  line-height: 1.55;
}
.system-loading-card > small {
  display: block;
  color: #607287;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.loading-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.loading-dots > i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1479ff;
  animation: sakaLoadingDot 1.2s ease-in-out infinite;
}
.loading-dots > i:nth-child(2) { animation-delay: .16s; }
.loading-dots > i:nth-child(3) { animation-delay: .32s; }
.system-loading-card h1 .loading-dots { margin-left: 7px; }
.loading > .loading-dots { margin-bottom: 17px; }
.loading > .loading-dots > i { width: 9px; height: 9px; }
.loading-label { font-size: 14px; font-weight: 600; color: #496079; }
@keyframes sakaLoadingTravel {
  0% { transform: translateX(-105%); }
  100% { transform: translateX(320%); }
}
@keyframes sakaLoadingDot {
  0%, 80%, 100% { opacity: .35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-4px); }
}
@media (max-width: 480px) {
  .system-loading { padding: 18px; }
  .system-loading-card { padding: 32px 22px 26px; border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .system-loading-track > span,
  .loading-dots > i {
    animation: none !important;
    transform: none;
    opacity: 1;
  }
  .system-loading-track > span { width: 32%; margin-inline: auto; background: #1479ff; }
}


/* =====================================================
   V3.3.2 KEGIATAN STATE MACHINE
===================================================== */
.btn-icon.success:hover {
  color: var(--green);
  background: #eaf8f3;
}

.kegiatan-state-note,
.kegiatan-cancel-warning {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid #dfe9f5;
  background: #f7fbff;
}

.kegiatan-state-note > .material-symbols-rounded {
  color: var(--blue);
  font-size: 21px;
}

.kegiatan-cancel-warning {
  border-color: #f2d7da;
  background: #fff7f8;
}

.kegiatan-cancel-warning > .material-symbols-rounded {
  color: var(--red);
  font-size: 21px;
}

.kegiatan-state-note strong,
.kegiatan-cancel-warning strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
}

.kegiatan-state-note span:not(.material-symbols-rounded),
.kegiatan-cancel-warning span:not(.material-symbols-rounded) {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}


/* =====================================================
   V3.3.3 BATCH ABSENSI
===================================================== */
.modal.batch-attendance-modal {
  width: min(1080px, 100%);
}

.batch-attendance-launch .material-symbols-rounded {
  font-size: 17px;
}

.batch-attendance-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.batch-attendance-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.batch-attendance-selector {
  min-width: min(420px, 100%);
  flex: 1;
}

.batch-attendance-selector label {
  display: block;
  margin-bottom: 7px;
  color: #526074;
  font-size: 10px;
  font-weight: 800;
}

.batch-attendance-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.batch-attendance-info,
.batch-attendance-blocked {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #d9e7f6;
  border-radius: 12px;
  background: #f7fbff;
  color: #5a6b80;
}

.batch-attendance-info > .material-symbols-rounded,
.batch-attendance-blocked > .material-symbols-rounded {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 19px;
}

.batch-attendance-info p,
.batch-attendance-blocked p {
  margin: 0;
  font-size: 10px;
  line-height: 1.55;
}

.batch-attendance-blocked {
  border-color: #f0d7d9;
  background: #fff7f7;
}

.batch-attendance-blocked > .material-symbols-rounded {
  color: var(--red);
}

.batch-attendance-blocked strong {
  display: block;
  margin-bottom: 4px;
  color: #9c3f48;
  font-size: 11px;
}

.batch-attendance-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.batch-attendance-summary span {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  color: #69778b;
  font-size: 9.5px;
}

.batch-attendance-summary strong {
  color: var(--text);
}

.batch-attendance-table-wrap {
  max-height: 52vh;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
}

.batch-attendance-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.batch-attendance-table td {
  vertical-align: middle;
}

.batch-attendance-number {
  width: 48px;
  text-align: center;
  color: var(--muted);
}

.batch-attendance-member-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.batch-attendance-status {
  min-width: 130px;
  min-height: 37px;
}

.batch-attendance-note {
  min-width: 180px;
  min-height: 37px;
}

.batch-attendance-footer {
  margin-top: 0;
}

@media (max-width: 820px) {
  .batch-attendance-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .batch-attendance-selector {
    min-width: 0;
    width: 100%;
  }

  .batch-attendance-actions {
    justify-content: stretch;
  }

  .batch-attendance-actions .btn {
    flex: 1;
  }

  .batch-attendance-table-wrap {
    max-height: 58vh;
  }
}

@media (max-width: 620px) {
  .modal.batch-attendance-modal {
    width: 100%;
  }

  .batch-attendance-summary {
    gap: 6px;
  }

  .batch-attendance-summary span {
    padding: 0 8px;
  }

  .batch-attendance-note {
    min-width: 150px;
  }
}


/* =====================================================
   V3.3.5 — IZIN ANGGOTA PER KEGIATAN
===================================================== */
.izin-link-button { color:#8a651d; background:#fff7e6; }
.izin-link-button:hover { color:#76520d; background:#ffefc8; }
.izin-link-card { display:flex; flex-direction:column; gap:16px; }
.izin-window-status { display:flex; gap:12px; align-items:flex-start; padding:14px; border-radius:14px; border:1px solid var(--border); }
.izin-window-status > .material-symbols-rounded { font-size:25px; }
.izin-window-status strong { display:block; font-size:13px; }
.izin-window-status p { margin:4px 0 0; color:var(--muted); font-size:11px; line-height:1.55; }
.izin-window-status.is-active { background:#ecfaf5; border-color:#c7eee1; color:#16775a; }
.izin-window-status.is-inactive { background:#fff8e8; border-color:#f0dfb3; color:#8a651d; }
.izin-window-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.izin-window-grid > div { padding:12px; border:1px solid var(--border); border-radius:12px; background:#f8fafc; }
.izin-window-grid span, .izin-link-label { display:block; color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.5px; text-transform:uppercase; }
.izin-window-grid strong { display:block; margin-top:5px; font-size:12px; }
.izin-manual-close-note { padding:10px 12px; border-radius:10px; background:#fff0f1; color:#b1424d; font-size:10px; line-height:1.5; }
.izin-url-box { overflow-wrap:anywhere; word-break:break-word; }
.izin-link-actions { display:flex; flex-wrap:wrap; gap:8px; }
.izin-public-card { width:min(500px,100%); }
.izin-public-textarea { min-height:100px; padding:12px 14px; resize:vertical; }
.izin-file-input { padding:11px 12px; height:auto; }
.izin-file-help { display:block; margin-top:6px; color:var(--muted); font-size:10px; }
.izin-public-window { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:16px 0; }
.izin-public-window span { padding:9px 10px; background:#f8fafc; border:1px solid var(--border); border-radius:9px; font-size:9.5px; color:#526074; }
.izin-public-closed { padding:20px; text-align:center; border:1px solid #f0dfb3; background:#fff8e8; border-radius:14px; }
.izin-public-closed .material-symbols-rounded { font-size:34px; color:#a9781f; }
.izin-public-closed strong { display:block; margin-top:8px; font-size:14px; }
.izin-public-closed p { margin:7px 0 0; color:var(--muted); font-size:11px; line-height:1.6; }
.izin-submit-success { text-align:center; }
.izin-submit-success .setup-icon { margin-inline:auto; }
.izin-proof-view { min-height:320px; display:flex; align-items:center; justify-content:center; background:#f4f7fa; border-radius:12px; overflow:hidden; }
.izin-proof-image { display:block; max-width:100%; max-height:70vh; object-fit:contain; }
.izin-proof-frame { width:100%; min-height:70vh; border:0; background:white; }
.btn-small { min-height:32px; padding:0 10px; font-size:9px; }
.izin-detail-section .data-table td { white-space:normal; vertical-align:top; }

@media (max-width: 700px) {
  .izin-window-grid, .izin-public-window { grid-template-columns:1fr; }
  .izin-link-actions .btn { width:100%; }
  .izin-proof-frame { min-height:62vh; }
}


/* =====================================================
   V3.4.0 — PENILAIAN KEAKTIFAN BULANAN
===================================================== */
.assessment-heading { align-items:flex-start; gap:18px; }
.assessment-eyebrow { display:block; margin-bottom:5px; color:var(--primary); font-size:9px; font-weight:800; letter-spacing:.8px; text-transform:uppercase; }
.assessment-page-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.assessment-control-panel { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:14px; padding:13px 15px; border:1px solid var(--border); border-radius:14px; background:var(--surface); box-shadow:var(--shadow-sm); }
.assessment-period-control { display:flex; align-items:center; gap:8px; color:var(--text); font-size:11px; font-weight:700; }
.assessment-period-control > .material-symbols-rounded { color:var(--primary); font-size:20px; }
.assessment-period-control input { min-height:36px; padding:6px 9px; border:1px solid var(--border); border-radius:9px; background:white; font:inherit; color:var(--text); }
.assessment-control-actions { display:flex; flex-wrap:wrap; gap:8px; }
.assessment-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.assessment-summary-card { padding:16px; border:1px solid var(--border); border-radius:15px; background:var(--surface); box-shadow:var(--shadow-sm); }
.assessment-summary-card span { display:block; color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.45px; text-transform:uppercase; }
.assessment-summary-card strong { display:block; margin-top:7px; color:var(--text); font-size:25px; line-height:1; }
.assessment-summary-card small { display:block; margin-top:6px; color:var(--muted); font-size:9.5px; }
.assessment-review-card { display:flex; gap:14px; align-items:flex-start; margin-bottom:14px; padding:16px; border:1px solid #cfe2f2; border-radius:15px; background:#f3f8fc; }
.assessment-review-icon { display:flex; width:38px; height:38px; flex:0 0 38px; align-items:center; justify-content:center; border-radius:11px; background:#e1eef8; color:#245f88; }
.assessment-review-card p { margin:0; color:#405164; font-size:11px; line-height:1.65; }
.assessment-review-counts { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.assessment-review-counts span { padding:6px 8px; border:1px solid #d6e5f0; border-radius:8px; background:white; color:#536274; font-size:9px; }
.assessment-review-counts b { color:var(--text); font-size:11px; }
.assessment-weight-note { display:flex; gap:9px; align-items:flex-start; margin-bottom:14px; padding:10px 12px; border:1px solid #ead9a9; border-radius:11px; background:#fff9ea; color:#715a25; font-size:9.5px; line-height:1.5; }
.assessment-weight-note .material-symbols-rounded { font-size:18px; }
.assessment-table-panel { margin-top:0; }
.assessment-table td { vertical-align:middle; }
.assessment-member-meta { display:block; margin-top:3px; color:var(--muted); font-size:8.5px; }
.assessment-attendance-mini { display:inline-flex; gap:2px; align-items:center; white-space:nowrap; font-size:10px; }
.assessment-attendance-mini b { color:#16775a; }
.assessment-max { color:var(--muted); font-size:8.5px; }
.assessment-index { display:inline-block; min-width:34px; color:var(--primary); font-size:15px; font-weight:800; }
.assessment-predicate { display:inline-flex; align-items:center; min-height:24px; padding:3px 8px; border-radius:999px; font-size:8.5px; font-weight:800; white-space:nowrap; }
.assessment-excellent { background:#e9f7f1; color:#16775a; }
.assessment-active { background:#e9f2fb; color:#245f88; }
.assessment-fair { background:#fff7e6; color:#8a651d; }
.assessment-support { background:#fff0f1; color:#ad4651; }
.assessment-empty { background:#f0f3f6; color:#657385; }
.assessment-rule-chip { display:inline-flex; align-items:center; min-height:28px; padding:5px 9px; border-radius:999px; background:#eef4f8; color:#516478; font-size:8.5px; font-weight:700; white-space:nowrap; }
.assessment-component-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.assessment-component-toolbar strong, .assessment-component-toolbar small { display:block; }
.assessment-component-toolbar small { margin-top:3px; color:var(--muted); font-size:9px; }
.assessment-rule-fields { padding:12px; border:1px solid var(--border); border-radius:12px; background:#f8fafc; }
.assessment-rule-fields > strong { display:block; margin-bottom:9px; font-size:10px; }
.assessment-rule-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.assessment-rule-grid label span { display:block; margin-bottom:4px; color:var(--muted); font-size:8.5px; font-weight:700; }
.assessment-member-overview { display:grid; grid-template-columns:minmax(160px,.7fr) minmax(0,1.5fr); gap:12px; margin-bottom:12px; }
.assessment-member-overview > div { padding:14px; border:1px solid var(--border); border-radius:13px; background:#f8fafc; }
.assessment-member-overview > div:first-child > span { display:block; color:var(--muted); font-size:9px; font-weight:800; text-transform:uppercase; }
.assessment-member-overview > div:first-child > strong { display:block; margin:7px 0; font-size:28px; color:var(--primary); }
.assessment-member-overview > div:first-child > strong small { font-size:10px; color:var(--muted); }
.assessment-member-review p { margin:0; color:#4b5b6c; font-size:10px; line-height:1.6; }
.assessment-detail-stats { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:14px; }
.assessment-detail-stats span { padding:7px 9px; border-radius:9px; background:#eef4f8; color:#536274; font-size:9px; }
.assessment-detail-stats b { color:var(--text); }
.assessment-modal-title { margin:14px 0 8px; font-size:12px; }
.assessment-modal-section-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:15px 0 8px; }
.assessment-modal-section-head h3 { margin:0; font-size:12px; }

@media (max-width: 900px) {
  .assessment-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .assessment-control-panel { align-items:flex-start; flex-direction:column; }
  .assessment-page-actions { justify-content:flex-start; }
}

@media (max-width: 620px) {
  .assessment-summary-grid { grid-template-columns:1fr 1fr; gap:8px; }
  .assessment-summary-card { padding:12px; }
  .assessment-summary-card strong { font-size:21px; }
  .assessment-review-card { padding:12px; }
  .assessment-review-icon { display:none; }
  .assessment-control-actions, .assessment-control-actions .btn, .assessment-page-actions, .assessment-page-actions .btn, .assessment-page-actions a.btn { width:100%; }
  .assessment-period-control { width:100%; justify-content:space-between; }
  .assessment-rule-grid { grid-template-columns:1fr 1fr; }
  .assessment-member-overview { grid-template-columns:1fr; }
  .assessment-component-toolbar { align-items:stretch; flex-direction:column; }
  .assessment-component-toolbar .btn { width:100%; }
}

/* =====================================================
   V3.4.2 — CHECKLIST SKK DISPLAY FIX
   - area daftar memiliki tinggi nyata dan scroll sendiri
   - kelompok tidak lagi bergantung pada elemen <details>
   - filter menggunakan style display eksplisit
===================================================== */
.assessment-skk-points{color:var(--primary,#0b5bd3)}
.assessment-skk-summary{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:18px 0 8px;padding:15px 16px;border:1px solid rgba(19,79,145,.16);border-radius:16px;background:rgba(30,111,205,.055)}
.assessment-skk-summary strong{display:block;margin-top:4px;font-size:15px}

.modal.skk-checklist-modal{width:min(980px,96vw)!important;max-height:min(94vh,980px)!important}
.skk-checklist-shell{display:flex;flex-direction:column;gap:12px;height:min(80vh,820px);min-height:560px;min-width:0}
.skk-member-card{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border-radius:18px;background:linear-gradient(135deg,rgba(15,65,120,.08),rgba(37,126,207,.04));border:1px solid rgba(21,83,147,.14)}
.skk-member-card h3{margin:3px 0;font-size:19px}.skk-member-card p{margin:0;color:var(--text-muted,#667085)}
.skk-total-progress{text-align:right}.skk-total-progress strong{font-size:26px;color:var(--primary,#155b9f)}.skk-total-progress span{display:block;font-size:12px;color:var(--text-muted,#667085)}
.skk-score-note{flex:0 0 auto;display:flex;gap:11px;align-items:flex-start;padding:10px 13px;border-radius:14px;background:rgba(25,135,84,.07);border:1px solid rgba(25,135,84,.14)}
.skk-score-note>.material-symbols-rounded{color:#198754}.skk-score-note strong{font-size:13px}.skk-score-note p{margin:3px 0 0;font-size:12px;line-height:1.45;color:var(--text-muted,#667085)}

.skk-toolbar{flex:0 0 auto;display:grid;grid-template-columns:180px 1fr 1.35fr;gap:10px;align-items:end}
.skk-toolbar label>span{display:block;margin-bottom:5px;font-size:11px;font-weight:750;color:var(--text-muted,#667085);text-transform:uppercase;letter-spacing:.04em}
.skk-preferred-bar{flex:0 0 auto;display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 10px;border-radius:12px;background:rgba(19,79,145,.04);font-size:11.5px;color:var(--text-muted,#667085)}
.skk-preferred-bar span{margin-right:auto}
.skk-visible-info{flex:0 0 auto;font-size:11px;font-weight:700;color:var(--text-muted,#667085)}

.skk-checklist-list{flex:1 1 auto;min-height:240px;overflow-y:auto!important;overflow-x:hidden;padding:0 5px 10px 0;display:flex;flex-direction:column;gap:14px;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.skk-krida-section{flex:0 0 auto;border:1px solid rgba(31,41,55,.10);border-radius:16px;overflow:hidden;background:var(--surface,#fff)}
.skk-krida-title{display:flex;align-items:center;gap:8px;padding:12px 14px;background:rgba(19,79,145,.055);border-bottom:1px solid rgba(31,41,55,.08)}
.skk-krida-title h3{margin:0;font-size:14px}.skk-krida-title .material-symbols-rounded{font-size:19px;color:var(--primary,#155b9f)}
.skk-group{display:block;border-bottom:1px solid rgba(31,41,55,.07)}
.skk-group:last-child{border-bottom:0}
.skk-group-head{display:flex;align-items:center;justify-content:space-between;padding:11px 14px;font-weight:750;font-size:13px;background:rgba(15,65,120,.018)}
.skk-group-head b{font-size:11px;padding:3px 8px;border-radius:999px;background:rgba(19,79,145,.08);color:var(--primary,#155b9f)}
.skk-group-items{padding:0 9px 9px;display:flex;flex-direction:column;gap:6px}
.skk-check-item{position:relative;display:grid;grid-template-columns:28px 1fr;gap:10px;align-items:flex-start;padding:10px;border-radius:12px;cursor:pointer;border:1px solid transparent;transition:.15s ease}
.skk-check-item:hover{background:rgba(19,79,145,.04);border-color:rgba(19,79,145,.10)}
.skk-check-item input{position:absolute;opacity:0;pointer-events:none}
.skk-check-box{width:24px;height:24px;border:1.5px solid rgba(82,95,113,.34);border-radius:7px;display:grid;place-items:center;background:#fff}
.skk-check-box .material-symbols-rounded{font-size:17px;opacity:0;color:#fff}
.skk-check-item input:checked+.skk-check-box{background:#198754;border-color:#198754}
.skk-check-item input:checked+.skk-check-box .material-symbols-rounded{opacity:1}
.skk-check-copy strong{display:block;font-size:12.5px;line-height:1.45}
.skk-check-copy small{display:block;margin-top:3px;font-size:10.8px;color:var(--text-muted,#667085);line-height:1.4}

.skk-no-results{flex:1 1 auto;min-height:180px;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:5px;border:1px dashed rgba(31,41,55,.16);border-radius:14px;color:var(--text-muted,#667085)}
.skk-no-results .material-symbols-rounded{font-size:34px}.skk-no-results strong{font-size:13px}.skk-no-results small{font-size:11px}
.skk-empty-master{display:flex;min-height:320px;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:10px;padding:24px}
.skk-empty-master>.material-symbols-rounded{font-size:42px;color:#c27c0e}.skk-empty-master h3{margin:0}.skk-empty-master p{max-width:520px;margin:0 0 8px;color:var(--text-muted,#667085);line-height:1.55}

.skk-savebar{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:10px;border-top:1px solid rgba(31,41,55,.10)}
.skk-savebar>div:first-child strong{display:block;font-size:13px}
.skk-savebar>div:first-child small{display:block;margin-top:2px;color:var(--text-muted,#667085);font-size:11px}

@media(max-width:760px){
  .modal.skk-checklist-modal{width:100%!important;max-height:94dvh!important}
  .skk-checklist-shell{height:78dvh;min-height:0}
  .skk-toolbar{grid-template-columns:1fr 1fr}
  .skk-search-field{grid-column:1/-1}
  .skk-member-card,.skk-savebar,.assessment-skk-summary{align-items:flex-start;flex-direction:column}
  .skk-total-progress{text-align:left}
  .skk-checklist-list{min-height:180px}
  .skk-savebar .form-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .skk-savebar .btn{justify-content:center}
}
/* v3.4.5 inventory controls */
.activity-inventory-card-head .row-actions{display:flex;gap:5px}

/* Custom confirmation and input dialogs */
.custom-dialog-content{display:flex;flex-direction:column;gap:16px;padding:4px 2px}
.custom-dialog-message{font-size:14px;line-height:1.6;color:var(--text)}
.custom-dialog-message .dialog-details{max-height:220px;overflow:auto;margin:0;padding:12px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft);font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap}
.custom-dialog-actions{display:flex;justify-content:flex-end;gap:10px;padding-top:4px}
@media(max-width:600px){.custom-dialog-actions{display:grid;grid-template-columns:1fr 1fr}.custom-dialog-actions .btn{justify-content:center}}

.pdf-progress-dialog,.pdf-success-dialog{text-align:center;padding:8px 4px}.pdf-progress-icon,.pdf-success-icon{width:62px;height:62px;margin:0 auto 12px;border-radius:18px;display:grid;place-items:center;background:rgba(20,121,255,.10);color:var(--blue)}.pdf-progress-icon .material-symbols-rounded,.pdf-success-icon .material-symbols-rounded{font-size:34px}.pdf-progress-dialog h3,.pdf-success-dialog h3{margin:4px 0 6px;font-size:18px}.pdf-progress-dialog p,.pdf-success-dialog p{margin:0 auto 16px;color:var(--muted);line-height:1.5;font-size:13px}.pdf-progress-track{height:8px;overflow:hidden;border-radius:999px;background:#e8eef5;margin:16px 0}.pdf-progress-track span{display:block;width:42%;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--blue),var(--cyan));animation:pdfProgress 1.4s ease-in-out infinite}.pdf-progress-dialog small{color:var(--muted);font-size:11px}.pdf-success-icon{background:rgba(20,167,119,.12);color:var(--green)}.pdf-success-actions{display:flex;justify-content:center;gap:10px;margin-top:16px}@keyframes pdfProgress{0%{transform:translateX(-120%)}100%{transform:translateX(260%)}}.spin{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:600px){.pdf-success-actions{display:grid;grid-template-columns:1fr}.pdf-success-actions .btn{justify-content:center}}

.permission-intro{padding:12px 14px;margin-bottom:12px;border-radius:12px;background:var(--surface-soft);color:var(--muted);font-size:13px;line-height:1.5}.permission-table th,.permission-table td{text-align:center}.permission-table th:first-child,.permission-table td:first-child{text-align:left}.permission-table input{width:18px;height:18px;accent-color:var(--blue)}

/* Thin global progress, no activity panel or history list. */
.activity-progress { position:fixed; inset:0 0 auto; height:3px; z-index:10050; pointer-events:none; }
.activity-progress[hidden] { display:none; }
.activity-progress-track { width:100%; height:3px; overflow:hidden; background:rgba(20,121,255,.16); }
.activity-progress-track > span { display:block; width:35%; height:100%; background:#1479ff; box-shadow:0 0 7px #1479ff; animation:activity-slide 1.25s ease-in-out infinite; }
.activity-progress.is-success .activity-progress-track > span,
.activity-progress.is-warning .activity-progress-track > span,
.activity-progress.is-error .activity-progress-track > span { width:100%; animation:none; background:#12845b; box-shadow:none; }
.activity-progress.is-warning .activity-progress-track > span { background:#b67808; }
.activity-progress.is-error .activity-progress-track > span { background:#c43c4c; }
.activity-sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
@keyframes activity-slide { from { transform:translateX(-100%); } to { transform:translateX(390%); } }
html body .toast-container { position:fixed; top:auto; left:auto; right:16px; bottom:calc(16px + env(safe-area-inset-bottom)); width:min(330px, calc(100vw - 32px)); z-index:10100; gap:8px; pointer-events:none; }
html body .toast { width:100%; min-width:0; padding:10px 12px; border-radius:10px; gap:8px; pointer-events:auto; box-sizing:border-box; }
html body .toast-message { font-size:12px; line-height:1.45; overflow-wrap:anywhere; }
html body .toast-icon { font-size:19px; }
html body .toast-close { width:26px; height:26px; flex-shrink:0; }
@media(prefers-reduced-motion:reduce) { .activity-progress-track > span { animation:none; width:100%; background:repeating-linear-gradient(90deg,#1479ff 0 18px,#8ec5ff 18px 36px); } }
@media print { .activity-progress, .toast-container { display:none!important; } }


.module-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:16px; margin-bottom:16px; }
.module-summary-card { padding:20px; border:1px solid #dce4ed; border-radius:16px; background:var(--card-bg, #fff); box-shadow:0 4px 14px rgba(15,23,42,.04); }
.module-summary-card span { display:block; font-size:13px; color:#64748b; margin-bottom:10px; }
.module-summary-card strong { display:block; font-size:24px; color:var(--text-primary,#0f172a); overflow-wrap:anywhere; }
.module-period-note { margin:0 0 18px; font-size:13px; color:#64748b; }
.register-table-title { margin:22px 16px 12px; font-size:18px; }
.form-group[hidden] { display:none !important; }
input[readonly] { background:#f1f5f9; }

.notification-bell { position:relative; }
.notification-count { position:absolute; right:-3px; top:-4px; min-width:18px; padding:2px 4px; border-radius:12px; background:#b91c1c; color:white; font-size:10px; font-weight:700; line-height:14px; }
.notification-count[hidden] { display:none; }
.action-center-summary,.action-center-toolbar,.action-center-item-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.action-center-summary span,.action-center-item-heading { color:#64748b; font-size:12px; }
.action-center-toolbar label { display:flex; align-items:center; gap:8px; }
.action-center-list { display:grid; gap:12px; }
.action-center-item { border:1px solid #dce4ed; border-left:4px solid #2563eb; border-radius:12px; padding:16px; }
.action-center-item.is-read { border-left-color:#cbd5e1; }
.action-center-item h3 { font-size:16px; margin:0 0 8px; }
.action-center-item p { margin:0 0 16px; color:#475569; overflow-wrap:anywhere; }
.action-priority { background:#eff6ff; color:#1d4ed8; border-radius:20px; padding:4px 10px; font-weight:600; }
.action-priority.is-high { background:#fff1f2; color:#9f1239; }
.action-center-empty { text-align:center; padding:30px 12px; color:#64748b; }
.action-center-empty .material-symbols-rounded { font-size:36px; }
@media(max-width:600px) { .action-center-toolbar { align-items:stretch; } .action-center-item .row-actions { flex-wrap:wrap; } }

/* Public izin uses document scrolling; dashboard keeps its own .main scroller.
   Specificity must exceed html.saka-mobile/body and desktop viewport locks. */
html.public-izin-page,
html.public-izin-page body {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 100% !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  position: static !important;
  touch-action: auto !important;
  overscroll-behavior-y: auto;
}
html.public-izin-page #appRoot {
  height: auto !important;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: none !important;
  overflow: visible !important;
}
html.public-izin-page .izin-public-shell {
  min-width: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  align-items: start;
}
html.public-izin-page .izin-public-shell .auth-panel {
  height: auto !important;
  max-height: none !important;
  min-width: 0;
  align-items: flex-start;
  overflow: visible !important;
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
}
html.public-izin-page .izin-public-card {
  height: auto !important;
  max-height: none !important;
  min-width: 0;
  overflow: visible !important;
  overflow-wrap: anywhere;
}
html.public-izin-page .auth-input { min-width: 0; max-width: 100%; }
html.public-izin-page .auth-submit { min-height: 48px; white-space: normal; }
html.public-izin-page .izin-submit-success { scroll-margin-top: 24px; }
.public-izin-error { margin: 12px 0; padding: 12px; border-radius: 10px; background: #fff1f2; color: #9f1239; font-size: 14px; line-height: 1.5; }
.public-izin-error[hidden] { display: none; }
@media (max-width: 720px) {
  html.public-izin-page .izin-public-shell { display: block; }
  html.public-izin-page .izin-public-shell .auth-visual { display: none !important; }
  html.public-izin-page .izin-public-card .mobile-logo { display: flex !important; }
  html.public-izin-page .auth-input { font-size: 16px; }
}
/* Inline verification keeps the attendance form and its draft in place. */
.batch-izin-panel { margin: 16px 0; padding: 16px; border: 1px solid var(--border); border-radius: 14px; }
.batch-izin-panel h3 { margin: 0 0 8px; }
.batch-izin-panel p { font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.batch-izin-list { display: grid; gap: 12px; }
.batch-izin-card { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.batch-izin-heading,.batch-izin-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.batch-izin-heading { justify-content: space-between; }
.batch-izin-buttons { margin-top: 10px; }
.batch-izin-card label { display: block; font-size: 12px; line-height: 1.5; }
.batch-izin-card textarea { margin-top: 6px; }
.batch-izin-proof { margin: 12px 0; }
.batch-izin-proof[hidden] { display: none; }
.batch-izin-proof img { display: block; max-width: 100%; height: auto; }
.batch-izin-proof iframe { width: 100%; height: 380px; max-height: 60vh; border: 1px solid var(--border); }


/* =============================
   PWA INSTALL / CONNECTIVITY
============================= */
.pwa-install-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1200;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #071827;
  color: #fff;
  box-shadow: 0 14px 34px rgba(7,24,39,.22);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}
.pwa-install-button[hidden] { display: none !important; }
.pwa-install-button:hover { transform: translateY(-1px); }
.pwa-install-button .material-symbols-rounded { font-size: 20px; }

.pwa-offline-banner {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1500;
  max-width: min(640px, calc(100vw - 24px));
  padding: 10px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff6df;
  color: #76561d;
  border: 1px solid #efd79b;
  box-shadow: 0 10px 28px rgba(7,24,39,.12);
  font-size: 11px;
  font-weight: 700;
}
.pwa-offline-banner[hidden] { display: none !important; }
.pwa-offline-banner .material-symbols-rounded { font-size: 18px; }

.pwa-install-help { text-align: left; }
.pwa-install-help-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1479ff;
  background: #edf5ff;
}
.pwa-install-help-icon .material-symbols-rounded { font-size: 27px; }
.pwa-install-help h3 { margin: 0 0 8px; font-size: 16px; }
.pwa-install-help p { color: var(--muted); line-height: 1.65; }
.pwa-install-help ol { margin: 14px 0; padding-left: 22px; color: #465267; line-height: 1.8; }

@media (max-width: 720px) {
  .pwa-install-button {
    right: 14px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    min-height: 44px;
    padding: 0 13px;
  }
  .pwa-offline-banner { top: calc(8px + env(safe-area-inset-top)); }
}

@media print {
  .pwa-install-button,
  .pwa-offline-banner { display: none !important; }
}
