﻿/* ============================================================
   All-in-One Wedding Planner â€” Design System
   Mobile-first, elegant, clean.
   ============================================================ */

:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --ink: #26221c;
  --ink-soft: #4d463c;
  --muted: #8a8277;
  --line: #e6e1d7;
  --primary: #1f5e45;
  --primary-strong: #174c38;
  --primary-soft: #e6f0ea;
  --gold: #b9943c;
  --gold-soft: #f6efdd;
  --danger: #c0392b;
  --danger-soft: #fbeae7;
  --warning: #b96f00;
  --warning-soft: #fdf1db;
  --info: #2c6f9b;
  --info-soft: #e7f1f7;
  --success: #2e7d32;
  --success-soft: #e7f3e8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(38, 34, 28, .06);
  --shadow: 0 4px 18px rgba(38, 34, 28, .08);
  --shadow-lg: 0 12px 40px rgba(38, 34, 28, .14);
  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --sidebar-w: 250px;
  --topbar-h: 64px;
  --transition: .18s ease;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 .5rem;
  letter-spacing: .2px;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-strong); }

p { margin: 0 0 .75rem; }

.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-sm { font-size: .825rem; }
.text-xs { font-size: .75rem; }
.text-lg { font-size: 1.15rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-serif { font-family: var(--font-serif); }
.nowrap { white-space: nowrap; }
.mb-0 { margin-bottom: 0; }

/* ---------- App shell ---------- */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: #1b2a24;
  color: #e8e4da;
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  transform: translateX(-100%);
  transition: transform var(--transition);
  overflow-y: auto;
}

.sidebar.open { transform: translateX(0); }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 1.1rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-brand .brand-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), #8a6d1f);
  display: grid; place-items: center;
  color: #fff; flex-shrink: 0;
}

.sidebar-brand .brand-name {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  color: #fff;
  line-height: 1.2;
}

.sidebar-brand .brand-tag { font-size: .68rem; color: #9fb3a8; letter-spacing: .5px; }

.sidebar-nav { flex: 1; padding: .75rem .6rem 2rem; }

.side-nav-group {
  font-size: .68rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #80968a;
  padding: .9rem .75rem .35rem;
}

.side-nav-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .55rem .75rem;
  margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: #d4dccB;
  font-size: .9rem;
  transition: background var(--transition), color var(--transition);
}

.side-nav-item .icon { flex-shrink: 0; opacity: .85; }

.side-nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }

.side-nav-item.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.side-nav-item.disabled { opacity: .4; pointer-events: none; }

.side-nav-badge {
  margin-left: auto;
  background: var(--gold);
  color: #241c05;
  font-size: .7rem;
  font-weight: 700;
  border-radius: 99px;
  padding: 0 .5rem;
  line-height: 1.4;
}

.sidebar-foot {
  padding: .9rem 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: .8rem;
  color: #9fb3a8;
}

/* ---------- Topbar ---------- */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 0 1.15rem;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--ink-soft);
  padding: .3rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}

.topbar-toggle:hover { background: var(--surface-2); }

.topbar-title { font-family: var(--font-serif); font-weight: 700; font-size: 1.05rem; }

.topbar-spacer { flex: 1; }

.topbar-user {
  display: flex; align-items: center; gap: .6rem;
  cursor: pointer; position: relative;
  padding: .35rem .5rem; border-radius: var(--radius-sm);
}

.topbar-user:hover { background: var(--surface-2); }

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: .8rem;
  letter-spacing: .5px; text-transform: uppercase;
}

.dropdown {
  position: absolute; right: 0; top: 115%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: all var(--transition);
  z-index: 50;
  overflow: hidden;
}

.dropdown.open { opacity: 1; pointer-events: auto; transform: none; }

.dropdown-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .65rem .9rem;
  color: var(--ink);
  font-size: .875rem;
}

.dropdown-item:hover { background: var(--surface-2); color: var(--primary); }

.dropdown-head {
  padding: .75rem .9rem;
  border-bottom: 1px solid var(--line);
}

.dropdown-head .name { font-weight: 600; }
.dropdown-head .email { font-size: .75rem; color: var(--muted); }

/* ---------- Dropdown Notifikasi (Phase 7B) ---------- */
.topbar-bell {
  position: relative;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: none; background: transparent;
  color: var(--ink); cursor: pointer;
  border-radius: var(--radius-sm);
}
.topbar-bell:hover { background: var(--surface-2); }

.notif-badge {
  position: absolute; top: 2px; right: 0;
  min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--danger); color: #fff;
  font-size: .65rem; font-weight: 700; border-radius: 999px;
  border: 2px solid var(--surface);
}

.dropdown-notif { min-width: 330px; max-width: 360px; }

.dropdown-item-form {
  display: block; width: 100%;
  border: none; background: transparent; text-align: left;
  cursor: pointer;
}
.dropdown-empty {
  padding: 1.25rem 1rem;
  font-size: .85rem; color: var(--muted); text-align: center;
}
.notif-dot {
  flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
}
.notif-dot.read { background: var(--muted); }
.dropdown-item.is-read { opacity: .6; }
.bold-link { font-weight: 600; color: var(--primary); text-decoration: none; font-size: .8rem; }
.bold-link:hover { text-decoration: underline; }

/* ---------- Content ---------- */
.app-content {
  flex: 1;
  min-width: 0;
  padding: 1.15rem 1.15rem 3rem;
  margin-left: 0;
}

.page-head {
  display: flex; align-items: center; gap: .8rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}

.page-head .actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

.card-header {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: .6rem;
  flex-wrap: wrap;
}

.card-header h3 { margin: 0; font-size: 1rem; }

.card-header .actions { margin-left: auto; }

.card-body { padding: 1.15rem; }

.card-foot {
  padding: .85rem 1.15rem;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ---------- Stat grid ---------- */
.stat-grid {
  display: grid;
  gap: .9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  display: flex; align-items: flex-start; gap: .8rem;
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
}

.stat-icon.primary { background: var(--primary-soft); color: var(--primary); }
.stat-icon.gold { background: var(--gold-soft); color: #8a6d1f; }
.stat-icon.info { background: var(--info-soft); color: var(--info); }
.stat-icon.success { background: var(--success-soft); color: var(--success); }
.stat-icon.danger { background: var(--danger-soft); color: var(--danger); }

.stat-value { font-family: var(--font-serif); font-weight: 700; font-size: 1.3rem; line-height: 1.1; }

.stat-label { font-size: .78rem; color: var(--muted); }

/* ---------- Wedding cards ---------- */
.wedding-grid {
  display: grid;
  gap: .9rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.wedding-card {
  display: flex; flex-direction: column; gap: .35rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: inherit; text-decoration: none;
  transition: all var(--transition);
}

.wedding-card:hover { border-color: var(--primary-soft); box-shadow: var(--shadow); transform: translateY(-1px); color: inherit; }

.wedding-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .2rem; }

.wedding-card-title { font-family: var(--font-serif); font-weight: 700; font-size: 1.02rem; color: var(--ink-soft); }

.wedding-card .text-sm { display: flex; align-items: center; gap: .35rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: .55rem 1rem;
  font-size: .875rem; font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.35;
}

.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-strong); color: #fff; }

.btn-gold { background: var(--gold); color: #241c05; }
.btn-gold:hover { background: #a9812e; color: #241c05; }

.btn-outline {
  background: var(--surface); color: var(--ink-soft);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--surface-2); }

.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--surface-2); color: var(--primary); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a93226; color: #fff; }

.btn-danger-ghost { background: transparent; color: var(--danger); border-color: transparent; }
.btn-danger-ghost:hover { background: var(--danger-soft); }

.btn-sm { padding: .35rem .65rem; font-size: .8rem; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-bottom: 1.1rem;
}

.form-group { display: flex; flex-direction: column; gap: .35rem; }

.form-label { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }

.form-control {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .6rem .75rem;
  font-size: .9rem;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 94, 69, .15);
}

.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(192, 57, 43, .15); }

textarea.form-control { resize: vertical; min-height: 90px; }

.form-help { font-size: .75rem; color: var(--muted); }

.field-error { font-size: .78rem; color: var(--danger); }

.form-check {
  display: flex; align-items: center; gap: .55rem;
  font-size: .875rem;
  cursor: pointer;
}

.form-check input[type="checkbox"], .form-check input[type="radio"] {
  width: 1.05rem; height: 1.05rem; accent-color: var(--primary);
  cursor: pointer;
}

.fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.fieldset-legend { font-size: .8rem; font-weight: 700; color: var(--primary); padding: 0 .5rem; }

/* ---------- Alerts ---------- */
.alert {
  display: flex; align-items: flex-start; gap: .6rem;
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  font-size: .875rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  animation: fadeIn .25s ease;
}

.alert .icon { flex-shrink: 0; margin-top: 1px; }

.alert-success { background: var(--success-soft); color: #1b5e20; border-color: #c5e3c8; }
.alert-error { background: var(--danger-soft); color: #911d12; border-color: #f1c6c0; }
.alert-warning { background: var(--warning-soft); color: #7a4a00; border-color: #efd99d; }
.alert-info { background: var(--info-soft); color: #1d4f73; border-color: #c0dced; }

.alert-dismiss { margin-left: auto; background: none; border: none; cursor: pointer; color: inherit; opacity: .6; padding: .1rem; }
.alert-dismiss:hover { opacity: 1; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.table thead th {
  text-align: left;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  font-weight: 700;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table tbody td {
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }

.table tbody tr:hover { background: var(--surface-2); }

.table .row-actions { display: flex; gap: .3rem; justify-content: flex-end; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .72rem; font-weight: 700;
  padding: .18rem .55rem;
  border-radius: 99px;
  white-space: nowrap;
}

.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-gold { background: var(--gold-soft); color: #8a6d1f; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: #eef0ee; color: var(--muted); }

/* ---------- Progress ---------- */
.progress {
  height: 8px;
  background: #ece9e1;
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #2f8f6a);
  border-radius: 99px;
  transition: width .5s ease;
}

.progress-bar.danger { background: var(--danger); }

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--muted);
}

.empty-state .empty-icon {
  width: 56px; height: 56px;
  margin: 0 auto .9rem;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: #b8b0a2;
}

.empty-state h3 { color: var(--ink-soft); margin-bottom: .25rem; }
.empty-state p { font-size: .85rem; margin-bottom: 1rem; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex; align-items: center; gap: .3rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

.pagination .page-info { font-size: .8rem; color: var(--muted); margin-right: .75rem; }

.page-link {
  min-width: 34px;
  text-align: center;
  padding: .4rem .6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .8rem;
  color: var(--ink-soft);
  background: var(--surface);
  transition: all var(--transition);
}

.page-link:hover { border-color: var(--primary); color: var(--primary); }

.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.page-link.disabled { opacity: .45; pointer-events: none; }

/* ---------- Filters / toolbar ---------- */
.toolbar {
  display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end;
  margin-bottom: 1rem;
}

.toolbar .form-group { flex: 1; min-width: 140px; }

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 1.2rem;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(185, 148, 60, .16), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(31, 94, 69, .18), transparent 60%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.75rem;
}

.auth-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-brand .brand-mark {
  width: 58px; height: 58px;
  margin: 0 auto .8rem;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  color: #fff;
  display: grid; place-items: center;
}

.auth-brand h1 {
  font-size: 1.45rem;
  margin-bottom: .2rem;
}

.auth-brand p { color: var(--muted); font-size: .85rem; margin: 0; }

.auth-title { text-align: center; margin-bottom: 1.25rem; }
.auth-title h2 { margin-bottom: .25rem; }
.auth-title p { color: var(--muted); font-size: .85rem; }

.auth-footer { text-align: center; margin-top: 1.25rem; font-size: .82rem; color: var(--muted); }

/* ---------- Error pages ---------- */
.error-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
  text-align: center;
}

.error-box { max-width: 480px; }

.error-code {
  font-family: var(--font-serif);
  font-size: 5rem;
  line-height: 1;
  background: linear-gradient(120deg, var(--primary), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: .5rem;
}

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line); margin: 1rem 0; }

.pill-list { display: flex; flex-wrap: wrap; gap: .35rem; }

.avatar-mini {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-grid; place-items: center;
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
}

.meta-line { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .8rem; }

.skeleton {
  background: linear-gradient(90deg, #ece9e1 25%, #f5f3ec 50%, #ece9e1 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* Scrollbar */
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 99px; }

/* ---------- Overlay (mobile sidebar) ---------- */
.sidebar-backdrop {
  position: fixed; inset: 0;
  background: rgba(18, 16, 12, .45);
  z-index: 35;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}

.sidebar-backdrop.show { opacity: 1; pointer-events: auto; }

/* ---------- Sub-navigasi modul (mis. Keuangan) ---------- */
.module-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: 0 0 1rem;
  padding: .4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.module-nav-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .8rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.module-nav-link:hover { background: var(--bg); color: var(--text); }

.module-nav-link.active { background: var(--primary-light); color: var(--primary); }

/* ---------- Desktop (>= 900px) ---------- */
@media (min-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100vh;
    transform: none;
  }

  .topbar-toggle { display: none; }

  .app-content { padding: 1.5rem 1.75rem 4rem; margin-left: var(--sidebar-w); }

  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  h1 { font-size: 1.65rem; }
}

/* ---------- Guests / Phase 5 ---------- */
.stat-icon.muted { background: #eef0ee; color: var(--muted); }
.stat-icon.warning { background: var(--warning-soft); color: var(--warning); }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: flex-end;
}

.filter-bar .field { min-width: 130px; }

.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.qr-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--surface);
}

.qr-card h3 { display: flex; align-items: center; gap: .4rem; margin-bottom: .25rem; font-size: 1rem; }

.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  margin: 1rem auto;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: #fff;
  max-width: 260px;
}

.qr-box svg { width: 100%; height: auto; display: block; }

.qr-label { font-size: .8rem; font-weight: 700; color: var(--ink-soft); text-align: center; }

.qr-link-row { margin: .5rem 0; }

.qr-actions { display: flex; gap: .4rem; flex-wrap: wrap; }

/* ---------- Reports & charts (Phase 7A) ---------- */
.trend-chart {
  display: flex;
  gap: .45rem;
  align-items: flex-end;
  height: 160px;
  padding-top: .4rem;
  overflow-x: auto;
}
.trend-col {
  flex: 1 1 0;
  min-width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.trend-val {
  font-size: .7rem;
  color: var(--muted);
  white-space: nowrap;
  margin-bottom: .25rem;
  min-height: 1rem;
}
.trend-track {
  flex: 1;
  width: 100%;
  max-width: 48px;
  display: flex;
  align-items: flex-end;
  background: var(--surface-2);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}
.trend-bar {
  width: 100%;
  background: var(--primary);
  border-radius: var(--radius) var(--radius) 0 0;
  min-height: 2px;
}
.trend-label {
  margin-top: .3rem;
  font-size: .7rem;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}
@media print {
  .filter-bar, .btn { display: none !important; }
  .app-shell { display: block !important; }
  .sidebar, .sidebar-backdrop, .topbar { display: none !important; }
  .app-body { padding: 0 !important; }
}
