/* ClinicSoul app-mock — pixel-faithful HTML/SVG recreation of the real app
   Renders crisp at any DPI. Used for hero, demos, and gallery. */

.app-mock {
  display: grid;
  grid-template-columns: 220px 1fr;
  background: #FFFFFF;
  font-family: 'Geist', system-ui, sans-serif;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  width: 100%;
  height: auto;
  position: relative;
  isolation: isolate;
}
.app-mock * { box-sizing: border-box; }

/* ---------- Sidebar ---------- */
.am-side {
  background: #1A0B3D;
  color: #fff;
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 600px;
  position: relative;
}
.am-side-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 14px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.am-side-brand .e {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F97316 0%, #EC4899 20%, #C026D3 55%, #5B21B6 100%);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 14px;
  font-style: italic;
  font-family: 'Geist', sans-serif;
  position: relative;
}
.am-side-brand .e::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.85);
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(-45deg);
}
.am-side-brand .e span { display: none; }
.am-side-burger {
  position: absolute;
  top: 14px; right: 12px;
  width: 26px; height: 26px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  display: grid; place-items: center;
  color: rgba(255,255,255,0.6);
}
.am-side-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  margin-bottom: 14px;
}
.am-side-user .av {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EC4899, #F43F5E);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}
.am-side-user .who { font-weight: 600; font-size: 12px; line-height: 1.2; }
.am-side-user .role {
  display: inline-block;
  margin-top: 4px;
  font-size: 10px;
  padding: 2px 7px;
  background: rgba(245, 158, 11, 0.18);
  color: #FCD34D;
  border-radius: 4px;
  font-weight: 500;
}
.am-side-user .swap { margin-left: auto; color: rgba(255,255,255,0.4); font-size: 14px; }

.am-side-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.62);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.am-side-item:hover { color: #fff; background: rgba(255,255,255,0.04); }
.am-side-item.active {
  background: linear-gradient(135deg, #EC4899 0%, #F43F5E 100%);
  color: #fff;
  font-weight: 500;
}
.am-side-item svg { flex-shrink: 0; opacity: 0.85; }
.am-side-item.active svg { opacity: 1; }

.am-side-bottom {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column; gap: 2px;
}
.am-side-bottom .am-side-item { color: rgba(255,255,255,0.5); }
.am-side-bottom .am-side-item .av {
  width: 22px; height: 22px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px;
  color: rgba(255,255,255,0.8);
}

/* ---------- Main content ---------- */
.am-main {
  background: #F8F7FC;
  padding: 28px 32px;
  min-height: 600px;
}
.am-h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: #1A0B3D; }
.am-sub { color: #6B6080; font-size: 13px; margin-top: 4px; }

/* ---------- KPI cards ---------- */
.am-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 22px;
}
.am-kpi {
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(26,11,61,0.04);
}
.am-kpi-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: #1A0B3D;
  font-weight: 500;
}
.am-kpi-head .ic {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: rgba(124,58,237,0.1);
  color: var(--violet);
  display: grid; place-items: center;
}
.am-kpi .v {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 12px;
  color: #1A0B3D;
}
.am-kpi .v small { font-size: 18px; font-weight: 600; }
.am-kpi .delta {
  margin-top: 6px;
  font-size: 11px;
  color: #6B6080;
  display: flex; align-items: center; gap: 4px;
}
.am-kpi .delta .up { color: #1F8A5B; font-weight: 600; }
.am-kpi .link {
  margin-top: 14px;
  display: block;
  color: var(--violet);
  font-size: 12px;
  font-weight: 500;
}

/* Donut KPI — base styling (gallery-mock-wrap overrides this) */
.am-kpi.donut .row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.am-kpi.donut .legend {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  width: 100%;
}
.am-kpi.donut .legend div {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #1A0B3D;
  white-space: nowrap;
  font-size: 11px;
}
.am-kpi.donut .legend .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.am-kpi.donut .legend .n { margin-left: auto; color: #6B6080; font-weight: 500; font-family: 'Geist Mono', monospace; padding-left: 4px; font-size: 10px; }
.am-kpi.donut svg { flex-shrink: 0; width: 80px; height: 80px; }
.am-kpi.donut .center-num { font-size: 14px; font-weight: 700; }
.am-kpi.donut .center-lbl { font-size: 9px; color: #6B6080; text-transform: uppercase; letter-spacing: 0.08em; }

/* Inside gallery-mock-wrap, donut+legend sit side-by-side compactly */
.gallery-mock-wrap .am-kpi.donut .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}
.gallery-mock-wrap .am-kpi.donut .legend {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 9.5px;
  width: auto;
  min-width: 0;
}
.gallery-mock-wrap .am-kpi.donut .legend div {
  font-size: 9.5px;
  white-space: nowrap;
  gap: 4px;
  overflow: hidden;
}
.gallery-mock-wrap .am-kpi.donut .legend .n { font-size: 9px; padding-left: 2px; }
.gallery-mock-wrap .am-kpi.donut svg { width: 52px; height: 52px; }
/* Hide the inner number text — donut shows the total already */
.gallery-mock-wrap .am-kpi.donut svg text { font-size: 11px !important; }

/* ---------- Two-col panels (lists + chart) ---------- */
.am-row2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.am-panel {
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(26,11,61,0.04);
}
.am-panel-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #1A0B3D;
  margin-bottom: 14px;
}
.am-panel-head .ic {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: rgba(124,58,237,0.1);
  color: var(--violet);
  display: grid; place-items: center;
}

.am-arrivals { display: flex; flex-direction: column; }
.am-arr-row {
  display: grid;
  grid-template-columns: 50px 36px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid #EFEAF7;
}
.am-arr-row:first-of-type { border-top: 0; }
.am-arr-time { font-weight: 700; font-size: 13px; color: #1A0B3D; font-family: 'Geist', sans-serif; }
.am-arr-av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C026D3, #7C3AED);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: grid; place-items: center;
}
.am-arr-av.b { background: linear-gradient(135deg, #7C3AED, #4338CA); }
.am-arr-av.c { background: linear-gradient(135deg, #EC4899, #F472B6); }
.am-arr-av.d { background: linear-gradient(135deg, #C026D3, #DB2777); }
.am-arr-av.e { background: linear-gradient(135deg, #8B5CF6, #6366F1); }
.am-arr-name { font-weight: 600; font-size: 13px; color: #1A0B3D; }
.am-arr-meta { font-size: 12px; color: #6B6080; margin-top: 2px; }
.am-arr-status {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(31,138,91,0.12);
  color: #1F8A5B;
}
.am-link { color: var(--violet); font-size: 12px; font-weight: 500; margin-top: 14px; display: inline-block; }

/* ---------- Bar chart ---------- */
.am-chart-totals {
  display: grid; grid-template-columns: 1fr 1fr;
  background: #F8F7FC;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.am-chart-totals > div .lbl {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em;
  color: #6B6080; font-family: 'Geist Mono', monospace;
}
.am-chart-totals > div .v { font-size: 16px; font-weight: 700; color: #1A0B3D; margin-top: 4px; }

.am-bars {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  margin-top: 10px;
}
.am-bars-y {
  display: flex; flex-direction: column; justify-content: space-between;
  font-size: 10px; color: #6B6080; font-family: 'Geist Mono', monospace;
  text-align: right;
  height: 130px;
}
.am-bars-area {
  position: relative;
  height: 130px;
  border-bottom: 1px solid #EFEAF7;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: flex-end;
  padding-top: 14px;
}
.am-bar {
  position: relative;
  margin: 0 4px;
  background: #C4B5FD;
  border-radius: 3px 3px 0 0;
  display: flex; justify-content: center; align-items: flex-start;
}
.am-bar.cur { background: #4338CA; }
.am-bar .top {
  position: absolute;
  top: -18px;
  font-size: 10px;
  color: #1A0B3D;
  font-weight: 500;
  font-family: 'Geist Mono', monospace;
}
.am-bars-x {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin-top: 6px;
  font-size: 10px;
  color: #6B6080;
  font-family: 'Geist Mono', monospace;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Calendar mock (week view) ---------- */
.am-cal {
  background: #fff;
  border-radius: 14px;
  padding: 0;
  margin-top: 14px;
  box-shadow: 0 1px 2px rgba(26,11,61,0.04);
  overflow: hidden;
}
.am-cal-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid #EFEAF7;
}
.am-cal-btn {
  background: #fff;
  border: 1px solid #E8E2F2;
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 12px;
  color: #1A0B3D;
  font-weight: 500;
}
.am-cal-btn.icon { padding: 6px 10px; font-size: 14px; line-height: 1; }
.am-cal-segment {
  display: inline-flex;
  background: #F4F0FB;
  border-radius: 7px;
  padding: 3px;
  margin-left: auto;
}
.am-cal-segment button {
  border: 0; background: transparent;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #6B6080;
  border-radius: 5px;
  cursor: pointer;
}
.am-cal-segment button.on { background: #C4B5FD; color: #1A0B3D; }
.am-cal-select {
  border: 1px solid #E8E2F2; border-radius: 7px;
  padding: 6px 26px 6px 10px;
  font-size: 12px;
  color: #6B6080;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M3 5l3 3 3-3' stroke='%236B6080' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>") no-repeat right 8px center / 10px;
  -webkit-appearance: none; appearance: none;
}
.am-cal-add {
  background: #5B21B6;
  color: #fff;
  border: 0;
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}

.am-cal-grid {
  display: grid;
  grid-template-columns: 56px repeat(7, 1fr);
  background: #fff;
}
.am-cal-grid .am-cal-h {
  padding: 10px 6px;
  text-align: center;
  font-size: 10px;
  font-weight: 500;
  color: #6B6080;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #EFEAF7;
  border-right: 1px solid #EFEAF7;
}
.am-cal-grid .am-cal-h:nth-last-child(8) { border-right: 0; }
.am-cal-grid .am-cal-th {
  background: transparent;
  border-bottom: 1px solid #EFEAF7;
}
.am-cal-time {
  padding: 6px 8px 6px 0;
  font-size: 10px;
  color: #6B6080;
  text-align: right;
  font-family: 'Geist Mono', monospace;
  border-right: 1px solid #EFEAF7;
  border-bottom: 1px solid #F4F0FB;
  height: 60px;
  display: flex; align-items: flex-start; justify-content: flex-end;
}
.am-cal-cell {
  border-right: 1px solid #EFEAF7;
  border-bottom: 1px solid #F4F0FB;
  height: 60px;
  position: relative;
  padding: 2px;
}
.am-cal-cell:last-child { border-right: 0; }
.am-cal-evt {
  position: absolute;
  left: 3px; right: 3px;
  padding: 4px 6px 3px;
  border-radius: 5px;
  font-size: 9.5px;
  line-height: 1.2;
  color: #1A0B3D;
  font-weight: 500;
  overflow: hidden;
}
.am-cal-evt::before {
  content: '';
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--am-evt-c, #7C3AED);
  border-radius: 3px 0 0 3px;
}
.am-cal-evt .t { font-size: 8.5px; color: #6B6080; margin-top: 1px; font-family: 'Geist Mono', monospace; }
.am-cal-evt .dot {
  position: absolute; top: 3px; right: 4px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--am-evt-c, #7C3AED);
}

/* Event color variants */
.am-cal-evt.c1 { --am-evt-c: #3B82F6; background: #DBEAFE; }
.am-cal-evt.c2 { --am-evt-c: #F59E0B; background: #FEF3C7; }
.am-cal-evt.c3 { --am-evt-c: #EC4899; background: #FCE7F3; }
.am-cal-evt.c4 { --am-evt-c: #10B981; background: #D1FAE5; }
.am-cal-evt.c5 { --am-evt-c: #8B5CF6; background: #EDE9FE; }
.am-cal-evt.c6 { --am-evt-c: #EF4444; background: #FEE2E2; }
.am-cal-evt.c7 { --am-evt-c: #06B6D4; background: #CFFAFE; }
.am-cal-evt.c8 { --am-evt-c: #A855F7; background: #F3E8FF; }

/* ---------- Invoice list (contabilità) ---------- */
.am-tabs {
  display: flex; gap: 4px;
  padding: 4px;
  background: #F4F0FB;
  border-radius: 7px;
  width: fit-content;
  margin-top: 14px;
}
.am-tab {
  border: 0; background: transparent;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #6B6080;
  border-radius: 5px;
  cursor: pointer;
}
.am-tab.on { background: #C4B5FD; color: #1A0B3D; }

.am-months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  background: #fff;
  border: 1px solid #E8E2F2;
  border-radius: 10px;
  margin: 18px 0 18px;
  overflow: hidden;
}
.am-month {
  padding: 10px 4px;
  text-align: center;
  border-right: 1px solid #EFEAF7;
}
.am-month:last-child { border-right: 0; }
.am-month .lbl { font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: #6B6080; font-family: 'Geist Mono', monospace; }
.am-month .n { font-size: 14px; font-weight: 700; color: #1A0B3D; margin-top: 4px; }
.am-month.cur { background: #EDE9FE; border-color: #C4B5FD; }
.am-month.cur .lbl { color: #5B21B6; }
.am-month.cur .euro { font-size: 9px; color: #5B21B6; margin-top: 2px; font-weight: 600; font-family: 'Geist Mono', monospace; }

.am-inv-toolbar {
  display: flex; gap: 8px; align-items: center;
  padding: 0 0 12px;
}
.am-inv-toolbar .search {
  flex: 1;
  border: 1px solid #E8E2F2;
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 12px;
  color: #6B6080;
  background: #fff;
  max-width: 280px;
}
.am-inv-search-btn {
  background: #5B21B6; color: #fff;
  border: 0; padding: 7px 12px; border-radius: 7px;
  font-size: 13px;
}

.am-inv-table {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #E8E2F2;
  overflow: hidden;
}
.am-inv-row {
  display: grid;
  grid-template-columns: 22px 60px 50px 60px 1fr 100px 90px 90px 16px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #EFEAF7;
  font-size: 12px;
  gap: 12px;
}
.am-inv-row:last-child { border-bottom: 0; }
.am-inv-row.head {
  background: #F8F7FC;
  font-size: 10px;
  font-weight: 500;
  color: #6B6080;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'Geist Mono', monospace;
}
.am-inv-row .checkbox {
  width: 14px; height: 14px;
  border: 1px solid #C4B5FD;
  border-radius: 3px;
}
.am-inv-row .num { color: #6B6080; }
.am-inv-row .date { color: #6B6080; }
.am-inv-row .pat { font-weight: 500; color: #1A0B3D; }
.am-inv-row .total { color: #1A0B3D; text-align: right; }
.am-inv-row .due { font-weight: 700; color: #1A0B3D; text-align: right; }
.am-inv-row .due.zero { color: #C4B5FD; font-weight: 400; }
.am-inv-row .menu { color: #C4B5FD; text-align: right; }
.am-status {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  display: inline-block;
  text-align: center;
}
.am-status.paid { background: #D1FAE5; color: #047857; }
.am-status.partial { background: #DBEAFE; color: #1E40AF; }
.am-status.unpaid { background: #F1F5F9; color: #64748B; }

/* ---------- Invoice detail (fattura singola) ---------- */
.am-finv {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
  margin-top: 14px;
}
.am-finv-main { display: flex; flex-direction: column; gap: 14px; }
.am-finv-side { display: flex; flex-direction: column; gap: 14px; }

.am-finv-breadcrumb { font-size: 11px; color: #6B6080; margin-bottom: 8px; }
.am-finv-breadcrumb a { color: #6B6080; }
.am-finv-breadcrumb .cur { color: #1A0B3D; }
.am-finv-h {
  display: flex; align-items: center; gap: 12px;
  font-size: 22px;
  font-weight: 700;
  color: #1A0B3D;
  letter-spacing: -0.02em;
}
.am-finv-h .badge {
  background: #D1FAE5; color: #047857;
  padding: 3px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 500;
}
.am-finv-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 10px;
}
.am-finv-action {
  background: #fff;
  border: 1px solid #E8E2F2;
  border-radius: 7px;
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 500;
  color: #1A0B3D;
  display: inline-flex; align-items: center; gap: 5px;
}
.am-finv-action.wa { color: #25D366; border-color: rgba(37,211,102,0.25); }
.am-finv-action.cta {
  background: #5B21B6; color: #fff; border-color: #5B21B6;
}

.am-finv-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(26,11,61,0.04);
}
.am-finv-card-h { font-size: 13px; font-weight: 600; color: #1A0B3D; margin-bottom: 12px; }
.am-finv-table { display: flex; flex-direction: column; }
.am-finv-table .h {
  display: grid; grid-template-columns: 1fr 40px 70px 50px 80px;
  gap: 10px;
  font-size: 10px;
  color: #6B6080;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'Geist Mono', monospace;
  padding-bottom: 8px;
  border-bottom: 1px solid #EFEAF7;
}
.am-finv-table .h > *:not(:first-child) { text-align: right; }
.am-finv-table .row {
  display: grid; grid-template-columns: 1fr 40px 70px 50px 80px;
  gap: 10px;
  padding: 10px 0;
  font-size: 12px;
  border-bottom: 1px solid #EFEAF7;
}
.am-finv-table .row > *:not(:first-child) { text-align: right; color: #6B6080; }
.am-finv-table .row .desc { color: #1A0B3D; font-weight: 500; }
.am-finv-table .row .tot { color: #1A0B3D; font-weight: 600; }
.am-finv-totals {
  margin-top: 14px;
  display: flex; flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 12px;
}
.am-finv-totals .line { display: flex; gap: 30px; color: #6B6080; }
.am-finv-totals .line .v { color: #1A0B3D; }
.am-finv-totals .line.total {
  font-size: 14px;
  font-weight: 700;
  color: #1A0B3D;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid #EFEAF7;
  width: 100%;
  justify-content: space-between;
  padding-left: 60%;
}

.am-pat-card .label-row { display: flex; align-items: center; gap: 10px; }
.am-pat-card .av {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C026D3, #7C3AED);
  color: #fff;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
}
.am-pat-card .name { font-size: 14px; font-weight: 600; }
.am-pat-card .meta { color: #6B6080; font-size: 11px; margin-top: 10px; text-transform: uppercase; letter-spacing: 0.08em; font-family: 'Geist Mono', monospace; }
.am-pat-card .field { font-size: 12px; color: #1A0B3D; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.am-pat-card .field .ico { color: #6B6080; }

.am-sched-row {
  display: grid;
  grid-template-columns: 1fr 70px 80px 60px;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  padding: 9px 0;
  border-bottom: 1px solid #EFEAF7;
}
.am-sched-row:last-child { border-bottom: 0; }
.am-sched-row.head {
  color: #6B6080;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'Geist Mono', monospace;
}
.am-sched-row .when { color: #1A0B3D; font-weight: 500; }
.am-sched-row .amt { text-align: right; color: #1A0B3D; }
.am-sched-row .when2 { color: #5B21B6; font-size: 11px; }

/* ---------- Odontogramma (SVG-driven) ---------- */
.am-odonto {
  background: #fff;
  border-radius: 12px;
  padding: 22px 26px;
  box-shadow: 0 1px 2px rgba(26,11,61,0.04);
}
.am-odonto-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 18px;
}
.am-odonto-h { font-size: 16px; font-weight: 700; color: #1A0B3D; }
.am-odonto-sub { font-size: 11px; color: #6B6080; margin-top: 2px; }
.am-odonto-actions { display: flex; gap: 8px; }
.am-odonto-actions .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: #F4F0FB;
  border: 1px solid #E8E2F2;
  border-radius: 7px;
  font-size: 11px;
  color: #1A0B3D;
}

  .am-teeth { display: grid; grid-template-columns: 1fr 6px 1fr; gap: 12px; align-items: start; }
  .am-teeth-side { width: 100%; }
.am-teeth .divider {
  background: linear-gradient(180deg, transparent, #C4B5FD, transparent);
  width: 1px;
  height: 100%;
  justify-self: center;
}
.am-teeth-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}
.am-teeth-row.lower { margin-top: 12px; }

.tooth {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
}
.tooth-num {
  font-size: 9px;
  color: #6B6080;
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
}
.tooth.lower .tooth-num { order: 2; }
.tooth-svg { display: block; }
.tooth-svg rect.face { fill: #fff; stroke: #C4B5FD; stroke-width: 0.8; }
.tooth-svg rect.face.h { fill: #FEE2E2; }
.tooth-svg rect.face.x { fill: none; }
.tooth-svg line.x-mark { stroke: #1A0B3D; stroke-width: 1.5; }
.tooth-svg .impianto { fill: #F97316; }
.tooth-svg.active rect.outer { fill: none; stroke: #1A0B3D; stroke-width: 1.5; }

/* Interactive odontogramma — clickable teeth */
.odonto-interactive .tooth { cursor: pointer; transition: transform 0.15s ease; }
.odonto-interactive .tooth:hover { transform: translateY(-2px); }
.odonto-interactive .tooth:hover .tooth-svg polygon.outer { stroke: #7C3AED; stroke-width: 1.2; }
.odonto-interactive .tooth.selected .tooth-svg polygon.outer { fill: #EDE9FE; stroke: #7C3AED; stroke-width: 1.5; }
.odonto-interactive .tooth.selected .tooth-num { color: #7C3AED; font-weight: 700; }

.am-odonto-legend {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #EFEAF7;
  font-size: 11px;
  color: #6B6080;
}
.am-odonto-legend strong {
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6B6080;
  font-family: 'Geist Mono', monospace;
  margin-right: 4px;
}
.am-odonto-legend .leg {
  display: inline-flex; align-items: center; gap: 6px;
  color: #1A0B3D;
}
.am-odonto-legend .leg .dot {
  width: 8px; height: 8px; border-radius: 50%;
}

/* ===== Responsive containment ===== */
/* Without min-width: 0, grid children refuse to shrink below content size,
   which is what's pushing KPIs off the right of the hero. */
.app-mock { min-width: 0; }
.am-main { min-width: 0; }
.am-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.am-kpis > * { min-width: 0; }
.am-row2 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.am-row2 > * { min-width: 0; }
.am-bars { min-width: 0; }
.am-bars-area { min-width: 0; }
.am-kpi.donut .row { grid-template-columns: minmax(0, 1fr) 72px; }
.am-kpi.donut .legend { min-width: 0; }
.am-kpi.donut .legend div { font-size: 11px; white-space: nowrap; }

/* Slightly tighter at the natural hero size so 4 KPIs always fit */
.app-mock { font-size: 12.5px; }
.am-main { padding: 24px 26px; }
.am-kpis { gap: 12px; margin-top: 18px; }
.am-kpi { padding: 14px 16px; }
.am-kpi .v { font-size: 22px; margin-top: 10px; }
.am-kpi .v small { font-size: 14px; }
.am-kpi-head { font-size: 12px; }
.am-kpi-head .ic { width: 22px; height: 22px; }
.am-row2 { gap: 12px; margin-top: 12px; }
.am-panel { padding: 16px 18px; }
.am-arr-row { padding: 10px 0; grid-template-columns: 46px 32px minmax(0, 1fr) auto; gap: 12px; }
.am-arr-av { width: 32px; height: 32px; font-size: 11px; }
.am-arr-name { font-size: 12.5px; }
.am-arr-meta { font-size: 11.5px; }
.am-arr-time { font-size: 12.5px; }
.am-bars-area { height: 110px; }
.am-bars-y { height: 110px; }

@media (max-width: 900px) {
  .am-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .am-row2 { grid-template-columns: 1fr; }
}

/* Calendar: prevent ugly truncation by giving events room */
.am-cal-evt { font-size: 10.5px; }
.am-cal-evt .t { font-size: 9.5px; }
@media (max-width: 1200px) {
  .am-cal-grid { font-size: 9px; }
  .am-cal-evt { font-size: 9.5px; padding: 3px 5px 2px; }
}

/* Calendar mobile-friendly compaction — applies inside the agenda demo on
   small viewports. The whole demo-shell also gets a zoom in styles.css so
   these rules + the zoom together make the week view legible without
   overflowing. */
@media (max-width: 760px) {
  .am-cal-grid { grid-template-columns: 36px repeat(7, minmax(0, 1fr)); }
  .am-cal-grid .am-cal-h { font-size: 8.5px; padding: 6px 2px; }
  .am-cal-time { font-size: 8.5px; padding: 4px 4px 4px 0; height: 42px; }
  .am-cal-cell { height: 42px; padding: 1px; }
  .am-cal-evt { font-size: 8px; padding: 2px 4px; border-radius: 4px; left: 2px; right: 2px; }
  .am-cal-evt .t { font-size: 7px; }
  .am-cal-toolbar { flex-wrap: wrap; row-gap: 6px; padding: 10px 12px; }
  .am-cal-toolbar .am-cal-btn { padding: 6px 9px; font-size: 11px; }
  .am-cal-toolbar .am-cal-select { font-size: 11px; padding: 6px 8px; }
  .am-cal-add { font-size: 11px; padding: 7px 12px; }
}

/* At phone widths, tighten the time column even further so the 7-day
   week stays legible. */
@media (max-width: 480px) {
  .am-cal-grid { grid-template-columns: 28px repeat(7, minmax(0, 1fr)); }
  .am-cal-grid .am-cal-h { font-size: 7.5px; padding: 5px 1px; letter-spacing: 0.02em; }
  .am-cal-time { font-size: 7.5px; }
  .am-cal-evt { font-size: 7.5px; padding: 1px 3px; }
  .am-cal-evt .t { display: none; }
  .am-cal-evt .dot { display: none; }
}
@media (max-width: 760px) {
  .app-mock { grid-template-columns: 60px 1fr; font-size: 12px; }
  .am-side { padding: 10px 6px; }
  .am-side-brand span:not(.e), .am-side-user .who, .am-side-user .role, .am-side-item span, .am-side-bottom .am-side-item span, .am-side-user .swap, .am-side-burger { display: none; }
  .am-side-user { padding: 6px; }
  .am-side-item { justify-content: center; padding: 9px 0; font-size: 0; }
  .am-side-item svg { margin: 0 auto; }
  .am-main { padding: 18px 16px; min-height: 480px; }
  .am-kpis { grid-template-columns: repeat(2, 1fr); }
  .am-row2 { grid-template-columns: 1fr; }
  .am-finv { grid-template-columns: 1fr; }
  .am-cal-grid { grid-template-columns: 40px repeat(7, 1fr); }
  /* Drop Numero + Data + the separator gap on mobile. Targeted by
     nth-child so the header row (which has no .num/.date classes)
     also loses the same columns and doesn't wrap onto a second line. */
  .am-inv-row { grid-template-columns: 18px 1fr 80px 60px 60px 12px; gap: 8px; padding: 10px 12px; font-size: 11px; }
  .am-inv-row > span:nth-child(2),
  .am-inv-row > span:nth-child(3),
  .am-inv-row > span:nth-child(4) { display: none; }
  .am-inv-row.head { font-size: 9px; letter-spacing: 0.06em; }
  .am-status { padding: 2px 7px; font-size: 9.5px; }
}


/* ===== Gallery mock containers (used in features gallery + index hero) ===== */
  /* Gallery mock containers */
  .gallery-mock-wrap {
    width: 100%;
    overflow: hidden;
    position: relative;
  }
  .gallery-mock-wrap .app-mock {
    font-size: 11px;
    transform-origin: top left;
  }
  .gallery-mock-wrap .am-side { min-height: 0; padding: 12px 10px; }
  .gallery-mock-wrap .am-side-brand { font-size: 13px; padding: 4px 6px 10px; }
  .gallery-mock-wrap .am-side-item { font-size: 11px; padding: 7px 8px; }
  .gallery-mock-wrap .am-main { padding: 18px 22px; min-height: 0; }
  .gallery-mock-wrap .am-h1 { font-size: 18px; }
  .gallery-mock-wrap .am-sub { font-size: 11px; }
  .gallery-mock-wrap .am-kpis { gap: 8px; margin-top: 14px; }
  .gallery-mock-wrap .am-kpi { padding: 10px 12px; }
  .gallery-mock-wrap .am-kpi .v { font-size: 18px; margin-top: 6px; }
  .gallery-mock-wrap .am-kpi .v small { font-size: 12px; }
  .gallery-mock-wrap .am-kpi-head { font-size: 11px; gap: 6px; }
  .gallery-mock-wrap .am-kpi-head .ic { width: 20px; height: 20px; font-size: 10px; }
  .gallery-mock-wrap .am-kpi .delta { font-size: 9px; margin-top: 4px; }
  .gallery-mock-wrap .am-kpi .link { font-size: 10px; margin-top: 8px; }
  .gallery-mock-wrap .am-row2 { gap: 8px; margin-top: 10px; }
  .gallery-mock-wrap .am-panel { padding: 12px 14px; }
  .gallery-mock-wrap .am-panel-head { font-size: 11px; margin-bottom: 8px; }
  .gallery-mock-wrap .am-arr-row { padding: 8px 0; gap: 10px; grid-template-columns: 40px 28px 1fr auto; }
  .gallery-mock-wrap .am-arr-time { font-size: 11px; }
  .gallery-mock-wrap .am-arr-av { width: 28px; height: 28px; font-size: 10px; }
  .gallery-mock-wrap .am-arr-name { font-size: 11px; }
  .gallery-mock-wrap .am-arr-meta { font-size: 10px; }
  .gallery-mock-wrap .am-arr-status { font-size: 9px; padding: 2px 8px; }
  .gallery-mock-wrap .am-bars-area { height: 90px; }
  .gallery-mock-wrap .am-bars-y { height: 90px; font-size: 9px; }
  .gallery-mock-wrap .am-bar .top { font-size: 9px; top: -14px; }
  .gallery-mock-wrap .am-bars-x { font-size: 9px; }
  .gallery-mock-wrap .am-chart-totals .v { font-size: 13px; }
  .gallery-mock-wrap.gallery-mock-no-side .app-mock,
  .gallery-mock-wrap.gallery-mock-no-side > .am-main { display: block; }
  .gallery-mock-wrap.gallery-mock-no-side .am-side { display: none; }

