:root {
  --teal-900: #0b3f3c;
  --teal-800: #0f5b55;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-100: #ccfbf1;
  --teal-50: #f0fdfa;
  --sky-50: #f0f9ff;
  --ink: #0f2f2c;
  --muted: #5b7370;
  --line: #e2e8e6;
  --bg: #f4f7f6;
  --white: #ffffff;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 47, 44, .06), 0 1px 3px rgba(15, 47, 44, .04);
  --shadow: 0 8px 24px rgba(15, 47, 44, .08);
  --shadow-lg: 0 18px 48px rgba(15, 47, 44, .14);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--teal-800); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; font-weight: 700; }
h2 { font-size: 1.05rem; font-weight: 600; }
h3 { font-size: .98rem; font-weight: 600; }
p { margin: 0; }
small { font-size: .78rem; }
.ico { flex: 0 0 auto; vertical-align: middle; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }

/* ---------------- Layout aplikasi ---------------- */
.app-shell, .admin-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}
.admin-shell { grid-template-columns: 248px minmax(0, 1fr); }

.sidebar {
  background: linear-gradient(180deg, var(--teal-900) 0%, #0a4741 60%, #0b3f3c 100%);
  color: #e7f5f2;
  padding: 18px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar { background: linear-gradient(180deg, #0d3b36 0%, #0b2f2b 100%); }

.sidebar-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; min-width: 0; }
.brand:hover { color: #fff; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 1rem; letter-spacing: -.01em; }
.brand-text small { color: #a7d8d1; font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 165px; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  color: #fff; box-shadow: 0 6px 16px rgba(20, 184, 166, .35); flex: 0 0 auto;
}
.logo-mark.logo-lg { width: 46px; height: 46px; border-radius: 14px; }
.sidebar-close { display: none; background: none; border: 0; color: #cfeae6; padding: 6px; cursor: pointer; margin-left: auto; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px;
  color: #cbe6e1; font-size: .875rem; font-weight: 500; border: 0; background: none;
  cursor: pointer; width: 100%; text-align: left; transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-link.active { background: rgba(20, 184, 166, .22); color: #fff; box-shadow: inset 2px 0 0 var(--teal-500); }
.nav-link span { flex: 1; min-width: 0; }
.nav-badge { background: var(--teal-500); color: #042f2b; font-weight: 700; font-size: .68rem; padding: 1px 7px; border-radius: 999px; }
.nav-sep { height: 1px; background: rgba(255, 255, 255, .09); margin: 8px 6px; }
.nav-logout { margin-top: 2px; }

.sidebar-user {
  margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px;
  background: rgba(255, 255, 255, .07); border-radius: 12px; overflow: hidden;
}
.sidebar-user strong { display: block; font-size: .82rem; color: #fff; }
.sidebar-user small { color: #a8d8d3; font-size: .7rem; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #14b8a6, #0d9488); color: #fff; font-weight: 700; font-size: .85rem; flex: 0 0 auto;
}
.avatar.sm { width: 28px; height: 28px; font-size: .75rem; }
.avatar-img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }

.main-shell { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 62px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px;
  padding: 0 22px; position: sticky; top: 0; z-index: 20;
}
.topbar-title { font-weight: 600; font-size: .95rem; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-search {
  flex: 1; max-width: 380px; display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; color: var(--muted);
}
.topbar-search input { border: 0; background: transparent; outline: none; width: 100%; font: inherit; color: var(--ink); }
.profile-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--teal-50); border: 1px solid #d5efeb; color: var(--ink); font-size: .82rem; font-weight: 600; }
.profile-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; position: relative; padding: 0;
}
.icon-btn:hover { background: var(--teal-50); border-color: #cbeae6; }
.icon-btn.danger { color: var(--red); border-color: #f6d5d5; }
.icon-btn.danger:hover { background: var(--red-soft); }
.dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.mobile-only { display: none; }
.sidebar-overlay { display: none; }

.content { padding: 24px 26px 56px; max-width: 1320px; width: 100%; margin: 0 auto; }

/* ---------------- Halaman ---------------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--muted); font-size: .86rem; margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.card + .card, .card + section, section + .card { margin-top: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2 { font-size: .95rem; }
.card-body { padding: 18px; }
.card-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  display: flex; gap: 12px; align-items: flex-start; box-shadow: var(--shadow-sm); color: var(--ink);
  transition: transform .15s, box-shadow .15s;
}
a.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.stat-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; }
.stat-body { min-width: 0; }
.stat-label { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.stat-value { font-size: 1.22rem; font-weight: 700; margin-top: 2px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.stat-hint { font-size: .76rem; color: var(--muted); margin-top: 4px; }
.tone-teal { background: var(--teal-100); color: var(--teal-800); }
.tone-green { background: var(--green-soft); color: #15803d; }
.tone-amber { background: var(--amber-soft); color: #b45309; }
.tone-red { background: var(--red-soft); color: #b91c1c; }
.tone-blue { background: var(--blue-soft); color: #1d4ed8; }
.tone-slate { background: #e2e8f0; color: #334155; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }

/* ---------------- Tombol ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 10px;
  font-size: .84rem; font-weight: 600; border: 1px solid transparent; cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .05s; text-decoration: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--teal-600), var(--teal-700)); color: #fff; box-shadow: 0 6px 16px rgba(13, 148, 136, .25); }
.btn-primary:hover { background: linear-gradient(135deg, var(--teal-700), var(--teal-800)); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--teal-50); border-color: #c9e9e4; color: var(--ink); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-warning { background: #f59e0b; color: #3b2606; }
.btn-sm { padding: 6px 11px; font-size: .79rem; border-radius: 9px; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.inline-form { display: inline-flex; }
.link-btn { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--teal-700); background: none; border: 0; cursor: pointer; padding: 2px; }
.link-btn:hover { color: var(--teal-900); text-decoration: underline; }

/* ---------------- Badge ---------------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.badge-success { background: var(--green-soft); color: #15803d; }
.badge-warning { background: var(--amber-soft); color: #b45309; }
.badge-danger { background: var(--red-soft); color: #b91c1c; }
.badge-info { background: var(--blue-soft); color: #1d4ed8; }
.badge-neutral { background: #eef2f1; color: #4b6563; }
.badge-teal { background: var(--teal-100); color: var(--teal-800); }

/* ---------------- Tabel ---------------- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.data-table th {
  text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 600; padding: 10px 12px; background: #f8faf9; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.data-table td { padding: 11px 12px; border-bottom: 1px solid #eef2f1; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafcfb; }
.data-table .actions-cell { display: flex; gap: 6px; justify-content: flex-end; }
.table-empty { padding: 30px 16px; text-align: center; color: var(--muted); font-size: .86rem; }
.table-wrap:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.amount { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.amount.pos { color: #15803d; }
.amount.neg { color: #b91c1c; }

/* ---------------- Form ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .84rem; }
.field > span { font-weight: 600; color: #2a4a46; font-size: .8rem; }
.field.wide { grid-column: 1 / -1; }
.field small { color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], input[type=file], select, textarea {
  font: inherit; font-size: .86rem; padding: 9px 12px; border: 1px solid #d9e3e0; border-radius: 10px;
  background: #fff; color: var(--ink); width: 100%; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(20, 184, 166, .15); }
textarea { resize: vertical; min-height: 72px; }
.input-money { position: relative; display: flex; align-items: center; }
.input-money > span { position: absolute; left: 12px; font-size: .82rem; color: var(--muted); font-weight: 600; }
.input-money input { padding-left: 38px; }
.check-field { display: flex; align-items: center; gap: 8px; font-size: .84rem; padding: 4px 0; }
.check-field input { width: auto; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 12px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.form-card { max-width: 720px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { min-width: 140px; }
.filters .field.grow { flex: 1; min-width: 190px; }
.password-wrap { position: relative; display: flex; align-items: center; }
.password-wrap input { padding-right: 42px; }
.password-toggle { position: absolute; right: 6px; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.password-toggle:hover { background: var(--teal-50); color: var(--teal-700); }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }

/* ---------------- Informasi & progres ---------------- */
.info-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed #e8eeec; font-size: .85rem; }
.info-row:last-child { border-bottom: 0; }
.info-row > span { color: var(--muted); }
.info-row strong { font-weight: 600; text-align: right; }
.progress { height: 8px; border-radius: 999px; background: #eef2f1; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal-500), var(--teal-600)); transition: width .4s; }
.progress-fill.tone-warning { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.progress-fill.tone-danger { background: linear-gradient(90deg, #f87171, #dc2626); }
.progress-fill.tone-ok { background: linear-gradient(90deg, #34d399, #10b981); }

.empty-state { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty-state h3 { color: var(--ink); margin-bottom: 4px; }
.empty-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--teal-50); color: var(--teal-700); display: grid; place-items: center; margin: 0 auto 10px; }

/* ---------------- Chart ---------------- */
.chart-bars { display: flex; align-items: flex-end; gap: 18px; height: 190px; padding: 10px 4px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.chart-pair { display: flex; align-items: flex-end; gap: 5px; flex: 1; width: 100%; justify-content: center; }
.chart-bar { width: 16px; border-radius: 6px 6px 3px 3px; min-height: 3px; transition: height .3s; }
.chart-bar.income { background: linear-gradient(180deg, #2dd4bf, #0d9488); }
.chart-bar.expense { background: linear-gradient(180deg, #fca5a5, #ef4444); }
.chart-label { font-size: .7rem; color: var(--muted); text-align: center; white-space: nowrap; }
.chart-legend { display: flex; gap: 14px; font-size: .75rem; color: var(--muted); margin-bottom: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.legend-dot.income { background: var(--teal-600); }
.legend-dot.expense { background: #ef4444; }

/* ---------------- Daftar ---------------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #eff3f2; }
.list-item:last-child { border-bottom: 0; }
.list-item .li-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--teal-50); color: var(--teal-700); display: grid; place-items: center; flex: 0 0 auto; }
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 600; font-size: .86rem; overflow-wrap: anywhere; }
.list-item .li-meta { font-size: .76rem; color: var(--muted); }
.list-item .li-end { text-align: right; white-space: nowrap; }

/* ---------------- Kalender ---------------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { font-size: .7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; text-align: center; padding: 4px 0; }
.cal-day { min-height: 84px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; font-size: .74rem; display: flex; flex-direction: column; gap: 3px; }
.cal-day.dim { background: #fafbfb; color: #b6c4c2; }
.cal-day.today { border-color: var(--teal-500); box-shadow: 0 0 0 2px rgba(20, 184, 166, .16); }
.cal-date { font-weight: 700; font-size: .76rem; }
.cal-event { background: var(--teal-50); color: var(--teal-800); border-radius: 6px; padding: 2px 5px; font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event.task { background: #eef2ff; color: #4338ca; }
.cal-event.bill { background: var(--amber-soft); color: #b45309; }

/* ---------------- Toast ---------------- */
.toast-stack { position: fixed; top: 16px; right: 16px; z-index: 999; display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.toast {
  display: flex; align-items: flex-start; gap: 10px; background: #fff; border-radius: 12px; padding: 12px 14px;
  box-shadow: var(--shadow-lg); border-left: 4px solid var(--teal-600); animation: toastIn .25s ease-out;
}
.toast p { font-size: .84rem; flex: 1; }
.toast-ico { display: grid; place-items: center; color: var(--teal-700); }
.toast-success { border-left-color: var(--green); }
.toast-success .toast-ico { color: var(--green); }
.toast-danger { border-left-color: var(--red); }
.toast-danger .toast-ico { color: var(--red); }
.toast-warning { border-left-color: #f59e0b; }
.toast-warning .toast-ico { color: #b45309; }
.toast-close { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------------- Pagination ---------------- */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 14px 10px 4px; flex-wrap: wrap; }
.page-btn { min-width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; font-size: .82rem; color: var(--ink); padding: 0 8px; }
.page-btn.current { background: var(--teal-700); color: #fff; border-color: var(--teal-700); }
.page-dots { color: var(--muted); align-self: center; }

/* ---------------- Publik / Login ---------------- */
.public-shell { min-height: 100vh; display: grid; grid-template-columns: 460px minmax(0, 1fr); }
.public-aside {
  background: linear-gradient(160deg, #0b3f3c 0%, #0f766e 70%, #0d9488 100%);
  color: #eafaf7; padding: 40px 38px; display: flex; flex-direction: column; gap: 28px; position: relative; overflow: hidden;
}
.public-aside::after { content: ''; position: absolute; right: -110px; bottom: -110px; width: 300px; height: 300px; border-radius: 50%; background: rgba(20, 184, 166, .25); filter: blur(50px); }
.public-aside .brand { font-size: 1.1rem; }
.public-points { list-style: none; display: flex; flex-direction: column; gap: 16px; padding: 0; margin: 0; font-size: .88rem; color: #d6f2ee; }
.public-points li { display: flex; gap: 12px; align-items: flex-start; }
.public-points .ico { color: #99f6e4; margin-top: 2px; }
.public-foot { margin-top: auto; font-size: .76rem; color: #a7d8d1; }
.public-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: radial-gradient(circle at 20% 10%, #e6fffa 0%, #f4f7f6 45%, #f4f7f6 100%); }
.auth-card { width: 100%; max-width: 430px; background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 30px; border: 1px solid #eaf1ef; }
.auth-card h1 { font-size: 1.4rem; margin-bottom: 6px; }
.auth-card > p.sub { color: var(--muted); font-size: .87rem; margin-bottom: 22px; }
.auth-card .form-grid { grid-template-columns: 1fr; gap: 14px; }
.auth-card .btn-block { margin-top: 6px; }
.auth-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.alert { border-radius: 10px; padding: 11px 13px; font-size: .83rem; display: flex; gap: 9px; align-items: flex-start; margin-bottom: 14px; }
.alert-danger { background: var(--red-soft); color: #991b1b; }
.alert-warning { background: var(--amber-soft); color: #92400e; }
.alert-info { background: var(--blue-soft); color: #1e40af; }
.alert-success { background: var(--green-soft); color: #166534; }
.brand-mobile { display: none; }

.message-card { max-width: 560px; margin: 8vh auto; background: #fff; border-radius: 20px; padding: 32px; box-shadow: var(--shadow-lg); text-align: center; border: 1px solid #eaf1ef; }
.message-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 14px; background: var(--teal-50); color: var(--teal-700); }
.message-card.tone-warning .message-ico { background: var(--amber-soft); color: #b45309; }
.message-card h1 { margin-bottom: 8px; font-size: 1.25rem; }
.message-card p { color: var(--muted); font-size: .9rem; }
.message-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }

/* ---------------- Kode akses ---------------- */
.code-box { display: flex; align-items: center; gap: 10px; background: var(--teal-50); border: 1px dashed var(--teal-500); border-radius: 12px; padding: 12px 14px; }
.code-box code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; font-weight: 700; letter-spacing: .08em; color: var(--teal-900); flex: 1; overflow-wrap: anywhere; }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 20px; }
.profile-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.profile-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.profile-card .avatar { width: 44px; height: 44px; font-size: 1.05rem; }
.profile-card strong { font-size: .95rem; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab { padding: 9px 14px; font-size: .84rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--teal-700); border-bottom-color: var(--teal-600); }
.tab:hover { color: var(--teal-800); }

/* ---------------- Modal ---------------- */
dialog.modal { border: 0; border-radius: 18px; padding: 0; max-width: 460px; width: calc(100% - 32px); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(11, 63, 60, .45); backdrop-filter: blur(2px); }
dialog.modal .modal-body { padding: 24px; }
dialog.modal h2 { margin-bottom: 8px; }
dialog.modal p { color: var(--muted); font-size: .88rem; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ---------------- Responsif ---------------- */
@media (max-width: 1100px) {
  .dashboard-grid, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app-shell, .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 60; transform: translateX(-100%);
    transition: transform .22s ease; height: 100vh;
  }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .sidebar-close { display: grid; place-items: center; }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(8, 47, 44, .45); z-index: 50; }
  .sidebar-overlay.show { display: block; }
  .mobile-only { display: inline-grid; }
  .content { padding: 18px 16px 48px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar-search { display: none; }
  .public-shell { grid-template-columns: minmax(0, 1fr); }
  .public-aside { display: none; }
  .public-main { padding: 24px 16px; align-items: flex-start; }
  .brand-mobile { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; color: var(--ink); }
  .brand-mobile .brand-text strong { color: var(--ink); }
  .brand-mobile .brand-text small { color: var(--muted); }
}
@media (max-width: 640px) {
  h1 { font-size: 1.3rem; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-actions .btn { flex: 1; justify-content: center; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
  .stat-card { padding: 13px; }
  .stat-value { font-size: 1.05rem; }
  .card-body { padding: 14px; }
  .auth-card { padding: 22px; border-radius: 16px; }
  .cal-day { min-height: 58px; padding: 4px; }
  .cal-event { display: none; }
  .cal-day.has-items::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--teal-600); margin-top: auto; }
  .actions-cell { justify-content: flex-start; }
  .profile-name { display: none; }
  .toast-stack { left: 12px; right: 12px; max-width: none; }
  .chart-bars { gap: 8px; height: 150px; }
  .chart-bar { width: 10px; }
  .data-table th, .data-table td { padding: 9px 8px; }
}
@media print {
  .sidebar, .topbar, .page-actions, .btn, .toast-stack { display: none !important; }
  .app-shell { grid-template-columns: 1fr; }
  .content { padding: 0; }
  body { background: #fff; }
}
