/* =========================================================
   Laporan Magang: desain neumorphism (mode terang & gelap)
   Permukaan "timbul" (raised) dan "tenggelam" (inset) dibuat dari
   dua bayangan lembut di atas warna latar yang sama.
   Warna aksen mengikuti --accent (diatur dari panel admin).
   ========================================================= */
:root {
  --accent: #1d4ed8;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 20px;
  --radius-sm: 14px;
  --nav-h: 68px;

  --bg: #e6ebf2;
  --ink: #1f2635;
  --ink-2: #4a5468;
  --muted: #717a8e;
  --line: rgba(31, 38, 53, .08);
  --sh-dark: rgba(158, 172, 196, .55);
  --sh-light: rgba(255, 255, 255, .95);
  --accent-ink: color-mix(in srgb, var(--accent) 88%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--bg));
  --on-accent: #fff;

  --green: #15a05a;
  --red: #d64545;
  --amber: #c27a0e;
  --blue: #2b7bd6;
  --violet: #7c4ddb;
}
:root[data-theme="dark"] {
  --bg: #222733;
  --ink: #e7eaf1;
  --ink-2: #b9c0cf;
  --muted: #8b94a8;
  --line: rgba(255, 255, 255, .07);
  --sh-dark: rgba(0, 0, 0, .5);
  --sh-light: rgba(255, 255, 255, .055);
  --accent-ink: color-mix(in srgb, var(--accent) 55%, #fff);
  --accent-soft: color-mix(in srgb, var(--accent) 22%, var(--bg));
  --green: #3fcf85;
  --red: #f07575;
  --amber: #f0b44c;
  --blue: #6aaef5;
  --violet: #b294f5;
}
:root {
  --raised: 7px 7px 16px var(--sh-dark), -7px -7px 16px var(--sh-light);
  --raised-sm: 4px 4px 9px var(--sh-dark), -4px -4px 9px var(--sh-light);
  --inset: inset 4px 4px 9px var(--sh-dark), inset -4px -4px 9px var(--sh-light);
  --inset-sm: inset 2px 2px 5px var(--sh-dark), inset -2px -2px 5px var(--sh-light);
  color-scheme: light;
}
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased; transition: background .25s, color .25s;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
a { color: var(--accent-ink); }
[hidden] { display: none !important; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

/* ---------- Tombol ---------- */
.btn {
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius-sm); border: 0;
  color: var(--ink); background: var(--bg); box-shadow: var(--raised-sm);
  transition: box-shadow .15s, transform .15s, color .15s;
}
.btn:hover { color: var(--accent-ink); }
.btn:active { box-shadow: var(--inset-sm); transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 4px 4px 10px color-mix(in srgb, var(--accent) 35%, var(--sh-dark)), -4px -4px 10px var(--sh-light); }
.btn-primary:hover { color: var(--on-accent); filter: brightness(1.06); }
.btn-outline, .btn-light { color: var(--ink); }
.btn-light { color: var(--accent-ink); }
.btn-danger { color: var(--red); }
.btn-danger:hover { color: var(--red); }
.btn-link { background: none; box-shadow: none; color: var(--accent-ink); padding: 8px; font-weight: 600; }
.btn-link:active { box-shadow: none; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 12px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; cursor: pointer;
  border-radius: 12px; border: 0; background: var(--bg); color: var(--ink-2); box-shadow: var(--raised-sm);
}
.icon-btn:hover { color: var(--accent-ink); }
.icon-btn:active { box-shadow: var(--inset-sm); }
.icon-btn.danger { color: var(--red); }
.icon-btn .ic { width: 17px; height: 17px; }
.theme-btn .i-sun { display: none; }
[data-theme="dark"] .theme-btn .i-sun { display: block; }
[data-theme="dark"] .theme-btn .i-moon { display: none; }

/* ---------- Navbar ---------- */
.navbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); box-shadow: 0 6px 18px -12px var(--sh-dark); }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--accent-ink); background: var(--bg); box-shadow: var(--raised-sm); overflow: hidden; }
.brand-mark.has-img { padding: 4px; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-text { font-size: 19px; font-weight: 800; letter-spacing: -.03em; }
.brand-text b { font-weight: 500; color: var(--accent-ink); margin-left: 1px; }
.brand-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); padding: 4px 10px; border-radius: 999px; box-shadow: var(--inset-sm); }
.nav-menu { flex: 1; display: flex; justify-content: center; gap: 6px; }
.nav-menu a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; padding: 9px 14px; border-radius: 12px; }
.nav-menu a:hover { color: var(--accent-ink); }
.nav-menu a.active { color: var(--accent-ink); box-shadow: var(--inset-sm); }
.nav-print { display: none; }
.nav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--accent-ink); background: var(--bg); box-shadow: var(--raised-sm); padding: 3px; }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.nav-toggle { display: none; }

/* ---------- Hero / profil ---------- */
.hero { padding: 28px 0 8px; }
.hero-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 26px 28px; border-radius: 26px; background: var(--bg); box-shadow: var(--raised);
}
.hero-sm { padding-top: 22px; }
.profile { display: flex; align-items: center; gap: 20px; min-width: 0; }
.profile-text { min-width: 0; }
.avatar {
  flex: none; width: 76px; height: 76px; border-radius: 22px; overflow: hidden; padding: 4px;
  display: grid; place-items: center; font-size: 24px; font-weight: 800; color: var(--accent-ink);
  background: var(--bg); box-shadow: var(--raised-sm);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.avatar .ic { width: 28px; height: 28px; }
.hero h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -.03em; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.badge-pill { font-size: 13px; font-weight: 700; color: var(--accent-ink); padding: 5px 12px; border-radius: 999px; box-shadow: var(--inset-sm); }
.hero-sub { color: var(--muted); font-size: 14px; }

.progress { display: flex; align-items: center; gap: 16px; }
.progress-text { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.progress-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.progress-sub { font-size: 15px; font-weight: 600; }
.progress-work { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.ring { width: 76px; height: 76px; transform: rotate(-90deg); flex: none; border-radius: 50%; box-shadow: var(--raised-sm); padding: 4px; }
.ring circle { fill: none; stroke-width: 5; }
.ring-bg { stroke: color-mix(in srgb, var(--ink) 10%, transparent); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.ring text { fill: var(--ink); font-family: var(--font); font-size: 13px; font-weight: 800; transform: rotate(90deg); transform-origin: 32px 32px; }

/* ---------- Tab (segmented control) ---------- */
.tabbar { position: sticky; top: var(--nav-h); z-index: 30; padding: 14px 0 10px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
.tabbar-inner { display: flex; }
.tabbar-inner { gap: 6px; padding: 6px; border-radius: 18px; box-shadow: var(--inset); overflow-x: auto; scrollbar-width: none; width: fit-content; max-width: calc(100% - 40px); margin: 0 auto; }
.tabbar-inner::-webkit-scrollbar { display: none; }
.tabbar-item {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); background: none; border: 0; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 13px; flex: none;
}
.tabbar-item:hover { color: var(--ink); }
.tabbar-item.active { color: var(--accent-ink); background: var(--bg); box-shadow: var(--raised-sm); }
.lbl-short { display: none; }

/* ---------- Kerangka halaman & kartu ---------- */
.page { padding-top: 14px; padding-bottom: 56px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.main-col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.view { display: flex; flex-direction: column; gap: 20px; }
.side-col { display: flex; flex-direction: column; gap: 22px; position: sticky; top: calc(var(--nav-h) + 80px); }
.card { background: var(--bg); border-radius: var(--radius); box-shadow: var(--raised); min-width: 0; }
.card-header { display: flex; align-items: center; gap: 14px; padding: 20px 22px 6px; }
.card-header h3 { font-size: 17px; font-weight: 700; flex: 1; }
.card-body { padding: 16px 22px 22px; }
.head-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; color: var(--accent-ink); box-shadow: var(--inset-sm); }
.head-icon.green { color: var(--green); }
.head-icon.red { color: var(--red); }
.head-text { flex: 1; min-width: 0; }
.head-text h3 { font-size: 17px; }
.head-text > span { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }

.pill { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; color: var(--accent-ink); box-shadow: var(--inset-sm); }
.pill-green { color: var(--green); }
.pill-sakit { color: var(--red); }
.pill-izin { color: var(--amber); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Formulir ---------- */
.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.field.grow { flex: 1 1 220px; }
input, select, textarea {
  font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); width: 100%; min-height: 46px;
  border: 0; border-radius: var(--radius-sm); padding: 11px 15px; background: var(--bg); box-shadow: var(--inset-sm);
}
textarea { resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; }
input[type="file"] { min-height: 0; box-shadow: none; padding: 0; }
/* Kolom rahasia berupa teks biasa agar pengelola sandi browser tidak mengisinya otomatis. */
.secret-text { -webkit-text-security: disc; text-security: disc; }
.secret-text:focus { -webkit-text-security: none; text-security: none; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.filters { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; }
.filter-search { margin: 0; min-height: 48px; }
.filter-search .ic { flex: none; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.filter-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; font-size: 13px; color: var(--muted); }
.filter-foot .btn { padding: 4px 8px; }

/* ---------- Angka utama ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 22px 0 6px; }
.kpis:empty { display: none; }
.kpi { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 22px; background: var(--bg); box-shadow: var(--raised-sm); min-width: 0; }
.kpi-icon { width: 46px; height: 46px; border-radius: 15px; flex: none; display: grid; place-items: center; color: var(--accent-ink); box-shadow: var(--inset-sm); }
.kpi > div { display: flex; flex-direction: column; min-width: 0; }
.kpi strong { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.kpi small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi small .ok { color: var(--green); font-weight: 700; }

/* ---------- Ringkasan AI ---------- */
.ai-card { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.ai-head { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.ai-head .head-icon { color: var(--violet); }
.ai-head h3 { font-size: 16px; flex: 1; }
.ai-head small { color: var(--muted); font-size: 12px; }
.ai-text { margin: 0; font-size: 15px; line-height: 1.7; color: var(--ink); }
.ai-highlights { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ai-highlights li { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; box-shadow: var(--raised-sm); }
.ai-more summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--accent-ink); list-style: none; }
.ai-more summary::-webkit-details-marker { display: none; }
.ai-more p { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.7; }

/* ---------- Timeline hari ---------- */
.week-label { display: flex; align-items: center; gap: 12px; margin: 8px 4px -4px; }
.week-label span { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.week-label small { color: var(--muted); font-size: 13px; }
.week-label::after { content: ''; flex: 1; height: 2px; border-radius: 2px; box-shadow: var(--inset-sm); }
.day-head { padding-bottom: 10px; }
.day-head h3 { font-size: 16.5px; }
.day-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.steps { list-style: none; margin: 0; padding: 4px 22px 16px; }
.step { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; padding: 12px 0; }
.step::before { content: ''; position: absolute; left: 12px; top: 40px; bottom: -8px; width: 2px; border-radius: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.step-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--green); box-shadow: var(--raised-sm); background: var(--bg); position: relative; z-index: 1; }
.step-dot .ic { width: 14px; height: 14px; stroke-width: 3; }
.step-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 2px; font-size: 13px; }
.time { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.sesi { font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; box-shadow: var(--inset-sm); }
.sesi-pagi { color: var(--amber); }
.sesi-siang { color: var(--blue); }
.sesi-sore { color: var(--violet); }
.lokasi { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; }
.lokasi .ic { width: 13px; height: 13px; flex: none; }
a.lokasi { text-decoration: none; }
a.lokasi:hover { color: var(--accent-ink); text-decoration: underline; }
.dicatat { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.dicatat > span { display: inline-flex; align-items: center; gap: 6px; }
.dicatat .ic { width: 13px; height: 13px; color: var(--green); flex: none; }
.drive-status.part .ic { color: var(--amber); }
.drive-status.no .ic { color: var(--muted); }
.drive-chip { position: absolute; right: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: rgba(15, 20, 30, .6); backdrop-filter: blur(4px); pointer-events: none; }
.drive-chip .ic { width: 14px; height: 14px; }
.drive-chip.ok { background: color-mix(in srgb, var(--green) 88%, #000); }
.gallery-item .drive-chip { top: 8px; right: 8px; bottom: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.drive-sync { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; box-shadow: var(--inset-sm); font-size: 13px; color: var(--ink-2); }
.drive-sync p { margin: 0; flex: 1 1 100%; display: flex; gap: 8px; align-items: flex-start; }
.drive-sync p .ic { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--accent-ink); }
.pill .ic { width: 13px; height: 13px; stroke-width: 3; }
.side-note { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side-actions .btn { justify-content: center; padding-inline: 10px; }
.step h4 { font-size: 15.5px; font-weight: 700; }
.ket {
  margin: 4px 0 0; color: var(--ink-2); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ket.open { display: block; cursor: auto; }
.photos { display: flex; gap: 10px; margin-top: 10px; }
.photo, .gallery-item { padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; background: var(--bg); position: relative; box-shadow: var(--raised-sm); }
.photos .photo { width: 112px; flex: none; }
.photo img, .gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.photo:hover img, .gallery-item:hover img { transform: scale(1.05); }
.photo-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15, 20, 30, .55); color: #fff; font-weight: 800; font-size: 18px; }
.absent { margin: 0; padding: 4px 22px 20px; color: var(--ink-2); }

.empty { text-align: center; color: var(--muted); padding: 32px 16px; margin: 0; }
.empty-card { text-align: center; color: var(--muted); padding: 48px 24px; }
.empty-card .ic { width: 38px; height: 38px; }
.empty-card p { margin: 10px 0 0; }

/* ---------- Galeri & rekap ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.gallery-cap { position: absolute; inset: auto 0 0 0; padding: 26px 12px 10px; text-align: left; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.35; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); }
.gallery-cap small { display: block; font-weight: 400; opacity: .85; font-size: 12px; }
.recap-list { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.recap-list li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; padding: 9px 12px; border-radius: 12px; }
.recap-list li:nth-child(odd) { box-shadow: var(--inset-sm); }
.recap-list strong { font-size: 14px; font-weight: 700; }
.recap-list span { color: var(--ink-2); font-size: 14px; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Sidebar ---------- */
.side-body { display: flex; flex-direction: column; gap: 14px; }
.org { display: flex; align-items: center; gap: 14px; }
.org strong { display: block; font-size: 15px; line-height: 1.35; }
.org span:not(.org-logo) { display: block; color: var(--muted); font-size: 13.5px; }
.org-logo { width: 50px; height: 50px; border-radius: 14px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 16px; color: var(--accent-ink); box-shadow: var(--raised-sm); overflow: hidden; }
.org-logo.has-img { padding: 5px; background: #fff; }
.org-logo img { width: 100%; height: 100%; object-fit: contain; }
.org-logo.soft { border-radius: 50%; }
.org-program { margin: 0; font-size: 12.5px; color: var(--muted); }
.side-label { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.kv-wide dd { text-align: left; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mini-stat { border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--inset-sm); }
.mini-stat .ic { color: var(--accent-ink); margin-bottom: 4px; }
.mini-stat strong { font-size: 24px; font-weight: 800; line-height: 1.1; }
.mini-stat span { color: var(--muted); font-size: 12.5px; }
.next-libur { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; box-shadow: var(--inset-sm); font-size: 12.5px; color: var(--ink-2); }
.updated { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 40px; padding: 0 0 18px; font-size: 14px; color: var(--ink-2); }
.footer-card { border-radius: 28px; background: var(--bg); box-shadow: var(--raised); padding: 30px 30px 0; overflow: hidden; position: relative; }
.footer-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 35%, var(--violet))); }
.footer-grid { display: grid; grid-template-columns: minmax(240px, 1.5fr) repeat(auto-fit, minmax(170px, 1fr)); gap: 32px; padding-bottom: 26px; }
.footer-col h4 { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; color: var(--accent-ink); }
.footer-col p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.7; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { display: inline-flex; align-items: center; gap: 9px; color: var(--ink-2); text-decoration: none; font-weight: 500; transition: color .15s, transform .15s; }
.footer-col ul a .ic { width: 15px; height: 15px; color: var(--muted); flex: none; }
.footer-col ul a:hover { color: var(--accent-ink); transform: translateX(2px); }
.footer-col ul a:hover .ic { color: var(--accent-ink); }
.footer-about .brand { margin-bottom: 14px; }
.footer-lead { color: var(--ink-2); max-width: 36ch; }
.footer-period { display: flex; align-items: center; gap: 8px; margin-top: 10px !important; font-size: 13px; color: var(--muted); }
.footer-period .ic { width: 15px; height: 15px; }
.footer-porto { margin-top: 16px; }
.footer-col a.footer-porto { color: var(--ink); }
.footer-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 0 -30px; padding: 16px 30px; border-top: 1px solid var(--line); }
.footer-clock { display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 18px; box-shadow: var(--inset-sm); color: var(--ink-2); text-align: left; }
.clock-icon { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; box-shadow: var(--raised-sm); color: var(--accent-ink); }
.clock-icon .ic { width: 18px; height: 18px; }
.clock-icon .live-dot { position: absolute; top: 1px; right: 1px; border: 2px solid var(--bg); box-sizing: content-box; }
.clock-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.3; }
.clock-text strong { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.clock-text small { font-size: 12px; color: var(--muted); }
.clock-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.clock-src { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--green); padding: 2px 8px; border-radius: 999px; box-shadow: var(--inset-sm); white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.footer-admin { color: var(--ink) !important; text-decoration: none; }
.footer-admin .ic { color: var(--accent-ink); }
.footer-bottom { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 18px 6px 4px; font-size: 12.5px; color: var(--muted); }
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--accent-ink); }

/* ---------- Lightbox & modal ---------- */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(8, 11, 18, .92); display: flex; align-items: center; justify-content: center; padding: 16px; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-height: calc(100vh - 110px); object-fit: contain; border-radius: 12px; }
.lightbox figcaption { color: #e2e8f0; margin-top: 12px; font-size: 14px; text-align: center; }
.lb-close, .lb-nav { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; cursor: pointer; width: 46px; height: 46px; border-radius: 50%; font-size: 28px; line-height: 1; display: grid; place-items: center; }
.lb-close { top: 16px; right: 16px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.modal { position: fixed; inset: 0; z-index: 65; background: color-mix(in srgb, var(--bg) 40%, rgba(0, 0, 0, .55)); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { background: var(--bg); border-radius: 24px; width: 100%; max-width: 640px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: var(--raised); }
.modal-box .card-header { position: sticky; top: 0; background: var(--bg); z-index: 1; padding-bottom: 14px; }
.report-view { display: flex; flex-direction: column; gap: 16px; }
.report-view h4 { font-size: 13px; color: var(--muted); margin: 0 0 6px; text-transform: uppercase; letter-spacing: .06em; }
.report-view p { margin: 0; white-space: pre-line; line-height: 1.7; }
.report-view section { padding: 14px 16px; border-radius: 16px; box-shadow: var(--inset-sm); }
.report-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* =========================================================
   Panel admin
   ========================================================= */
.admin .page { min-height: 50vh; }
.admin-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 28px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.form { display: flex; flex-direction: column; gap: 16px; }
.row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.note { margin: 0 0 16px; font-size: 13.5px; color: var(--ink-2); padding: 12px 14px; border-radius: 14px; box-shadow: var(--inset-sm); line-height: 1.6; }
.progress-msg { font-size: 13.5px; color: var(--muted); }
.auth-card { max-width: 640px; margin: 8px auto 0; }
.auth-unlock { max-width: 420px; text-align: center; }
.auth-unlock h2 { font-size: 22px; margin-top: 14px; }
.auth-unlock .muted { margin: 6px 0 20px; font-size: 14px; }
.auth-unlock .form { text-align: left; gap: 14px; }
.lock-badge { width: 64px; height: 64px; border-radius: 20px; display: inline-grid; place-items: center; color: var(--accent-ink); box-shadow: var(--raised-sm); }
.lock-badge .ic { width: 26px; height: 26px; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check-row input { width: 18px; height: 18px; min-height: 0; box-shadow: none; accent-color: var(--accent); }

.list-card { position: sticky; top: calc(var(--nav-h) + 80px); }
.list-card .card-body { max-height: calc(100vh - var(--nav-h) - 220px); overflow-y: auto; }
.search-box { display: flex; align-items: center; gap: 8px; border-radius: var(--radius-sm); padding: 0 14px; margin-bottom: 12px; color: var(--muted); box-shadow: var(--inset-sm); }
.search-box input { box-shadow: none; padding-left: 0; background: transparent; }
.search-box input:focus { outline: none; }
.list-date { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin: 16px 0 6px; }
.list-date:first-child { margin-top: 4px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px; margin: 0 -4px; border-radius: 14px; }
.list-item:hover { box-shadow: var(--inset-sm); }
.list-item.editing { box-shadow: var(--inset); }
.list-item > img, .no-thumb { width: 50px; height: 50px; border-radius: 12px; object-fit: cover; flex: none; }
.no-thumb { display: grid; place-items: center; color: var(--muted); box-shadow: var(--inset-sm); }
.list-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.list-info strong { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-info > span { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-info .sesi { font-size: 10.5px; padding: 1px 8px; }
.list-actions { display: flex; gap: 8px; }
.list-btn { width: 100%; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; color: inherit; }

.dropzone { position: relative; border-radius: 18px; padding: 26px; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink); box-shadow: var(--inset); border: 2px dashed color-mix(in srgb, var(--accent) 30%, transparent); }
.dropzone.over { border-color: var(--accent); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; min-height: 0; }
.dz-icon { width: 46px; height: 46px; border-radius: 14px; color: var(--accent-ink); display: grid; place-items: center; margin-bottom: 6px; box-shadow: var(--raised-sm); background: var(--bg); }
.dropzone small { color: var(--muted); font-weight: 500; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 12px; }
.previews:not(:empty) { margin-top: 14px; }
.preview { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; box-shadow: var(--raised-sm); }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview.new { outline: 2px solid var(--accent); outline-offset: 2px; }
.preview.failed { outline-color: var(--red); }
.preview-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 11px; text-align: center; padding: 4px; box-shadow: var(--inset-sm); border-radius: inherit; }
.preview-state.bad { color: var(--red); }
.preview-state .ic { width: 20px; height: 20px; }
.ic.spin { animation: spin 1s linear infinite; }
.preview button { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(15, 20, 30, .75); color: #fff; cursor: pointer; display: grid; place-items: center; }
.preview button .ic { width: 14px; height: 14px; }
.quick-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.server-clock { flex: 1 1 220px; min-width: 0; max-width: 100%; overflow: hidden; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; box-shadow: var(--inset-sm); color: var(--ink-2); }
.server-clock > .ic { color: var(--green); width: 22px; height: 22px; flex: none; }
.server-clock.unsynced > .ic { color: var(--amber); }
.server-clock div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.server-clock strong { font-size: 18px; font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1.2; }
.server-clock small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-cam { position: relative; overflow: hidden; min-height: 52px; padding-inline: 20px; }
.quick-cam input, .fab input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; padding: 0; font-size: 0; }
.quick-cam.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 25%, transparent), var(--raised-sm); } }
.input-with-btn { display: flex; gap: 10px; }
.input-with-btn input { flex: 1; min-width: 0; }
.input-with-btn .btn { flex: none; }
#btnGps.loading .ic { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.field-hint { font-size: 12px; font-weight: 500; color: var(--muted); min-height: 1em; }
.field-hint:empty { display: none; }
.photo-src { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.photo-src .dropzone { padding: 20px 14px; }
.dz-camera { border-style: solid; }
.stamp-row { margin-top: 12px; font-size: 13px; }
.ai-auto-note { display: flex; gap: 8px; align-items: flex-start; }
.ai-auto-note .ic { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--violet); }
.fab { display: none; }
@media (max-width: 860px) {
  .fab:not([hidden]) { position: fixed; right: 18px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 40; width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: var(--accent); box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 45%, transparent), var(--raised-sm); overflow: hidden; }
  .fab .ic { width: 26px; height: 26px; }
}
@media (max-width: 600px) {
  .quick-cam { flex: 1 1 100%; justify-content: center; }
  .photo-src .dropzone small { display: none; }
  .input-with-btn .btn-label { display: none; }
}
.drive-note { display: block; line-height: 1.5; margin: 10px 0 0; font-size: 13px; color: var(--green); }
.drive-note .ic { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; }

.profile-edit { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.avatar-lg { width: 96px; height: 96px; border-radius: 24px; font-size: 28px; }
.avatar-logo { width: 76px; height: 76px; }
.avatar-logo img { object-fit: contain; background: #fff; }
.profile-edit-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; flex: 1; min-width: 200px; }
.profile-edit-actions small { width: 100%; font-size: 12.5px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; padding: 0; font-size: 0; }
.color-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.color-field input[type="color"] { width: 50px; height: 46px; padding: 6px; cursor: pointer; flex: none; }
.color-field code { font-size: 13px; color: var(--ink-2); padding: 4px 8px; border-radius: 8px; box-shadow: var(--inset-sm); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--bg); box-shadow: var(--raised-sm); cursor: pointer; padding: 0; }
.swatch-1d4ed8 { background: #1d4ed8; } .swatch-0f766e { background: #0f766e; } .swatch-15803d { background: #15803d; }
.swatch-7c3aed { background: #7c3aed; } .swatch-be123c { background: #be123c; } .swatch-c2410c { background: #c2410c; } .swatch-0f172a { background: #0f172a; }
.switch-row { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.switch { width: 48px; height: 28px; border-radius: 999px; position: relative; flex: none; box-shadow: var(--inset-sm); transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); box-shadow: 2px 2px 5px var(--sh-dark), -1px -1px 3px var(--sh-light); transition: transform .2s; }
.switch-row input:checked + .switch { background: var(--accent); }
.switch-row input:checked + .switch::after { transform: translateX(20px); background: #fff; }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.repeat-list { display: flex; flex-direction: column; gap: 12px; }
.repeat-list:not(:empty) { margin-bottom: 12px; }
.repeat-row { display: flex; gap: 10px; align-items: flex-start; border-radius: 16px; padding: 12px; box-shadow: var(--inset-sm); }
.repeat-fields { flex: 1; display: grid; gap: 8px; min-width: 0; }
.libur-fields { grid-template-columns: 160px minmax(0, 1fr) 150px; }
.libur-row .repeat-tools { align-self: center; }
.repeat-tools { display: flex; gap: 6px; }
.field > .btn { align-self: flex-start; }
.save-bar { position: sticky; bottom: 16px; z-index: 20; margin-top: 28px; display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--bg); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--raised); }
.save-bar .progress-msg { margin-right: auto; }
.help { font-size: 14px; color: var(--ink-2); padding-top: 12px; border-top: 1px solid var(--line); }
.help summary { cursor: pointer; font-weight: 700; color: var(--accent-ink); }
.help ol { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.help code { padding: 1px 6px; border-radius: 6px; font-size: 12.5px; box-shadow: var(--inset-sm); overflow-wrap: anywhere; }
.day-entries { list-style: none; margin: 0; padding: 12px 16px; border-radius: 14px; box-shadow: var(--inset-sm); display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.day-entries b { font-variant-numeric: tabular-nums; margin-right: 6px; }
.report-field { display: flex; flex-direction: column; gap: 6px; }
.report-head label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.btn-link.btn-sm { padding: 2px 6px; }
.deploy-status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; text-decoration: none; font-size: 12.5px; font-weight: 700; padding: 8px 12px; border-radius: 999px; box-shadow: var(--inset-sm); }
.deploy-status .ic { width: 15px; height: 15px; }
.deploy-status.pending { color: var(--amber); }
.deploy-status.done { color: var(--green); }
.deploy-status.slow { color: var(--red); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; max-width: calc(100% - 32px); font-size: 14px; font-weight: 500; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
.toast.error { background: var(--red); color: #fff; }

/* =========================================================
   Responsif
   ========================================================= */
@media (max-width: 1024px) {
  .layout, .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .side-col, .list-card { position: static; }
  .list-card .card-body { max-height: none; }
  .side-col { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 860px) {
  :root { --nav-h: 62px; }
  .nav-inner { gap: 10px; }
  .nav-toggle { display: inline-grid; }
  .btn-print-desktop { display: none; }
  .nav-avatar { width: 38px; height: 38px; }
  .nav-menu { position: absolute; top: var(--nav-h); left: 12px; right: 12px; display: none; flex-direction: column; gap: 6px; background: var(--bg); padding: 12px; border-radius: 20px; box-shadow: var(--raised); }
  .menu-open .nav-menu { display: flex; }
  .nav-print { display: inline-flex; margin-top: 6px; }
  .brand-text { font-size: 17px; }
  .hero-inner { padding: 20px; }
  .progress { width: 100%; justify-content: flex-start; padding: 12px 14px; border-radius: 18px; box-shadow: var(--inset-sm); }
  .progress .ring { order: -1; }
  .progress-text { text-align: left; }
  .side-col { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .recap-list li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 600px) {
  body { font-size: 14.5px; }
  .container { padding: 0 14px; }
  .hide-xs { display: none; }
  .brand-tag { display: none; }
  .brand-text { font-size: 16px; }
  .nav-right { gap: 8px; }
  .icon-btn { width: 38px; height: 38px; }
  .hero { padding-top: 16px; }
  .hero-inner { padding: 16px; gap: 14px; border-radius: 22px; }
  .avatar { width: 58px; height: 58px; border-radius: 18px; font-size: 20px; }
  .avatar img { border-radius: 14px; }
  .profile { gap: 14px; }
  .hero h1 { font-size: 20px; }
  .chips { margin-top: 6px; gap: 6px 10px; }
  .hero-sub { font-size: 13px; }
  .ring { width: 56px; height: 56px; }
  .progress-sub { font-size: 14px; }
  .tabbar { padding: 10px 0 8px; }
  .tabbar-inner { max-width: calc(100% - 28px); }
  .tabbar-item { padding: 9px 13px; font-size: 13.5px; }
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
  .page { padding-top: 10px; }
  .filters { padding: 14px; gap: 12px; }
  .filter-row { gap: 10px; }
  .kpis { gap: 12px; margin-top: 16px; }
  .kpi { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; border-radius: 18px; }
  .kpi-icon { width: 36px; height: 36px; border-radius: 12px; }
  .kpi strong { font-size: 22px; }
  .kpi small { white-space: normal; }
  .day-head { flex-wrap: wrap; }
  .day-head .head-text { flex: 1 1 calc(100% - 60px); }
  .day-actions { flex-basis: 100%; justify-content: flex-start; padding-left: 50px; }
  .day-actions:not(:has(.btn, .pill-sakit, .pill-izin)) { display: none; }
  .card-header { padding: 16px 16px 4px; gap: 12px; }
  .card-body { padding: 12px 16px 18px; }
  .head-icon { width: 38px; height: 38px; }
  .steps { padding: 2px 16px 12px; }
  .step { gap: 12px; }
  .photos .photo { width: calc((100% - 20px) / 3); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .row, .row-2, .libur-fields { grid-template-columns: minmax(0, 1fr); }
  .repeat-row { flex-direction: column; }
  .repeat-tools { align-self: flex-end; }
  .save-bar { bottom: 10px; padding: 10px 12px; }
  .save-bar .progress-msg { width: 100%; }
  .save-bar .btn { flex: 1; }
  .deploy-status { position: fixed; top: calc(var(--nav-h) + 64px); left: 50%; transform: translateX(-50%); z-index: 45; background: var(--bg); box-shadow: var(--raised-sm); }
  .lb-nav { top: auto; bottom: 20px; transform: none; }
  .ai-card { padding: 16px; margin-bottom: 22px; }
  .footer-card { padding: 22px 18px 0; border-radius: 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .footer-about { grid-column: 1 / -1; }
  .footer-bar { margin: 0 -18px; padding: 14px 18px; }
  .footer-clock { width: 100%; }
  .footer-admin { width: 100%; justify-content: center; }
  .footer-bottom { flex-direction: column; }
  .ai-head small { flex-basis: 100%; }
  select { font-size: 14px; padding-left: 13px; }
}

/* =========================================================
   Cetak (dasbor)
   ========================================================= */
@media print {
  :root { --bg: #fff; --sh-dark: transparent; --sh-light: transparent; }
  body { background: #fff; color: #000; }
  .navbar, .tabbar, .side-col, .filters, .kpis, .fab, .site-footer, .lightbox, .modal, .ai-card, #view-galeri, #view-rekap, .day-actions .btn { display: none !important; }
  .layout { display: block; }
  .card, .hero-inner { box-shadow: none; border: 1px solid #ccc; }
  .ket { display: block; }
}

/* Pemberitahuan versi baru */
.update-bar { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 18px; border-radius: 999px; background: var(--bg); box-shadow: var(--raised); font-size: 14px; font-weight: 600; color: var(--ink); max-width: calc(100% - 32px); }
@media print { .update-bar { display: none !important; } }

/* Indikator penyimpanan (panel admin) */
.storage { display: flex; flex-direction: column; gap: 18px; }
.meter-block { display: flex; flex-direction: column; gap: 7px; }
.meter-block small { font-size: 12px; color: var(--muted); line-height: 1.5; }
.meter-block .btn { align-self: flex-start; margin-top: 4px; }
.meter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13.5px; flex-wrap: wrap; }
.meter-head span { font-size: 12.5px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.meter { height: 12px; border-radius: 999px; box-shadow: var(--inset-sm); overflow: hidden; padding: 2px; }
.meter > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--green); transition: width .6s ease; }
.meter.warn > span { background: var(--amber); }
.meter.danger > span { background: var(--red); }
.storage-forecast { margin: 0; padding: 10px 12px; border-radius: 12px; box-shadow: var(--inset-sm); font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }

.steps-setup { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.code-box { margin: 10px 0 0; max-height: 320px; overflow: auto; padding: 12px; border-radius: 12px; box-shadow: var(--inset-sm); font-size: 11.5px; line-height: 1.5; white-space: pre; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink-2); }

/* ---------- Situs baru disalin (belum diatur pemiliknya) ---------- */
.copy-note { background: color-mix(in srgb, #f59e0b 16%, var(--bg)); color: var(--ink); font-size: 14px; line-height: 1.5; }
.copy-note .container { display: flex; align-items: flex-start; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
.copy-note .ic { flex: none; margin-top: 2px; color: #b45309; }
.copy-note a { color: inherit; font-weight: 700; }

/* ---------- Mulai baru (repo salinan) ---------- */
.head-icon.amber { color: #d97706; }
.start-card { margin-bottom: 22px; box-shadow: var(--raised), inset 0 0 0 2px color-mix(in srgb, #f59e0b 45%, transparent); }
.start-list { margin: 0 0 4px; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--ink-2); }
.setup-guide { margin: 0 0 16px; padding-top: 0; border-top: 0; }
.setup-guide .steps-setup { margin-top: 10px; }

/* ---------- Notifikasi push ---------- */
.sub-head { margin: 4px 0 8px; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.muted.small { font-size: 13px; margin: 0 0 10px; }
.secret-once { padding: 14px; border-radius: 14px; box-shadow: var(--inset-sm), inset 0 0 0 2px color-mix(in srgb, #f59e0b 45%, transparent); margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.secret-once p { margin: 0; }
.check-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.device-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.device-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; box-shadow: var(--inset-sm); font-size: 13.5px; }
.device-row small { display: block; color: var(--muted); }
.device-row b.this { color: var(--green); font-weight: 700; }
#notifCard [hidden] { display: none !important; }

/* ---------- Indikator jaringan (panel admin) ---------- */
.net-status { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 11px; border: 0; border-radius: 999px; background: var(--bg); box-shadow: var(--raised-sm); color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; white-space: nowrap; }
.net-bars { width: 18px; height: 14px; flex: none; }
.net-bars rect { fill: currentColor; opacity: .22; transition: opacity .3s, fill .3s; }
.net-status[data-bars="1"] rect:nth-child(-n+1),
.net-status[data-bars="2"] rect:nth-child(-n+2),
.net-status[data-bars="3"] rect:nth-child(-n+3),
.net-status[data-bars="4"] rect:nth-child(-n+4) { opacity: 1; }
.net-good { color: var(--green); }
.net-fair { color: #d97706; }
.net-poor, .net-off { color: var(--red); }
.net-ms { min-width: 3.2em; text-align: left; }
@media (max-width: 420px) {
  .net-status { padding: 0 9px; }
  .net-ms { min-width: 0; }
}
/* HP: navbar panel memuat indikator jaringan, jadi teks brand disembunyikan (ikon tetap). */
@media (max-width: 480px) {
  body.admin .brand-text, body.admin .brand-tag { display: none; }
}

/* ---------- Kode pasangan Apps Script ---------- */
.pair-box { padding: 14px; border-radius: 14px; box-shadow: var(--inset-sm); margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.pair-box p { margin: 0; line-height: 1.55; color: var(--ink-2); }
#pairRecv { box-shadow: var(--inset-sm), inset 0 0 0 2px color-mix(in srgb, #f59e0b 45%, transparent); }
.pair-code { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; border-radius: 12px; box-shadow: var(--raised-sm); text-align: center; }
.pair-code strong { font: 800 26px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; color: var(--accent-ink); }
.pair-code small { color: var(--muted); font-size: 12.5px; }
#pairInput { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Presisi tampilan HP ---------- */
.kv dt, .kv dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  /* Label di atas nilai agar teks panjang (nama repo, dsb.) tidak menembus kartu. */
  .kv-wide { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv-wide dt { font-size: 12.5px; margin-top: 10px; }
  .kv-wide dt:first-child { margin-top: 0; }
  /* Tab panel admin: empat tab selalu muat, ikon di atas label (tanpa geser). */
  body.admin .tabbar-inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: auto; max-width: none; overflow: visible; gap: 4px; }
  body.admin .tabbar-item { flex-direction: column; justify-content: center; gap: 3px; padding: 8px 2px; font-size: 11.5px; line-height: 1.2; text-align: center; white-space: nowrap; }
  body.admin .tabbar-item .ic { width: 19px; height: 19px; }
}
