:root {
  --bg: #f2f5f3;
  --surface: #ffffff;
  --surface-soft: #f7faf8;
  --ink: #18231f;
  --muted: #6d7974;
  --line: #dbe4df;
  --primary: #123f36;
  --primary-2: #1f6254;
  --accent: #e7b94a;
  --danger: #ad332d;
  --warning: #9a6415;
  --success: #16714f;
  --shadow: 0 16px 45px rgba(21, 50, 42, .09);
  --radius: 18px;
  --sidebar: 272px;
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 4px; color: var(--primary-2); line-height: 1.2; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow.light { color: #b8d9d0; }
h1, h2, h3, p { margin-top: 0; }
code { border-radius: 6px; padding: 2px 6px; background: #edf2ef; }

.boot-screen, .center-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.boot-screen { visibility: hidden; opacity: 0; transition: opacity .16s ease; }
.boot-screen.is-visible { visibility: visible; opacity: 1; }
.boot-indicator { display: grid; place-items: center; width: 48px; height: 48px; }
.boot-spinner { width: 28px; height: 28px; border: 3px solid rgba(18,63,54,.14); border-top-color: var(--primary-2); border-radius: 50%; animation: bootSpin .72s linear infinite; }

.setup-card { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(520px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.connection-card h1 { margin-bottom: 0; font-size: clamp(24px, 4vw, 32px); }
.connection-card > p:not(.eyebrow):not(.form-message) { max-width: 410px; margin-bottom: 8px; color: var(--muted); line-height: 1.6; }
.connection-symbol { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: #e5f1ed; color: var(--primary-2); font-size: 29px; font-weight: 800; }
@keyframes bootSpin { to { transform: rotate(360deg); } }
.brand-lockup { display: flex; align-items: center; gap: 14px; text-align: left; }
.brand-lockup h1, .brand-lockup h2 { margin: 0; line-height: 1.15; }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); }
.login-visual { position: relative; display: flex; align-items: flex-end; overflow: hidden; padding: clamp(40px, 7vw, 100px); background: radial-gradient(circle at 76% 20%, rgba(231,185,74,.28), transparent 24%), linear-gradient(145deg, #0c3029 0%, #174f44 55%, #246d5e 100%); color: white; }
.login-visual::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to top, black, transparent); }
.login-visual-inner { position: relative; z-index: 1; max-width: 700px; }
.login-visual h1 { margin-bottom: 18px; font-size: clamp(38px, 5vw, 68px); line-height: 1.02; letter-spacing: -.04em; }
.login-visual p { max-width: 650px; color: #d9ebe6; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.7; }
.feature-pills { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.feature-pills span { padding: 9px 13px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.08); color: #fff; font-size: 13px; }
.login-panel { display: grid; place-items: center; padding: 34px; background: #f8faf9; }
.auth-card { width: min(430px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.auth-card .brand-lockup { margin-bottom: 32px; }
.auth-note { margin: 20px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; padding: 10px 16px; font-weight: 750; transition: transform .15s ease, opacity .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { cursor: not-allowed; opacity: .56; transform: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #0d332c; }
.btn-accent { border: 1px solid #d4a52f; background: var(--accent); color: #2c260f; box-shadow: 0 4px 12px rgba(154,100,21,.14); }
.btn-accent:hover { background: #dcae3e; color: #241f0d; }
.btn-soft { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.btn-light { background: white; color: var(--primary); }
.btn-danger { background: var(--danger); color: white; }
.btn-block { width: 100%; }

.text-btn { border: 0; background: transparent; color: var(--primary-2); font-weight: 750; }
.icon-btn { display: grid; place-items: center; width: 42px; border: 0; background: transparent; color: var(--muted); }

.field { min-width: 0; display: flex; flex-direction: column; }
.field > span { color: #34413c; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #cdd8d2; outline: 0; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(31,98,84,.12); }
.field input[readonly] { background: #f0f4f2; color: #59655f; }
.field small { align-self: flex-end; }
.password-wrap { display: flex; border: 1px solid #cdd8d2; border-radius: 11px; overflow: hidden; background: #fff; }
.password-wrap:focus-within { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(31,98,84,.12); }
.password-wrap input { border: 0; box-shadow: none !important; }
.form-message { min-height: 18px; margin: 12px 0 0; color: var(--danger); font-size: 13px; }
.form-message.success { color: var(--success); }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar); min-width: 0; display: flex; flex-direction: column; overflow: hidden; padding: 18px 14px; background: #0e3029; color: white; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.sidebar-brand img { border-radius: 12px; }
.sidebar-brand strong, .sidebar-brand span { display: block; }
.sidebar-brand strong { font-size: 17px; }
.sidebar-brand span { margin-top: 2px; color: #a9c6be; font-size: 11px; }
.main-nav { display: flex; flex: 1; flex-direction: column; gap: 5px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 11px; padding: 11px 12px; background: transparent; color: #ccddd8; font-weight: 700; text-align: left; }
.nav-item span { width: 20px; color: #9fc2b9; font-size: 18px; text-align: center; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.active::after { content: ""; width: 4px; height: 18px; margin-left: auto; border-radius: 999px; background: var(--accent); }
.nav-separator { height: 1px; margin: 8px 6px; background: rgba(255,255,255,.12); }
.sidebar-footer { min-width: 0; display: block; margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.11); }
.user-card { width: 100%; min-width: 0; min-height: 62px; display: grid; grid-template-columns: 40px minmax(0,1fr); align-items: center; gap: 11px; overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; padding: 11px 12px; background: rgba(255,255,255,.075); color: white; text-align: left; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.user-card:hover { border-color: rgba(231,185,74,.38); background: rgba(255,255,255,.105); transform: translateY(-1px); }
.avatar { position: relative; width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: var(--accent); color: #2c260f; font-weight: 900; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.user-card-text { min-width: 0; display: grid; gap: 2px; overflow: hidden; }
.user-card-text strong, .user-card-text small, .user-card-role { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card-text strong { font-size: 12.5px; line-height: 1.3; }
.user-card-role { color: #f0cf76; font-size: 10.5px; font-weight: 800; line-height: 1.3; }
.user-card-text small { color: #b7cec8; font-size: 10px; line-height: 1.35; }

.app-main { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; z-index: 20; top: 0; min-height: 84px; display: flex; align-items: center; gap: 16px; padding: 15px clamp(18px, 3vw, 42px); border-bottom: 1px solid rgba(210,220,215,.8); background: rgba(242,245,243,.92); backdrop-filter: blur(14px); }
.topbar h1 { margin: 0; font-size: 25px; line-height: 1.1; letter-spacing: -.02em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.signout-btn { min-width: 82px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #dcc8c4; border-radius: 10px; padding: 0 13px; background: #fff; color: #8f352d; box-shadow: 0 5px 14px rgba(56,27,22,.06); font-size: 12px; font-weight: 800; line-height: 1; }
.signout-btn:hover { border-color: #cfa69f; background: #fff8f6; color: #75271f; transform: translateY(-1px); }
.signout-btn:focus-visible { outline: 3px solid rgba(231,185,74,.28); outline-offset: 2px; }
.menu-btn { display: none; border: 0; border-radius: 9px; padding: 8px 10px; background: var(--surface); color: var(--ink); font-size: 20px; }
.connection-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 7px 10px; font-size: 11px; font-weight: 800; }
.connection-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.connection-badge.online { background: #dff3ea; color: #176949; }
.connection-badge.offline { background: #f6e5dd; color: #9b402f; }
.content { width: 100%; max-width: 1680px; margin: 0 auto; padding: clamp(18px, 2.4vw, 36px); }
.page { display: none; }
.page.active { display: block; animation: pageIn .18s ease; }
@keyframes pageIn { from { opacity: .3; transform: translateY(3px); } }

.welcome-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; overflow: hidden; padding: clamp(26px, 4vw, 42px); border-radius: 22px; background: radial-gradient(circle at 88% 0, rgba(231,185,74,.25), transparent 27%), linear-gradient(135deg, #123f36, #1d6253); color: white; box-shadow: var(--shadow); }
.welcome-card h2 { margin-bottom: 9px; font-size: clamp(27px, 3vw, 40px); letter-spacing: -.035em; }
.welcome-card p:last-child { max-width: 720px; margin: 0; color: #d9e9e5; line-height: 1.6; }
.stats-grid { display: grid; grid-template-columns: minmax(0,1.45fr) repeat(3, minmax(0,1fr)); gap: 14px; margin: 18px 0; }
.stat-card { min-height: 145px; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 25px rgba(30,53,46,.04); }
.stat-card > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-card strong { overflow: hidden; color: var(--primary); font-size: clamp(27px, 3vw, 38px); letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap; }
#statLastNumber { overflow: visible; font-size: clamp(17px, 1.7vw, 23px); line-height: 1.2; overflow-wrap: normal; word-break: normal; white-space: normal; }
.stat-card small { color: var(--muted); font-size: 11px; }
.two-column { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr); gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 7px 28px rgba(23,52,44,.045); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.panel-head h3 { margin: 0; letter-spacing: -.02em; }
.wrap-head { flex-wrap: wrap; }
.recent-list { display: grid; }
.recent-item { display: grid; grid-template-columns: minmax(220px, .9fr) minmax(0,1.3fr) auto; gap: 14px; align-items: center; padding: 13px 0; border-top: 1px solid #ebf0ed; }
.recent-item:first-child { border-top: 0; }
.recent-number { color: var(--primary); font-size: 12px; font-weight: 850; line-height: 1.35; overflow-wrap: anywhere; }
.recent-main strong, .recent-main span { display: block; }
.recent-main strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.recent-main span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.steps { display: grid; gap: 15px; margin: 0; padding-left: 22px; color: #46524d; font-size: 13px; line-height: 1.55; }
.empty-state { padding: 28px; border: 1px dashed #cfdbd5; border-radius: 13px; color: var(--muted); font-size: 13px; text-align: center; }

.form-panel { max-width: 1000px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.field-wide { grid-column: 1 / -1; }
.required-note { color: var(--muted); font-size: 11px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.issue-warning { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; padding: 13px 15px; background: #fff9ea; color: #654c13; font-size: 12px; }
.notice-banner { display: flex; flex-direction: column; gap: 4px; max-width: 1000px; margin: 0 auto 14px; border: 1px solid #c7dded; border-radius: 13px; padding: 13px 16px; background: #eef8ff; color: #1f587b; font-size: 12px; }
.template-help { margin-top: 16px; border-radius: 10px; padding: 12px 14px; background: var(--surface-soft); color: var(--muted); font-size: 12px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-grid { display: grid; grid-template-columns: 1.4fr repeat(4,minmax(130px,.8fr)) auto; gap: 11px; align-items: end; margin-bottom: 20px; padding: 15px; border-radius: 14px; background: var(--surface-soft); }
.filter-actions { display: flex; gap: 7px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; min-width: 1050px; border-collapse: collapse; font-size: 12px; }
.data-table th { padding: 11px 13px; background: #eef3f0; color: #3b4943; font-size: 10px; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 12px 13px; border-top: 1px solid #e8eeeb; vertical-align: top; }

.table-number { color: var(--primary); font-weight: 850; white-space: nowrap; }
.table-subject { max-width: 300px; }
.table-subject strong, .table-subject span { display: block; }
.table-subject span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.table-actions { display: flex; flex-wrap: wrap; gap: 5px; }

/* Tindakan tabel: compact, natural, dan tidak memenuhi seluruh lebar kolom. */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}
.action-buttons .action-btn {
  width: auto;
  min-width: 48px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid;
  border-radius: 8px;
  box-shadow: none;
  font-size: 10.75px;
  font-weight: 720;
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
}
.action-buttons .action-btn:hover { transform: translateY(-1px); }
.action-buttons .action-edit {
  border-color: #b8d2c7;
  background: #dcebe5;
  color: #175c48;
}
.action-buttons .action-edit:hover {
  border-color: #9dbfb1;
  background: #cfe3da;
  color: #104f3d;
}
.action-buttons .action-lock {
  border-color: #cbd5d0;
  background: #f2f5f3;
  color: #40534b;
}
.action-buttons .action-lock:hover {
  border-color: #afbeb7;
  background: #e6ece9;
}
.action-buttons .action-unlock {
  border-color: #c6d0e2;
  background: #e8edf6;
  color: #405c88;
}
.action-buttons .action-unlock:hover {
  border-color: #aebbd3;
  background: #dbe3f0;
}
.action-buttons .action-reset {
  border-color: #b8c9d3;
  background: #e1e9ee;
  color: #345366;
}
.action-buttons .action-reset:hover {
  border-color: #9eb4c1;
  background: #d3e0e7;
  color: #29495c;
}
.action-buttons .action-cancel,
.action-buttons .action-toggle {
  border-color: #dccaa8;
  background: #efe4cf;
  color: #6d5730;
}
.action-buttons .action-cancel:hover,
.action-buttons .action-toggle:hover {
  border-color: #cdb687;
  background: #e7d8ba;
}
.action-buttons .action-delete {
  border-color: #e2b9bf;
  background: #f4dfe2;
  color: #9a3544;
}
.action-buttons .action-delete:hover {
  border-color: #d49ca5;
  background: #edcfd4;
  color: #842c39;
}
.table-empty { padding: 34px !important; color: var(--muted); text-align: center; }
.status-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 8px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.status-issued { background: #dff4e9; color: #166844; }
.status-corrected { background: #e9eefc; color: #395d9d; }
.status-cancelled { background: #f8e4e1; color: #9b3832; }
.status-locked { background: #eee9f8; color: #624695; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.pagination > div { display: flex; align-items: center; gap: 9px; }

.card-list { display: grid; gap: 10px; }
.register-card { display: grid; grid-template-columns: minmax(180px,.85fr) minmax(0,1.5fr) auto; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 13px; padding: 14px; }
.register-card-number { color: var(--primary); font-weight: 850; }
.register-card-main strong, .register-card-main span { display: block; }
.register-card-main span { margin-top: 4px; color: var(--muted); font-size: 11px; }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tab { border: 0; border-bottom: 3px solid transparent; padding: 10px 13px; background: transparent; color: var(--muted); font-weight: 750; white-space: nowrap; }
.tab.active { border-bottom-color: var(--primary); color: var(--primary); }
.master-toolbar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.inline-form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; gap: 9px; margin-bottom: 15px; padding: 13px; border-radius: 12px; background: var(--surface-soft); }
.master-list { display: grid; gap: 7px; }
.master-row { display: grid; grid-template-columns: minmax(120px,.6fr) minmax(0,1.4fr) auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; font-size: 12px; }
.master-row small { color: var(--muted); }
.audit-list { display: grid; }
.audit-item { display: grid; grid-template-columns: 155px minmax(130px,.6fr) minmax(0,1.4fr); gap: 14px; padding: 13px 0; border-top: 1px solid #e8eeeb; font-size: 12px; }
.audit-item:first-child { border-top: 0; }
.audit-time { color: var(--muted); }
.audit-item strong, .audit-item span { display: block; }
.audit-item span { margin-top: 3px; color: var(--muted); }
.profile-panel { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: start; max-width: 860px; margin: 0 auto; }
.profile-avatar { width: 92px; height: 92px; display: grid; place-items: center; border-radius: 25px; background: linear-gradient(145deg,var(--primary),var(--primary-2)); color: white; font-size: 36px; font-weight: 900; }
.profile-info h3 { margin-bottom: 18px; font-size: 27px; }
.profile-info dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 0; }
.profile-info dl div { border-radius: 11px; padding: 11px; background: var(--surface-soft); }
.profile-info dt { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.profile-info dd { margin: 5px 0 0; font-size: 13px; font-weight: 700; }

.modal { width: min(620px, calc(100% - 24px)); max-height: calc(100vh - 30px); border: 0; border-radius: 20px; padding: 0; background: transparent; }
.modal::backdrop { background: rgba(8,26,21,.58); backdrop-filter: blur(3px); }
.modal-card { position: relative; overflow-y: auto; max-height: calc(100vh - 30px); padding: 28px; border-radius: 20px; background: white; box-shadow: 0 28px 90px rgba(7,25,20,.25); }
.modal-wide { width: min(760px, 100%); }
.modal-close { position: absolute; top: 13px; right: 13px; width: 34px; height: 34px; border: 0; border-radius: 10px; background: #eef3f0; color: var(--muted); font-size: 20px; }
.modal-card h2 { margin-bottom: 18px; }
.modal-subtitle { color: var(--muted); }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.result-card { text-align: center; }
.success-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 50%; background: #daf1e6; color: var(--success); font-size: 28px; font-weight: 900; }
.result-card h2 { overflow-wrap: anywhere; color: var(--primary); font-size: clamp(23px,4vw,34px); }
.result-details { display: grid; gap: 7px; border-radius: 12px; padding: 14px; background: var(--surface-soft); color: var(--muted); font-size: 12px; text-align: left; }
.result-details div { display: flex; justify-content: space-between; gap: 15px; }
.toast-region { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 8px; width: min(360px, calc(100% - 36px)); }
.toast { border-left: 4px solid var(--primary); border-radius: 11px; padding: 12px 14px; background: #fff; box-shadow: var(--shadow); font-size: 12px; animation: toastIn .2s ease; }
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.sidebar-backdrop { display: none; }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .filter-actions { grid-column: span 1; }
}
@media (max-width: 900px) {
  :root { --sidebar: 276px; }
  .login-screen { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; }
  .sidebar { transform: translateX(-105%); box-shadow: 20px 0 60px rgba(7,25,20,.25); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .menu-btn { display: block; }
  .sidebar-backdrop { position: fixed; z-index: 25; inset: 0; display: none; background: rgba(7,25,20,.46); }
  .sidebar-backdrop.show { display: block; }
  .two-column { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .content { padding: 14px; }
  .topbar { min-height: 72px; padding: 12px 14px; }
  .topbar h1 { font-size: 20px; }
  .topbar .btn:not(.signout-btn) { display: none; }
  .signout-btn { min-width: 72px; height: 34px; padding: 0 10px; font-size: 11px; }
  .connection-badge { padding: 6px 8px; }
  .welcome-card { align-items: flex-start; flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 118px; padding: 15px; }
  .stat-card strong { font-size: 27px; }
  .form-grid, .filter-grid, .inline-form { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .filter-actions { grid-column: auto; }
  .form-actions, .modal-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .btn, .modal-actions .btn { width: 100%; }
  .recent-item, .register-card, .audit-item { grid-template-columns: 1fr; gap: 7px; }
  .recent-item > :last-child { justify-self: start; }
  .profile-panel { grid-template-columns: 1fr; }
  .profile-info dl { grid-template-columns: 1fr; }
  .profile-actions .btn { width: 100%; }
  .panel { border-radius: 15px; padding: 16px; }
  
}
@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 104px; }
  .pagination { align-items: stretch; flex-direction: column; }
  .pagination > div { justify-content: space-between; }
}


/* Pengaturan akun seluruh pegawai */
.account-settings-grid { display: grid; gap: 18px; max-width: 980px; margin: 0 auto; }
.account-profile-card { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 28px; align-items: start; }
.account-avatar-column { display: grid; justify-items: center; gap: 11px; text-align: center; }
.account-avatar-column small { max-width: 220px; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.avatar-frame { position: relative; overflow: hidden; }
.avatar-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-photo-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.account-photo-actions .btn { min-width: 96px; }
.account-avatar-column .form-message:empty, .account-security-card > .form-message:empty { display: none; }
.account-preferences-card, .account-security-card { max-width: none; margin: 0; }
.account-security-card { display: grid; gap: 0; }
.security-actions { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.security-actions:first-of-type { border-top: 0; }
.security-actions strong, .security-actions span { display: block; }
.security-actions strong { margin-bottom: 4px; font-size: 13px; }
.security-actions span { color: var(--muted); font-size: 11px; line-height: 1.55; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; clip-path: inset(50%) !important; }
body.compact-mode .data-table th, body.compact-mode .data-table td { padding-top: 7px; padding-bottom: 7px; }
body.compact-mode .register-card, body.compact-mode .recent-item, body.compact-mode .master-row { padding-top: 9px; padding-bottom: 9px; }

@media (max-width: 680px) {
  .account-profile-card { grid-template-columns: 1fr; gap: 20px; }
  .account-photo-actions { width: 100%; }
  .account-photo-actions .btn { flex: 1 1 120px; }
  .security-actions { grid-template-columns: 1fr; gap: 11px; }
  .security-actions .btn { width: 100%; }
}

/* v1.0.4 - administrasi lengkap dan perapihan layout */
.panel-description { max-width: 720px; margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.master-caption { margin: -4px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.inline-form-signatory { grid-template-columns: repeat(4,minmax(0,1fr)) auto; }
.master-row-profile { grid-template-columns: minmax(170px,.65fr) minmax(260px,1.35fr) minmax(260px,auto); }
.master-row .table-actions { justify-content: flex-end; }
.field input:disabled, .field select:disabled, .field textarea:disabled { cursor: not-allowed; background: #edf1ef; color: #74807a; opacity: 1; }
.modal-card .form-grid { align-items: start; }

@media (max-width: 1180px) {
  .master-row-profile { grid-template-columns: minmax(160px,.65fr) minmax(220px,1.35fr); }
  .master-row-profile .table-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .inline-form-signatory { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .inline-form-signatory .btn { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .master-row, .master-row-profile { grid-template-columns: 1fr; gap: 8px; }
  .master-row .table-actions, .master-row-profile .table-actions { grid-column: auto; justify-content: stretch; }
  .master-row .table-actions .btn { flex: 1 1 auto; }
  .inline-form-signatory { grid-template-columns: 1fr; }
  .inline-form-signatory .btn { grid-column: auto; }
  .tabs { margin-inline: -4px; padding-inline: 4px; }
}

/* v1.0.5 - konfigurasi tahan cache dan pengaturan penomoran admin */
.setup-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.settings-subpanel { margin-top: 18px; }
.sequence-form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.sequence-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 10px; margin-bottom: 18px; }
.sequence-card { display: flex; min-width: 0; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; background: var(--surface-soft); }
.sequence-card span { color: var(--muted); font-size: 11px; font-weight: 750; }
.sequence-card strong { color: var(--primary); font-size: 18px; }
.sequence-card small { color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.inline-form-unit { grid-template-columns: .65fr 1.5fr .8fr 1.1fr 1.1fr auto; }
.field small { display: block; margin-top: 5px; color: var(--muted); font-size: 10.5px; line-height: 1.35; }
@media (max-width: 1180px) {
  .inline-form-unit { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .inline-form-unit .btn { align-self: end; }
}
@media (max-width: 680px) {
  .setup-actions, .sequence-form, .inline-form-unit { grid-template-columns: 1fr; flex-direction: column; }
  .setup-actions .btn { width: 100%; }
  .sequence-summary { grid-template-columns: 1fr; }
}

/* v1.0.6 - kontrol tahun, pemeriksaan sistem, cadangan, dan buka kunci */
.notice-danger { border-color: #efc8c8; background: #fff2f2; color: #8b2525; }
.year-control-grid { display: grid; grid-template-columns: minmax(180px,.55fr) minmax(300px,1.45fr); gap: 16px; align-items: end; }
.year-status-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 5px 10px; min-height: 76px; border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px; background: var(--surface-soft); }
.year-status-card strong { color: var(--primary); font-size: 14px; }
.year-status-card small { grid-column: 2; color: var(--muted); font-size: 11px; line-height: 1.45; }
.health-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.health-card { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 10px; border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; background: var(--surface-soft); }
.health-card div { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.health-card strong { color: var(--ink); font-size: 12.5px; }
.health-card small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.health-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; border-radius: 999px; padding: 5px 8px; font-size: 9.5px; font-weight: 850; letter-spacing: .02em; }
.health-ok { border-color: #bee3d1; background: #eaf8f1; color: #176440; }
.health-warning { border-color: #eddca9; background: #fff8df; color: #795b08; }
.health-error { border-color: #efc6c6; background: #fff0f0; color: #942d2d; }
.health-info { border-color: #c8ddef; background: #eef7ff; color: #285f87; }

@media (max-width: 900px) {
  .health-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .year-control-grid { grid-template-columns: 1fr; }
  .year-status-card small { grid-column: 1 / -1; }
  .health-card { grid-template-columns: 1fr; }
  .health-badge { justify-self: start; }
}


/* v1.0.7 - tipografi konsisten, tabel profesional, form proporsional, dan responsif */
:root {
  --font-ui: "Aptos", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}
html, body, button, input, select, textarea, table, dialog { font-family: var(--font-ui); }
body { font-size: 14px; line-height: 1.45; }

/* Kontrol formulir: tinggi dan ritme visual konsisten */
.field { gap: 6px; }
.field > span { font-size: 13px; line-height: 1.35; }
.field input, .field select, .field textarea {
  min-height: 46px;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
}
.field textarea { min-height: 78px; }
.field small, .required-note { font-size: 12px; line-height: 1.4; }
.btn { min-height: 42px; border-radius: 10px; font-size: 14px; line-height: 1.25; }
.btn-small { min-height: 36px; padding: 7px 11px; font-size: 13px; }

/* Panel dan judul halaman */
.panel { padding: clamp(19px, 2vw, 25px); }
.panel-head { margin-bottom: 17px; }
.panel-head h3 { font-size: 21px; line-height: 1.25; }
.panel-description, .master-caption { font-size: 14px; line-height: 1.55; }
.eyebrow { font-size: 11.5px; }

/* Pengaturan: lebih lebar, compact, dan rapi */
#page-settings .form-panel { width: 100%; max-width: 1180px; }

#page-settings .form-grid { gap: 14px 16px; }
#page-settings .sequence-form { gap: 14px 16px; }

#page-settings .panel-description { max-width: 850px; }

#page-settings .template-help { margin-top: 14px; font-size: 13px; line-height: 1.5; }

#page-settings .sequence-card { justify-content: center; }
#page-settings .sequence-card span { font-size: 13px; }
#page-settings .sequence-card strong { line-height: 1.2; }
#page-settings .sequence-card small { font-size: 12px; }
#page-settings .year-control-grid { grid-template-columns: minmax(190px,.45fr) minmax(340px,1.55fr); gap: 14px 16px; align-items: start; }

#page-settings .year-status-card strong { font-size: 15px; }
#page-settings .year-status-card small { font-size: 12.5px; }

/* Master Data: isi dinaikkan sekitar 3px dari versi sebelumnya */
#page-master .tabs { margin-bottom: 16px; }
#page-master .tab { padding: 10px 14px; font-size: 14px; }
#page-master .master-caption { margin-bottom: 13px; }
#page-master .inline-form {
  gap: 10px;
  margin-bottom: 14px;
  padding: 13px;
}
#page-master .inline-form input,
#page-master .inline-form select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #cdd8d2;
  border-radius: 10px;
  padding: 9px 11px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  
  line-height: 1.35;
}
#page-master .inline-form input:focus,
#page-master .inline-form select:focus { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(31,98,84,.12); }
#page-master .master-row {
  min-height: 66px;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 12px;
  
  
}


/* Buku Register: nomor dan seluruh isi lebih terbaca, kolom tetap proporsional */
#page-register .filter-grid { gap: 10px; margin-bottom: 16px; padding: 14px; }
#page-register .table-wrap { border-radius: 12px; }


#page-register .data-table th:nth-child(1), #page-register .data-table td:nth-child(1) { width: 54px; text-align: center; }
#page-register .data-table th:nth-child(2), #page-register .data-table td:nth-child(2) { width: 205px; }
#page-register .data-table th:nth-child(3), #page-register .data-table td:nth-child(3) { width: 112px; }
#page-register .data-table th:nth-child(4), #page-register .data-table td:nth-child(4) { width: 300px; }
#page-register .data-table th:nth-child(5), #page-register .data-table td:nth-child(5) { width: 155px; }
#page-register .data-table th:nth-child(6), #page-register .data-table td:nth-child(6) { width: 165px; }
#page-register .data-table th:nth-child(7), #page-register .data-table td:nth-child(7) { width: 100px; }
#page-register .data-table th:nth-child(8), #page-register .data-table td:nth-child(8) { width: 185px; }
#page-register .table-number { font-size: 15px; line-height: 1.42; white-space: normal; overflow-wrap: anywhere; }
#page-register .data-table td small { color: var(--muted); }
#page-register .table-subject { max-width: none; }
#page-register .table-subject strong { font-size: 15px; line-height: 1.42; }


#page-register .pagination { font-size: 13px; }

/* Audit Aktivitas: struktur tiga kolom yang jelas dan konsisten */
#page-audit .audit-list { gap: 0; }


/* Resolusi laptop 1366x768 */
@media (min-width: 901px) and (max-width: 1440px) {
  :root { --sidebar: 254px; }
  .sidebar { padding-inline: 12px; }
  .content { padding: 20px 22px 26px; }
  .topbar { min-height: 76px; padding: 13px 22px; }
  .panel { padding: 19px 20px; }
  #page-settings .form-panel { max-width: 1100px; }
  #page-master .master-row-profile { grid-template-columns: minmax(175px,.65fr) minmax(260px,1.35fr); }
  #page-master .master-row-profile .table-actions { grid-column: 1 / -1; justify-content: flex-start; }
  
  
  #page-register .data-table th:nth-child(1), #page-register .data-table td:nth-child(1) { width: 44px; }
  #page-register .data-table th:nth-child(2), #page-register .data-table td:nth-child(2) { width: 165px; }
  #page-register .data-table th:nth-child(3), #page-register .data-table td:nth-child(3) { width: 95px; }
  #page-register .data-table th:nth-child(4), #page-register .data-table td:nth-child(4) { width: 218px; }
  #page-register .data-table th:nth-child(5), #page-register .data-table td:nth-child(5) { width: 135px; }
  #page-register .data-table th:nth-child(6), #page-register .data-table td:nth-child(6) { width: 135px; }
  #page-register .data-table th:nth-child(7), #page-register .data-table td:nth-child(7) { width: 78px; }
  #page-register .data-table th:nth-child(8), #page-register .data-table td:nth-child(8) { width: 130px; }
  #page-register .table-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; }
  #page-register .table-actions .btn-small { min-width: 0; }
}

/* Tablet dan HP: tabel register berubah menjadi kartu, bukan tabel sempit */
@media (max-width: 900px) {
  #page-settings .form-panel { max-width: none; }
  #page-master .master-row-profile { grid-template-columns: minmax(170px,.65fr) minmax(220px,1.35fr); }
}
@media (max-width: 680px) {
  body { font-size: 14px; }
  .panel-head { align-items: flex-start; }
  .panel-head h3 { font-size: 19px; }
  .panel-description, .master-caption { font-size: 13px; }

  
  #page-settings .settings-subpanel { margin-top: 12px; }
  #page-settings .year-control-grid { grid-template-columns: 1fr; }
  #page-settings .year-status-card { min-height: 70px; }
  #page-settings .toolbar { width: 100%; }
  #page-settings .toolbar .btn { flex: 1 1 100%; }

  #page-master .inline-form,
  #page-master .inline-form-signatory,
  #page-master .inline-form-unit { grid-template-columns: 1fr; }
  #page-master .master-row,
  #page-master .master-row-profile { grid-template-columns: 1fr; min-height: 0; padding: 13px; }
  #page-master .master-row .table-actions,
  #page-master .master-row-profile .table-actions { grid-column: auto; }
  #page-master .master-row .table-actions .btn { flex: 1 1 calc(50% - 6px); }

  #page-register .filter-grid { padding: 12px; }
  
  
  #page-register .data-table thead { display: none; }
  
  #page-register .data-table tr { border-radius: 13px; background: var(--surface); box-shadow: 0 5px 18px rgba(23,52,44,.045); }
  #page-register .data-table td {
    
    display: grid;
    grid-template-columns: minmax(94px,108px) minmax(0,1fr);
    gap: 10px;
    border-top: 1px solid #edf1ef;
    padding: 9px 12px;
    
    text-align: left !important;
 }
  #page-register .data-table td:first-child { border-top: 0; }
  #page-register .data-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.35;
    text-transform: uppercase;
 }
  #page-register .data-table td.table-empty { display: block; border: 1px dashed var(--line); text-align: center !important; }
  #page-register .data-table td.table-empty::before { content: none; }
  #page-register .table-number, #page-register .table-subject strong { font-size: 14.5px; }
  #page-register .table-subject span, #page-register .data-table td small { font-size: 13px; }
  #page-register .table-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  #page-register .table-actions .btn { width: 100%; }

  #page-audit .audit-item {
    
    background: var(--surface-soft);
 }
}

/* Cetak A4 Portrait: 190 mm bersih, kolom tetap presisi */
/* ========================================================================== */
/* e-Register Simpala v1.0.8 - tabel presisi dan tipografi compact           */
/* ========================================================================== */

.compact-notice { margin: 12px 0 14px; padding: 12px 13px; }
.compact-notice strong, .compact-notice span { display: block; }
.compact-notice span { margin-top: 4px; font-size: 13px; line-height: 1.45; }

/* Master Data diturunkan 1 px dari v1.0.7 agar tetap compact. */
#page-master .inline-form input,
#page-master .inline-form select { font-size: 14px; }
#page-master .master-row { font-size: 14px; line-height: 1.38; }
#page-master .master-row strong { font-size: 14px; line-height: 1.38; }
#page-master .master-row small { font-size: 13px; line-height: 1.42; }
#page-master .master-row .btn-small { font-size: 12px; }

/* Semua tabel memakai garis baris dan garis kolom yang konsisten. */
table { border-collapse: collapse; }
.table-wrap { border: 0; border-radius: 12px; }
.data-table { border: 1px solid #cbd7d1; }
.data-table th,
.data-table td { border: 1px solid #d5dfda; }
.data-table th { border-color: #cbd7d1; }
.data-table tr:hover td { background: #f8fbf9; }

/* Buku Register v1.0.64: lebih compact, proporsional, dan konsisten. */
#page-register .data-table {
  min-width: 1130px;
  table-layout: fixed;
  font-size: 13.5px;
  line-height: 1.32;
}
#page-register .data-table th {
  padding: 8px 7px;
  font-size: 11.5px;
  line-height: 1.22;
  letter-spacing: .035em;
  text-align: center;
  vertical-align: middle;
}
#page-register .data-table td {
  padding: 8px 7px;
  font-size: 13.5px;
  line-height: 1.32;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
#page-register .data-table th:nth-child(1),
#page-register .data-table td:nth-child(1) { width: 44px; }
#page-register .data-table th:nth-child(2),
#page-register .data-table td:nth-child(2) { width: 185px; }
#page-register .data-table th:nth-child(3),
#page-register .data-table td:nth-child(3) { width: 100px; }
#page-register .data-table th:nth-child(4),
#page-register .data-table td:nth-child(4) { width: 235px; }
#page-register .data-table th:nth-child(5),
#page-register .data-table td:nth-child(5) { width: 130px; }
#page-register .data-table th:nth-child(6),
#page-register .data-table td:nth-child(6) { width: 200px; }
#page-register .data-table th:nth-child(7),
#page-register .data-table td:nth-child(7) { width: 90px; }
#page-register .data-table th:nth-child(8),
#page-register .data-table td:nth-child(8) { width: 146px; }
#page-register .data-table td:nth-child(1),
#page-register .data-table td:nth-child(7),
#page-register .data-table td:nth-child(8) {
  text-align: center;
}
#page-register .data-table td:nth-child(1),
#page-register .data-table td:nth-child(7) {
  vertical-align: top;
}
#page-register .data-table td:nth-child(8) {
  vertical-align: middle;
}
#page-register .table-number,
#page-register .table-subject strong { font-size: 13.5px; line-height: 1.32; }
#page-register .table-subject span {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.32;
}
#page-register .data-table td small { font-size: 12.5px; line-height: 1.32; }
#page-register .table-creator-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #293b34;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#page-register .table-creator small {
  display: block;
  margin-top: 3px;
  white-space: nowrap;
}
#page-register .table-actions {
  align-items: center;
  justify-content: center;
}
#page-register .table-actions .action-btn {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 10.75px;
}
#page-register .status-badge { padding: 4px 8px; font-size: 11px; }

@media (min-width: 901px) and (max-width: 1440px) {
  #page-register .data-table { min-width: 940px; }
  #page-register .data-table th:nth-child(1),
  #page-register .data-table td:nth-child(1) { width: 38px; }
  #page-register .data-table th:nth-child(2),
  #page-register .data-table td:nth-child(2) { width: 150px; }
  #page-register .data-table th:nth-child(3),
  #page-register .data-table td:nth-child(3) { width: 84px; }
  #page-register .data-table th:nth-child(4),
  #page-register .data-table td:nth-child(4) { width: 168px; }
  #page-register .data-table th:nth-child(5),
  #page-register .data-table td:nth-child(5) { width: 110px; }
  #page-register .data-table th:nth-child(6),
  #page-register .data-table td:nth-child(6) { width: 180px; }
  #page-register .data-table th:nth-child(7),
  #page-register .data-table td:nth-child(7) { width: 72px; }
  #page-register .data-table th:nth-child(8),
  #page-register .data-table td:nth-child(8) { width: 138px; }
  #page-register .data-table th,
  #page-register .data-table td { padding-inline: 6px; }
  #page-register .table-creator-name { font-size: 12.5px; }
  #page-register .table-actions .action-btn { padding-inline: 7px; font-size: 10.25px; }
}

@media (max-width: 680px) {
  #page-register .table-wrap { border: 0; }
  
  #page-register .data-table tr { border: 1px solid #cbd7d1; }
  #page-register .data-table td {
    border-width: 1px 0 0;
    border-color: #dbe4df;
    font-size: 14px;
 }
  #page-register .table-number,
  #page-register .table-subject strong { font-size: 14px; }
  #page-register .table-creator-name,
  #page-register .table-creator small { white-space: normal; overflow: visible; text-overflow: clip; }
  #page-master .master-row,
  #page-master .master-row strong { font-size: 14px; }
  #page-master .master-row small { font-size: 13px; }
}

/* Pemisah kolom untuk daftar Master Data dan Audit yang berbentuk grid. */
@media (min-width: 681px) {
  #page-master .master-row > div + div {
    border-left: 1px solid #d5dfda;
    padding-left: 14px;
 }
  #page-audit .audit-item > div + div {
    border-left: 1px solid #d5dfda;
    padding-left: 14px;
 }
}


/* ========================================================================== */
/* e-Register Simpala v1.0.9 - Pengaturan compact, jelas, dan sejajar         */
/* ========================================================================== */

/* Panel Pengaturan dibuat lebih ringkas tanpa mengurangi keterbacaan. */
#page-settings .panel {
  padding: 18px 20px;
}
#page-settings .settings-subpanel {
  margin-top: 13px;
}
#page-settings .panel-head {
  gap: 14px;
  margin-bottom: 12px;
}
#page-settings .panel-head h3 {
  font-size: 20px;
  line-height: 1.22;
}
#page-settings .panel-description {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
}
#page-settings .form-grid,
#page-settings .sequence-form,
#page-settings .year-control-grid {
  gap: 10px 12px;
}
#page-settings .field {
  gap: 5px;
}
#page-settings .field > span {
  font-size: 12.5px;
  line-height: 1.3;
}
#page-settings .field input,
#page-settings .field select {
  min-height: 42px;
  height: 42px;
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 13.5px;
}
#page-settings .field textarea {
  min-height: 68px;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 13.5px;
}
#page-settings .field small {
  min-height: 17px;
  font-size: 11.5px;
  line-height: 1.35;
}
#page-settings .btn {
  min-height: 40px;
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 13.5px;
}

/* Tombol Simpan Pengaturan berada satu baris dan satu tinggi dengan kolom batas tanggal. */
#page-settings .settings-save-cell {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-width: 0;
  padding-bottom: 27px;
}
#page-settings .settings-save-cell .btn {
  width: 100%;
  min-height: 42px;
}
#page-settings #settingsMessage {
  margin-top: 8px;
}

/* Penomoran, kontrol tahun, dan pemeriksaan sistem mengikuti ritme yang sama. */
#page-settings .sequence-summary {
  margin-bottom: 11px;
}
#page-settings .sequence-card {
  min-height: 68px;
  padding: 10px 12px;
}
#page-settings .sequence-card strong {
  font-size: 18px;
}
#page-settings .year-status-card {
  min-height: 68px;
  padding: 10px 12px;
}
#page-settings .form-actions {
  gap: 8px;
  margin-top: 2px;
}
#page-settings .health-grid {
  gap: 8px;
}
#page-settings .health-card {
  min-height: 66px;
  padding: 10px 12px;
}

@media (min-width: 901px) and (max-width: 1440px) {
  #page-settings .panel {
    padding: 16px 18px;
 }
  #page-settings .panel-head {
    margin-bottom: 10px;
 }
  #page-settings .form-grid,
  #page-settings .sequence-form,
  #page-settings .year-control-grid {
    gap: 9px 11px;
 }
  #page-settings .field input,
  #page-settings .field select {
    min-height: 40px;
    height: 40px;
 }
  #page-settings .settings-save-cell .btn {
    min-height: 40px;
 }
}

@media (max-width: 680px) {
  #page-settings .panel {
    padding: 14px;
 }
  #page-settings .settings-save-cell {
    padding-bottom: 0;
 }
  #page-settings .settings-save-cell .btn {
    width: 100%;
 }
  #page-settings .field small {
    min-height: 0;
 }
}


@media (max-width: 680px) {
  #page-register .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow: visible;
 }
  #page-register .data-table {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
    table-layout: auto;
    border: 0;
 }
  #page-register .data-table tbody {
    display: grid;
    width: 100%;
    gap: 12px;
 }
  #page-register .data-table tr {
    display: grid;
    width: 100%;
    min-width: 0;
    overflow: hidden;
 }
  #page-register .data-table td {
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
 }
  #page-register .data-table td > *,
  #page-register .table-number,
  #page-register .table-subject,
  #page-register .table-subject strong,
  #page-register .table-subject span,
  #page-register .table-actions {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
 }
}

/* e-Register Simpala v1.0.11 - tombol Reset Password memakai aksen tema. */

/* v1.0.16 - optimasi performa, login HP, dan signature pembuat */
.login-panel {
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}
.auth-card { align-self: center; }

.password-wrap { min-height: 48px; align-items: stretch; }
.password-wrap input {
  min-width: 0;
  flex: 1 1 auto;
  height: auto;
  min-height: 46px;
  padding-right: 12px;
}
.password-toggle {
  position: relative;
  flex: 0 0 50px;
  width: 50px;
  min-height: 46px;
  border-left: 1px solid #d8e1dc;
  border-radius: 0;
  color: #66756f;
}
.password-toggle:hover { background: #f1f6f3; color: var(--primary); }
.password-toggle:focus-visible { outline: 3px solid rgba(31,98,84,.16); outline-offset: -3px; }
.password-toggle svg {
  position: absolute;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.password-toggle .eye-closed { display: none; }
.password-toggle.is-visible .eye-open { display: none; }
.password-toggle.is-visible .eye-closed { display: block; }

.app-main { display: flex; flex-direction: column; }
.content { flex: 1 0 auto; }
.app-signature {
  color: #77837e;
  
  line-height: 1.4;
  text-align: center;
}
.login-signature {
  width: 100%;
  padding: 0 8px 4px;
}
.app-signature-main {
  flex: 0 0 auto;
  padding: 10px 24px 18px;
}

@media (max-width: 900px) {
  .login-screen, .login-panel { min-height: 100vh; min-height: 100dvh; }
  .login-panel {
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
 }
}

@media (max-width: 680px) {
  
  
  .auth-card {
    
    
    
    display: flex;
    flex-direction: column;
    
    
    
    
    
    
    
 }
  
  
  
  
  
  
  
  
  
  .auth-card .password-toggle {
    flex-basis: 54px;
    
    
 }
  
  
  
  
  .app-signature-main { padding: 8px 16px 14px; font-size: 10px; }
}

@media (max-width: 420px) {
  .auth-card {
    padding-right: max(18px, env(safe-area-inset-right));
    padding-left: max(18px, env(safe-area-inset-left));
 }
  .auth-card .brand-lockup { margin-bottom: 30px; }
}

@media (max-height: 700px) and (max-width: 900px) {
  .auth-card {
    justify-content: flex-start;
    min-height: auto;
    padding-top: max(22px, env(safe-area-inset-top));
 }
  .auth-card .brand-lockup { margin-bottom: 22px; }
  .auth-card .field { margin-bottom: 12px; }
  .auth-note { margin-top: 14px; }
}

/* v1.0.16 - login HP solid, modern, profesional, dan signature lebih jelas */
.app-signature {
  font-size: 12px;
}
.app-signature-main {
  font-size: 11px;
}

@media (max-width: 680px) {
  .login-screen {
    min-height: 100vh;
    min-height: 100dvh;
    background:
      radial-gradient(circle at 88% 0%, rgba(231,185,74,.16), transparent 28%),
      linear-gradient(180deg, #edf4f0 0%, #f5f8f6 46%, #eef4f1 100%);
 }

  .login-panel {
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-rows: minmax(0, 1fr) auto;
    
    
    
    background:
      radial-gradient(circle at 88% 0%, rgba(231,185,74,.16), transparent 28%),
      linear-gradient(180deg, #edf4f0 0%, #f5f8f6 46%, #eef4f1 100%);
 }

  .auth-card {
    position: relative;
    width: min(100%, 430px);
    max-width: 430px;
    min-height: 0;
    
    justify-content: flex-start;
    overflow: hidden;
    padding: 27px 20px 23px;
    border: 1px solid rgba(25,78,66,.14);
    
    
    
 }

  

  .auth-card .brand-lockup {
    align-items: center;
    gap: 13px;
    margin-bottom: 24px;
 }

  .auth-card .brand-lockup img {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 14px;
    
 }

  .auth-card .brand-lockup h2 {
    font-size: clamp(23px, 6.7vw, 28px);
    line-height: 1.08;
    letter-spacing: -.025em;
 }

  .auth-card .eyebrow {
    margin-bottom: 5px;
    font-size: 10.5px;
    letter-spacing: .085em;
 }

  .auth-card .field {
    gap: 7px;
    margin-bottom: 14px;
 }

  .auth-card .field > span {
    font-size: 13px;
    line-height: 1.2;
    font-weight: 750;
 }

  .auth-card input {
    min-height: 52px;
    border: 1px solid #cbd8d2;
    border-radius: 13px;
    padding: 12px 14px;
    background: #fbfdfc;
    font-size: 16px;
    line-height: 1.2;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
 }

  .auth-card input:focus {
    border-color: var(--primary-2);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(31,98,84,.10);
 }

  .auth-card .password-wrap {
    min-height: 52px;
    overflow: hidden;
    border: 1px solid #cbd8d2;
    border-radius: 13px;
    background: #fbfdfc;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
 }

  .auth-card .password-wrap:focus-within {
    border-color: var(--primary-2);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(31,98,84,.10);
 }

  .auth-card .password-wrap input {
    min-height: 50px;
    border: 0;
    border-radius: 0;
    background: #fbfdfc;
    box-shadow: none !important;
 }

  .auth-card .password-wrap:focus-within input {
    background: #ffffff;
 }

  .auth-card .password-toggle {
    flex: 0 0 52px;
    width: 52px;
    min-height: 50px;
    border-left: 1px solid #d7e1dc;
    background: #f2f7f4;
    color: #52665f;
 }

  .auth-card .password-toggle:hover,
  .auth-card .password-toggle:active {
    background: #e8f1ed;
    color: var(--primary);
 }

  .auth-card .password-toggle svg {
    width: 21px;
    height: 21px;
    stroke-width: 1.9;
 }

  .auth-card #loginBtn {
    min-height: 52px;
    margin-top: 2px;
    border-radius: 13px;
    
    font-size: 15.5px;
    
 }

  .auth-card #loginBtn:active {
    transform: translateY(1px);
    box-shadow: 0 5px 14px rgba(18,63,54,.15);
 }

  .auth-note {
    max-width: 350px;
    margin: 18px auto 0;
    color: #64736d;
    font-size: 12.5px;
    line-height: 1.5;
 }

  .login-signature {
    padding: 4px 8px max(4px, env(safe-area-inset-bottom));
    
    
    font-size: 11.5px;
    line-height: 1.35;
 }
}

@media (max-width: 390px) {
  .login-panel {
    padding-right: max(11px, env(safe-area-inset-right));
    padding-left: max(11px, env(safe-area-inset-left));
 }

  .auth-card {
    padding-right: 17px;
    padding-left: 17px;
    border-radius: 22px;
 }

  
}

@media (max-height: 700px) and (max-width: 680px) {
  

  .auth-card {
    
    padding-top: 22px;
    padding-bottom: 18px;
 }

  .auth-card .brand-lockup {
    margin-bottom: 18px;
 }

  .auth-card .brand-lockup img {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
 }

  .auth-card .brand-lockup h2 {
    font-size: 23px;
 }

  .auth-card .field {
    margin-bottom: 10px;
 }

  .auth-card input,
  .auth-card .password-wrap,
  .auth-card #loginBtn {
    min-height: 48px;
 }

  .auth-card .password-wrap input,
  .auth-card .password-toggle {
    min-height: 46px;
 }

  .auth-card .password-toggle {
    flex-basis: 48px;
    width: 48px;
 }

  .auth-note {
    margin-top: 12px;
    font-size: 12px;
 }

  .login-signature {
    font-size: 11px;
 }
}

/* v1.0.16 - identitas Simpala, keseimbangan login HP, dan catatan desktop satu baris */
@media (min-width: 901px) {
  .auth-card {
    width: min(510px, 100%);
    padding-right: 30px;
    padding-left: 30px;
 }

  .auth-note {
    margin-right: -4px;
    margin-left: -4px;
    white-space: nowrap;
    font-size: 11.2px;
    line-height: 1.45;
    letter-spacing: -.006em;
 }
}

@media (max-width: 680px) {
  .login-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 13px;
    overflow-x: hidden;
    overflow-y: auto;
    padding:
      max(16px, env(safe-area-inset-top))
      max(13px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(13px, env(safe-area-inset-left));
 }

  .auth-card {
    flex: 0 0 auto;
    align-self: center;
    margin: 0;
 }

  

  .login-signature {
    flex: 0 0 auto;
    align-self: center;
    width: 100%;
    max-width: 430px;
    padding-top: 2px;
    padding-bottom: max(2px, env(safe-area-inset-bottom));
    background: transparent;
 }
}

@media (max-width: 390px) {
  .auth-card::before {
    left: 50%;
    right: auto;
    
 }
}

@media (max-height: 700px) and (max-width: 680px) {
  .login-panel {
    justify-content: center;
    align-items: stretch;
    gap: 8px;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
 }

  .auth-card {
    align-self: center;
    margin: 0;
 }
}

@media (max-height: 540px) and (max-width: 680px) {
  .login-panel {
    justify-content: flex-start;
 }
}

/* ========================================================================== */
/* e-Register Simpala v1.0.16 - dropdown Penandatangan HP dan Audit compact   */
/* ========================================================================== */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Audit Aktivitas dibuat lebih compact dan tombol admin ditempatkan proporsional. */

#page-audit .audit-panel-actions {
  flex: 0 0 auto;
}
#page-audit .audit-panel-actions .btn {
  
  
  
  
  white-space: nowrap;
}


/* Pemilih Penandatangan buatan sendiri mencegah teks dropdown native membesar di HP. */
.mobile-select-trigger {
  display: none;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #cdd8d2;
  border-radius: 11px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
}
.mobile-select-trigger span {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-select-trigger b {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}
.mobile-select-trigger.is-placeholder { color: #6f7d77; }
.mobile-select-trigger:focus-visible {
  border-color: var(--primary-2);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(31,98,84,.12);
}
.mobile-select-trigger.is-invalid {
  border-color: #ba403f;
  box-shadow: 0 0 0 3px rgba(186,64,63,.10);
}
.mobile-select-trigger:disabled {
  cursor: not-allowed;
  background: #edf1ef;
  color: #74807a;
}
.mobile-select-overlay {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  background: rgba(9,29,25,.48);
  backdrop-filter: blur(2px);
}
.mobile-select-overlay.hidden { display: none !important; }
.mobile-select-sheet {
  width: min(100%, 480px);
  max-height: min(72dvh, 620px);
  overflow: hidden;
  border: 1px solid rgba(18,63,54,.13);
  border-radius: 18px 18px 14px 14px;
  background: #fff;
  box-shadow: 0 -16px 45px rgba(9,29,25,.22);
}
.mobile-select-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 13px 15px;
}
.mobile-select-head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}
.mobile-select-head .modal-close {
  position: static;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
}
.mobile-select-options {
  max-height: calc(min(72dvh, 620px) - 63px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
}
.mobile-select-option {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 10px;
  padding: 11px 10px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
}
.mobile-select-option + .mobile-select-option { border-top: 1px solid #edf1ef; }
.mobile-select-option:hover,
.mobile-select-option:focus-visible { background: #eef5f1; outline: 0; }
.mobile-select-option.selected {
  background: #e8f2ed;
  color: var(--primary);
  font-weight: 700;
}
.mobile-select-option:disabled { display: none; }
.mobile-select-option span { min-width: 0; overflow-wrap: anywhere; }
.mobile-select-option b { flex: 0 0 auto; color: var(--primary); }

@media (min-width: 901px) and (max-width: 1440px) {
  
}

@media (max-width: 680px) {
  select[data-mobile-signatory-select] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    opacity: 0 !important;
    white-space: nowrap !important;
 }
  select[data-mobile-signatory-select] + .mobile-select-trigger {
    display: flex;
 }

  
  
  #page-audit .audit-panel-actions {
    align-self: flex-end;
 }
  
  
  
  
}

@media (max-width: 680px) {
  #page-audit .audit-panel-head {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
 }
  #page-audit .audit-panel-head > :first-child {
    flex: 1 1 190px;
    min-width: 0;
 }
  #page-audit .audit-panel-actions {
    flex: 0 0 auto;
    margin-left: auto;
 }
  #page-audit .audit-item {
    width: 100%;
    min-width: 0;
 }
  #page-audit .audit-item > div {
    min-width: 0;
    overflow-wrap: anywhere;
 }
}

/* ========================================================================== */
/* Konsistensi form login pada layar laptop */
/* ========================================================================== */
@media (min-width: 681px) {
  .login-panel {
    gap: 16px;
    padding: clamp(26px, 3vw, 40px);
 }

  #loginForm.auth-card {
    display: flex;
    flex-direction: column;
    width: min(500px, 100%);
    padding: 32px 34px 30px;
 }

  #loginForm .brand-lockup {
    margin: 0 0 28px;
 }

  #loginForm > .field {
    gap: 8px;
    margin: 0 0 18px;
 }

  #loginForm > .field:nth-of-type(2) {
    margin-bottom: 24px;
 }

  #loginForm > .field > span {
    font-size: 13px;
    line-height: 1.2;
 }

  #loginForm > .field > input,
  #loginForm .password-wrap {
    width: 100%;
    min-height: 48px;
    height: 48px;
    border-radius: 12px;
 }

  #loginForm > .field > input {
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.2;
 }

  #loginForm .password-wrap {
    align-items: stretch;
 }

  #loginForm .password-wrap input {
    min-height: 46px;
    height: 46px;
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.2;
 }

  #loginForm .password-toggle {
    flex: 0 0 50px;
    width: 50px;
    min-height: 46px;
    height: 46px;
 }

  #loginForm #loginBtn {
    min-height: 48px;
    margin: 0;
    border-radius: 12px;
    font-size: 15px;
 }

  #loginForm .form-message {
    min-height: 18px;
    margin: 10px 0 0;
 }

  #loginForm .auth-note {
    margin-top: 16px;
 }
}

@media (min-width: 901px) and (max-height: 820px) {
  .login-panel {
    gap: 14px;
    padding: 24px 30px;
 }

  #loginForm.auth-card {
    padding: 28px 32px 26px;
 }

  #loginForm .brand-lockup {
    margin-bottom: 24px;
 }
}

/* Penempatan akun, tombol keluar, dan proteksi interaksi dasar */
html, body { -webkit-touch-callout: none; }
input, textarea, select, [contenteditable="true"] { -webkit-touch-callout: default; }
@media (max-width: 430px) {
  .topbar-actions { gap: 6px; }
  .connection-badge { display: none; }
  .signout-btn { min-width: 70px; height: 34px; border-radius: 9px; padding: 0 9px; }
}

/* ========================================================================== */
/* e-Register Simpala v1.0.22 - identitas sidebar dan panel hijau login       */
/* ========================================================================== */

/* Seluruh teks identitas akun memakai Semi Bold secara konsisten. */
.user-card-text strong,
.user-card-role,
.user-card-text small {
  font-weight: 600;
}

/* Panel hijau hanya tampil pada laptop/desktop. Seluruh blok teks dipusatkan. */
@media (min-width: 901px) {
  

  

  

  
}

/* ========================================================================== */
/* e-Register Simpala v1.0.25 - halaman login modern, rapi, dan profesional   */
/* ========================================================================== */

/* Identitas akun sidebar tetap Semi Bold. */

@media (min-width: 901px) {
  .login-screen {
    grid-template-columns: minmax(0, 1.14fr) minmax(470px, .86fr);
    background: #eef3f0;
 }

  .login-visual {
    position: relative;
    isolation: isolate;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    padding: clamp(48px, 6.2vw, 92px);
    background:
      radial-gradient(circle at 17% 14%, rgba(255,255,255,.11), transparent 25%),
      radial-gradient(circle at 82% 15%, rgba(231,185,74,.25), transparent 23%),
      radial-gradient(circle at 73% 92%, rgba(87,171,146,.26), transparent 31%),
      linear-gradient(145deg, #082d26 0%, #10483c 49%, #1c6a58 100%);
    color: #ffffff;
 }

  .login-visual::before {
    content: "";
    position: absolute;
    z-index: -2;
    inset: 0;
    opacity: .7;
    background-image:
      linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
      linear-gradient(120deg, transparent 0 62%, rgba(255,255,255,.035) 62% 62.4%, transparent 62.4%);
    background-size: 46px 46px, 46px 46px, 100% 100%;
    -webkit-mask-image: linear-gradient(115deg, rgba(0,0,0,.92), rgba(0,0,0,.28) 72%, transparent 100%);
    mask-image: linear-gradient(115deg, rgba(0,0,0,.92), rgba(0,0,0,.28) 72%, transparent 100%);
 }

  .login-visual::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: -165px;
    bottom: -180px;
    width: 430px;
    height: 430px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    box-shadow:
      0 0 0 64px rgba(255,255,255,.035),
      0 0 0 128px rgba(255,255,255,.022);
 }

  .login-visual-inner {
    position: relative;
    z-index: 2;
    width: min(690px, 100%);
    max-width: 690px;
    margin: 0;
    padding-left: 26px;
    text-align: left;
    transform: translateY(-22px);
 }

  .login-visual-inner::before {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 6px;
    left: 0;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f3d783 0%, #e7b94a 42%, rgba(231,185,74,.12) 100%);
    box-shadow: 0 0 22px rgba(231,185,74,.22);
 }

  .login-visual .eyebrow,
  .login-visual h1,
  .login-visual p {
    margin-right: 0;
    margin-left: 0;
    text-align: left;
 }

  .login-visual .eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin-bottom: 18px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255,255,255,.075);
    color: #d8ede7;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .11em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
    backdrop-filter: blur(8px);
 }

  .login-visual h1 {
    max-width: 660px;
    margin-bottom: 20px;
    color: #ffffff;
    font-size: clamp(42px, 4.65vw, 66px);
    font-weight: 700;
    line-height: 1.01;
    letter-spacing: -.045em;
    text-wrap: balance;
    text-shadow: 0 9px 30px rgba(4,29,24,.22);
 }

  .login-visual p:not(.eyebrow) {
    max-width: 625px;
    margin-bottom: 0;
    color: rgba(229,243,238,.88);
    font-size: clamp(15.5px, 1.28vw, 18.5px);
    font-weight: 400;
    line-height: 1.68;
 }

  .login-visual .feature-pills {
    justify-content: flex-start;
    gap: 10px;
    margin-top: 30px;
 }

  .login-visual .feature-pills span {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    padding: 9px 13px;
    background: rgba(255,255,255,.075);
    color: #f7fbf9;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.055);
    backdrop-filter: blur(8px);
 }

  .login-visual .feature-pills span::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #f0ca67;
    box-shadow: 0 0 0 4px rgba(240,202,103,.10);
 }

  .login-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    gap: 17px;
    padding: clamp(30px, 4vw, 58px);
    
 }

  .login-panel::before,
  .login-panel::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
 }

  .login-panel::before {
    top: -115px;
    right: -120px;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(18,63,54,.07);
    box-shadow: 0 0 0 42px rgba(18,63,54,.022);
 }

  .login-panel::after {
    bottom: -155px;
    left: -135px;
    width: 310px;
    height: 310px;
    background: radial-gradient(circle, rgba(31,98,84,.075), transparent 68%);
 }

  #loginForm.auth-card {
    position: relative;
    z-index: 1;
    width: min(500px, 100%);
    overflow: hidden;
    border: 1px solid rgba(18,63,54,.105);
    border-radius: 28px;
    padding: 34px 36px 31px;
    background: #ffffff;
    box-shadow:
      0 28px 70px rgba(14,48,41,.13),
      0 4px 16px rgba(14,48,41,.055),
      inset 0 1px 0 rgba(255,255,255,.96);
 }

  #loginForm.auth-card::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: -92px;
    right: -82px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(231,185,74,.12), transparent 67%);
    pointer-events: none;
 }

  #loginForm .brand-lockup {
    align-items: center;
    gap: 15px;
    margin-bottom: 29px;
 }

  #loginForm .brand-lockup img {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    border: 1px solid rgba(18,63,54,.08);
    border-radius: 17px;
    padding: 2px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(18,63,54,.13);
 }

  #loginForm .eyebrow {
    margin-bottom: 5px;
    color: #527068;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .09em;
 }

  #loginForm h2 {
    color: #16362f;
    font-size: clamp(25px, 2.15vw, 30px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.028em;
 }

  #loginForm > .field {
    gap: 8px;
    margin-bottom: 18px;
 }

  #loginForm > .field:nth-of-type(2) {
    margin-bottom: 24px;
 }

  #loginForm > .field > span {
    color: #334c45;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
 }

  #loginForm > .field > input,
  #loginForm .password-wrap {
    min-height: 49px;
    height: 49px;
    border-color: #cbd9d3;
    border-radius: 13px;
    background: #fbfdfc;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
 }

  #loginForm > .field > input {
    padding: 12px 14px;
    color: #1c302a;
    font-size: 14.5px;
    font-weight: 500;
 }

  #loginForm > .field > input:hover,
  #loginForm .password-wrap:hover {
    border-color: #aebfb8;
    background: #ffffff;
 }

  #loginForm > .field > input:focus,
  #loginForm .password-wrap:focus-within {
    border-color: #2a7565;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(31,98,84,.105);
 }

  #loginForm .password-wrap input {
    min-height: 47px;
    height: 47px;
    padding: 12px 14px;
    background: transparent;
    color: #1c302a;
    font-size: 14.5px;
    font-weight: 500;
 }

  #loginForm .password-toggle {
    flex-basis: 50px;
    width: 50px;
    min-height: 47px;
    height: 47px;
    border-left-color: #d7e1dc;
    background: #f4f8f6;
 }

  #loginForm #loginBtn {
    min-height: 50px;
    border-radius: 13px;
    background: linear-gradient(135deg, #123f36 0%, #1d6353 100%);
    box-shadow: 0 12px 25px rgba(18,63,54,.19);
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: .01em;
 }

  #loginForm #loginBtn:hover {
    background: linear-gradient(135deg, #0d342d 0%, #185747 100%);
    box-shadow: 0 14px 28px rgba(18,63,54,.23);
 }

  #loginForm .form-message {
    min-height: 17px;
    margin: 9px 0 0;
 }

  #loginForm .auth-note {
    margin: 15px -5px 0;
    color: #667770;
    font-size: 11.1px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: -.004em;
    white-space: nowrap;
 }

  .login-signature {
    position: relative;
    z-index: 1;
    color: #73817b;
    font-size: 11.5px;
    font-weight: 500;
 }
}

@media (min-width: 901px) and (max-height: 780px) {
  .login-visual-inner {
    transform: translateY(-10px);
 }

  #loginForm.auth-card {
    padding-top: 29px;
    padding-bottom: 27px;
 }

  #loginForm .brand-lockup {
    margin-bottom: 24px;
 }
}

@media (max-width: 900px) {
  .login-panel {
    position: relative;
    isolation: isolate;
 }
}

@media (max-width: 680px) {
  

  .auth-card {
    border-color: rgba(18,63,54,.12);
    border-radius: 26px;
    background: #ffffff;
    box-shadow:
      0 24px 60px rgba(18,63,54,.14),
      0 4px 15px rgba(18,63,54,.055);
 }

  /* Menghapus garis dekoratif lama di atas kartu agar tampil lebih bersih. */
  

  .auth-card .brand-lockup img {
    border: 1px solid rgba(18,63,54,.08);
    padding: 2px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(18,63,54,.13);
 }

  .auth-card .eyebrow,
  .auth-card .field > span {
    font-weight: 600;
 }

  .auth-card input,
  .auth-card .password-wrap {
    background: #fbfdfc;
 }

  .auth-card #loginBtn {
    background: linear-gradient(135deg, #123f36 0%, #1d6353 100%);
    box-shadow: 0 11px 24px rgba(18,63,54,.19);
    font-weight: 700;
 }

  .login-signature {
    color: #718079;
    font-weight: 500;
 }
}

/* ========================================================================== */
/* e-Register Simpala v1.0.25 - aksen kuning HP tanpa efek cahaya             */
/* ========================================================================== */

/* Panel login desktop dibuat bersih tanpa glow/dekorasi cahaya kuning. */
@media (min-width: 901px) {
  .login-panel {
    background: linear-gradient(155deg, #f9fbfa 0%, #eff5f2 100%);
 }

  .login-panel::before,
  .login-panel::after,
  #loginForm.auth-card::after {
    display: none;
 }
}

/* HP: latar bersih tanpa efek cahaya, tetapi aksen kuning kartu dikembalikan. */
@media (max-width: 680px) {
  .login-screen,
  .login-panel {
    background: linear-gradient(165deg, #edf4f0 0%, #f8faf9 48%, #edf3f0 100%);
 }

  .login-panel::before,
  .login-panel::after,
  #loginForm.auth-card::after {
    display: none;
 }

  .auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    right: auto;
    display: block;
    width: 54px;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: var(--accent);
    box-shadow: none;
    transform: translateX(-50%);
 }
}

@media (max-width: 390px) {
  .auth-card::before {
    width: 48px;
 }
}

/* ========================================================================== */
/* e-Register Simpala v1.0.31 - Akun rapi, foto admin, dan status proporsional */
/* ========================================================================== */
.main-nav { min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.nav-group-label { padding: 2px 12px 4px; color: #86aaa1; font-size: 9px; font-weight: 850; letter-spacing: .12em; }

#page-profile .account-settings-grid {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  gap: 16px;
}
#page-profile .account-profile-card { display: block; padding: 22px 24px; }
#page-profile .account-profile-hero {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) minmax(250px, 290px);
  gap: 20px;
  align-items: center;
}
#page-profile .profile-avatar {
  width: 112px;
  height: 112px;
  border-radius: 27px;
  font-size: 38px;
  box-shadow: 0 8px 24px rgba(18, 63, 54, .14);
}
#page-profile .account-identity { min-width: 0; }
#page-profile .account-identity h3 {
  margin: 0;
  font-size: clamp(23px, 2.3vw, 30px);
  line-height: 1.18;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
#page-profile .account-headline { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.account-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 12px; }
.account-badge {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.account-badge-active { border-color: #c8e5d7; background: #e6f5ed; color: #176949; }
.account-badge-inactive { border-color: #efd0cc; background: #fae9e6; color: #9b3832; }
.account-badge-role { border-color: #c9ddd7; background: #eef6f3; color: #245f53; }
.account-badge-unit { border-color: #d7dfdb; background: #f5f7f6; color: #53615b; }

#page-profile .account-photo-panel {
  min-width: 0;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
#page-profile .account-photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#page-profile .account-photo-actions .btn { width: 100%; min-width: 0; }
#page-profile .account-photo-panel > small { display: block; margin-top: 9px; color: var(--muted); font-size: 10.5px; line-height: 1.5; text-align: center; text-wrap: balance; }
#page-profile .account-photo-panel .form-message { min-height: 0; margin-top: 8px; font-size: 11.5px; }
#page-profile .account-photo-panel .form-message:empty { display: none; }

#page-profile .account-details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
#page-profile .account-details-grid > div {
  min-width: 0;
  min-height: 76px;
  border: 1px solid #e5ece8;
  border-radius: 12px;
  padding: 11px 12px;
  background: var(--surface-soft);
}
#page-profile .account-details-grid dt { color: var(--muted); font-size: 9.5px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
#page-profile .account-details-grid dd { margin: 6px 0 0; font-size: 12.5px; font-weight: 750; line-height: 1.45; overflow-wrap: anywhere; }

#page-profile .account-settings-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}
#page-profile .account-preferences-card,
#page-profile .account-security-card {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 20px 22px;
}
#page-profile .account-preferences-card { display: flex; flex-direction: column; }
#page-profile .account-preferences-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
#page-profile .account-preferences-card .form-actions { margin-top: auto; padding-top: 18px; }
#page-profile .account-preferences-card .form-message { min-height: 0; }
#page-profile .account-preferences-card .form-message:empty { display: none; }
#page-profile .account-security-card { display: flex; flex-direction: column; }
#page-profile .security-action-list { border-top: 1px solid var(--line); }
#page-profile .security-actions {
  grid-template-columns: minmax(0, 1fr) minmax(170px, auto);
  min-height: 92px;
  padding: 15px 0;
}
#page-profile .security-actions:first-child { border-top: 0; }
#page-profile .security-actions .btn { width: 100%; max-width: 210px; justify-self: end; }
#page-profile .account-security-card > .form-message { min-height: 0; }

#page-settings .admin-profile-settings-card {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto 13px;
  padding: 18px 20px;
}
#page-settings .admin-profile-settings-main {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(230px, auto);
  gap: 16px;
  align-items: center;
}
#page-settings .admin-settings-avatar {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  background: linear-gradient(145deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 26px;
  font-weight: 900;
}
#page-settings .admin-settings-identity { min-width: 0; }
#page-settings .admin-settings-identity h3 { margin: 0; font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
#page-settings .admin-settings-identity .panel-description { margin: 4px 0 0; font-size: 12px; }
#page-settings .admin-settings-identity .account-badges { margin-top: 8px; }
#page-settings .admin-settings-photo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: center;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
#page-settings .admin-settings-photo-actions .btn { width: 100%; min-width: 0; }
#page-settings .admin-settings-photo-actions small { grid-column: 1 / -1; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
#page-settings #adminProfilePhotoMessage { min-height: 0; margin-top: 8px; }
#page-settings #adminProfilePhotoMessage:empty { display: none; }
#page-settings > #settingsForm { margin-top: 0; }

@media (max-width: 1050px) {
  #page-profile .account-profile-hero { grid-template-columns: 104px minmax(0, 1fr); }
  #page-profile .account-photo-panel { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0; padding: 16px 0 0; }
  #page-profile .account-photo-actions { max-width: 410px; }
  #page-profile .account-details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #page-profile .account-settings-columns { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  #page-settings .admin-profile-settings-main { grid-template-columns: 64px minmax(0, 1fr); }
  #page-settings .admin-settings-avatar { width: 64px; height: 64px; border-radius: 17px; font-size: 23px; }
  #page-settings .admin-settings-photo-actions { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0; padding: 14px 0 0; }
}

@media (max-width: 680px) {
  .nav-group-label { padding-left: 13px; }
  #page-profile .account-settings-grid { gap: 12px; }
  #page-profile .account-profile-card,
  #page-profile .account-preferences-card,
  #page-profile .account-security-card { padding: 16px; }
  #page-profile .account-profile-hero { grid-template-columns: 1fr; gap: 13px; text-align: center; }
  #page-profile .profile-avatar { justify-self: center; width: 96px; height: 96px; border-radius: 24px; font-size: 33px; }
  #page-profile .account-headline { margin-top: 5px; }
  #page-profile .account-badges { justify-content: center; margin-top: 10px; }
  #page-profile .account-badge { min-height: 25px; padding: 4px 9px; font-size: 10px; }
  #page-profile .account-photo-panel { padding-top: 14px; }
  #page-profile .account-photo-actions { max-width: none; }
  #page-profile .account-photo-panel > small { text-align: center; }
  #page-profile .account-details-grid { grid-template-columns: 1fr; gap: 8px; margin-top: 16px; padding-top: 14px; text-align: left; }
  #page-profile .account-details-grid > div { min-height: 0; padding: 10px 11px; }
  #page-profile .account-preferences-grid { grid-template-columns: 1fr; }
  #page-profile .account-preferences-grid .field-wide { grid-column: auto; }
  #page-profile .account-preferences-card .form-actions { padding-top: 16px; }
  #page-profile .account-preferences-card .form-actions .btn { width: 100%; }
  #page-profile .security-actions { grid-template-columns: 1fr; gap: 11px; min-height: 0; padding: 14px 0; }
  #page-profile .security-actions .btn { max-width: none; justify-self: stretch; }
  #page-settings .admin-profile-settings-card { padding: 15px; }
  #page-settings .admin-profile-settings-main { grid-template-columns: 1fr; text-align: center; }
  #page-settings .admin-settings-avatar { justify-self: center; }
  #page-settings .admin-settings-identity .account-badges { justify-content: center; }
  #page-settings .admin-settings-photo-actions { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 390px) {
  #page-profile .account-photo-actions,
  #page-settings .admin-settings-photo-actions { grid-template-columns: 1fr; }
  #page-settings .admin-settings-photo-actions small { grid-column: auto; }
}

/* Daftar pegawai pada Master Data memakai identitas dan badge yang seimbang. */
#page-master .master-profile-account,
#page-master .master-profile-identity { min-width: 0; }
#page-master .master-profile-account > strong,
#page-master .master-profile-identity > strong { display: block; overflow-wrap: anywhere; }

/* Penyelarasan akhir v1.0.31: badge tidak melebar/bertumpuk dan kartu sejajar. */
.account-badge-unit {
  max-width: min(230px, 100%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}
#page-profile .account-details-grid { grid-auto-rows: 1fr; }
#page-profile .account-details-grid > div { height: 100%; }
#page-profile .account-preferences-card > .panel-head,
#page-profile .account-security-card > .panel-head { min-height: 86px; }
#page-profile .account-preferences-card .field select,
#page-profile .account-preferences-card .field input { width: 100%; }
#page-settings .admin-profile-settings-card .account-badge-unit { max-width: 190px; }

@media (max-width: 1050px) {
  #page-profile .account-preferences-card > .panel-head,
  #page-profile .account-security-card > .panel-head { min-height: 0; }
}

@media (max-width: 680px) {
  .account-badge-unit { max-width: min(260px, 100%); }
  #page-profile .account-details-grid { grid-auto-rows: auto; }
  #page-profile .account-details-grid > div { height: auto; }
}


/* ========================================================================== */
/* e-Register Simpala v1.0.31 - preferensi tampilan aktif dan profil laptop   */
/* ========================================================================== */

/* Sapaan dashboard selalu satu baris; JavaScript menurunkan ukuran bila perlu. */
.welcome-card > div { min-width: 0; }
#welcomeName {
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  overflow: visible;
  font-size: clamp(24px, 2.55vw, 36px);
  line-height: 1.12;
}

.field-help {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.35;
}

/* Mode tabel ringkas dibuat terasa pada seluruh representasi data, bukan hanya
   dua jenis kartu seperti implementasi lama. Ukuran font tetap terbaca. */
body.compact-mode .data-table { font-size: 11.5px; }
body.compact-mode .data-table th {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
  font-size: 9.5px !important;
  line-height: 1.25 !important;
}
body.compact-mode .data-table td {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
  line-height: 1.3 !important;
}
body.compact-mode #page-register .data-table td,
body.compact-mode #page-register .table-number,
body.compact-mode #page-register .table-subject strong { font-size: 12.5px !important; line-height: 1.3 !important; }
body.compact-mode #page-register .table-subject span,
body.compact-mode #page-register .data-table td small { font-size: 11.5px !important; line-height: 1.3 !important; }
body.compact-mode .data-table .status-badge { padding: 3px 7px; font-size: 9px; }
body.compact-mode .data-table .btn-small,
body.compact-mode #page-register .table-actions .btn-small { min-height: 29px; padding: 4px 7px; font-size: 10.5px; }
body.compact-mode .filter-grid { gap: 8px; margin-bottom: 13px; padding: 11px; }
body.compact-mode .pagination { margin-top: 10px; }
body.compact-mode .register-card,
body.compact-mode .recent-item,
body.compact-mode .audit-item { gap: 10px; padding-top: 8px; padding-bottom: 8px; }
body.compact-mode .master-row,
body.compact-mode #page-master .master-row,
body.compact-mode #page-master .master-row-profile { min-height: 0; gap: 8px; padding: 8px 10px; }
body.compact-mode #page-master .master-row,
body.compact-mode #page-master .master-row strong { font-size: 12.5px; line-height: 1.3; }
body.compact-mode #page-master .master-row small,
body.compact-mode #page-master .master-profile-identity small,
body.compact-mode #page-master .master-profile-unit { font-size: 11.5px; line-height: 1.3; }
body.compact-mode #page-master .master-profile-badges { gap: 4px; margin-top: 5px; }
body.compact-mode #page-master .master-profile-badges .account-badge { min-height: 21px; padding: 3px 7px; font-size: 9px; }
body.compact-mode .health-card { gap: 8px; padding: 9px 10px; }
body.compact-mode .empty-state { padding-top: 18px; padding-bottom: 18px; }

/* Reduce motion bekerja untuk preferensi akun maupun preferensi sistem. */
html.reduce-motion { scroll-behavior: auto !important; }
body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  scroll-behavior: auto !important;
  animation: none !important;
  transition: none !important;
  caret-color: auto;
}
body.reduce-motion .boot-spinner { animation: none !important; border-top-color: rgba(18,63,54,.14); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Laptop pendek (termasuk 1366x768): seluruh halaman Pengaturan muat tanpa scroll. */
@media (min-width: 1051px) and (max-height: 820px) {
  #page-profile .account-settings-grid { gap: 8px; }
  #page-profile .account-profile-card { padding: 10px 14px; }
  #page-profile .account-profile-hero {
    grid-template-columns: 90px minmax(0, 1fr) minmax(225px, 255px);
    gap: 12px;
 }
  #page-profile .profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    font-size: 31px;
    box-shadow: 0 4px 13px rgba(18,63,54,.1);
 }
  #page-profile .account-identity h3 { font-size: clamp(18px, 1.75vw, 22px); line-height: 1.1; }
  #page-profile .account-headline { margin-top: 3px; font-size: 10.5px; line-height: 1.25; }
  #page-profile .account-badges { gap: 4px; margin-top: 5px; }
  #page-profile .account-photo-panel { padding-left: 12px; }
  #page-profile .account-photo-actions { gap: 5px; }
  #page-profile .account-photo-actions .btn { min-height: 31px; padding: 5px 8px; font-size: 10px; }
  #page-profile .account-photo-panel > small { margin-top: 4px; font-size: 8.5px; line-height: 1.2; }
  #page-profile .account-photo-panel .form-message { margin-top: 3px; font-size: 9.5px; }
  #page-profile .account-details-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
    margin-top: 8px;
    padding-top: 7px;
 }
  #page-profile .account-details-grid > div { min-height: 45px; padding: 5px 7px; border-radius: 8px; }
  #page-profile .account-details-grid dt { font-size: 7.5px; }
  #page-profile .account-details-grid dd { margin-top: 2px; font-size: 9.5px; line-height: 1.18; }
  #page-profile .account-settings-columns { gap: 8px; }
  #page-profile .account-preferences-card,
  #page-profile .account-security-card { padding: 10px 13px; }
  #page-profile .account-preferences-card > .panel-head,
  #page-profile .account-security-card > .panel-head { min-height: 43px; margin-bottom: 7px; }
  #page-profile .panel-head h3 { font-size: 14px; }
  #page-profile .panel-description { margin-top: 2px; font-size: 9px; line-height: 1.2; }
  #page-profile .account-preferences-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px 7px;
 }
  #page-profile .account-preferences-grid .field-wide { grid-column: span 2; }
  #page-profile .account-preferences-grid .field { grid-column: span 2; gap: 3px; }
  #page-profile .account-preferences-card .field > span { font-size: 9px; }
  #page-profile .account-preferences-card .field input,
  #page-profile .account-preferences-card .field select { padding: 5px 7px; border-radius: 8px; }
  #page-profile .field-help { margin-top: 2px; font-size: 8px; line-height: 1.15; }
  #page-profile .account-preferences-card .form-actions { padding-top: 7px; margin-top: 0; }
  #page-profile .account-preferences-card .form-actions .btn { min-height: 31px; padding: 5px 9px; font-size: 10px; }
  #page-profile .security-actions {
    grid-template-columns: minmax(0, 1fr) minmax(125px, 155px);
    min-height: 53px;
    gap: 8px;
    padding: 6px 0;
 }
  #page-profile .security-actions strong { margin-bottom: 1px; font-size: 10px; }
  #page-profile .security-actions span { font-size: 8.5px; line-height: 1.2; }
  #page-profile .security-actions .btn { min-height: 31px; max-width: 155px; padding: 5px 8px; font-size: 9.5px; }
  #page-profile .form-message { margin-top: 4px; font-size: 9.5px; }
}

/* v1.0.35 - penyesuaian sangat ringan Full HD tanpa mengubah struktur lama */
@media (min-width: 1051px) and (min-height: 821px) and (max-height: 1080px) {
  /* Halaman Pengaturan tetap memakai proporsi lama; hanya ruang kosong luar dan jarak vertikal dipangkas sedikit. */
  #page-profile { margin-top: -10px; margin-bottom: -18px; }
  #page-profile .account-settings-grid { gap: 12px; }
  #page-profile .account-profile-card { padding: 16px 22px; }
  #page-profile .account-profile-hero {
    grid-template-columns: 106px minmax(0, 1fr) minmax(245px, 285px);
    gap: 18px;
 }
  #page-profile .profile-avatar {
    width: 106px;
    height: 106px;
    border-radius: 26px;
    font-size: 36px;
 }
  #page-profile .account-headline { margin-top: 5px; line-height: 1.4; }
  #page-profile .account-badges { margin-top: 9px; }
  #page-profile .account-photo-panel { padding-left: 18px; }
  #page-profile .account-photo-panel > small { margin-top: 7px; line-height: 1.4; }
  #page-profile .account-photo-panel .form-message { margin-top: 6px; }
  #page-profile .account-details-grid {
    gap: 9px;
    margin-top: 13px;
    padding-top: 11px;
 }
  #page-profile .account-details-grid > div {
    min-height: 64px;
    padding: 8px 11px;
 }
  #page-profile .account-details-grid dd { margin-top: 4px; line-height: 1.38; }
  #page-profile .account-settings-columns { gap: 12px; }
  #page-profile .account-preferences-card,
  #page-profile .account-security-card { padding: 15px 20px; }
  #page-profile .account-preferences-card > .panel-head,
  #page-profile .account-security-card > .panel-head {
    min-height: 68px;
    margin-bottom: 13px;
 }
  #page-profile .account-preferences-grid { gap: 10px 14px; }
  #page-profile .account-preferences-card .form-actions { padding-top: 12px; }
  #page-profile .security-actions {
    min-height: 76px;
    padding: 10px 0;
 }

  /* Ambil Nomor tetap dua kolom dan urutan lama; hanya tinggi elemen diringankan. */
  #page-issue #issueForm { padding-top: 22px; padding-bottom: 22px; }
  #page-issue #issueForm .panel-head { margin-bottom: 16px; }
  #page-issue #issueForm .form-grid { gap: 13px 16px; }
  #page-issue #issueForm .field { gap: 6px; }
  #page-issue #issueForm .field input,
  #page-issue #issueForm .field select {
    min-height: 42px;
    padding-top: 9px;
    padding-bottom: 9px;
 }
  #page-issue #issueForm .field textarea {
    min-height: 78px;
    padding-top: 9px;
    padding-bottom: 9px;
 }
  #page-issue .issue-warning {
    margin-top: 14px;
    padding: 11px 14px;
 }
  #page-issue .form-actions { margin-top: 16px; }
  #page-issue #issueMessage { margin-top: 8px; }
  #page-issue #issueMessage:empty { display: none; }
}

/* ========================================================================== */
/* e-Register Simpala v1.0.36 - patch tampilan terbatas                       */
/* ========================================================================== */

/* Ikon sidebar modern dan spesifik tanpa library eksternal. */
.nav-item .nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: #9fc2b9;
}
.nav-item .nav-label { width: auto; min-width: 0; color: inherit; font-size: inherit; text-align: left; }
.nav-item:hover .nav-icon,
.nav-item.active .nav-icon { color: #fff; }

/* Audit Aktivitas dibuat lebih padat, seimbang, dan tetap mudah dibaca. */
#page-audit .audit-panel-head .panel-description { margin-top: 2px; font-size: 11px; line-height: 1.28; }
#page-audit .audit-item {
  grid-template-columns: 122px minmax(145px,.58fr) minmax(0,1.42fr);
  gap: 9px;
}
#page-audit .audit-item > div + div { padding-left: 10px; }

/* Nomor Saya v1.0.64: tabel mengikuti sistem visual Buku Register. */
#page-mine > .panel { padding: 19px 21px; }
#page-mine .panel-head { margin-bottom: 12px; }
#page-mine .mine-data-table {
  min-width: 1040px;
  table-layout: fixed;
  font-size: 13px;
  line-height: 1.32;
}
#page-mine .mine-data-table th {
  padding: 8px 7px;
  font-size: 11.5px;
  line-height: 1.22;
  letter-spacing: .035em;
  text-align: center;
  vertical-align: middle;
}
#page-mine .mine-data-table td {
  padding: 8px 7px;
  font-size: 13px;
  line-height: 1.32;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
#page-mine .mine-data-table th:nth-child(1),
#page-mine .mine-data-table td:nth-child(1) { width: 44px; }
#page-mine .mine-data-table th:nth-child(2),
#page-mine .mine-data-table td:nth-child(2) { width: 185px; }
#page-mine .mine-data-table th:nth-child(3),
#page-mine .mine-data-table td:nth-child(3) { width: 100px; }
#page-mine .mine-data-table th:nth-child(4),
#page-mine .mine-data-table td:nth-child(4) { width: 285px; }
#page-mine .mine-data-table th:nth-child(6),
#page-mine .mine-data-table td:nth-child(6) { width: 90px; }
#page-mine .mine-data-table td:nth-child(1),
#page-mine .mine-data-table td:nth-child(6),
#page-mine .mine-data-table td:nth-child(7) { text-align: center; }
#page-mine .mine-data-table td:nth-child(1),
#page-mine .mine-data-table td:nth-child(6) { vertical-align: top; }
#page-mine .table-number,
#page-mine .table-subject strong { font-size: 13px; line-height: 1.32; }
#page-mine .table-subject span { margin-top: 3px; font-size: 12px; line-height: 1.32; }
#page-mine .mine-data-table td small { font-size: 12px; line-height: 1.32; }
#page-mine .table-actions {
  align-items: center;
  justify-content: center;
}
#page-mine .table-actions .action-btn {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 10.25px;
}
#page-mine .status-badge { padding: 4px 8px; font-size: 11px; }

@media (min-width: 901px) and (max-width: 1440px) {
  #page-mine .mine-data-table { min-width: 900px; }
  #page-mine .mine-data-table th:nth-child(1),
  #page-mine .mine-data-table td:nth-child(1) { width: 38px; }
  #page-mine .mine-data-table th:nth-child(2),
  #page-mine .mine-data-table td:nth-child(2) { width: 150px; }
  #page-mine .mine-data-table th:nth-child(3),
  #page-mine .mine-data-table td:nth-child(3) { width: 84px; }
  #page-mine .mine-data-table th:nth-child(4),
  #page-mine .mine-data-table td:nth-child(4) { width: 220px; }
  #page-mine .mine-data-table th:nth-child(6),
  #page-mine .mine-data-table td:nth-child(6) { width: 72px; }
  #page-mine .mine-data-table th,
  #page-mine .mine-data-table td { padding-inline: 6px; }
}

@media (max-width: 680px) {
  #page-mine > .panel { padding: 14px; }
  #page-mine .mine-table-wrap { width: 100%; max-width: 100%; overflow: visible; border: 0; }
  #page-mine .mine-data-table { display: block; width: 100% !important; min-width: 0 !important; border: 0; table-layout: auto; }
  #page-mine .mine-data-table thead { display: none; }
  #page-mine .mine-data-table tbody { display: grid; width: 100%; gap: 12px; }
  #page-mine .mine-data-table tr { display: grid; width: 100%; overflow: hidden; border: 1px solid #cbd7d1; border-radius: 11px; background: #fff; }
  #page-mine .mine-data-table td {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    width: 100% !important;
    min-width: 0;
    padding: 9px 10px;
    border-width: 1px 0 0;
    border-color: #dbe4df;
    text-align: left !important;
    vertical-align: top !important;
  }
  #page-mine .mine-data-table td:first-child { border-top: 0; }
  #page-mine .mine-data-table td::before { content: attr(data-label); color: #53645d; font-size: 10px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
  #page-mine .mine-data-table td > *,
  #page-mine .table-number,
  #page-mine .table-subject,
  #page-mine .table-subject strong,
  #page-mine .table-subject span,
  #page-mine .table-actions { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  #page-register .action-buttons,
  #page-mine .action-buttons,
  #page-master .master-table-actions.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #page-register .action-buttons > .action-btn,
  #page-mine .action-buttons > .action-btn,
  #page-master .master-table-actions.action-buttons > .action-btn { width: 100%; }
  #page-register .action-buttons > .action-btn:last-child:nth-child(odd),
  #page-mine .action-buttons > .action-btn:last-child:nth-child(odd),
  #page-master .master-table-actions.action-buttons > .action-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
  #page-master .master-table-profiles .master-table-actions.action-buttons > .action-btn:last-child:nth-child(odd) {
    grid-column: auto;
  }
  #page-mine .table-empty { display: block !important; text-align: center !important; }
  #page-mine .table-empty::before { content: none; }
}

/* ========================================================================== */
/* e-Register Simpala v1.0.37 - footer laptop dan dashboard HP lebih compact */
/* ========================================================================== */

/* Hanya layar laptop/desktop: tulisan hak cipta diperbesar 2px dan semi-bold. */
@media (min-width: 901px) {
  .app-signature {
    font-size: 14px;
    font-weight: 600;
 }
  .app-signature-main {
    font-size: 13px;
 }
}

/* Hanya layar HP: dashboard dirapatkan sedikit tanpa mengubah susunan/fungsi. */
@media (max-width: 680px) {
  #page-dashboard .welcome-card {
    gap: 16px;
    padding: 22px;
 }
  #page-dashboard .welcome-card h2 { margin-bottom: 7px; }
  #page-dashboard .welcome-card p:last-child { line-height: 1.5; }

  #page-dashboard .stats-grid {
    gap: 8px;
    margin: 14px 0;
 }
  #page-dashboard .stat-card {
    min-height: 112px;
    padding: 14px;
 }

  #page-dashboard .two-column { gap: 14px; }
  #page-dashboard .two-column > .panel { padding: 15px; }

  /* Kartu Panduan Singkat dibuat paling terasa ringkas pada arah vertikal. */
  #page-dashboard .two-column > .panel:last-child { padding: 14px 15px; }
  #page-dashboard .two-column > .panel:last-child .panel-head { margin-bottom: 11px; }
  #page-dashboard .two-column > .panel:last-child .steps {
    gap: 10px;
    padding-left: 20px;
    font-size: 12.5px;
    line-height: 1.45;
 }
}

@media (max-width: 420px) {
  #page-dashboard .stat-card { min-height: 100px; }
}

/* ========================================================================== */
/* e-Register Simpala v1.0.64 - Master Data kartu pegawai + tabel master umum */
/* ========================================================================== */

/* Tab Pegawai tetap berbentuk kartu dua kolom yang simetris. */
#page-master .master-list {
  gap: 12px;
  align-items: stretch;
}
#page-master .master-row-profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 146px;
  padding: 13px 14px;
  border: 1px solid #cbd7d1;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(31, 66, 55, .05);
}
#page-master .master-row-profile > .master-profile-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  min-width: 0;
  height: 100%;
}
#page-master .master-profile-identity {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}
#page-master .master-profile-name {
  display: block;
  max-width: 100%;
  color: #20342b;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.32;
  letter-spacing: -.08px;
  overflow-wrap: anywhere;
}
#page-master .master-profile-nip,
#page-master .master-profile-job,
#page-master .master-profile-unit { display: block; max-width: 100%; overflow-wrap: anywhere; }
#page-master .master-profile-nip {
  margin-top: 4px;
  color: #53645c;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
}
#page-master .master-profile-job {
  margin-top: 7px;
  color: #304b3f;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.38;
}
#page-master .master-profile-unit {
  margin-top: 3px;
  color: #65756d;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.38;
}
#page-master .master-profile-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  margin: 0;
}
#page-master .master-profile-badges .account-badge,
#page-master .master-data-table .account-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  min-height: 24px;
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  font-size: 9.75px;
  font-weight: 760;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}
#page-master .account-badge-active { background: #d8ece2; color: #205f46; }
#page-master .account-badge-inactive { background: #efd9d6; color: #874039; }
#page-master .account-badge-role { min-width: 74px; }
#page-master .account-badge-role-admin { background: #dce7f1; color: #365d7b; }
#page-master .account-badge-role-operator { background: #e5e0ef; color: #5c4d78; }
#page-master .account-badge-role-auditor { background: #eee7d3; color: #695827; }

/* Seluruh tab Master Data menggunakan struktur tabel dan ritme visual yang konsisten. */
#page-master .master-table-wrap { margin-top: 12px; border-radius: 11px; }
#page-master .master-data-table {
  width: 100%;
  min-width: 840px;
  table-layout: fixed;
  font-family: var(--font-ui);
  font-size: 12.5px;
  line-height: 1.32;
}
#page-master .master-data-table th {
  padding: 9px 7px;
  background: #e7eeea;
  color: #2f433a;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 780;
  line-height: 1.22;
  letter-spacing: .03em;
  text-align: center;
  text-transform: uppercase;
  vertical-align: middle;
}
#page-master .master-data-table td {
  padding: 8px 8px;
  color: #33443d;
  font-size: 12.5px;
  line-height: 1.32;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
#page-master .master-data-table td strong { color: #263b32; font-weight: 680; }
#page-master .master-data-table td:first-child,
#page-master .master-data-table td:nth-last-child(2),
#page-master .master-data-table td:last-child {
  text-align: center;
  vertical-align: middle;
}
#page-master .master-table-profiles td:nth-child(6),
#page-master .master-table-profiles td:nth-child(7) {
  text-align: center;
  vertical-align: middle;
}
#page-master .master-table-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  justify-content: stretch;
  gap: 5px;
  width: 100%;
}
#page-master .master-table-profiles .master-table-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#page-master .master-table-actions .action-btn {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 5px 7px;
  line-height: 1.15;
}

#page-master .master-table-profiles { min-width: 1010px; }
#page-master .master-table-profiles th:nth-child(1), #page-master .master-table-profiles td:nth-child(1) { width: 42px; }
#page-master .master-table-profiles th:nth-child(2), #page-master .master-table-profiles td:nth-child(2) { width: 155px; }
#page-master .master-table-profiles th:nth-child(3), #page-master .master-table-profiles td:nth-child(3) { width: 145px; }
#page-master .master-table-profiles th:nth-child(4), #page-master .master-table-profiles td:nth-child(4) { width: 165px; }
#page-master .master-table-profiles th:nth-child(5), #page-master .master-table-profiles td:nth-child(5) { width: 135px; }
#page-master .master-table-profiles th:nth-child(6), #page-master .master-table-profiles td:nth-child(6) { width: 90px; }
#page-master .master-table-profiles th:nth-child(7), #page-master .master-table-profiles td:nth-child(7) { width: 78px; }
#page-master .master-table-profiles th:nth-child(8), #page-master .master-table-profiles td:nth-child(8) { width: 200px; }
#page-master .master-table-profiles .master-profile-nip-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
#page-master .master-table-profiles .master-profile-job-cell { font-weight: 680; }
#page-master .master-table-profiles .master-table-actions .action-btn { padding-inline: 6px; }

#page-master .master-table-units { min-width: 1020px; }
#page-master .master-table-units th:nth-child(1), #page-master .master-table-units td:nth-child(1) { width: 42px; }
#page-master .master-table-units th:nth-child(2), #page-master .master-table-units td:nth-child(2) { width: 90px; }
#page-master .master-table-units th:nth-child(3), #page-master .master-table-units td:nth-child(3) { width: 255px; }
#page-master .master-table-units th:nth-child(4), #page-master .master-table-units td:nth-child(4) { width: 125px; }
#page-master .master-table-units th:nth-child(5), #page-master .master-table-units td:nth-child(5) { width: 210px; }
#page-master .master-table-units th:nth-child(6), #page-master .master-table-units td:nth-child(6) { width: 82px; }
#page-master .master-table-units th:nth-child(7), #page-master .master-table-units td:nth-child(7) { width: 216px; }
#page-master .master-table-units .master-unit-name { white-space: nowrap; }

#page-master .master-table-classifications { min-width: 760px; }
#page-master .master-table-classifications th:nth-child(1), #page-master .master-table-classifications td:nth-child(1) { width: 42px; }
#page-master .master-table-classifications th:nth-child(2), #page-master .master-table-classifications td:nth-child(2) { width: 145px; }
#page-master .master-table-classifications th:nth-child(3), #page-master .master-table-classifications td:nth-child(3) { width: 280px; }
#page-master .master-table-classifications th:nth-child(4), #page-master .master-table-classifications td:nth-child(4) { width: 82px; }
#page-master .master-table-classifications th:nth-child(5), #page-master .master-table-classifications td:nth-child(5) { width: 220px; }

#page-master .master-table-letter_types { min-width: 720px; }
#page-master .master-table-letter_types th:nth-child(1), #page-master .master-table-letter_types td:nth-child(1) { width: 42px; }
#page-master .master-table-letter_types th:nth-child(2), #page-master .master-table-letter_types td:nth-child(2) { width: 330px; }
#page-master .master-table-letter_types th:nth-child(3), #page-master .master-table-letter_types td:nth-child(3) { width: 82px; text-align: center; }
#page-master .master-table-letter_types th:nth-child(4), #page-master .master-table-letter_types td:nth-child(4) { width: 82px; }
#page-master .master-table-letter_types th:nth-child(5), #page-master .master-table-letter_types td:nth-child(5) { width: 220px; }

#page-master .master-table-signatories { min-width: 1040px; }
#page-master .master-table-signatories th:nth-child(1), #page-master .master-table-signatories td:nth-child(1) { width: 42px; }
#page-master .master-table-signatories th:nth-child(2), #page-master .master-table-signatories td:nth-child(2) { width: 220px; }
#page-master .master-table-signatories th:nth-child(3), #page-master .master-table-signatories td:nth-child(3) { width: 170px; }
#page-master .master-table-signatories th:nth-child(4), #page-master .master-table-signatories td:nth-child(4) { width: 230px; }
#page-master .master-table-signatories th:nth-child(5), #page-master .master-table-signatories td:nth-child(5) { width: 72px; text-align: center; }
#page-master .master-table-signatories th:nth-child(6), #page-master .master-table-signatories td:nth-child(6) { width: 82px; }
#page-master .master-table-signatories th:nth-child(7), #page-master .master-table-signatories td:nth-child(7) { width: 220px; }

@media (max-width: 680px) {
  #page-master .master-table-wrap { width: 100%; max-width: 100%; overflow: visible; border: 0; }
  #page-master .master-data-table { display: block; width: 100% !important; min-width: 0 !important; border: 0; table-layout: auto; }
  #page-master .master-data-table thead { display: none; }
  #page-master .master-data-table tbody { display: grid; gap: 10px; }
  #page-master .master-data-table tr { display: grid; overflow: hidden; border: 1px solid #cbd7d1; border-radius: 11px; background: #fff; }
  #page-master .master-data-table td {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    width: 100% !important;
    padding: 9px 10px;
    border-width: 1px 0 0;
    text-align: left !important;
    vertical-align: top !important;
  }
  #page-master .master-data-table td:first-child { border-top: 0; }
  #page-master .master-data-table td::before { content: attr(data-label); color: #53645d; font-size: 10px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
  #page-master .master-data-table .table-empty { display: block !important; text-align: center !important; }
  #page-master .master-data-table .table-empty::before { content: none; }
}


/* ========================================================================== */
/* e-Register Simpala v1.0.64 - proporsi Master Data, Nomor Saya, dan Audit   */
/* ========================================================================== */

/* CTA Master Data: tombol halaman tidak mendominasi judul; tombol form sejajar input. */
#page-master .master-create-user-btn {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.2;
  box-shadow: none;
  white-space: nowrap;
}
#page-master .inline-form > .btn-primary {
  align-self: stretch;
  min-height: 44px;
  height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.2;
  box-shadow: none;
  white-space: nowrap;
}

/* Isi kolom identitas/nomor dibuat semi-bold tanpa memberatkan seluruh tabel. */
#page-master .master-table-profiles td:nth-child(1),
#page-master .master-table-profiles td:nth-child(3),
#page-master .master-table-profiles td:nth-child(5),
#page-master .master-table-units td:nth-child(1),
#page-master .master-table-units td:nth-child(3),
#page-master .master-table-units td:nth-child(4),
#page-master .master-table-units td:nth-child(5),
#page-master .master-table-classifications td:nth-child(1),
#page-master .master-table-letter_types td:nth-child(1),
#page-master .master-table-letter_types td:nth-child(3),
#page-master .master-table-signatories td:nth-child(1),
#page-master .master-table-signatories td:nth-child(3),
#page-master .master-table-signatories td:nth-child(5) {
  font-weight: 650;
}

/* Font badge dan tombol naik 1px; ukuran kotak tetap sama. */
#page-master .master-data-table .account-badge {
  font-size: 10.75px;
}
#page-master .master-table-actions .action-btn {
  font-size: 11px;
}
/* Pegawai dibedakan jelas dari status Aktif dengan nuansa biru-abu. */
#page-master .account-badge-role-employee {
  background: #e3e8f0;
  color: #44536f;
}

/* NIP sedikit dipadatkan dan ruangnya dialihkan ke Jabatan. */
#page-master .master-table-profiles th:nth-child(3),
#page-master .master-table-profiles td:nth-child(3) { width: 130px; }
#page-master .master-table-profiles th:nth-child(4),
#page-master .master-table-profiles td:nth-child(4) { width: 180px; }

/* Nomor Saya: tanpa Salin; Unit/Seksi lebih lebar dan tetap sebaris. */
#page-mine .mine-data-table th:nth-child(5),
#page-mine .mine-data-table td:nth-child(5) { width: 175px; }
#page-mine .mine-data-table th:nth-child(7),
#page-mine .mine-data-table td:nth-child(7) { width: 160px; }
#page-mine .mine-data-table td:nth-child(5) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Audit Aktivitas: tabel empat kolom dengan ritme, garis, dan hierarki jelas. */
#page-audit .audit-panel {
  padding: 18px 20px;
}
#page-audit .audit-panel-head {
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 14px;
  padding-bottom: 13px;
  border-bottom: 1px solid #d7e0dc;
}
#page-audit .audit-title-block { min-width: 0; }
#page-audit .audit-title-block .eyebrow { margin-bottom: 4px; }
#page-audit .audit-title-block h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.22;
}
#page-audit .audit-summary-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 6px;
}
#page-audit .audit-summary-line .panel-description {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}
#page-audit .audit-retention {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: #edf2f0;
  color: #52645c;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
#page-audit .audit-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
#page-audit .audit-panel-actions .btn {
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.15;
}
#page-audit #refreshAuditBtn {
  border: 1px solid #cbd7d1;
  background: #edf3f0;
  color: #2f5548;
}
#page-audit #refreshAuditBtn:hover { background: #e2ece7; }
#page-audit .audit-table {
  overflow: hidden;
  border: 1px solid #cbd7d1;
  border-radius: 11px;
  background: #fff;
}
#page-audit .audit-table-head,
#page-audit .audit-item {
  display: grid;
  grid-template-columns: 142px minmax(180px, .72fr) minmax(300px, 1.55fr) 105px;
  gap: 0;
}
#page-audit .audit-table-head {
  background: #e7eeea;
  color: #2f433a;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 780;
  line-height: 1.2;
  letter-spacing: .03em;
  text-align: center;
  text-transform: uppercase;
}
#page-audit .audit-table-head > span {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-right: 1px solid #cbd7d1;
}
#page-audit .audit-table-head > span:last-child { border-right: 0; }
#page-audit .audit-list {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
}
#page-audit .audit-list.empty-state {
  padding: 24px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}
#page-audit .audit-item {
  padding: 0;
  border: 0;
  border-top: 1px solid #d7e0dc;
  border-radius: 0;
  background: #fff;
  font-size: 12.5px;
  line-height: 1.34;
}
#page-audit .audit-item:first-child { border-top: 0; }
#page-audit .audit-item > div {
  min-width: 0;
  padding: 10px 11px;
  border-right: 1px solid #d7e0dc;
}
#page-audit .audit-item > div:last-child { border-right: 0; }
#page-audit .audit-time {
  color: #4f6159;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  text-align: center;
}
#page-audit .audit-item strong {
  color: #263b32;
  font-size: 12.5px;
  font-weight: 680;
  line-height: 1.34;
}
#page-audit .audit-item span {
  margin-top: 3px;
  color: #64736c;
  font-size: 11.5px;
  line-height: 1.34;
}
#page-audit .audit-source {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
#page-audit .audit-source-badge {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 999px;
  padding: 4px 8px;
  background: #e6ece9;
  color: #40564c;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  text-transform: capitalize;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 901px) and (max-width: 1440px) {
  #page-mine .mine-data-table th:nth-child(5),
  #page-mine .mine-data-table td:nth-child(5) { width: 150px; }
  #page-mine .mine-data-table th:nth-child(7),
  #page-mine .mine-data-table td:nth-child(7) { width: 150px; }

  #page-audit .audit-table-head,
  #page-audit .audit-item {
    grid-template-columns: 125px minmax(150px, .65fr) minmax(260px, 1.5fr) 92px;
  }
}

@media (max-width: 680px) {
  #page-master .wrap-head { gap: 12px; }
  #page-master .master-create-user-btn { width: 100%; min-height: 40px; }
  #page-master .inline-form > .btn-primary { width: 100%; }
  #page-mine .mine-data-table td:nth-child(5) { white-space: normal; overflow: visible; text-overflow: clip; }

  #page-audit .audit-panel { padding: 14px; }
  #page-audit .audit-panel-head {
    align-items: stretch;
    gap: 11px;
    margin-bottom: 12px;
    padding-bottom: 12px;
  }
  #page-audit .audit-panel-actions { width: 100%; }
  #page-audit .audit-panel-actions .btn { flex: 1 1 0; }
  #page-audit .audit-table { overflow: visible; border: 0; background: transparent; }
  #page-audit .audit-table-head { display: none; }
  #page-audit .audit-list { display: grid; gap: 10px; }
  #page-audit .audit-list.empty-state { border: 1px dashed #cbd7d1; border-radius: 11px; }
  #page-audit .audit-item {
    display: grid;
    grid-template-columns: 1fr;
    overflow: hidden;
    border: 1px solid #cbd7d1;
    border-radius: 11px;
  }
  #page-audit .audit-item:first-child { border-top: 1px solid #cbd7d1; }
  #page-audit .audit-item > div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: start;
    gap: 9px;
    padding: 9px 10px;
    border: 0;
    border-top: 1px solid #dbe4df;
    text-align: left;
  }
  #page-audit .audit-item > div:first-child { border-top: 0; }
  #page-audit .audit-item > div::before {
    content: attr(data-label);
    color: #53645d;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .035em;
    line-height: 1.35;
    text-transform: uppercase;
  }
  #page-audit .audit-source { justify-content: start; }
  #page-audit .audit-source-badge { justify-self: start; }
}

/* ========================================================================== */

/* ========================================================================== */
/* e-Register Simpala v1.0.64 - Pengaturan, profil, dan kontrol yang seragam */
/* ========================================================================== */
#page-settings .register-control-panel { padding: 17px 18px; }
#page-settings .register-control-panel-head { align-items: center; }
#page-settings .register-control-panel-head > div { min-width: 0; }
#page-settings .register-control-panel-head > .btn { flex: 0 0 auto; min-width: 150px; }
#page-settings .register-control-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 12px;
  align-items: stretch;
}
#page-settings .register-control-card {
  min-width: 0;
  border: 1px solid #d8e2dd;
  border-radius: 13px;
  padding: 14px;
  background: #fbfcfc;
}
#page-settings .settings-block-head { min-height: 76px; margin-bottom: 11px; }
#page-settings .settings-block-head .eyebrow { margin-bottom: 3px; }
#page-settings .settings-block-head h4 {
  margin: 0;
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}
#page-settings .settings-block-head p:last-child {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11.75px;
  line-height: 1.4;
}
#page-settings .register-control-card .sequence-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 9px;
}
#page-settings .register-control-card .sequence-card {
  min-height: 62px;
  padding: 8px 10px;
  border-radius: 10px;
}
#page-settings .register-control-card .sequence-card span { font-size: 10.5px; }
#page-settings .register-control-card .sequence-card strong { font-size: 15px; }
#page-settings .register-control-card .sequence-card small { font-size: 10px; }
#page-settings .register-control-card .sequence-form,
#page-settings .register-control-card .year-control-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 10px;
  align-items: start;
}
#page-settings .register-control-card .field-wide { grid-column: 1 / -1; }
#page-settings .register-control-card .field input,
#page-settings .register-control-card .field select { min-height: 38px; height: 38px; font-size: 12.5px; }
#page-settings .register-control-card .field textarea { min-height: 58px; font-size: 12.5px; }
#page-settings .register-control-card .field > span { font-size: 11.5px; font-weight: 650; }
#page-settings .register-control-card .year-status-card {
  min-height: 38px;
  height: auto;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 7px 9px;
  border-radius: 9px;
}
#page-settings .register-control-card .year-status-card strong { font-size: 12.5px; }
#page-settings .register-control-card .year-status-card small { font-size: 10.5px; }
#page-settings .settings-control-actions { align-items: stretch; }
#page-settings .settings-control-actions .btn { flex: 1 1 0; min-width: 0; min-height: 38px; font-size: 12px; }
#page-settings .system-health-head { align-items: center; }
#page-settings .system-health-meta {
  margin: -2px 0 10px;
  border: 1px solid #dde5e1;
  border-radius: 9px;
  padding: 8px 10px;
  background: #f7f9f8;
  color: #52615b;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
}
#page-settings .health-card { grid-template-columns: 72px minmax(0, 1fr); align-items: center; }
#page-settings .health-card strong { font-size: 13px; font-weight: 700; }
#page-settings .health-card small { font-size: 11.5px; }
#page-settings .health-badge { min-width: 64px; border: 0; font-size: 10.5px; font-weight: 650; }

/* Badge profil menggunakan satu ukuran dan bobot semi-bold. */
#page-profile .account-badge,
#page-settings .admin-profile-settings-card .account-badge {
  min-height: 26px;
  border: 0;
  padding: 4px 10px;
  font-size: 10.75px;
  font-weight: 650;
  letter-spacing: .01em;
  line-height: 1.2;
}
#page-profile .account-badge-active,
#page-settings .account-badge-active { background: #dceee5; color: #245f48; }
#page-profile .account-badge-inactive,
#page-settings .account-badge-inactive { background: #f0ddda; color: #87433c; }
#page-profile .account-badge-role,
#page-settings .account-badge-role { background: #e2e8ef; color: #3e5870; }
#page-profile .account-badge-unit,
#page-settings .account-badge-unit { background: #ece8df; color: #625845; }

/* Tombol profil dan admin memiliki tinggi, font, serta ritme yang sama. */
#page-profile .account-photo-actions .btn,
#page-profile .security-actions .btn,
#page-profile .account-preferences-card .form-actions .btn,
#page-settings .admin-settings-photo-actions .btn {
  min-height: 36px;
  height: 36px;
  border-radius: 9px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
}
#page-profile .account-photo-actions,
#page-settings .admin-settings-photo-actions { gap: 7px; }
#page-profile .account-photo-panel > small,
#page-settings .admin-settings-photo-actions small {
  font-size: 10.5px;
  line-height: 1.4;
  text-align: center;
}
#page-profile .security-actions strong { font-weight: 650; }
#page-profile .account-preferences-card .field > span,
#page-profile .security-actions strong { font-size: 12.25px; }
#page-profile .account-preferences-card .field input,
#page-profile .account-preferences-card .field select { min-height: 40px; height: 40px; font-size: 13px; }

@media (min-width: 1051px) and (max-height: 820px) {
  #page-profile .account-badge { min-height: 22px; padding: 3px 8px; font-size: 9.75px; }
  #page-profile .account-photo-actions .btn,
  #page-profile .security-actions .btn,
  #page-profile .account-preferences-card .form-actions .btn { min-height: 33px; height: 33px; font-size: 10.75px; }
  #page-profile .account-preferences-card .field input,
  #page-profile .account-preferences-card .field select { min-height: 33px; height: 33px; font-size: 10.5px; }
}

@media (max-width: 1050px) {
  #page-settings .register-control-layout { grid-template-columns: 1fr; }
  #page-settings .settings-block-head { min-height: 0; }
}
@media (max-width: 680px) {
  #page-settings .register-control-panel-head > .btn { width: 100%; min-width: 0; }
  #page-settings .register-control-card { padding: 12px; }
  #page-settings .register-control-card .sequence-form,
  #page-settings .register-control-card .year-control-grid { grid-template-columns: 1fr; }
  #page-settings .register-control-card .field-wide { grid-column: auto; }
  #page-settings .register-control-card .sequence-summary { grid-template-columns: 1fr; }
  #page-settings .settings-control-actions { display: grid; grid-template-columns: 1fr; }
  #page-settings .system-health-head .toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  #page-settings .health-card { grid-template-columns: 64px minmax(0, 1fr); }
  #page-profile .account-badge,
  #page-settings .admin-profile-settings-card .account-badge { min-height: 24px; font-size: 10.25px; }
}

/* e-Register Simpala v1.0.64 - Cetak native adaptif portrait dan landscape   */
/* ========================================================================== */
.print-page-header { display: none; }

@media print {
  /* Orientasi sengaja tidak dikunci agar pilihan Portrait/Landscape browser berfungsi. */
  @page { margin: 9mm; }

  html,
  body {
    min-height: 0 !important;
    background: #ffffff !important;
    color: #17251f !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body { margin: 0 !important; }

  /* Chrome aplikasi tidak ikut dicetak; hanya isi halaman aktif. */
  .sidebar,
  .topbar,
  .sidebar-backdrop,
  .toast-region,
  .mobile-select-overlay,
  .app-signature,
  dialog { display: none !important; }

  .app-shell:not(.hidden),
  .app-main,
  .content {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .print-page-header {
    display: block !important;
    margin: 0 0 5mm;
    padding: 0 0 3.5mm;
    border-bottom: .45pt solid #9eaaa4;
  }
  .print-page-header .eyebrow {
    margin: 0 0 1.2mm;
    color: #52655d !important;
    font-size: 8pt;
    font-weight: 750;
    letter-spacing: .07em;
    text-transform: uppercase;
  }
  .print-page-header h1 {
    margin: 0;
    color: #173f35 !important;
    font-size: 17pt;
    line-height: 1.16;
    letter-spacing: -.015em;
  }
  .print-page-header p:last-child {
    margin: 1.2mm 0 0;
    color: #52655d !important;
    font-size: 8pt;
    line-height: 1.3;
  }

  /* Jangan pernah memaksa halaman lain tampil. */
  .page { display: none !important; }
  .page.active {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    animation: none !important;
  }
  .page.active,
  .page.active * {
    animation: none !important;
    transition: none !important;
  }

  /* Kontrol interaktif tidak dibutuhkan pada kertas/PDF. */
  .page.active button,
  .page.active .btn,
  .page.active .toolbar,
  .page.active .pagination,
  .page.active .table-actions,
  .page.active .master-table-actions,
  .page.active .form-actions,
  .page.active .filter-actions,
  .page.active .account-photo-actions,
  .page.active .admin-settings-photo-actions,
  .page.active .setup-actions,
  .page.active .tabs { display: none !important; }

  .page.active .panel,
  .page.active .welcome-card,
  .page.active .stat-card,
  .page.active .recent-card,
  .page.active .register-card,
  .page.active .master-row,
  .page.active .audit-item,
  .page.active .account-profile-card,
  .page.active .account-preferences-card,
  .page.active .account-security-card {
    box-shadow: none !important;
  }

  .page.active .panel {
    padding: 4mm !important;
    border-color: #aeb9b4 !important;
    border-radius: 3mm !important;
  }
  .page.active .panel-head { margin-bottom: 3mm !important; }
  .page.active .panel,
  .page.active .stat-card,
  .page.active .register-card,
  .page.active .master-row,
  .page.active .audit-item,
  .page.active .health-card,
  .page.active .sequence-card,
  .page.active .register-control-card,
  .page.active .account-details-grid > div {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .page.active input,
  .page.active select,
  .page.active textarea {
    min-height: 0 !important;
    padding: 2.2mm 2.5mm !important;
    background: #ffffff !important;
    color: #17251f !important;
    border-color: #9eaaa4 !important;
    box-shadow: none !important;
    font-size: 9pt !important;
  }
  .page.active textarea { height: auto !important; }
  .page.active .field > span { font-size: 8.5pt !important; }
  .page.active .field small,
  .page.active .panel-description { font-size: 7.5pt !important; }

  /* Dashboard diringkas tanpa menghilangkan isi. */
  #page-dashboard.active .welcome-card {
    padding: 5mm !important;
    border-radius: 3mm !important;
  }
  #page-dashboard.active .welcome-card h2 { font-size: 19pt !important; }
  #page-dashboard.active .welcome-card p:last-child { font-size: 8.5pt !important; line-height: 1.4 !important; }
  #page-dashboard.active .stats-grid { gap: 3mm !important; margin: 4mm 0 !important; }
  #page-dashboard.active .stat-card {
    min-height: 27mm !important;
    padding: 3.5mm !important;
  }
  #page-dashboard.active .stat-card strong { font-size: 18pt !important; }
  #page-dashboard.active #statLastNumber { font-size: 12pt !important; }
  #page-dashboard.active .two-column { gap: 3mm !important; }

  /* Pulihkan tabel dari mode kartu HP/tablet saat media cetak aktif. */
  .table-wrap {
    width: 100% !important;
    max-width: none !important;
    overflow: visible !important;
    border-radius: 0 !important;
  }
  .data-table {
    display: table !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    border-collapse: collapse !important;
  }
  .data-table thead { display: table-header-group !important; }
  .data-table tbody { display: table-row-group !important; }
  .data-table tr {
    display: table-row !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .data-table th,
  .data-table td {
    display: table-cell !important;
    border: .35pt solid #66746e !important;
    text-align: left;
    vertical-align: top !important;
  }
  .data-table td::before { content: none !important; display: none !important; }

  /* Judul panel yang sama dengan header cetak tidak perlu ditampilkan dua kali. */
  #page-register.active > .panel > .panel-head,
  #page-mine.active > .panel > .panel-head,
  #page-master.active > .panel > .panel-head { display: none !important; }

  /* Buku Register: lebar selalu mengikuti area cetak, baik portrait maupun landscape. */
  #page-register.active .filter-grid { display: none !important; }
  #page-register.active .panel,
  #page-mine.active .panel {
    border: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  #page-register.active .data-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    font-size: 8.2pt !important;
    line-height: 1.23 !important;
  }
  #page-register.active .data-table th {
    padding: 1.5mm 1.2mm !important;
    font-size: 7.2pt !important;
    line-height: 1.18 !important;
    text-align: center !important;
  }
  #page-register.active .data-table td {
    padding: 1.6mm 1.2mm !important;
    font-size: 8.2pt !important;
    line-height: 1.23 !important;
    overflow-wrap: anywhere;
  }
  #page-register.active .data-table th:nth-child(1),
  #page-register.active .data-table td:nth-child(1) { width: 4% !important; text-align: center !important; }
  #page-register.active .data-table th:nth-child(2),
  #page-register.active .data-table td:nth-child(2) { width: 18% !important; }
  #page-register.active .data-table th:nth-child(3),
  #page-register.active .data-table td:nth-child(3) { width: 11% !important; }
  #page-register.active .data-table th:nth-child(4),
  #page-register.active .data-table td:nth-child(4) { width: 27% !important; }
  #page-register.active .data-table th:nth-child(5),
  #page-register.active .data-table td:nth-child(5) { width: 13% !important; }
  #page-register.active .data-table th:nth-child(6),
  #page-register.active .data-table td:nth-child(6) { width: 19% !important; }
  #page-register.active .data-table th:nth-child(7),
  #page-register.active .data-table td:nth-child(7) { width: 8% !important; text-align: center !important; }
  #page-register.active .data-table th:nth-child(8),
  #page-register.active .data-table td:nth-child(8) { display: none !important; }
  #page-register.active .table-number,
  #page-register.active .table-subject strong { font-size: 8.2pt !important; line-height: 1.23 !important; }
  #page-register.active .table-subject span,
  #page-register.active .data-table td small { font-size: 7.2pt !important; line-height: 1.23 !important; }
  #page-register.active .table-creator-name,
  #page-register.active .table-creator small {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
  }
  #page-register.active .status-badge { padding: 1mm 1.5mm !important; font-size: 6.8pt !important; }

  /* Nomor Saya menggunakan proporsi tabel cetak yang sama dan tanpa kolom tombol kosong. */
  #page-mine.active .mine-data-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    font-size: 8.2pt !important;
    line-height: 1.23 !important;
  }
  #page-mine.active .mine-data-table th {
    padding: 1.5mm 1.2mm !important;
    font-size: 7.2pt !important;
    text-align: center !important;
  }
  #page-mine.active .mine-data-table td {
    padding: 1.6mm 1.2mm !important;
    font-size: 8.2pt !important;
  }
  #page-mine.active .mine-data-table th:nth-child(1),
  #page-mine.active .mine-data-table td:nth-child(1) { width: 5% !important; text-align: center !important; }
  #page-mine.active .mine-data-table th:nth-child(2),
  #page-mine.active .mine-data-table td:nth-child(2) { width: 21% !important; }
  #page-mine.active .mine-data-table th:nth-child(3),
  #page-mine.active .mine-data-table td:nth-child(3) { width: 12% !important; }
  #page-mine.active .mine-data-table th:nth-child(4),
  #page-mine.active .mine-data-table td:nth-child(4) { width: 34% !important; }
  #page-mine.active .mine-data-table th:nth-child(5),
  #page-mine.active .mine-data-table td:nth-child(5) { width: 18% !important; }
  #page-mine.active .mine-data-table th:nth-child(6),
  #page-mine.active .mine-data-table td:nth-child(6) { width: 10% !important; text-align: center !important; }
  #page-mine.active .mine-data-table th:nth-child(7),
  #page-mine.active .mine-data-table td:nth-child(7) { display: none !important; }
  #page-mine.active .table-number {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }
  #page-mine.active .mine-data-table td:nth-child(5) {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  /* Master Data: seluruh tab dicetak sebagai tabel penuh. */
  #page-master.active .master-data-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    font-size: 7.8pt !important;
    line-height: 1.2 !important;
  }
  #page-master.active .master-data-table th {
    padding: 1.35mm 1mm !important;
    font-size: 6.8pt !important;
    line-height: 1.15 !important;
    text-align: center !important;
  }
  #page-master.active .master-data-table td {
    padding: 1.45mm 1mm !important;
    font-size: 7.8pt !important;
    line-height: 1.2 !important;
  }
  #page-master.active .master-data-table th:last-child,
  #page-master.active .master-data-table td:last-child { display: none !important; }

  #page-master.active .master-table-profiles th:nth-child(1),
  #page-master.active .master-table-profiles td:nth-child(1) { width: 4% !important; }
  #page-master.active .master-table-profiles th:nth-child(2),
  #page-master.active .master-table-profiles td:nth-child(2) { width: 18% !important; }
  #page-master.active .master-table-profiles th:nth-child(3),
  #page-master.active .master-table-profiles td:nth-child(3) { width: 16% !important; }
  #page-master.active .master-table-profiles th:nth-child(4),
  #page-master.active .master-table-profiles td:nth-child(4) { width: 20% !important; }
  #page-master.active .master-table-profiles th:nth-child(5),
  #page-master.active .master-table-profiles td:nth-child(5) { width: 18% !important; }
  #page-master.active .master-table-profiles th:nth-child(6),
  #page-master.active .master-table-profiles td:nth-child(6) { width: 12% !important; text-align: center !important; }
  #page-master.active .master-table-profiles th:nth-child(7),
  #page-master.active .master-table-profiles td:nth-child(7) { width: 12% !important; text-align: center !important; }

  #page-master.active .master-table-units th:nth-child(1),
  #page-master.active .master-table-units td:nth-child(1) { width: 4% !important; }
  #page-master.active .master-table-units th:nth-child(2),
  #page-master.active .master-table-units td:nth-child(2) { width: 9% !important; }
  #page-master.active .master-table-units th:nth-child(3),
  #page-master.active .master-table-units td:nth-child(3) { width: 31% !important; }
  #page-master.active .master-table-units th:nth-child(4),
  #page-master.active .master-table-units td:nth-child(4) { width: 14% !important; }
  #page-master.active .master-table-units th:nth-child(5),
  #page-master.active .master-table-units td:nth-child(5) { width: 32% !important; }
  #page-master.active .master-table-units th:nth-child(6),
  #page-master.active .master-table-units td:nth-child(6) { width: 10% !important; text-align: center !important; }

  #page-master.active .master-table-classifications th:nth-child(1),
  #page-master.active .master-table-classifications td:nth-child(1) { width: 6% !important; }
  #page-master.active .master-table-classifications th:nth-child(2),
  #page-master.active .master-table-classifications td:nth-child(2) { width: 16% !important; }
  #page-master.active .master-table-classifications th:nth-child(3),
  #page-master.active .master-table-classifications td:nth-child(3) { width: 45% !important; }
  #page-master.active .master-table-classifications th:nth-child(4),
  #page-master.active .master-table-classifications td:nth-child(4) { width: 21% !important; }
  #page-master.active .master-table-classifications th:nth-child(5),
  #page-master.active .master-table-classifications td:nth-child(5) { width: 12% !important; text-align: center !important; }

  #page-master.active .master-table-letter_types th:nth-child(1),
  #page-master.active .master-table-letter_types td:nth-child(1) { width: 7% !important; }
  #page-master.active .master-table-letter_types th:nth-child(2),
  #page-master.active .master-table-letter_types td:nth-child(2) { width: 43% !important; }
  #page-master.active .master-table-letter_types th:nth-child(3),
  #page-master.active .master-table-letter_types td:nth-child(3) { width: 12% !important; text-align: center !important; }
  #page-master.active .master-table-letter_types th:nth-child(4),
  #page-master.active .master-table-letter_types td:nth-child(4) { width: 26% !important; }
  #page-master.active .master-table-letter_types th:nth-child(5),
  #page-master.active .master-table-letter_types td:nth-child(5) { width: 12% !important; text-align: center !important; }

  #page-master.active .master-table-signatories th:nth-child(1),
  #page-master.active .master-table-signatories td:nth-child(1) { width: 5% !important; }
  #page-master.active .master-table-signatories th:nth-child(2),
  #page-master.active .master-table-signatories td:nth-child(2) { width: 23% !important; }
  #page-master.active .master-table-signatories th:nth-child(3),
  #page-master.active .master-table-signatories td:nth-child(3) { width: 19% !important; }
  #page-master.active .master-table-signatories th:nth-child(4),
  #page-master.active .master-table-signatories td:nth-child(4) { width: 33% !important; }
  #page-master.active .master-table-signatories th:nth-child(5),
  #page-master.active .master-table-signatories td:nth-child(5) { width: 8% !important; text-align: center !important; }
  #page-master.active .master-table-signatories th:nth-child(6),
  #page-master.active .master-table-signatories td:nth-child(6) { width: 12% !important; text-align: center !important; }

  /* Audit, Pengaturan, Profil, dan form tetap rapat serta tidak terpotong. */
  #page-audit.active .audit-panel {
    padding: 0 !important;
    border: 0 !important;
  }
  #page-audit.active .audit-panel-head { display: none !important; }
  #page-audit.active .audit-table-head,
  #page-audit.active .audit-item {
    grid-template-columns: 15% 22% 53% 10% !important;
  }
  #page-audit.active .audit-table-head > span {
    min-height: 7mm !important;
    padding: 1.4mm 1.2mm !important;
    font-size: 7pt !important;
  }
  #page-audit.active .audit-item { padding: 0 !important; }
  #page-audit.active .audit-item > div {
    padding: 1.6mm 1.3mm !important;
    font-size: 7.6pt !important;
    line-height: 1.22 !important;
  }
  #page-audit.active .audit-item strong { font-size: 7.6pt !important; }
  #page-audit.active .audit-item span,
  #page-audit.active .audit-time { font-size: 6.8pt !important; }
  #page-audit.active .audit-source-badge {
    min-height: 0 !important;
    padding: .8mm 1.2mm !important;
    font-size: 6.4pt !important;
  }
  /* Form dan panel Pengaturan dicetak tanpa grid sempit atau kontrol terpotong. */
  .page.active .visually-hidden,
  .page.active input[type="file"] { display: none !important; }
  #page-settings.active #settingsForm .form-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 2.5mm 3mm !important;
    align-items: flex-start !important;
  }
  #page-settings.active #settingsForm .field {
    flex: 1 1 47% !important;
    width: 47% !important;
    max-width: 47% !important;
    break-inside: avoid !important;
  }
  #page-settings.active #settingsForm .field-wide {
    flex-basis: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  #page-settings.active #settingsForm .settings-save-cell { display: none !important; }
  #page-settings.active #settingsForm input,
  #page-settings.active #settingsForm select,
  #page-settings.active #settingsForm textarea { width: 100% !important; height: auto !important; }
  #page-settings.active .register-control-layout { grid-template-columns: 1fr !important; gap: 3mm !important; }
  #page-settings.active .register-control-card { padding: 3mm !important; border-color: #aeb9b4 !important; }
  #page-settings.active .settings-block-head { min-height: 0 !important; margin-bottom: 2mm !important; }
  #page-settings.active .register-control-card .sequence-form,
  #page-settings.active .register-control-card .year-control-grid { display: block !important; }
  #page-settings.active .register-control-card .field { margin-bottom: 2mm !important; }
  #page-settings.active .register-control-card .field:last-of-type { margin-bottom: 0 !important; }
  #page-settings.active .register-control-card input,
  #page-settings.active .register-control-card select,
  #page-settings.active .register-control-card textarea { width: 100% !important; }
  #page-settings.active .year-status-card { margin-bottom: 2mm !important; }
  #page-settings.active .system-health-meta { padding: 1.5mm 2mm !important; font-size: 7pt !important; }
  #page-settings.active .health-grid,
  #page-settings.active .sequence-summary,
  #page-profile.active .account-details-grid { gap: 3mm !important; }

  /* Profil dicetak sebagai informasi akun, bukan panel unggah/interaksi. */
  #page-profile.active .account-photo-panel { display: none !important; }
  #page-profile.active .account-profile-hero {
    grid-template-columns: 24mm minmax(0, 1fr) !important;
    gap: 4mm !important;
  }
  #page-profile.active .profile-avatar { width: 24mm !important; height: 24mm !important; }
  #page-profile.active .account-settings-columns { grid-template-columns: 1fr !important; gap: 3mm !important; }
  #page-profile.active .account-preferences-grid { display: block !important; }
  #page-profile.active .account-preferences-grid .field { margin-bottom: 2.5mm !important; }
  #page-profile.active .account-preferences-grid input,
  #page-profile.active .account-preferences-grid select { width: 100% !important; }
  #page-profile.active .security-actions { grid-template-columns: 1fr !important; min-height: 0 !important; }

  #page-register .register-table-frame,
  #page-mine .mine-table-frame,
  #page-master .master-table-frame {
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
}

@media print and (orientation: portrait) {
  #page-dashboard.active .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #page-dashboard.active .two-column { grid-template-columns: 1fr !important; }
  #page-settings.active .register-control-layout { grid-template-columns: 1fr !important; }
  #page-profile.active .account-settings-columns { grid-template-columns: 1fr !important; }
}

@media print and (orientation: landscape) {
  .print-page-header {
    margin-bottom: 4mm;
    padding-bottom: 3mm;
  }
  .print-page-header h1 { font-size: 16pt; }
  #page-dashboard.active .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  #page-dashboard.active .two-column { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr) !important; }
  #page-settings.active .register-control-layout { grid-template-columns: 1fr 1fr !important; }
  #page-profile.active .account-settings-columns { grid-template-columns: 1fr 1fr !important; }
  #page-register.active .data-table,
  #page-mine.active .mine-data-table { font-size: 8.8pt !important; }
  #page-register.active .data-table td,
  #page-mine.active .mine-data-table td { font-size: 8.8pt !important; }
  #page-register.active .data-table th,
  #page-mine.active .mine-data-table th { font-size: 7.6pt !important; }
  #page-master.active .master-data-table { font-size: 8.2pt !important; }
  #page-master.active .master-data-table td { font-size: 8.2pt !important; }
}

/* ========================================================================== */
/* e-Register Simpala v1.0.64 - kolom tindakan lebih ringkas dan berjarak     */
/* ========================================================================== */

/*
 * Buku Register dan Riwayat Nomor Surat Saya memakai spesifikasi identik.
 * Lebar kolom dilonggarkan ringan, sementara ukuran dan jarak tombol
 * tetap persis seperti sebelumnya. Ukuran font dan tinggi tombol tetap.
 */
@media (min-width: 901px) {
  #page-register .data-table {
    min-width: 1026px;
  }
  #page-register .data-table th:nth-child(1),
  #page-register .data-table td:nth-child(1) { width: 40px; }
  #page-register .data-table th:nth-child(2),
  #page-register .data-table td:nth-child(2) { width: 168px; }
  #page-register .data-table th:nth-child(3),
  #page-register .data-table td:nth-child(3) { width: 86px; }
  #page-register .data-table th:nth-child(4),
  #page-register .data-table td:nth-child(4) { width: 180px; }
  #page-register .data-table th:nth-child(5),
  #page-register .data-table td:nth-child(5) { width: 112px; }
  #page-register .data-table th:nth-child(6),
  #page-register .data-table td:nth-child(6) { width: 178px; }
  #page-register .data-table th:nth-child(7),
  #page-register .data-table td:nth-child(7) { width: 72px; }

  #page-register .data-table,
  #page-mine .mine-data-table { table-layout: auto; }

  #page-register .data-table th:nth-child(8),
  #page-register .data-table td:nth-child(8),
  #page-mine .mine-data-table th:nth-child(7),
  #page-mine .mine-data-table td:nth-child(7) {
    width: 1%;
    min-width: 216px;
    padding-inline: 4px;
    white-space: nowrap;
  }

  #page-register .table-actions.action-buttons,
  #page-mine .table-actions.action-buttons {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
  }
  #page-register .table-actions.action-buttons .action-btn,
  #page-mine .table-actions.action-buttons .action-btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 42px;
    min-height: 30px;
    padding: 5px 3px;
    font-size: 10.75px;
    white-space: nowrap;
  }
}

/*
 * Seluruh tabel Master Data memakai kolom tindakan yang sedikit lebih lega.
 * Gap dinaikkan agar tiga atau empat tombol tetap memiliki napas visual.
 */
@media (min-width: 681px) {
  #page-master .master-data-table { table-layout: auto; }
  #page-master .master-data-table th:last-child,
  #page-master .master-data-table td:last-child {
    width: 1%;
    min-width: 204px;
    padding-inline: 4px;
    white-space: nowrap;
  }
  #page-master .master-table-actions {
    grid-template-columns: 49px 72px 49px;
    justify-content: center;
    gap: 6px;
    width: max-content;
    margin-inline: auto;
  }
  #page-master .master-table-profiles .master-table-actions {
    grid-template-columns: 85px 85px;
    gap: 6px;
  }
  #page-master .master-table-actions .action-btn {
    min-height: 30px;
    padding-inline: 2px;
    font-size: 11px;
  }
  #page-master .master-table-profiles th:nth-child(8),
  #page-master .master-table-profiles td:nth-child(8) { min-width: 200px; }

  /* Klasifikasi dan Jenis Surat memperoleh kolom Terakhir Diubah yang informatif. */
  #page-master .master-table-classifications { min-width: 820px; }
  #page-master .master-table-classifications th:nth-child(1),
  #page-master .master-table-classifications td:nth-child(1) { width: 42px; }
  #page-master .master-table-classifications th:nth-child(2),
  #page-master .master-table-classifications td:nth-child(2) { width: 112px; }
  #page-master .master-table-classifications th:nth-child(3),
  #page-master .master-table-classifications td:nth-child(3) { width: 225px; }
  #page-master .master-table-classifications th:nth-child(4),
  #page-master .master-table-classifications td:nth-child(4) { width: 145px; }
  #page-master .master-table-classifications th:nth-child(5),
  #page-master .master-table-classifications td:nth-child(5) { width: 82px; }

  #page-master .master-table-letter_types { min-width: 800px; }
  #page-master .master-table-letter_types th:nth-child(1),
  #page-master .master-table-letter_types td:nth-child(1) { width: 42px; }
  #page-master .master-table-letter_types th:nth-child(2),
  #page-master .master-table-letter_types td:nth-child(2) { width: 225px; }
  #page-master .master-table-letter_types th:nth-child(3),
  #page-master .master-table-letter_types td:nth-child(3) { width: 90px; text-align: center; }
  #page-master .master-table-letter_types th:nth-child(4),
  #page-master .master-table-letter_types td:nth-child(4) { width: 145px; }
  #page-master .master-table-letter_types th:nth-child(5),
  #page-master .master-table-letter_types td:nth-child(5) { width: 82px; }
}

#page-master .master-updated-cell {
  color: #52645c;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1.32;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
}
#page-master .master-table-classifications th:nth-child(4),
#page-master .master-table-letter_types th:nth-child(4) {
  text-align: center;
}

/* ========================================================================== */
/* e-Register Simpala v1.0.64 - bingkai tabel dengan sudut utuh              */
/* ========================================================================== */

/*
 * Bingkai luar dipisahkan dari elemen penggulir. Dengan demikian border-radius
 * tidak lagi dipotong oleh overflow horizontal dan border-collapse tabel.
 */
@media screen and (min-width: 681px) {
  #page-register .register-table-frame,
  #page-mine .mine-table-frame,
  #page-master .master-table-frame {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid #cbd7d1;
    border-radius: 12px;
    background: #fff;
    background-clip: padding-box;
    box-shadow: 0 0 0 1px rgba(255,255,255,.35) inset;
  }

  #page-register .register-table-frame > .table-wrap,
  #page-mine .mine-table-frame > .table-wrap,
  #page-master .master-table-frame > .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  #page-register .register-table-frame .data-table,
  #page-mine .mine-table-frame .data-table,
  #page-master .master-table-frame .data-table {
    border: 0;
    border-collapse: separate;
    border-spacing: 0;
  }

  #page-register .register-table-frame .data-table th,
  #page-register .register-table-frame .data-table td,
  #page-mine .mine-table-frame .data-table th,
  #page-mine .mine-table-frame .data-table td,
  #page-master .master-table-frame .data-table th,
  #page-master .master-table-frame .data-table td {
    border-top: 0;
    border-left: 0;
    border-right: 1px solid #d5dfda;
    border-bottom: 1px solid #d5dfda;
  }

  #page-register .register-table-frame .data-table th,
  #page-mine .mine-table-frame .data-table th,
  #page-master .master-table-frame .data-table th {
    border-color: #cbd7d1;
  }

  #page-register .register-table-frame .data-table tr > :last-child,
  #page-mine .mine-table-frame .data-table tr > :last-child,
  #page-master .master-table-frame .data-table tr > :last-child {
    border-right: 0;
  }

  #page-register .register-table-frame .data-table tbody tr:last-child > td,
  #page-mine .mine-table-frame .data-table tbody tr:last-child > td,
  #page-master .master-table-frame .data-table tbody tr:last-child > td {
    border-bottom: 0;
  }
}

@media screen and (max-width: 680px) {
  #page-register .register-table-frame,
  #page-mine .mine-table-frame,
  #page-master .master-table-frame {
    width: 100%;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
}


@media screen and (min-width: 681px) {
  #page-master .master-table-frame { margin-top: 12px; }
  #page-master .master-table-frame > .master-table-wrap { margin-top: 0; }
}

/* ========================================================================== */
/* e-Register Simpala v1.0.80 - proporsi profesional halaman Pengaturan       */
/* ========================================================================== */

/* Tombol Keluar mengikuti ritme kontrol topbar: tegas, ringan, dan tidak gemuk. */
.signout-btn {
  min-width: 92px;
  min-height: 40px;
  height: 40px;
  gap: 7px;
  border: 1px solid #d7c5c0;
  border-radius: 10px;
  padding: 0 14px;
  background: #fff;
  color: #80362f;
  box-shadow: 0 1px 2px rgba(73, 39, 33, .035);
  font-size: 12.25px;
  font-weight: 700;
  line-height: 1;
}
.signout-btn .signout-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.signout-btn:hover {
  border-color: #c7a9a2;
  background: #fff8f6;
  color: #6f2d27;
  box-shadow: 0 4px 12px rgba(92, 42, 34, .065);
}

#page-settings {
  --settings-field-height: 42px;
  --settings-button-height: 40px;
  --settings-radius: 10px;
  --settings-panel-gap: 14px;
}
#page-settings > .panel,
#page-settings > .form-panel {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
}
#page-settings .panel {
  border-radius: 15px;
  padding: 19px 20px;
}
#page-settings .settings-subpanel { margin-top: var(--settings-panel-gap); }
#page-settings .panel-head {
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 15px;
}
#page-settings .panel-head > div { min-width: 0; }
#page-settings .eyebrow {
  margin-bottom: 3px;
  font-size: 10.75px;
  font-weight: 775;
  letter-spacing: .085em;
}
#page-settings .panel-head h3 {
  font-size: 20px;
  font-weight: 750;
  line-height: 1.22;
}
#page-settings .panel-description {
  max-width: 920px;
  margin-top: 4px;
  font-size: 12.25px;
  line-height: 1.45;
}

/* Profil Admin dikembalikan ke ukuran normal; tidak lagi diperkecil. */
#page-settings .admin-profile-settings-card {
  margin-bottom: var(--settings-panel-gap);
  padding: 18px 20px;
}
#page-settings .admin-profile-settings-main {
  grid-template-columns: 86px minmax(0, 1fr) minmax(250px, 300px);
  gap: 16px;
  align-items: center;
}
#page-settings .admin-settings-avatar {
  width: 86px;
  height: 86px;
  border-radius: 22px;
  font-size: 30px;
}
#page-settings .admin-settings-identity h3 {
  font-size: 20px;
  font-weight: 750;
  line-height: 1.25;
}
#page-settings .admin-settings-identity .panel-description {
  margin-top: 4px;
  font-size: 12px;
}
#page-settings .admin-settings-identity .account-badges {
  margin-top: 8px;
  gap: 7px;
}
#page-settings .admin-profile-settings-card .account-badge {
  min-height: 26px;
  padding: 4px 10px;
  font-size: 10.75px;
  font-weight: 650;
}
#page-settings .admin-settings-photo-actions {
  gap: 8px;
  padding-left: 18px;
}
#page-settings .admin-settings-photo-actions .btn {
  min-height: 40px;
  height: 40px;
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 12px;
}
#page-settings .admin-settings-photo-actions small {
  font-size: 10.75px;
  line-height: 1.4;
}

/* Konfigurasi Utama memakai baseline dan lebar kolom yang konsisten. */
#page-settings #settingsForm .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
#page-settings #settingsForm .field-wide { grid-column: auto; }
#page-settings .field { gap: 5px; }
#page-settings .field > span,
#page-settings .year-status-label {
  min-height: 16px;
  display: flex;
  align-items: flex-end;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}
#page-settings .field input,
#page-settings .field select {
  min-height: var(--settings-field-height);
  height: var(--settings-field-height);
  border-radius: var(--settings-radius);
  padding: 8px 11px;
  font-size: 13px;
}
#page-settings .field textarea {
  min-height: 62px;
  border-radius: var(--settings-radius);
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.4;
}
#page-settings .field small {
  min-height: 14px;
  font-size: 10.75px;
  line-height: 1.35;
}
#page-settings .btn {
  min-height: var(--settings-button-height);
  height: var(--settings-button-height);
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 12.25px;
  font-weight: 700;
  line-height: 1.15;
}
#page-settings .settings-save-cell {
  grid-column: 1 / -1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 2px;
  border-top: 1px solid #e4ebe7;
  padding: 12px 0 0;
}
#page-settings .settings-save-cell .btn {
  width: min(220px, 100%);
}
#page-settings .form-message:empty { display: none; }
#page-settings .form-message:not(:empty) {
  min-height: 0;
  margin-top: 9px;
}

/* Penomoran dan Kontrol Tahun dirancang sebagai dua kartu setara. */
#page-settings .register-control-panel { padding: 18px 20px; }
#page-settings .register-control-panel-head { align-items: center; }
#page-settings .register-control-panel-head > .btn {
  flex: 0 0 auto;
  min-width: 158px;
  height: var(--settings-button-height);
  min-height: var(--settings-button-height);
  font-size: 12px;
}
#page-settings .register-control-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
#page-settings .register-control-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid #d6e0db;
  border-radius: 12px;
  padding: 16px;
  background: #fbfcfc;
}
#page-settings .settings-block-head {
  min-height: 72px;
  margin-bottom: 12px;
}
#page-settings .settings-block-head .eyebrow { margin-bottom: 3px; }
#page-settings .settings-block-head h4 {
  margin: 0;
  color: var(--primary);
  font-size: 16px;
  font-weight: 750;
  line-height: 1.25;
}
#page-settings .settings-block-head p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}
#page-settings .register-control-card .sequence-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}
#page-settings .register-control-card .sequence-card {
  min-height: 64px;
  justify-content: center;
  gap: 3px;
  border-radius: 10px;
  padding: 9px 11px;
}
#page-settings .register-control-card .sequence-card span { font-size: 10.75px; }
#page-settings .register-control-card .sequence-card strong {
  font-size: 15.5px;
  line-height: 1.18;
}
#page-settings .register-control-card .sequence-card small {
  font-size: 10.25px;
  line-height: 1.3;
}
#page-settings .register-control-card .sequence-form,
#page-settings .register-control-card .year-control-grid {
  flex: 1 1 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 12px;
  align-content: start;
  align-items: start;
}
#page-settings .register-control-card .field-wide { grid-column: 1 / -1; }
/* Skema global: Tahun Register dan Nomor Berikutnya sama lebar. */
#page-settings #sequenceUnitField.hidden + .field-wide { grid-column: auto; }
#page-settings .register-control-card .field input,
#page-settings .register-control-card .field select {
  min-height: var(--settings-field-height);
  height: var(--settings-field-height);
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 13px;
}
#page-settings .register-control-card .field textarea {
  min-height: 64px;
  height: 64px;
  border-radius: 9px;
  padding: 9px 10px;
  font-size: 12.75px;
  line-height: 1.4;
}
#page-settings .register-control-card .field > span { font-size: 11.75px; }

/* Tahun dan status memiliki label, baseline, dan proporsi yang jelas. */
#page-settings .year-control-top {
  display: grid;
  grid-template-columns: minmax(150px, .72fr) minmax(250px, 1.28fr);
  gap: 12px;
  align-items: end;
}
#page-settings .year-status-field {
  min-width: 0;
  display: grid;
  gap: 5px;
}
#page-settings .year-status-card {
  min-width: 0;
  min-height: var(--settings-field-height);
  height: var(--settings-field-height);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  column-gap: 9px;
  row-gap: 0;
  border-radius: 9px;
  padding: 5px 10px;
}
#page-settings .year-status-card .health-badge {
  grid-column: 1;
  grid-row: 1 / 3;
  min-width: 62px;
  padding: 4px 8px;
  font-size: 9.75px;
}
#page-settings .year-status-card strong {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#page-settings .year-status-card small {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  overflow: hidden;
  font-size: 8.5px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#page-settings .year-status-card .empty-state {
  grid-column: 1 / -1;
  padding: 0;
  font-size: 10.5px;
}
#page-settings .settings-control-actions {
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 9px;
  margin-top: 2px;
}
#page-settings .settings-control-actions .btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--settings-button-height);
  height: var(--settings-button-height);
  padding-inline: 11px;
  font-size: 11.75px;
  white-space: nowrap;
}
#page-settings #sequencePanel .settings-control-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#page-settings #sequencePanel .settings-control-actions .btn { width: 100%; }

/* Pemeriksaan Sistem mengikuti ukuran dan garis tata letak yang sama. */
#page-settings .system-health-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}
#page-settings .system-health-head .toolbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(126px, 1fr));
  gap: 9px;
}
#page-settings .system-health-head .toolbar .btn { width: 100%; }
#page-settings .system-health-meta {
  margin: 0 0 10px;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 11.25px;
}
#page-settings .health-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
#page-settings .health-card {
  min-height: 56px;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  border-radius: 9px;
  padding: 8px 9px;
}
#page-settings .health-card strong { font-size: 12.25px; }
#page-settings .health-card small {
  font-size: 10.5px;
  line-height: 1.3;
}

@media (max-width: 1050px) {
  #page-settings .register-control-layout { grid-template-columns: 1fr; }
  #page-settings .settings-block-head { min-height: 0; }
  #page-settings .health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  #page-settings .admin-profile-settings-main {
    grid-template-columns: 76px minmax(0, 1fr);
  }
  #page-settings .admin-settings-avatar {
    width: 76px;
    height: 76px;
    border-radius: 19px;
    font-size: 27px;
  }
  #page-settings .admin-settings-photo-actions {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
    padding: 12px 0 0;
  }
  #page-settings .system-health-head { grid-template-columns: 1fr; }
  #page-settings .system-health-head .toolbar { width: 100%; }
}

@media (max-width: 680px) {
  .signout-btn {
    min-width: 80px;
    min-height: 36px;
    height: 36px;
    gap: 6px;
    border-radius: 9px;
    padding: 0 11px;
    font-size: 11.25px;
  }
  .signout-btn .signout-icon {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
  }
  #page-settings .panel,
  #page-settings .admin-profile-settings-card,
  #page-settings .register-control-panel { padding: 15px; }
  #page-settings #settingsForm .form-grid,
  #page-settings .register-control-card .sequence-form,
  #page-settings .register-control-card .year-control-grid,
  #page-settings .year-control-top { grid-template-columns: 1fr; }
  #page-settings #sequenceUnitField.hidden + .field-wide,
  #page-settings .register-control-card .field-wide { grid-column: auto; }
  #page-settings .settings-save-cell { padding-top: 10px; }
  #page-settings .settings-save-cell .btn,
  #page-settings .register-control-panel-head > .btn {
    width: 100%;
    min-width: 0;
  }
  #page-settings .settings-control-actions,
  #page-settings #sequencePanel .settings-control-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  #page-settings .system-health-head .toolbar {
    grid-template-columns: 1fr 1fr;
  }
  #page-settings .year-status-card {
    height: auto;
    min-height: 48px;
  }
  #page-settings .year-status-card strong,
  #page-settings .year-status-card small {
    white-space: normal;
  }
  #page-settings .health-grid { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  #page-settings .admin-settings-photo-actions,
  #page-settings .system-health-head .toolbar { grid-template-columns: 1fr; }
  #page-settings .register-control-card .sequence-summary { grid-template-columns: 1fr; }
}


/* ========================================================================== */
/* e-Register Simpala v1.0.80 - proporsi tabel, profil, dan pemeriksaan sistem */
/* ========================================================================== */
@media screen and (min-width: 681px) {
  #page-master .master-data-table td { vertical-align: middle; }
}

/* ========================================================================== */
/* e-Register Simpala v1.0.80 - profil, preferensi, audit, dan kontrol topbar */
/* ========================================================================== */

/* Status koneksi dan tombol Keluar berdiri sendiri; tombol memiliki latar lembut permanen. */
.topbar-actions {
  gap: 10px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.connection-badge {
  min-height: 36px;
  height: 36px;
  border: 1px solid #cfe3d9;
  border-radius: 999px;
  padding: 0 11px;
  background: #e8f4ee;
  font-size: 11px;
  line-height: 1;
}
.connection-badge::before {
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 3px rgba(23, 105, 73, .10);
}
.connection-badge.offline {
  border-color: #ead8cf;
  background: #f8ece6;
}
.connection-badge.offline::before { box-shadow: 0 0 0 3px rgba(155, 64, 47, .10); }
.signout-btn {
  min-width: auto;
  min-height: 36px;
  height: 36px;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(142, 63, 53, .07);
  box-shadow: none;
  color: #7d3b34;
  font-size: 11.75px;
  font-weight: 700;
}
.signout-btn .signout-icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
  stroke-width: 1.9;
}
.signout-btn:hover {
  border: 0;
  background: rgba(142, 63, 53, .11);
  box-shadow: none;
  color: #6e302a;
  transform: none;
}

/* Identitas admin dan detail profil dibuat tegas tanpa tampak terlalu berat. */
#page-settings .admin-settings-identity #adminSettingsMeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  font-weight: 650;
}
#page-settings .admin-settings-meta-separator {
  color: #9aa7a1;
  font-weight: 500;
}
body.role-admin #page-profile #profileNip,
body.role-admin #page-profile #profileTitle,
#page-profile #profileHeadline {
  font-weight: 650;
}

/* Tombol penyimpanan konfigurasi admin dipersempit sedikit. */
#page-settings .settings-save-cell .btn {
  width: min(208px, 100%);
}

/* Waktu pada Audit Aktivitas lebih mudah dipindai. */
#page-audit .audit-time {
  font-weight: 650;
}

@media (max-width: 680px) {
  .topbar-actions {
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
  .signout-btn {
    min-width: 76px;
    min-height: 35px;
    height: 35px;
    padding: 0 10px;
  }
  #page-settings .settings-save-cell .btn { width: 100%; }
}

/* ========================================================================== */
/* e-Register Simpala v1.0.81 - compact laptop 1366x768 dan login tanpa scroll */
/* ========================================================================== */

/*
 * Resolusi layar 1366x768 biasanya hanya menyisakan viewport sekitar 600-680px
 * setelah tab dan toolbar browser. Login dikunci pada viewport aktual agar
 * tinggi minimum konten tidak lagi menambah scroll halaman.
 */
@media screen and (min-width: 901px) and (max-width: 1440px) and (max-height: 820px) {
  .login-screen:not(.hidden) {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .login-screen:not(.hidden) > .login-visual,
  .login-screen:not(.hidden) > .login-panel {
    min-width: 0;
    min-height: 0;
    height: 100%;
  }

  .login-visual {
    padding: clamp(30px, 3.8vw, 48px);
  }

  .login-visual-inner {
    width: min(620px, 100%);
    padding-left: 22px;
    transform: none;
  }

  .login-visual .eyebrow {
    min-height: 26px;
    margin-bottom: 12px;
    padding: 5px 10px;
    font-size: 9.75px;
  }

  .login-visual h1 {
    max-width: 600px;
    margin-bottom: 14px;
    font-size: clamp(34px, 3.35vw, 46px);
    line-height: 1.035;
  }

  .login-visual p:not(.eyebrow) {
    max-width: 590px;
    font-size: 14px;
    line-height: 1.5;
  }

  .login-visual .feature-pills {
    gap: 7px;
    margin-top: 17px;
  }

  .login-visual .feature-pills span {
    min-height: 32px;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 11.25px;
  }

  .login-panel {
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    padding: 12px 24px 10px;
    overflow: hidden;
  }

  #loginForm.auth-card {
    width: min(450px, 100%);
    padding: 21px 27px 18px;
    border-radius: 22px;
  }

  #loginForm .brand-lockup {
    gap: 12px;
    margin-bottom: 15px;
  }

  #loginForm .brand-lockup img {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    border-radius: 14px;
  }

  #loginForm .eyebrow {
    margin-bottom: 3px;
    font-size: 9.75px;
  }

  #loginForm h2 {
    font-size: 24px;
  }

  #loginForm > .field {
    gap: 5px;
    margin-bottom: 10px;
  }

  #loginForm > .field:nth-of-type(2) {
    margin-bottom: 14px;
  }

  #loginForm > .field > span {
    font-size: 11.75px;
  }

  #loginForm > .field > input,
  #loginForm .password-wrap {
    min-height: 42px;
    height: 42px;
    border-radius: 11px;
  }

  #loginForm > .field > input {
    padding: 9px 12px;
    font-size: 13.5px;
  }

  #loginForm .password-wrap input {
    min-height: 40px;
    height: 40px;
    padding: 9px 12px;
    font-size: 13.5px;
  }

  #loginForm .password-toggle {
    flex-basis: 44px;
    width: 44px;
    min-height: 40px;
    height: 40px;
  }

  #loginForm #loginBtn {
    min-height: 42px;
    height: 42px;
    border-radius: 11px;
    font-size: 13.5px;
  }

  #loginForm .form-message {
    min-height: 14px;
    margin-top: 5px;
    font-size: 11.5px;
    line-height: 1.2;
  }

  #loginForm .auth-note {
    margin: 8px 0 0;
    font-size: 10.25px;
    line-height: 1.35;
    white-space: normal;
  }

  .login-signature {
    padding: 0 6px 1px;
    font-size: 10.5px;
    line-height: 1.25;
  }
}

/* ========================================================================== */
/* e-Register Simpala v1.0.97 - visual lama v1.0.80 + perbaikan terisolasi   */
/* ========================================================================== */

/* Compact hanya pada Dashboard/Ambil Nomor di laptop pendek. Halaman lama
   lainnya tetap memakai proporsi asli v1.0.80. */
@media screen and (min-width: 1051px) and (max-width: 1440px) and (max-height: 820px) {
  body[data-current-page="dashboard"] .topbar,
  body[data-current-page="issue"] .topbar {
    min-height: 70px;
    gap: 12px;
    padding: 10px 24px;
  }
  body[data-current-page="dashboard"] .topbar h1,
  body[data-current-page="issue"] .topbar h1 { font-size: 22px; }
  body[data-current-page="dashboard"] .content,
  body[data-current-page="issue"] .content { padding: 15px 20px 18px; }
  body[data-current-page="dashboard"] .app-signature-main,
  body[data-current-page="issue"] .app-signature-main { padding: 7px 20px 11px; font-size: 11.5px; }

  #page-dashboard .welcome-card {
    gap: 18px;
    padding: 20px 25px;
    border-radius: 18px;
  }
  #page-dashboard .welcome-card h2 { margin-bottom: 5px; font-size: 30px; }
  #page-dashboard .welcome-card p:last-child { font-size: 13px; line-height: 1.45; }
  #page-dashboard .stats-grid { gap: 10px; margin: 13px 0; }
  #page-dashboard .stat-card { min-height: 112px; padding: 14px 16px; border-radius: 14px; }
  #page-dashboard .stat-card strong { font-size: 30px; }
  #page-dashboard .two-column { gap: 12px; }
  #page-dashboard .two-column > .panel { padding: 14px 16px; }
  #page-dashboard .steps { gap: 8px; font-size: 12px; line-height: 1.4; }
  #page-dashboard .empty-state { padding-top: 24px; padding-bottom: 24px; }

  #page-issue > .panel { padding: 16px 18px; }
  #page-issue .panel-head { gap: 14px; margin-bottom: 12px; }
  #page-issue #issueForm .form-grid { gap: 10px 14px; }
  #page-issue #issueForm .field { gap: 4px; }
  #page-issue #issueForm .field input,
  #page-issue #issueForm .field select { min-height: 39px; padding-top: 8px; padding-bottom: 8px; }
  #page-issue #issueForm .field textarea { min-height: 64px; }
  #page-issue #issueForm .issue-warning { margin-top: 12px; padding: 10px 12px; }
  #page-issue #issueForm .form-actions { margin-top: 12px; }
}

/* Fitur Validator memakai bahasa visual halaman lama: panel putih, border netral,
   tab dan tabel standar. Tidak ada perubahan global pada Dashboard/Profil/Master. */
#approvalNavBtn { position: relative; }
#approvalNavBtn .nav-count {
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  border-radius: 999px;
  padding: 0 6px;
  background: #f2c84b;
  color: #173d33;
  font-size: 9.5px;
  font-weight: 850;
  line-height: 1;
}
#approvalNavBtn.active .nav-count { background: #fff; color: var(--primary); }
#approvalNavBtn.active::after { margin-left: 0; }

.status-pending_supervisor { background: #fff1d6; color: #825c0f; }
.status-pending_validator { background: #e7edf8; color: #405b92; }
.status-approved { background: #dff4e9; color: #166844; }
.status-rejected { background: #f8e4e1; color: #9b3832; }
#page-master .account-badge-role-validator { background: #dcece9; color: #1d6558; }
#page-master .master-supervisor-line { display:block; margin-top:4px; color:var(--muted); font-size:10.5px; font-weight:600; line-height:1.3; }
.field.supervisor-not-required select { background:#f2f4f3; color:#718079; cursor:not-allowed; }
.field.supervisor-not-required small { color:#527166; }

#page-approval .approval-panel { min-width: 0; }
#page-approval .approval-panel-head { margin-bottom: 12px; }
#page-approval .approval-flow-banner {
  max-width: none;
  margin: 0 0 14px;
  border-color: var(--line);
  background: #f7faf8;
  color: #3f5c52;
}
#page-approval .approval-flow-banner strong { color: var(--primary); font-size: 12px; }
#page-approval .approval-flow-banner span { line-height: 1.45; }
#page-approval .approval-stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}
#page-approval .approval-stat { min-height: 104px; padding: 14px 16px; box-shadow: none; }
#page-approval .approval-stat > span { font-size: 11px; text-transform: uppercase; letter-spacing: .025em; }
#page-approval .approval-stat strong { font-size: 29px; }
#page-approval .approval-stat small { font-size: 10.75px; }
#page-approval .approval-tabs { margin-bottom: 12px; }
#page-approval .approval-data-table { min-width: 980px; table-layout: fixed; }
#page-approval .approval-data-table th { text-align: center; vertical-align: middle; }
#page-approval .approval-data-table td { vertical-align: middle; }
#page-approval .approval-data-table th:nth-child(1), #page-approval .approval-data-table td:nth-child(1) { width:42px; text-align:center; }
#page-approval .approval-data-table th:nth-child(2), #page-approval .approval-data-table td:nth-child(2) { width:142px; text-align:center; }
#page-approval .approval-data-table th:nth-child(3), #page-approval .approval-data-table td:nth-child(3) { width:285px; }
#page-approval .approval-data-table th:nth-child(4), #page-approval .approval-data-table td:nth-child(4) { width:175px; }
#page-approval .approval-data-table th:nth-child(5), #page-approval .approval-data-table td:nth-child(5) { width:135px; }
#page-approval .approval-data-table th:nth-child(6), #page-approval .approval-data-table td:nth-child(6) { width:128px; text-align:center; }
#page-approval .approval-data-table th:nth-child(7), #page-approval .approval-data-table td:nth-child(7) { width:155px; text-align:center; }
#page-approval .approval-data-table .table-subject strong,
#page-approval .approval-data-table .table-subject span { display:block; }
#page-approval .approval-data-table .table-subject strong { color:#283f35; font-weight:700; line-height:1.35; }
#page-approval .approval-data-table .table-subject span { margin-top:3px; color:var(--muted); font-size:11px; line-height:1.35; }
#page-approval .approval-data-table .table-creator small { display:block; margin-top:3px; color:var(--muted); font-size:10.75px; }
#page-approval .approval-time-cell { font-weight:600; }
#page-approval .approval-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; width:100%; }
#page-approval .approval-actions .action-btn { min-width:0; }
#page-approval .approval-workflow-detail { color:#48695d !important; font-weight:620; }
#page-approval .request-reason { color:#9b3832 !important; font-weight:600; }

@media screen and (min-width:1051px) and (max-width:1440px) {
  #page-approval .approval-data-table { width:100%; min-width:0; }
  #page-approval .approval-data-table th:nth-child(1), #page-approval .approval-data-table td:nth-child(1) { width:38px; }
  #page-approval .approval-data-table th:nth-child(2), #page-approval .approval-data-table td:nth-child(2) { width:122px; }
  #page-approval .approval-data-table th:nth-child(3), #page-approval .approval-data-table td:nth-child(3) { width:250px; }
  #page-approval .approval-data-table th:nth-child(4), #page-approval .approval-data-table td:nth-child(4) { width:150px; }
  #page-approval .approval-data-table th:nth-child(5), #page-approval .approval-data-table td:nth-child(5) { width:108px; }
  #page-approval .approval-data-table th:nth-child(6), #page-approval .approval-data-table td:nth-child(6) { width:116px; }
  #page-approval .approval-data-table th:nth-child(7), #page-approval .approval-data-table td:nth-child(7) { width:136px; }
  #page-approval .approval-actions { gap:4px; }
  #page-approval .approval-actions .action-btn { padding-inline:7px; font-size:10px; }
}
@media screen and (min-width:1051px) and (max-width:1440px) and (max-height:820px) {
  body[data-current-page="approval"] .topbar { min-height:70px; padding:10px 24px; }
  body[data-current-page="approval"] .topbar h1 { font-size:22px; }
  body[data-current-page="approval"] .content { padding:15px 20px 18px; }
  body[data-current-page="approval"] .app-signature-main { padding:7px 20px 11px; font-size:11.5px; }
  #page-approval .approval-panel { padding:16px 18px; }
  #page-approval .approval-flow-banner { margin-bottom:10px; padding:10px 12px; }
  #page-approval .approval-stats-grid { gap:8px; margin-bottom:10px; }
  #page-approval .approval-stat { min-height:84px; padding:10px 12px; }
  #page-approval .approval-stat strong { font-size:24px; }
  #page-approval .approval-tabs { margin-bottom:10px; }
  #page-approval .approval-data-table th,
  #page-approval .approval-data-table td { padding:8px 7px; }
}
@media (max-width:900px) {
  #page-approval .approval-stats-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  #page-approval .approval-data-table { min-width:900px; }
}
@media (max-width:680px) {
  #approvalNavBtn .nav-count { min-width:19px; height:19px; padding-inline:5px; }
  #page-approval .approval-panel-head .btn { width:100%; }
  #page-approval .approval-stats-grid { grid-template-columns:1fr; gap:7px; }
  #page-approval .approval-stat { min-height:0; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:2px 10px; padding:10px 12px; }
  #page-approval .approval-stat strong { grid-column:2; grid-row:1 / span 2; margin:0; font-size:24px; }
  #page-approval .approval-stat small { grid-column:1; }
  #page-approval .approval-tabs { width:100%; }
  #page-approval .approval-tabs .tab { flex:1 1 0; }
  #page-approval .approval-table-frame { border:0; background:transparent; overflow:visible; }
  #page-approval .approval-table-frame .table-wrap { overflow:visible; }
  #page-approval .approval-data-table,
  #page-approval .approval-data-table tbody,
  #page-approval .approval-data-table tr,
  #page-approval .approval-data-table td { display:block; width:100% !important; min-width:0; }
  #page-approval .approval-data-table { min-width:0; border:0; }
  #page-approval .approval-data-table thead { display:none; }
  #page-approval .approval-data-table tbody { display:grid; gap:10px; }
  #page-approval .approval-data-table tr { overflow:hidden; border:1px solid var(--line); border-radius:13px; background:var(--surface); }
  #page-approval .approval-data-table td { display:grid; grid-template-columns:104px minmax(0,1fr); gap:10px; border:0; border-top:1px solid #e7eeea; padding:9px 11px; text-align:left !important; }
  #page-approval .approval-data-table td:first-child { border-top:0; }
  #page-approval .approval-data-table td::before { content:attr(data-label); color:var(--muted); font-size:9.5px; font-weight:850; letter-spacing:.04em; text-transform:uppercase; }
  #page-approval .approval-data-table td.table-empty { display:block; border:1px dashed var(--line); text-align:center !important; }
  #page-approval .approval-data-table td.table-empty::before { content:none; }
  #page-approval .approval-actions { width:100%; }
}


/* ========================================================================== */
/* e-Register Simpala v1.0.97 - perbaikan Master Data dan Nomor Terakhir     */
/* ========================================================================== */
@media screen and (min-width: 1051px) and (max-width: 1440px) and (max-height: 820px) {
  #page-dashboard .stat-card-last-number > span {
    font-size: 10.5px;
    line-height: 1.15;
    letter-spacing: .01em;
  }
  #page-dashboard .stat-card-last-number #statLastNumber {
    font-size: 16px;
    line-height: 1.18;
    letter-spacing: -.015em;
  }
  #page-dashboard .stat-card-last-number small {
    font-size: 10px;
    line-height: 1.2;
  }
}

/* Viewport browser laptop 1366x768 umumnya tinggal sekitar 600-650px. */
@media screen and (min-width: 1051px) and (max-width: 1440px) and (max-height: 650px) {
  body[data-current-page="dashboard"] .content {
    padding-bottom: 12px;
  }
  body[data-current-page="dashboard"] .app-signature-main {
    padding: 3px 20px 6px;
    font-size: 10.5px;
    line-height: 1.3;
  }
}

/* ========================================================================== */
/* e-Register Simpala v1.0.97 - laptop 1366x768 dan edit peran Validator      */
/* ========================================================================== */
@media screen and (min-width: 1051px) and (max-width: 1440px) and (max-height: 820px) {
  /* Tepat 1px lebih kecil dibanding build sebelumnya. */
  #page-dashboard .welcome-card p:last-child {
    font-size: 12px;
  }

  /* Tepat 1px lebih besar dibanding build sebelumnya. */
  #page-dashboard .stat-card-last-number > span {
    font-size: 11.5px;
  }
  #page-dashboard .stat-card-last-number #statLastNumber {
    font-size: 17px;
  }

  /* Perapatan ringan, hanya Dashboard laptop pendek. */
  body[data-current-page="dashboard"] .topbar {
    min-height: 66px;
    padding: 8px 22px;
  }
  body[data-current-page="dashboard"] .content {
    padding: 11px 18px 12px;
  }
  #page-dashboard .welcome-card {
    gap: 16px;
    padding: 17px 22px;
  }
  #page-dashboard .welcome-card h2 {
    margin-bottom: 4px;
    font-size: 28px;
  }
  #page-dashboard .stats-grid {
    gap: 9px;
    margin: 10px 0;
  }
  #page-dashboard .stat-card {
    min-height: 100px;
    padding: 12px 15px;
  }
  #page-dashboard .two-column {
    gap: 10px;
  }
  #page-dashboard .two-column > .panel {
    padding: 12px 14px;
  }
  #page-dashboard .two-column > .panel .panel-head {
    margin-bottom: 8px;
  }
  #page-dashboard .recent-item {
    gap: 10px;
    padding: 9px 0;
  }
  #page-dashboard .steps {
    gap: 6px;
    font-size: 11.5px;
    line-height: 1.35;
  }
  body[data-current-page="dashboard"] .app-signature-main {
    padding: 3px 18px 6px;
    font-size: 10.5px;
  }
}


/* e-Register Simpala v1.0.97 - kebijakan peran, mobile register, dan copy/paste */
.copy-enabled,
.table-number,
input,
textarea,
select,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

.role-policy-panel { min-width: 0; }
.role-policy-head { align-items: flex-start; }
.role-policy-head .btn { flex: 0 0 auto; }
.role-policy-notice { margin-bottom: 16px; }
.role-policy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.role-policy-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: #fbfdfc; }
.role-policy-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.role-policy-card h4 { margin: 2px 0 0; font-size: 15px; line-height: 1.35; color: #243a31; }
.role-policy-badge { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: #eaf3ef; color: #245d4c; font-size: 10px; font-weight: 800; }
.role-route-field { margin-bottom: 13px; }
.role-route-field small { min-height: 34px; line-height: 1.45; }
.role-permission-grid { display: grid; gap: 7px; }
.role-permission-option { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: flex-start; gap: 9px; padding: 9px 10px; border: 1px solid #e2ebe7; border-radius: 10px; background: #fff; cursor: pointer; }
.role-permission-option input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--primary); }
.role-permission-option span { min-width: 0; }
.role-permission-option strong { display: block; color: #30483e; font-size: 11.5px; line-height: 1.35; }
.role-permission-option small { display: block; margin-top: 2px; color: var(--muted); font-size: 10.25px; line-height: 1.4; }

#page-dashboard .two-column > .panel:last-child .panel-head { margin-bottom: 10px; }
#page-dashboard .two-column > .panel:last-child .steps { font-size: 12px; line-height: 1.45; gap: 8px; }

@media (min-width: 1051px) and (max-width: 1440px) and (max-height: 820px) {
  #page-dashboard .stat-card-last-number > span { font-size: 12px; }
  #page-dashboard .stat-card-last-number #statLastNumber { font-size: 18px; line-height: 1.15; }
  #page-dashboard .two-column > .panel:last-child .panel-head .eyebrow { font-size: 10px; }
  #page-dashboard .two-column > .panel:last-child .panel-head h3 { font-size: 15px; }
  #page-dashboard .two-column > .panel:last-child .steps { font-size: 11.5px; line-height: 1.38; gap: 6px; }
}

@media (max-width: 900px) {
  .role-policy-grid { grid-template-columns: 1fr; }
  .role-policy-head .btn { width: 100%; }
}

@media (max-width: 640px) {
  #page-register .panel { padding: 13px; }
  #page-register .panel-head { gap: 10px; margin-bottom: 12px; }
  #page-register .toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 7px; }
  #page-register .toolbar .btn { width: 100%; min-width: 0; padding: 9px 7px; font-size: 10.5px; }
  #page-register .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  #page-register .filter-grid .field { gap: 4px; min-width: 0; }
  #page-register .filter-grid .field > span { font-size: 9.5px; }
  #page-register .filter-grid input,
  #page-register .filter-grid select { min-height: 38px; height: 38px; padding: 7px 9px; font-size: 11px; }
  #page-register .filter-grid .field:first-child,
  #page-register .filter-actions { grid-column: 1 / -1; }
  #page-register .filter-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  #page-register .filter-actions .btn { width: 100%; min-height: 38px; padding: 8px; font-size: 11px; }
  #page-register .data-table tbody { gap: 9px; }
  #page-register .data-table tr { border-radius: 12px; box-shadow: 0 5px 13px rgba(20,65,51,.05); }
  #page-register .data-table td { grid-template-columns: 91px minmax(0, 1fr); gap: 8px; padding: 8px 10px; font-size: 11px; line-height: 1.35; }
  #page-register .data-table td::before { font-size: 9px; }
  #page-register .table-number { font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
  #page-register .table-subject strong { font-size: 11.5px; }
  #page-register .table-subject span,
  #page-register .table-creator small { font-size: 10px; }
  #page-register .status-badge { font-size: 9.5px; padding: 4px 7px; }
  #page-register .table-actions { gap: 5px; }
  #page-register .action-btn { min-height: 34px; padding: 7px 6px; font-size: 9.75px; }
  #page-register .pagination { gap: 8px; font-size: 10.5px; }

  .role-policy-card { padding: 13px; }
  .role-policy-card > header { display: block; }
  .role-policy-badge { display: inline-block; margin-top: 7px; }
  .role-permission-option { padding: 8px; }
}


/* v1.0.97 - penyempurnaan status, salin/tempel, dan proporsi mobile */
.status-pending_reviewer { background: #fff1d6; color: #825c0f; }
.login-card,
.auth-card,
.login-card p,
.login-card h1,
.login-card h2,
.login-card h3,
.login-card label,
.login-card small,
.auth-card p,
.auth-card h1,
.auth-card h2,
.auth-card h3,
.auth-card label,
.auth-card small {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

@media (max-width: 640px) {
  #page-register .filter-grid { align-items: end; }
  #page-register .filter-grid .field > span { min-height: 12px; line-height: 1.2; }
  #page-register .data-table td[data-label="Nomor Surat"] { padding-top: 10px; padding-bottom: 10px; }
  #page-register .data-table td[data-label="Perihal/Tujuan"] { padding-top: 9px; padding-bottom: 9px; }
  #page-register .table-number { font-weight: 750; letter-spacing: -.01em; }
  #page-register .table-subject strong { line-height: 1.32; }
  #page-register .table-subject span { margin-top: 3px; line-height: 1.32; }
  #page-register .status-badge { display: inline-flex; justify-content: center; min-width: 76px; }
}


/* Konfirmasi penghapusan tetap ringkas tanpa input kata HAPUS. */
.modal-confirmation-text {
  margin: 12px 0 2px;
  border: 1px solid #e2e9e5;
  border-radius: 11px;
  padding: 11px 12px;
  background: #f8faf9;
  color: #52645d;
  font-size: 12px;
  line-height: 1.45;
}

/* ========================================================================== */
/* e-Register Simpala v1.0.97 - klasifikasi fleksibel dan filter pegawai      */
/* ========================================================================== */
.classification-reference-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #d7e2dd;
  border-radius: 10px;
  background: #f6f9f7;
}
.classification-reference-tools .btn { flex: 0 0 auto; }
.classification-reference-tools small {
  min-width: 0;
  color: #5e6e67;
  font-size: 10.75px;
  line-height: 1.35;
}
.classification-reference-card { width: min(920px, calc(100vw - 32px)); max-height: min(88vh, 760px); }
.classification-reference-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(190px, .7fr);
  gap: 12px;
  margin: 16px 0 12px;
}
.classification-reference-content {
  min-height: 180px;
  max-height: min(54vh, 470px);
  overflow: auto;
  padding-right: 3px;
  scrollbar-gutter: stable;
}
.classification-reference-list,
.classification-unit-list,
.classification-note-list { display: grid; gap: 9px; }
.classification-reference-item,
.classification-unit-item,
.classification-note-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 13px;
  border: 1px solid #d8e2dd;
  border-radius: 11px;
  background: #fff;
}
.classification-reference-item > div,
.classification-unit-item > div { min-width: 0; }
.classification-reference-item > div > strong {
  display: inline-flex;
  margin-bottom: 3px;
  color: #15594a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .025em;
}
.classification-reference-item h3 {
  margin: 0;
  color: #243a31;
  font-size: 13.25px;
  line-height: 1.3;
}
.classification-reference-item p,
.classification-unit-item p,
.classification-note-list p {
  margin: 4px 0 0;
  color: #617069;
  font-size: 11px;
  line-height: 1.42;
}
.classification-unit-item { display: block; }
.classification-unit-head,
.classification-unit-code,
.classification-unit-foot { display: flex; align-items: center; gap: 9px; min-width: 0; }
.classification-unit-head span {
  flex: 0 0 auto;
  min-width: 74px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e2f0ea;
  color: #1f654e;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}
.classification-unit-head strong { min-width: 0; font-size: 12.75px; }
.classification-unit-code { margin-top: 8px; }
.classification-unit-code b { color: #15594a; font-size: 13px; }
.classification-unit-code span { color: #455a50; font-size: 11.25px; font-weight: 650; }
.classification-unit-foot { justify-content: space-between; margin-top: 9px; }
.classification-unit-foot small { color: #65766e; font-size: 10.5px; }
.classification-note-list article { display: block; }
.classification-note-list article strong { color: #25463a; font-size: 12px; }
.classification-source-note { background: #f2f7f4 !important; }


.classification-mapping-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.classification-mapping-item {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #d7e3de;
  border-radius: 11px;
  background: #fff;
}
.classification-mapping-item > p,
.classification-unit-item > p { margin: 8px 0 0; color: #53665d; font-size: 11px; line-height: 1.48; }
.classification-alternative {
  display: grid;
  grid-template-columns: minmax(135px, .45fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 9px;
  padding: 8px 9px;
  border-radius: 8px;
  background: #f3f7f5;
}
.classification-alternative strong { color: #40584e; font-size: 10.25px; }
.classification-alternative span { min-width: 0; color: #285f51; font-size: 10.75px; font-weight: 700; overflow-wrap: anywhere; }

#page-master .master-profile-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
#page-master .master-profile-toolbar .master-caption { margin: 0; }
#page-master .master-profile-toolbar > span {
  flex: 0 0 auto;
  color: #53665d;
  font-size: 11px;
  font-weight: 700;
}
#page-master .master-profile-filterbar {
  display: grid;
  grid-template-columns: minmax(210px, 1.3fr) repeat(3, minmax(150px, .8fr));
  gap: 10px;
  margin-bottom: 13px;
  padding: 11px 12px;
  border: 1px solid #d7e1dc;
  border-radius: 11px;
  background: #f6f9f7;
}
#page-master .master-profile-filterbar .field { gap: 4px; }
#page-master .master-profile-filterbar .field > span {
  color: #4f6259;
  font-size: 10.25px;
  font-weight: 750;
}
#page-master .master-profile-filterbar input,
#page-master .master-profile-filterbar select {
  min-width: 0;
  min-height: 38px;
  height: 38px;
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 11.5px;
}

@media (min-width: 1051px) and (max-width: 1440px) and (max-height: 820px) {
  /* Seluruh teks Profil & Preferensi naik 1px dari build sebelumnya. */
  #page-profile .profile-avatar { font-size: 32px; }
  #page-profile .eyebrow { font-size: 12.5px; }
  #page-profile .account-identity h3 { font-size: clamp(19px, calc(1.75vw + 1px), 23px); }
  #page-profile .account-headline { font-size: 11.5px; }
  #page-profile .account-badge { font-size: 10.75px; }
  #page-profile .account-photo-actions .btn,
  #page-profile .account-preferences-card .form-actions .btn { font-size: 11.75px; }
  #page-profile .account-photo-panel .form-message,
  #page-profile .form-message { font-size: 10.5px; }
  #page-profile .account-details-grid dt { font-size: 8.5px; }
  #page-profile .account-details-grid dd { font-size: 10.5px; }
  #page-profile .panel-head h3 { font-size: 15px; }
  #page-profile .panel-description { font-size: 10px; }
  #page-profile .account-preferences-card .field > span { font-size: 13.25px; }
  #page-profile .account-preferences-card .field input,
  #page-profile .account-preferences-card .field select { font-size: 11.5px; }
  #page-profile .field-help { font-size: 9px; }
  #page-profile .security-actions strong { font-size: 13.25px; }
  #page-profile .security-actions span { font-size: 9.5px; }
  #page-profile .security-actions .btn { font-size: 11.75px; }
  /* Sesuai permintaan, keterangan format foto justru turun 2px. */
  #page-profile #profilePhotoHelp { font-size: 8.5px !important; line-height: 1.25; }
}

@media (max-width: 900px) {
  #page-master .master-profile-filterbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #page-master .master-profile-search { grid-column: 1 / -1; }
  .classification-reference-controls { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .classification-mapping-list { grid-template-columns: 1fr; }
  .classification-reference-tools { align-items: stretch; flex-direction: column; gap: 7px; padding: 9px; }
  .classification-reference-tools .btn { width: 100%; }
  .classification-reference-tools small { font-size: 10px; text-align: left; }
  .classification-reference-card { width: calc(100vw - 18px); max-height: 92vh; padding: 16px 13px; }
  .classification-reference-content { max-height: 55vh; }
  .classification-reference-item { grid-template-columns: 1fr; gap: 9px; }
  .classification-reference-item .btn { width: 100%; }
  .classification-unit-head { align-items: flex-start; }
  .classification-unit-foot { align-items: stretch; flex-direction: column; }
  .classification-unit-foot .btn { width: 100%; }
  #page-master .master-profile-toolbar { align-items: flex-start; flex-direction: column; gap: 4px; }
  #page-master .master-profile-filterbar { grid-template-columns: 1fr; gap: 8px; padding: 10px; }
  #page-master .master-profile-search { grid-column: auto; }
}

/* Dialog rujukan memakai lebar sendiri agar kartu tidak melampaui elemen dialog. */
.classification-reference-dialog { width: min(960px, calc(100% - 24px)); }
.classification-reference-dialog .classification-reference-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}



/* ========================================================================== */
/* e-Register Simpala v1.0.97 - perbaikan final proporsi dan klasifikasi      */
/* ========================================================================== */
.custom-classification-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #d8e3de;
  border-radius: 11px;
  background: #f8fbf9;
}
.custom-classification-fields.hidden { display: none !important; }

/* Filter Buku Register diperbesar 1px pada tampilan normal. */
#page-register .filter-grid .field > span { font-size: 14px; }
#page-register .filter-grid input,
#page-register .filter-grid select { font-size: 15px; }

/* Judul dua halaman riwayat/validasi harus setara. */
#page-mine > .panel > .panel-head h3,
#page-approval .approval-panel-head h3 {
  font-size: 18px;
  line-height: 1.28;
}

@media screen and (min-width: 641px) {
  /* Buku Register: seluruh isi berada tepat di tengah secara vertikal. */
  #page-register .data-table th,
  #page-register .data-table td {
    vertical-align: middle;
  }
  #page-register .data-table th {
    font-size: 12.5px;
    line-height: 1.25;
  }
  #page-register .table-number {
    font-size: 14px;
    line-height: 1.35;
  }
}

/* Proporsi tabel Unit/Seksi pada Master Data. */
@media screen and (min-width: 901px) {
  #page-master .master-table-units {
    width: 100%;
    min-width: 980px;
    table-layout: fixed;
  }
  #page-master .master-table-units th,
  #page-master .master-table-units td { vertical-align: middle; }
  #page-master .master-table-units th:nth-child(1), #page-master .master-table-units td:nth-child(1) { width: 4.3%; }
  #page-master .master-table-units th:nth-child(2), #page-master .master-table-units td:nth-child(2) { width: 8.6%; }
  #page-master .master-table-units th:nth-child(3), #page-master .master-table-units td:nth-child(3) { width: 23%; }
  #page-master .master-table-units th:nth-child(4), #page-master .master-table-units td:nth-child(4) { width: 13.8%; }
  #page-master .master-table-units th:nth-child(5), #page-master .master-table-units td:nth-child(5) { width: 24%; }
  #page-master .master-table-units th:nth-child(6), #page-master .master-table-units td:nth-child(6) { width: 8.2%; text-align: center; }
  #page-master .master-table-units th:nth-child(7), #page-master .master-table-units td:nth-child(7) { width: 18.1%; }
  #page-master .master-table-units .master-unit-name { white-space: normal; }
}

/* Audit Aktivitas: empat kolom seimbang dengan isi tengah vertikal. */
@media screen and (min-width: 901px) {
  #page-audit .audit-item {
    grid-template-columns: 132px minmax(165px, .72fr) minmax(260px, 1.55fr) 92px;
    gap: 0;
    align-items: stretch;
  }
  #page-audit .audit-item > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 10px 12px;
  }
  #page-audit .audit-time,
  #page-audit .audit-source { text-align: center; }
}

/* 1366×768: kembali mendekati ukuran awal, hanya dirapatkan secukupnya. */
@media screen and (min-width: 1051px) and (max-width: 1440px) and (max-height: 820px) {
  body[data-current-page="issue"] .topbar,
  body[data-current-page="register"] .topbar {
    min-height: 66px;
    padding: 8px 21px;
  }
  body[data-current-page="issue"] .content,
  body[data-current-page="register"] .content { padding: 12px 18px 12px; }

  #page-issue > .panel { padding: 15px 18px; }
  #page-issue .panel-head { margin-bottom: 10px; }
  #page-issue #issueForm .form-grid { gap: 9px 14px; }
  #page-issue #issueForm .field { gap: 4px; }
  #page-issue #issueForm .field > span { font-size: 11.5px; }
  #page-issue #issueForm .field input,
  #page-issue #issueForm .field select { min-height: 39px; height: 39px; padding: 7px 11px; font-size: 12.5px; }
  #page-issue #issueForm .field textarea { min-height: 56px; height: 56px; padding: 8px 11px; font-size: 12.5px; line-height: 1.38; }
  #page-issue #issueForm .field small { font-size: 10.5px; }
  #page-issue .classification-reference-tools { padding: 8px 10px; }
  #page-issue #issueForm .issue-warning { margin-top: 9px; padding: 9px 11px; font-size: 11px; line-height: 1.38; }
  #page-issue #issueForm .form-actions { margin-top: 9px; }
  #page-issue #issueForm .form-actions .btn { min-height: 38px; padding: 7px 14px; }

  #page-register > .panel { padding: 14px 17px; }
  #page-register .panel-head { margin-bottom: 10px; }
  #page-register .filter-grid { gap: 8px; margin-bottom: 10px; padding: 9px 10px; }
  #page-register .filter-grid .field { gap: 4px; }
  #page-register .filter-grid .field > span { font-size: 11px; line-height: 1.2; }
  #page-register .filter-grid input,
  #page-register .filter-grid select { min-height: 36px; height: 36px; padding: 7px 9px; font-size: 12px; }
  #page-register .filter-actions .btn { min-height: 36px; padding: 7px 10px; font-size: 11px; }
  #page-register .data-table th { padding-top: 8px; padding-bottom: 8px; font-size: 10.5px; }
  #page-register .data-table td { padding-top: 7px; padding-bottom: 7px; vertical-align: middle; }
  #page-register .table-number { font-size: 14px; }
}

/* Area browser laptop yang pendek: tetap layak dibaca, tidak dipadatkan ekstrem. */
@media screen and (min-width: 1051px) and (max-width: 1440px) and (max-height: 680px) {
  body[data-current-page="issue"] .topbar,
  body[data-current-page="register"] .topbar { min-height: 60px; padding: 6px 19px; }
  body[data-current-page="issue"] .content,
  body[data-current-page="register"] .content { padding: 8px 16px 8px; }

  #page-issue > .panel { padding: 12px 15px; }
  #page-issue .panel-head { margin-bottom: 7px; }
  #page-issue #issueForm .form-grid { gap: 7px 12px; }
  #page-issue #issueForm .field input,
  #page-issue #issueForm .field select { min-height: 36px; height: 36px; padding: 6px 10px; }
  #page-issue #issueForm .field textarea { min-height: 48px; height: 48px; padding: 6px 10px; line-height: 1.32; }
  #page-issue #issueForm .issue-warning { margin-top: 7px; padding: 7px 10px; }
  #page-issue #issueForm .form-actions { margin-top: 7px; }
  #page-issue #issueForm .form-actions .btn { min-height: 36px; }

  #page-register > .panel { padding: 12px 15px; }
  #page-register .panel-head { margin-bottom: 8px; }
  #page-register .filter-grid { gap: 6px; margin-bottom: 8px; padding: 8px; }
  #page-register .filter-grid input,
  #page-register .filter-grid select,
  #page-register .filter-actions .btn { min-height: 34px; height: 34px; padding-top: 6px; padding-bottom: 6px; }
  #page-register .data-table th { padding-top: 7px; padding-bottom: 7px; }
  #page-register .data-table td { padding-top: 6px; padding-bottom: 6px; }
}

@media screen and (max-width: 640px) {
  .custom-classification-fields { grid-template-columns: 1fr; gap: 9px; padding: 10px; }
  #page-register .filter-grid .field > span { font-size: 10.5px; }
  #page-register .filter-grid input,
  #page-register .filter-grid select { font-size: 12px; }
  #page-register .data-table td { align-items: center; }
  #page-register .table-number { font-size: 11px; }
}
