@import url('../assets/pulse-app.css');

/* pulse screens for the wemark.ca pulse page (2026-10-22). Focused panels, not the whole
   app: no sidebar (it carries old module names), designed at 640px wide (call review at
   1040px), with a narrow layout below 520px for phones. Sample data only; it agrees with
   the homepage dashboard (Smile Dental Studio, October 2026). Only LIVE features. */
html, body { background: var(--bg); }
.app { display: block; width: 100%; min-height: 0; padding: 22px 24px 24px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.head h1 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.head .sub { font-size: 12.5px; color: var(--cocoa); margin-top: 3px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--cbord); background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 12px; white-space: nowrap; color: var(--walnut); }
.btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; padding: 6px 11px; font-size: 11.5px; font-weight: 600; white-space: nowrap; border: 1px solid var(--cbord); background: var(--card); color: var(--walnut); }
.btn.burg { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }
.btn.good { background: var(--green-bg); border-color: rgba(91,122,82,.25); color: var(--green); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border-radius: 5px; padding: 3px 7px; white-space: nowrap; }
.chip.ai { background: rgba(47,27,17,0.06); color: var(--cocoa); }
.chip.need { background: rgba(124,45,42,0.1); color: var(--burgundy); }
.chip.done { background: var(--green-bg); color: var(--green); }
.chip.web { background: #fff; border: 1px solid var(--cbord); color: var(--walnut); }
.tag.danger { background: var(--danger-bg); color: var(--danger); }
.muted { color: var(--camel); }
.grid { display: grid; gap: 10px; }
.k3 { grid-template-columns: repeat(3, 1fr); } .k4 { grid-template-columns: repeat(4, 1fr); } .k2 { grid-template-columns: 1fr 1fr; }
.kpi { padding: 12px 13px; }
.kpi .v .big { font-size: 21px; }
.card + .card, .grid + .card, .card + .grid { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.sp { flex: 1; }
.ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(124,45,42,0.09); color: var(--burgundy); }
.ic svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--camel); padding: 9px 10px; border-bottom: 1px solid var(--cbord); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--cbord); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td b { font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.score { font-weight: 700; color: var(--green); } .score.mid { color: var(--amber); }
.bar { height: 7px; border-radius: 999px; background: var(--cream); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--burgundy); }
.note { font-size: 11px; color: var(--camel); margin-top: 10px; text-align: right; }
@media (max-width: 520px) {
  .app { padding: 16px 14px 18px; }
  .head { flex-wrap: wrap; }
  .head h1 { font-size: 18px; }
  .k4 { grid-template-columns: 1fr 1fr; } .k3 { grid-template-columns: 1fr 1fr; }
  .hide-n { display: none !important; }
  .note { text-align: left; }
}
/* smallest phones (frame under 300px, e.g. iPhone SE): keep rows on one line and drop
   the least important column so nothing is cut off (go-live review). */
@media (max-width: 300px) {
  .app { padding: 12px 10px 14px; }
  td.muted, th { white-space: nowrap; }
  .hide-xs { display: none !important; }
  table { font-size: 11.5px; }
}

/* Compact phone versions (refinement brief, 2026-10-28): readable rows, not a squeezed table. */
@media (max-width: 520px) {
  /* call logs: name and number on one line, outcome on the right, date beneath */
  table.calllog thead { display: none; }
  table.calllog, table.calllog tbody { display: block; }
  table.calllog tbody tr:not(.xprow) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--cbord); }
  table.calllog tbody tr:first-child { border-top: 0; }
  table.calllog tbody td { padding: 0 !important; border: 0 !important; white-space: nowrap; }
  table.calllog td.who { grid-column: 1; grid-row: 1; overflow: hidden; text-overflow: ellipsis; }
  table.calllog td.who b { display: inline; font-size: 13px; }
  table.calllog td.who small { display: inline; margin-left: 6px; }
  table.calllog td.muted:first-child { grid-column: 1; grid-row: 2; font-size: 11px; }
  table.calllog td:has(.tag) { grid-column: 2; grid-row: 1 / span 2; }
  table.calllog td:not(.who):not(:first-child):not(:has(.tag)) { display: none; }
  table.calllog .xprow { display: block; }
  table.calllog .xprow td { display: block; }
  table.calllog.short tbody tr:not(.xprow):nth-child(n+5) { display: none; }
}
