:root {
  --primary: #356B52;
  --primary-700: #295540;
  --navy: #234535;
  --teal: #4A8468;
  --accent: #F2B84B;
  --success: #2E8B57;
  --danger: #C84A52;
  --warning: #D97706;
  --info: #5B8B70;
  --surface: #FFFFFF;
  --surface-alt: #FFFFFF;
  --surface-blue: #EDF6F0;
  --surface-green: #E8F4EC;
  --surface-yellow: #FFF6E3;
  --surface-red: #FDECEF;
  --text: #233B30;
  --muted: #66776E;
  --border: #DCE7E0;
  --shadow: 0 8px 28px rgba(35, 69, 53, .08);
  --radius: 12px;
  --radius-lg: 18px;
  --sidebar-width: 250px;
  --bottom-nav-height: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--surface-alt); }
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface-alt);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.app-root { min-height: 100vh; }
.app-shell { min-height: 100vh; }
.app-main {
  width: 100%;
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 16px);
}
.content-wrap { width: min(100%, 1180px); margin: 0 auto; padding: 16px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--primary);
  color: #fff;
  padding: max(14px, env(safe-area-inset-top)) 16px 14px;
  box-shadow: 0 4px 16px rgba(53, 107, 82, .18);
}
.topbar-inner { width: min(100%, 1180px); margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.topbar-title { min-width: 0; flex: 1; }
.topbar-title h1 { font-size: 18px; line-height: 1.25; margin: 0; font-weight: 800; }
.topbar-title p { margin: 3px 0 0; color: rgba(255,255,255,.82); font-size: 12px; }
.icon-btn {
  width: 44px; height: 44px; flex: 0 0 44px;
  border: 0; border-radius: 50%; display: inline-grid; place-items: center;
  background: rgba(255,255,255,.12); color: #fff;
}
.icon-btn:hover { background: rgba(255,255,255,.2); }

.sidebar {
  display: none;
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  background: var(--navy);
  color: #fff;
  z-index: 40;
  padding: 24px 16px;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  color: var(--primary); background: #fff; font-weight: 900;
}
.brand strong { display: block; font-size: 16px; }
.brand small { color: rgba(255,255,255,.72); }
.sidebar-nav { display: grid; gap: 6px; }
.nav-link {
  min-height: 46px; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; text-decoration: none;
  color: rgba(255,255,255,.8); font-size: 14px; font-weight: 700;
}
.nav-link:hover, .nav-link.is-active { color: #fff; background: rgba(255,255,255,.12); }
.nav-icon { width: 22px; height: 22px; display: grid; place-items: center; font-size: 18px; }
.sidebar-user { margin-top: 24px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; }
.sidebar-user-head { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 4px; border-radius: 10px; }
.sidebar-user-head:hover { background: rgba(255,255,255,.08); }
.sidebar-user-avatar { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.14); font-size: 12px; font-weight: 900; }
.sidebar-user-copy { min-width: 0; }
.sidebar-user strong { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { color: rgba(255,255,255,.7); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user em { color: rgba(255,255,255,.48); display: block; margin-top: 2px; font-size: 10px; font-style: normal; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.sidebar-account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.sidebar-account-actions a, .sidebar-account-actions button { min-height: 38px; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 6px; background: rgba(255,255,255,.06); color: #fff; text-decoration: none; font-size: 11px; font-weight: 800; }
.sidebar-account-actions a:hover, .sidebar-account-actions button:hover { background: rgba(255,255,255,.14); }
.topbar-account { width: 44px; height: 44px; flex: 0 0 44px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; color: #fff; text-decoration: none; background: rgba(255,255,255,.12); }
.topbar-account:hover { background: rgba(255,255,255,.2); }
.topbar-account-avatar { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--primary); font-size: 11px; font-weight: 900; }
.topbar-account-copy { display: none; min-width: 0; text-align: left; }
.topbar-account-copy strong, .topbar-account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-account-copy strong { font-size: 11px; }
.topbar-account-copy small { color: rgba(255,255,255,.72); font-size: 9px; }
.account-settings-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.account-settings-head h2 { margin: 0; font-size: 15px; }
.account-settings-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 35;
  min-height: calc(var(--bottom-nav-height) + var(--safe-bottom));
  padding: 8px 8px calc(8px + var(--safe-bottom));
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  backdrop-filter: blur(10px);
}
.bottom-link {
  min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; border-radius: 10px; text-decoration: none; color: #7A8B82; font-size: 10px; font-weight: 700;
}
.bottom-link .nav-icon { font-size: 19px; }
.bottom-link.is-active { color: var(--primary); background: var(--surface-blue); }

.page-grid { display: grid; gap: 16px; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 12px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card.is-flat { box-shadow: none; }
.card.is-blue { background: var(--surface-blue); border-color: #D5E9DC; }
.card.is-green { background: var(--surface-green); border-color: #D0EBDD; }
.card.is-yellow { background: var(--surface-yellow); border-color: #F9E7BD; }
.card.is-red { background: var(--surface-red); border-color: #F4CDD3; }
.card-title { font-size: 14px; line-height: 1.4; font-weight: 800; margin: 0 0 4px; }
.card-subtitle { font-size: 12px; color: var(--muted); margin: 0; }
.section-title { font-size: 16px; margin: 4px 0 10px; font-weight: 800; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-head h2 { margin: 0; font-size: 16px; }
.section-head p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

.hero-card { padding: 18px; background: var(--surface-blue); border: 0; }
.hero-card .date { font-size: 12px; color: var(--primary); font-weight: 800; }
.hero-card .status { margin-top: 6px; font-size: 13px; color: var(--muted); }
.greeting { margin-bottom: 16px; }
.greeting h2 { margin: 0; font-size: 20px; }
.greeting p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.stat-card { min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; }
.stat-value { font-size: 25px; line-height: 1; font-weight: 900; color: var(--primary); }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-card[data-tone="warning"] .stat-value { color: var(--warning); }
.stat-card[data-tone="success"] .stat-value { color: var(--success); }
.stat-card[data-tone="danger"] .stat-value { color: var(--danger); }
.stat-card[data-tone="navy"] .stat-value { color: var(--navy); }

.btn {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 800;
  text-decoration: none;
  transition: transform .12s ease, opacity .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .48; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-primary { color: #fff; background: var(--primary); }
.btn-primary:hover { background: var(--primary-700); }
.btn-secondary { color: var(--primary); background: #fff; border-color: var(--primary); }
.btn-teal { color: #fff; background: var(--teal); }
.btn-success { color: #fff; background: var(--success); }
.btn-warning { color: #fff; background: #E58100; }
.btn-danger { color: #fff; background: var(--danger); }
.btn-danger-outline { color: var(--danger); background: #fff; border-color: var(--danger); }
.btn-ghost { color: var(--text); background: transparent; border-color: var(--border); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 140px; }
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.action-card {
  min-height: 98px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff;
  padding: 14px; text-align: left; color: var(--text); display: flex; flex-direction: column; justify-content: space-between;
}
.action-card:hover { border-color: var(--primary); background: var(--surface-blue); }
.action-number { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-blue); color: var(--primary); font-size: 12px; font-weight: 900; }
.action-label { font-size: 13px; font-weight: 800; }

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 800; color: var(--text); }
.field .hint { font-size: 11px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 11px 12px;
  border: 1px solid var(--border); border-radius: 9px;
  background: #fff; color: var(--text); outline: none;
}
.textarea { min-height: 100px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(53,107,82,.12); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.field-error { min-height: 14px; color: var(--danger); font-size: 11px; }
.inline-fields { display: grid; gap: 12px; }
.segmented { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  min-height: 46px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--primary);
  color: var(--primary); background: #fff; font-weight: 800; font-size: 13px;
}
.segmented input:checked + span { color: #fff; background: var(--primary); }
.checkbox-row { min-height: 44px; display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: 18px; height: 18px; }

.list { display: grid; gap: 10px; }
.list-item {
  display: flex; align-items: center; gap: 12px; min-height: 70px;
  padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff;
}
.list-item.is-clickable { cursor: pointer; }
.list-item.is-clickable:hover { border-color: var(--primary); background: #FBFDFC; }
.list-main { flex: 1; min-width: 0; }
.list-title { margin: 0; font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.list-meta { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.avatar {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface-blue); color: var(--primary); font-weight: 900; font-size: 12px;
}
.chevron { color: var(--primary); font-size: 20px; }

.chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 25px; padding: 4px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 900; white-space: nowrap;
  background: #EEF2F5; color: var(--muted);
}
.chip-success { background: var(--surface-green); color: var(--success); }
.chip-warning { background: var(--surface-yellow); color: var(--warning); }
.chip-danger { background: var(--surface-red); color: var(--danger); }
.chip-info { background: var(--surface-blue); color: var(--primary); }
.chip-navy { background: #E8EDF2; color: var(--navy); }

.timeline { display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 32px 1fr; gap: 10px; position: relative; padding-bottom: 16px; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 30px; bottom: 0; width: 2px; background: var(--border); }
.timeline-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-green); color: var(--success); font-size: 11px; font-weight: 900; }
.timeline-content { padding-top: 3px; }
.timeline-content strong { font-size: 12px; }
.timeline-content p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.data-pair { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.data-pair:last-child { border-bottom: 0; }
.data-pair span { color: var(--muted); font-size: 12px; }
.data-pair strong { text-align: right; font-size: 12px; overflow-wrap: anywhere; }

.camera-box, .map-box {
  position: relative; min-height: 245px; border-radius: var(--radius); overflow: hidden;
  background: #DCE8EE; display: grid; place-items: center; border: 1px solid var(--border);
}
.camera-box img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.camera-placeholder { text-align: center; color: #788A80; }
.camera-placeholder .face { width: 90px; height: 120px; border-radius: 50px 50px 36px 36px; background: #9EB4C1; margin: 0 auto 10px; opacity: .9; }
.map-box {
  min-height: 190px;
  background-image: linear-gradient(#C7D8E0 1px, transparent 1px), linear-gradient(90deg, #C7D8E0 1px, transparent 1px);
  background-size: 42px 42px;
}
.map-pin { width: 34px; height: 34px; border-radius: 50% 50% 50% 0; background: var(--danger); transform: rotate(-45deg); display: grid; place-items: center; box-shadow: 0 5px 14px rgba(200,74,82,.3); }
.map-pin::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.location-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.notice { padding: 12px 14px; border-radius: 10px; font-size: 12px; line-height: 1.55; border: 1px solid transparent; }
.notice-info { background: var(--surface-blue); color: var(--primary); border-color: #D5E9DC; }
.notice-success { background: var(--surface-green); color: var(--success); border-color: #D1EBDD; }
.notice-warning { background: var(--surface-yellow); color: #9A6200; border-color: #F6E1AF; }
.notice-danger { background: var(--surface-red); color: var(--danger); border-color: #F2CED4; }

.empty-state { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-blue); color: var(--primary); font-size: 24px; margin: 0 auto 12px; }
.empty-state h3 { color: var(--text); font-size: 15px; margin: 0 0 6px; }
.empty-state p { font-size: 12px; margin: 0; line-height: 1.6; }
.skeleton { min-height: 84px; border-radius: var(--radius); background: linear-gradient(90deg,#EDF2F5 25%,#F8FAFB 38%,#EDF2F5 63%); background-size: 400% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { 0%{background-position:100% 0}100%{background-position:0 0} }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 12px; vertical-align: top; }
th { color: #fff; background: var(--primary); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; }
.pagination .btn { min-width: 44px; padding: 8px 10px; }

.auth-page { min-height: 100vh; background: #fff; display: grid; grid-template-rows: auto 1fr; }
.auth-brand { background: var(--primary); color: #fff; padding: max(20px, env(safe-area-inset-top)) 20px 28px; }
.auth-brand h1 { margin: 0; font-size: 20px; }
.auth-brand p { margin: 4px 0 0; font-size: 12px; color: rgba(255,255,255,.85); }
.auth-panel { width: min(100%, 460px); margin: 0 auto; padding: 34px 20px; }
.auth-logo { width: 78px; height: 78px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-blue); color: var(--primary); font-size: 22px; font-weight: 900; margin: 0 auto 18px; }
.auth-heading { text-align: center; margin-bottom: 24px; }
.auth-heading h2 { font-size: 20px; margin: 0; }
.auth-heading p { color: var(--muted); margin: 6px 0 0; font-size: 13px; }
.login-help { margin-top: 14px; text-align: center; font-size: 11px; color: var(--muted); }

.profile-head { text-align: center; padding: 18px; }
.profile-head .avatar { width: 78px; height: 78px; margin: 0 auto 12px; font-size: 20px; }
.profile-head h2 { margin: 0; font-size: 17px; }
.profile-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.tab { min-height: 40px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--muted); padding: 8px 12px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.tab.is-active { color: #fff; background: var(--primary); border-color: var(--primary); }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(18,42,31,.48); display: grid; place-items: end center; padding: 16px; }
.modal { width: min(100%, 560px); max-height: 88vh; overflow-y: auto; border-radius: 18px 18px 12px 12px; background: #fff; box-shadow: 0 20px 70px rgba(0,0,0,.25); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; background: #fff; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 16px; }
.modal-body { padding: 16px; }
.modal-foot { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 14px 16px; background: #fff; border-top: 1px solid var(--border); }
.modal-foot .btn { flex: 1; }

.toast-root { position: fixed; z-index: 100; left: 12px; right: 12px; bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 12px); display: grid; gap: 8px; pointer-events: none; }
.toast { width: min(100%, 480px); margin: 0 auto; padding: 12px 14px; border-radius: 10px; color: #fff; background: var(--navy); box-shadow: 0 12px 32px rgba(35,69,53,.22); font-size: 12px; line-height: 1.5; animation: toastIn .2s ease; }
.toast.is-success { background: var(--success); }
.toast.is-danger { background: var(--danger); }
.toast.is-warning { background: #A66500; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }

.global-loading { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; align-content: center; gap: 12px; background: rgba(255,255,255,.86); backdrop-filter: blur(3px); color: var(--navy); }
.global-loading.is-hidden { display: none; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid #D9E7ED; border-top-color: var(--primary); animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.success-screen { text-align: center; padding-top: 20px; }
.success-badge { width: 92px; height: 92px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 900; margin: 12px auto 18px; }
.success-screen h2 { font-size: 18px; margin: 0 0 5px; }
.success-screen > p { color: var(--muted); font-size: 12px; margin: 0 0 18px; }

.progress-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.progress-step { text-align: center; font-size: 10px; color: var(--muted); }
.progress-step span { width: 28px; height: 28px; margin: 0 auto 5px; border-radius: 50%; display: grid; place-items: center; background: #E8EEF2; color: var(--muted); font-weight: 900; }
.progress-step.is-active span, .progress-step.is-done span { color: #fff; background: var(--primary); }
.progress-step.is-done span { background: var(--success); }

.file-preview { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 9px; background: var(--surface-blue); }
.file-preview .thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: #D8E4EA; }
.file-preview .file-info { flex: 1; min-width: 0; }
.file-preview strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-preview small { color: var(--muted); font-size: 10px; }

.temporary-pin {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px; margin: 12px 0; border: 1px dashed var(--primary); border-radius: 10px;
  background: var(--surface-blue);
}
.temporary-pin code { font: 800 22px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; color: var(--navy); }
.request-id { margin-top: 10px !important; font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }

.json-view { margin: 0; padding: 12px; max-height: 300px; overflow: auto; background: #1E3A2D; color: #EDF6F0; border-radius: 10px; font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (min-width: 700px) {
  .content-wrap { padding: 20px 24px; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .inline-fields { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stat-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .modal-backdrop { place-items: center; }
  .modal { border-radius: var(--radius-lg); }
}

@media (min-width: 1024px) {
  .sidebar { display: block; }
  .bottom-nav { display: none; }
  .app-main { margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); padding-bottom: 30px; }
  .topbar { padding-left: 24px; padding-right: 24px; }
  .topbar-inner { max-width: 1180px; }
  .topbar-account { width: auto; max-width: 220px; padding: 6px 10px 6px 6px; }
  .topbar-account-copy { display: block; }
  .stat-grid { grid-template-columns: repeat(6, minmax(0,1fr)); }
  .toast-root { left: calc(var(--sidebar-width) + 20px); bottom: 20px; }
  .auth-page { grid-template-columns: .85fr 1.15fr; grid-template-rows: 1fr; }
  .auth-brand { display: flex; flex-direction: column; justify-content: center; padding: 70px; }
  .auth-brand h1 { font-size: 34px; }
  .auth-brand p { font-size: 15px; max-width: 420px; }
  .auth-panel { align-self: center; }
}

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

/* EABSENSI FRONTEND 1.0.4 - logo, profile icons, and password visibility */
.brand-mark { overflow: hidden; background: #fff; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }

.auth-logo {
  overflow: hidden;
  padding: 0;
  background: transparent;
  box-shadow: 0 10px 30px rgba(35, 69, 53, .14);
}
.auth-logo img { width: 100%; height: 100%; object-fit: cover; }
.auth-logo-alert {
  background: var(--surface-red);
  color: var(--danger);
  box-shadow: none;
}

.person-icon { width: 100%; height: 100%; display: grid; place-items: center; color: inherit; }
.person-icon svg {
  width: 72%; height: 72%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.avatar { overflow: hidden; }
.avatar-male { color: #356B52; background: #E8F4EC; }
.avatar-female { color: #795F78; background: #F4EDF4; }
.avatar-neutral { color: #66776E; background: #EEF2F0; }
.avatar .person-icon svg { width: 76%; height: 76%; }
.sidebar-user-avatar .person-icon,
.topbar-account-avatar .person-icon { width: 100%; height: 100%; }
.sidebar-user-avatar .person-icon svg { width: 70%; height: 70%; }
.topbar-account-avatar .person-icon svg { width: 72%; height: 72%; }

.password-control { position: relative; }
.password-control .input { width: 100%; padding-right: 52px; }
.password-toggle {
  position: absolute;
  top: 50%; right: 4px;
  width: 44px; height: 44px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
}
.password-toggle:hover,
.password-toggle:focus-visible { color: var(--primary); background: var(--surface-blue); outline: none; }
.password-toggle svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.password-toggle .eye-hide { display: none; }
.password-toggle[aria-pressed="true"] .eye-show { display: none; }
.password-toggle[aria-pressed="true"] .eye-hide { display: grid; }
.password-toggle .eye-show,
.password-toggle .eye-hide { place-items: center; }

/* EABSENSI-LOGO-FIX-106 */
.auth-logo {
    width: 110px !important;
    height: 110px !important;
    padding: 10px !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    overflow: visible !important;
}

.auth-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.brand-mark {
    padding: 4px !important;
    background: #ffffff !important;
}

.brand-mark img {
    object-fit: contain !important;
}
