/* =========================================================================
   views.css — styles specific to individual screens
   ========================================================================= */

/* ============================ TODAY / COMMAND =========================== */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  padding: 26px 28px;
  background: linear-gradient(135deg, var(--plum-soft) 0%, var(--blush-soft) 52%, var(--gold-soft) 100%);
  border: 1px solid var(--line);
  margin-bottom: 20px;
}
.hero::after {
  content: ''; position: absolute; right: -40px; top: -50px;
  width: 210px; height: 210px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.5), transparent 68%);
  pointer-events: none;
}
:root[data-theme="dark"] .hero::after { background: radial-gradient(circle, rgba(255,255,255,.07), transparent 68%); }
.hero__greet {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 600;
  letter-spacing: -.025em; line-height: 1.12;
}
.hero__date { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--plum-deep); opacity: .75; margin-bottom: 7px; }
.hero__line { color: var(--ink-2); font-size: .93rem; margin-top: 9px; max-width: 60ch; position: relative; z-index: 1; }
.hero__row { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 16px; position: relative; z-index: 1; }

.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--line-2);
  cursor: pointer; text-align: left; width: 100%;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.alert:hover { transform: translateX(2px); box-shadow: var(--sh-2); }
.alert--danger { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger-soft) 40%, var(--surface)); }
.alert--warn { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn-soft) 40%, var(--surface)); }
.alert--info { border-left-color: var(--info); }
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .alert--danger { background: var(--danger-soft); }
  .alert--warn { background: var(--warn-soft); }
}
.alert__ico { font-size: 16px; flex: 0 0 auto; line-height: 1.5; }
.alert__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.alert__title { display: block; font-weight: 600; font-size: .875rem; line-height: 1.4; }
.alert__meta { display: block; font-size: .76rem; color: var(--ink-3); margin-top: 2px; }
.alert__go { color: var(--ink-3); font-size: 14px; flex: 0 0 auto; align-self: center; }

.tasklist { display: flex; flex-direction: column; }
.taskrow {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 16px; border-bottom: 1px solid var(--line);
  transition: background var(--t-fast);
}
.taskrow:last-child { border-bottom: 0; }
.taskrow:hover { background: var(--surface-2); }
.taskrow.is-done { opacity: .52; }
.taskrow.is-done .taskrow__title { text-decoration: line-through; }
.taskrow__check {
  width: 20px; height: 20px; flex: 0 0 20px; margin-top: 1px;
  border-radius: 6px; border: 1.6px solid var(--line-2);
  display: grid; place-items: center; cursor: pointer;
  font-size: 11px; color: transparent; background: var(--surface);
  transition: all var(--t-fast);
}
.taskrow__check:hover { border-color: var(--plum); background: var(--plum-soft); }
.taskrow.is-done .taskrow__check { background: var(--plum); border-color: var(--plum); color: #fff; }
:root[data-theme="dark"] .taskrow.is-done .taskrow__check { color: #1B1421; }
.taskrow__body { flex: 1 1 auto; min-width: 0; }
.taskrow__title { font-size: .875rem; font-weight: 500; line-height: 1.45; word-break: break-word; }
.taskrow__meta { font-size: .74rem; color: var(--ink-3); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.taskrow__acts { display: flex; gap: 2px; opacity: .4; transition: opacity var(--t-fast); flex: 0 0 auto; }
.taskrow:hover .taskrow__acts, .taskrow__acts:focus-within { opacity: 1; }
@media (max-width: 720px) { .taskrow__acts { opacity: 1; } }

/* ============================== PIPELINE =============================== */
.pipeline { display: flex; gap: 3px; margin: 4px 0 2px; }
.pipeline__seg {
  flex: 1 1 0; height: 6px; border-radius: 2px;
  background: var(--surface-3);
  transition: background var(--t-slow) var(--ease-out);
  position: relative;
}
.pipeline__seg.is-done { background: var(--plum); }
.pipeline__seg.is-current { background: var(--blush); }
.pipeline__seg.is-current::after {
  content: ''; position: absolute; inset: -3px -1px;
  border-radius: 4px; border: 1.5px solid var(--blush); opacity: .45;
}

/* stage stepper on the project detail page */
.stepper { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex; gap: 13px; padding: 0 0 0 2px;
  position: relative; text-align: left; width: 100%;
  cursor: pointer; background: none;
}
.step__rail { flex: 0 0 22px; display: flex; flex-direction: column; align-items: center; }
.step__dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line-2); background: var(--surface);
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: var(--ink-3);
  flex: 0 0 22px; transition: all var(--t);
}
.step__line { flex: 1 1 auto; width: 2px; background: var(--line); min-height: 14px; }
.step:last-child .step__line { display: none; }
.step__body { flex: 1 1 auto; padding: 0 0 15px; min-width: 0; display: flex; flex-direction: column; }
.step__label { display: block; font-size: .875rem; font-weight: 600; line-height: 1.3; }
.step__note { display: block; font-size: .75rem; color: var(--ink-3); margin-top: 1px; line-height: 1.4; }
.step.is-done .step__dot { background: var(--plum); border-color: var(--plum); color: #fff; }
:root[data-theme="dark"] .step.is-done .step__dot { color: #1B1421; }
.step.is-done .step__line { background: var(--plum); }
.step.is-current .step__dot {
  border-color: var(--blush); background: var(--blush-soft); color: var(--blush);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blush) 18%, transparent);
}
.step.is-current .step__label { color: var(--plum-deep); }
.step:hover .step__label { text-decoration: underline; text-underline-offset: 3px; }
.step.is-future .step__label { color: var(--ink-3); font-weight: 500; }

/* ============================== KANBAN ================================= */
.kanban {
  display: flex; gap: 13px; overflow-x: auto; padding-bottom: 12px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.kcol {
  flex: 0 0 258px; width: 258px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 11px;
  scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 9px;
  min-height: 130px;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.kcol.is-drop { background: var(--plum-soft); border-color: var(--plum); border-style: dashed; }
.kcol__head { display: flex; align-items: center; gap: 7px; padding: 2px 4px 0; }
.kcol__title { font-size: .76rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcol__count { font-size: .7rem; font-weight: 700; color: var(--ink-3); background: var(--surface); border-radius: var(--r-pill); padding: 1px 7px; }
.kcol__sum { font-size: .68rem; color: var(--ink-3); padding: 0 4px 2px; font-variant-numeric: tabular-nums; }
.kcard {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 12px;
  box-shadow: var(--sh-1); cursor: grab;
  transition: box-shadow var(--t-fast), transform var(--t-fast);
  display: flex; flex-direction: column; gap: 8px;
}
.kcard:hover { box-shadow: var(--sh-2); transform: translateY(-1px); }
.kcard:active { cursor: grabbing; }
.kcard.is-drag { opacity: .4; }
.kcard__top { display: flex; align-items: flex-start; gap: 9px; }
.kcard__title { font-size: .85rem; font-weight: 600; line-height: 1.35; flex: 1 1 auto; min-width: 0; word-break: break-word; }
.kcard__meta { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; font-size: .72rem; color: var(--ink-3); }
.kcard__foot { display: flex; align-items: center; gap: 8px; font-size: .72rem; }
.kanban__hint { font-size: .76rem; color: var(--ink-3); margin-bottom: 11px; }

/* =========================== CUSTOMER CARDS ============================ */
.ccard { display: flex; flex-direction: column; gap: 13px; padding: 17px; cursor: pointer; }
.ccard__top { display: flex; gap: 12px; align-items: flex-start; }
.ccard__id { flex: 1 1 auto; min-width: 0; }
.ccard__name { font-family: var(--font-display); font-size: 1.04rem; font-weight: 600; line-height: 1.22; letter-spacing: -.015em; word-break: break-word; }
.ccard__partner { font-size: .79rem; color: var(--ink-3); margin-top: 1px; }
.ccard__meta { display: flex; gap: 7px; flex-wrap: wrap; }
.ccard__money { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .8rem; }
.ccard__money strong { font-size: .95rem; font-variant-numeric: tabular-nums; }
.ccard__foot { display: flex; justify-content: space-between; align-items: center; gap: 9px; font-size: .74rem; color: var(--ink-3); padding-top: 11px; border-top: 1px solid var(--line); }

/* profile header on the detail page */
.phero {
  display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap;
  padding: 22px; border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line); box-shadow: var(--sh-1);
  margin-bottom: 18px;
}
.phero__id { flex: 1 1 260px; min-width: 0; }
.phero__name { font-family: var(--font-display); font-size: clamp(1.3rem, 3.4vw, 1.75rem); font-weight: 600; letter-spacing: -.022em; line-height: 1.14; }
.phero__sub { color: var(--ink-2); font-size: .89rem; margin-top: 4px; }
.phero__pills { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 11px; }
.phero__stats { display: flex; gap: 22px; flex-wrap: wrap; }
.phero__stat { min-width: 84px; }
.phero__stat dt { font-size: .67rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.phero__stat dd { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin: 3px 0 0; font-variant-numeric: tabular-nums; }
.phero__actions { display: flex; gap: 7px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .phero { padding: 16px; }
  .phero__stats { gap: 16px; width: 100%; }
  .phero__actions { width: 100%; }
  .phero__actions .btn { flex: 1 1 auto; }
}

/* countdown ribbon */
.countdown {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--blush-soft); color: #A85761;
  font-size: .82rem; font-weight: 600;
}
:root[data-theme="dark"] .countdown { color: var(--blush); }
.countdown strong { font-family: var(--font-display); font-size: 1.05rem; }

/* ================================ TABS ================================= */
.tabs {
  display: flex; gap: 2px; border-bottom: 1px solid var(--line);
  margin-bottom: 18px; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { height: 0; }
.tab {
  padding: 10px 15px; font-size: .86rem; font-weight: 600;
  color: var(--ink-3); border-bottom: 2px solid transparent;
  white-space: nowrap; margin-bottom: -1px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--plum); border-bottom-color: var(--plum); }
.tab__count { font-size: .7rem; color: var(--ink-3); margin-left: 5px; font-weight: 700; }

/* =============================== CHARTS ================================ */
.chartwrap { width: 100%; position: relative; }
.chartwrap svg { width: 100%; height: auto; display: block; overflow: visible; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.legend__item { display: flex; align-items: center; gap: 6px; font-size: .77rem; color: var(--ink-2); }
.legend__swatch { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.chart__empty { padding: 40px 16px; text-align: center; color: var(--ink-3); font-size: .85rem; }

.donutwrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.donutwrap__chart { flex: 0 0 158px; }
.donutwrap__legend { flex: 1 1 190px; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.dlegend { display: flex; align-items: center; gap: 9px; font-size: .8rem; }
.dlegend__swatch { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 9px; }
.dlegend__label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.dlegend__val { font-weight: 600; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.dlegend__pct { color: var(--ink-3); font-size: .73rem; flex: 0 0 38px; text-align: right; font-variant-numeric: tabular-nums; }

/* bar rows — the workhorse for "x by y" lists */
.brow { display: grid; grid-template-columns: minmax(84px, 1.1fr) minmax(0, 2.4fr) auto; gap: 11px; align-items: center; font-size: .81rem; }
.brow + .brow { margin-top: 9px; }
.brow__label { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow__val { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
@media (max-width: 560px) { .brow { grid-template-columns: minmax(70px, 1fr) minmax(0, 1.6fr) auto; gap: 8px; font-size: .78rem; } }

/* =============================== CALENDAR ============================== */
.cal { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.cal__head {
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.cal__dow {
  padding: 9px 6px; text-align: center;
  font-size: .66rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3);
}
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal__day {
  min-height: 104px; padding: 7px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); text-align: left;
  transition: background var(--t-fast);
  position: relative; overflow: hidden;
}
.cal__day:nth-child(7n) { border-right: 0; }
.cal__day:hover { background: var(--surface-2); }
.cal__day.is-out { background: var(--surface-2); opacity: .5; }
.cal__day.is-today { background: var(--plum-soft); }
.cal__day.is-today .cal__num { background: var(--plum); color: #fff; }
:root[data-theme="dark"] .cal__day.is-today .cal__num { color: #1B1421; }
.cal__num {
  font-size: .73rem; font-weight: 700; color: var(--ink-2);
  width: 21px; height: 21px; border-radius: 50%;
  display: grid; place-items: center; flex: 0 0 auto;
}
.cal__ev {
  font-size: .68rem; line-height: 1.32;
  padding: 2px 6px; border-radius: 5px;
  background: var(--surface-3); color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  cursor: pointer; text-align: left; width: 100%;
  border-left: 2px solid var(--line-2);
}
.cal__ev:hover { background: var(--line); }
.cal__ev--wedding { background: var(--blush-soft); color: #A85761; border-left-color: var(--blush); }
.cal__ev--deadline { background: var(--warn-soft); color: var(--warn); border-left-color: var(--warn); }
.cal__ev--overdue { background: var(--danger-soft); color: var(--danger); border-left-color: var(--danger); font-weight: 600; }
.cal__ev--payment { background: var(--ok-soft); color: var(--ok); border-left-color: var(--ok); }
.cal__ev--launch { background: var(--plum-soft); color: var(--plum-deep); border-left-color: var(--plum); }
.cal__ev--submission { background: var(--info-soft); color: var(--info); border-left-color: var(--info); }
.cal__ev--renewal { background: #DFF0EE; color: #2F736C; border-left-color: #2F736C; }
:root[data-theme="dark"] .cal__ev--renewal { background: #1B302E; color: #7FC3BB; }
.cal__ev--task { background: var(--surface-3); border-left-color: var(--ink-3); }
.cal__ev--done { opacity: .55; text-decoration: line-through; }
.cal__more { font-size: .65rem; color: var(--ink-3); font-weight: 600; padding: 0 6px; text-align: left; }
:root[data-theme="dark"] .pill--blush, :root[data-theme="dark"] .cal__ev--wedding { color: var(--blush); }

@media (max-width: 820px) {
  .cal__day { min-height: 74px; padding: 5px; }
  .cal__ev { font-size: .62rem; padding: 1px 4px; }
  .cal__num { font-size: .68rem; width: 19px; height: 19px; }
}
/* agenda list — the mobile-friendly calendar view */
.agenda__day { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.agenda__day:last-child { border-bottom: 0; }
.agenda__date { flex: 0 0 56px; text-align: center; }
.agenda__dow { font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.agenda__num { font-family: var(--font-display); font-size: 1.32rem; font-weight: 600; line-height: 1.1; }
.agenda__date.is-today .agenda__num { color: var(--plum); }
.agenda__date.is-today .agenda__dow { color: var(--plum); }
.agenda__items { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.agenda__item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 11px; border-radius: var(--r-sm);
  background: var(--surface-2); font-size: .82rem;
  cursor: pointer; text-align: left; width: 100%;
  border-left: 2px solid var(--line-2);
  transition: background var(--t-fast), transform var(--t-fast);
}
.agenda__item:hover { background: var(--surface-3); transform: translateX(2px); }
.agenda__item .truncate { flex: 1 1 auto; }

/* ============================== WELLBEING ============================== */
.calmhero {
  display: flex; gap: 26px; align-items: center; flex-wrap: wrap;
  padding: 28px; border-radius: var(--r-xl);
  border: 1px solid var(--line); box-shadow: var(--sh-1);
  background: linear-gradient(135deg, var(--sage-soft) 0%, var(--surface) 55%, var(--blush-soft) 100%);
}
.calmhero__ring { flex: 0 0 148px; }
.calmhero__body { flex: 1 1 260px; min-width: 0; }
.calmhero__band { font-family: var(--font-display); font-size: clamp(1.4rem, 3.6vw, 1.95rem); font-weight: 600; letter-spacing: -.022em; }
.calmhero__line { color: var(--ink-2); font-size: .95rem; margin-top: 6px; }
.calmhero__emoji { font-size: 2rem; line-height: 1; }
@media (max-width: 720px) { .calmhero { padding: 20px; gap: 18px; } .calmhero__ring { flex: 0 0 118px; margin: 0 auto; } }

.factor {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.factor:last-child { border-bottom: 0; }
.factor__body { flex: 1 1 auto; min-width: 0; }
.factor__label { font-size: .86rem; font-weight: 600; }
.factor__detail { font-size: .76rem; color: var(--ink-3); margin-top: 1px; }
.factor__points {
  flex: 0 0 auto; font-size: .78rem; font-weight: 700;
  color: var(--danger); background: var(--danger-soft);
  padding: 3px 9px; border-radius: var(--r-pill);
  font-variant-numeric: tabular-nums;
}

.breathe {
  width: 118px; height: 118px; border-radius: 50%; margin: 0 auto;
  background: radial-gradient(circle, var(--sage-soft), var(--plum-soft));
  display: grid; place-items: center;
  font-size: .8rem; font-weight: 600; color: var(--ink-2);
  animation: breathe 9s var(--ease) infinite;
  border: 1px solid var(--line);
}
@keyframes breathe {
  0%, 100% { transform: scale(.88); opacity: .78; }
  45%, 55% { transform: scale(1.06); opacity: 1; }
}

.winlist { display: flex; flex-direction: column; gap: 9px; }
.win { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; line-height: 1.5; }
.win__ico { flex: 0 0 auto; }

/* ============================== FUNNEL ================================= */
.funnel { display: flex; flex-direction: column; gap: 14px; }
.funnel__step { display: flex; flex-direction: column; gap: 6px; }
.funnel__label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .84rem; }
.funnel__label span { color: var(--ink-2); }
.funnel__label strong { font-variant-numeric: tabular-nums; }
.funnel__bar {
  height: 24px; border-radius: var(--r-xs);
  min-width: 3px; opacity: .88;
  transition: width var(--t-slow) var(--ease-out);
}
.funnel__bar--spend { width: 100%; opacity: .55; }

/* ========================== CUSTOMER RATING ============================ */
.ratepicks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .ratepicks { grid-template-columns: 1fr; } }

.ratepick {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 16px 12px; text-align: center;
  border: 1.5px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.ratepick:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-2px); box-shadow: var(--sh-2); }
.ratepick:active { transform: scale(.98); }
.ratepick__ico { font-size: 27px; line-height: 1.1; }
.ratepick__label { font-weight: 600; font-size: .92rem; }
.ratepick__note { font-size: .72rem; color: var(--ink-3); line-height: 1.45; }
.ratepick.is-picked {
  border-color: var(--plum); background: var(--plum-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--plum) 14%, transparent);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .ratepick.is-picked { box-shadow: var(--sh-2); }
}
.ratepick.is-picked .ratepick__label { color: var(--plum-deep); }
.ratepick.is-picked .ratepick__note { color: var(--ink-2); }

/* a pill that is actually a button — nudges without shouting */
.pill--action { cursor: pointer; border: 1px dashed transparent; transition: filter var(--t-fast), border-color var(--t-fast); }
.pill--action:hover { filter: brightness(.96); border-color: currentColor; }
:root[data-theme="dark"] .pill--action:hover { filter: brightness(1.14); }

.ratingcard { display: flex; align-items: center; gap: 13px; }
.ratingcard__ico { font-size: 28px; line-height: 1; flex: 0 0 auto; }
.ratingcard__body { flex: 1 1 auto; min-width: 0; }
.ratingcard__label { font-weight: 600; font-size: .95rem; }
.ratingcard__meta { font-size: .75rem; color: var(--ink-3); margin-top: 2px; }

/* =============================== FILES ================================= */
.filegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.filecard {
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow var(--t), transform var(--t);
}
.filecard:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.filecard__thumb {
  height: 108px; background: var(--surface-3);
  display: grid; place-items: center; font-size: 30px;
  overflow: hidden; position: relative; cursor: pointer;
}
.filecard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.filecard__body { padding: 10px 11px; flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; }
.filecard__name { font-size: .79rem; font-weight: 600; line-height: 1.35; word-break: break-word; }
.filecard__meta { font-size: .7rem; color: var(--ink-3); }
.filecard__note { font-size: .73rem; color: var(--ink-2); line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.filecard__acts { display: flex; gap: 2px; padding: 0 7px 7px; justify-content: flex-end; }

.dropzone {
  border: 1.5px dashed var(--line-2); border-radius: var(--r-lg);
  padding: 26px 18px; text-align: center;
  background: var(--surface-2); cursor: pointer;
  transition: all var(--t-fast);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--plum); background: var(--plum-soft); }
.dropzone__ico { font-size: 26px; margin-bottom: 7px; opacity: .7; }
.dropzone__title { font-weight: 600; font-size: .88rem; }
.dropzone__sub { font-size: .76rem; color: var(--ink-3); margin-top: 3px; }

/* =============================== INTAKE ================================ */
.intake__section { margin-bottom: 26px; }
.intakeview { display: grid; gap: 15px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.intakeitem { background: var(--surface-2); border-radius: var(--r-md); padding: 13px 15px; border: 1px solid var(--line); }
.intakeitem__label { font-size: .67rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 5px; }
.intakeitem__value { font-size: .87rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.intakeitem--wide { grid-column: 1 / -1; }
.intakeitem--empty .intakeitem__value { color: var(--ink-3); font-style: italic; }

.privacy {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--r-md);
  background: var(--info-soft); border-left: 3px solid var(--info);
  font-size: .81rem; line-height: 1.6; color: var(--ink-2);
}
.privacy__ico { flex: 0 0 auto; font-size: 15px; }

/* =============================== DOMAINS =============================== */
.domaincard { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.domaincard__name { font-family: var(--font-mono); font-size: .88rem; font-weight: 600; word-break: break-all; }
.renewbar { display: flex; flex-direction: column; gap: 5px; }

/* ============================= TIME TRACKER ============================ */
.timerbox {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  padding: 20px; border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--plum-soft), var(--surface) 70%);
  border: 1px solid var(--line);
}
.timerbox__clock {
  font-family: var(--font-display); font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 600; letter-spacing: -.03em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.timerbox__body { flex: 1 1 200px; min-width: 0; }
.timerbox__label { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.timerbox__what { font-size: .88rem; color: var(--ink-2); margin-top: 4px; }
.timerbox__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.is-running .timerbox__clock { color: var(--plum); }

.daybars { display: flex; align-items: flex-end; gap: 4px; height: 82px; }
.daybar { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.daybar__fill {
  width: 100%; border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--plum), var(--blush));
  min-height: 2px; position: relative;
  transition: height var(--t-slow) var(--ease-out);
}
.daybar__fill--empty { background: var(--surface-3); }
.daybar__fill--over { background: linear-gradient(180deg, var(--danger), var(--blush)); }
.daybar__label { font-size: .6rem; color: var(--ink-3); font-weight: 600; }
.daybar.is-today .daybar__label { color: var(--plum); font-weight: 700; }

/* ============================== ANALYTICS ============================== */
.kpi { display: flex; flex-direction: column; gap: 3px; }
.kpi__label { font-size: .69rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.kpi__value { font-family: var(--font-display); font-size: 1.32rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi__hint { font-size: .74rem; color: var(--ink-3); line-height: 1.45; }
.kpigrid { display: grid; gap: 18px 22px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.insight {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: .84rem; line-height: 1.55;
}
.insight__ico { flex: 0 0 auto; font-size: 15px; }
.insight--good { background: var(--ok-soft); border-color: transparent; }
.insight--bad { background: var(--danger-soft); border-color: transparent; }
.insight--warn { background: var(--warn-soft); border-color: transparent; }

/* ============================== SETTINGS =============================== */
.health { display: flex; flex-direction: column; }
.healthrow {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .84rem;
}
.healthrow:last-child { border-bottom: 0; }
.healthrow__ico { flex: 0 0 auto; }
.healthrow__body { flex: 1 1 auto; min-width: 0; line-height: 1.5; }
.dangerzone { border-color: var(--danger); }
.dangerzone .card__head { border-bottom-color: var(--danger); background: var(--danger-soft); border-radius: var(--r-lg) var(--r-lg) 0 0; }

/* ============================ PAGINATION =============================== */
.pager { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 14px; }
.pager__info { font-size: .79rem; color: var(--ink-3); }

/* =========================== MOBILE CARD ROWS ========================== */
/* Tables collapse to stacked cards below 720px where a table can't breathe */
@media (max-width: 720px) {
  .tbl--stack thead { display: none; }
  .tbl--stack tbody tr {
    display: block; padding: 13px 14px;
    border-bottom: 1px solid var(--line);
  }
  .tbl--stack tbody tr:hover { background: transparent; }
  .tbl--stack td {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 3px 0; border: 0; text-align: right;
    /* long values (emails, links) must wrap rather than run off the card edge */
    flex-wrap: wrap; overflow-wrap: anywhere;
  }
  /* a secondary line under a value gets its own row instead of being squeezed */
  .tbl--stack td > .tbl__sub { flex: 1 0 100%; text-align: right; margin-top: 3px; }
  .tbl--stack td::before {
    content: attr(data-label);
    font-size: .69rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
    color: var(--ink-3); text-align: left; flex: 0 0 auto;
  }
  .tbl--stack td:first-child {
    text-align: left; padding-bottom: 8px;
    border-bottom: 1px dashed var(--line); margin-bottom: 5px;
  }
  .tbl--stack td:first-child::before { display: none; }
  .tbl--stack td.num { text-align: right; }
  .tbl--stack .tbl__actions { opacity: 1; justify-content: flex-end; }
}
