:root {
  --paper: #f6f1e8;
  --paper-2: #efe8dc;
  --paper-3: #e7ddd0;
  --ink: #1c1915;
  --ink-2: #4a453e;
  --ink-3: #7a7368;
  --ink-4: #a39b90;
  --card: #ffffff;
  --card-warm: #fffcf7;
  --line: #e4dbcf;
  --line-strong: #d4c8b8;
  --teal: #0f766e;
  --teal-deep: #0b5a54;
  --teal-ink: #0c4f49;
  --teal-soft: #d7efe9;
  --teal-mist: #eef7f4;
  --coral: #e85d4c;
  --coral-deep: #c44738;
  --coral-soft: #fde8e4;
  --gold: #c4a35a;
  --gold-deep: #9a7c3d;
  --gold-soft: #f4ead4;
  --green: #2f7d4a;
  --green-soft: #e1f0e6;
  --amber: #b7791f;
  --amber-soft: #f8ecd4;
  --red: #c2413b;
  --shadow: 0 1px 2px rgba(28, 25, 21, 0.05), 0 12px 32px rgba(28, 25, 21, 0.06);
  --shadow-sm: 0 1px 2px rgba(28, 25, 21, 0.06);
  --font-ui: "Figtree", "Segoe UI", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --radius: 14px;
  --radius-sm: 9px;
  --list-w: 400px;
  --topbar-h: 62px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

body {
  background-image:
    radial-gradient(ellipse 1200px 500px at 10% -10%, rgba(15, 118, 110, 0.06), transparent 50%),
    radial-gradient(ellipse 900px 400px at 100% 0%, rgba(196, 163, 90, 0.08), transparent 46%);
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

#app {
  position: relative;
  z-index: 1;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--teal);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

::selection {
  background: var(--teal-soft);
  color: var(--teal-ink);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 560;
  letter-spacing: -0.02em;
  margin: 0;
}

.topbar {
  flex: none;
  min-height: 56px;
  height: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 241, 232, 0.94);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  flex: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.1;
}

.brand-name em {
  font-style: italic;
  font-weight: 480;
  color: var(--teal);
}

.brand-sub {
  display: block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  flex: none;
}

.nav a:hover {
  background: rgba(28, 25, 21, 0.05);
  text-decoration: none;
}

.nav a.is-on {
  background: var(--ink);
  color: var(--paper);
}

.nav-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav a.is-on .nav-badge {
  background: var(--coral);
  color: #fff;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.attn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--coral-soft);
  color: var(--coral-deep);
  font-size: 12.5px;
  font-weight: 650;
  border: 1px solid transparent;
}

.attn.ok {
  background: var(--teal-soft);
  color: var(--teal-ink);
}

.userwrap {
  position: relative;
}

.userchip {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.userchip:hover {
  border-color: var(--line-strong);
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--teal);
  flex: none;
}

.avatar.sm {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.avatar.md {
  width: 36px;
  height: 36px;
}

.avatar.lg {
  width: 44px;
  height: 44px;
  font-size: 15px;
}

.avatar.gold {
  background: var(--gold-deep);
}

.avatar.coral {
  background: var(--coral);
}

.avatar.ink {
  background: #5c564e;
}

.avatar.violet {
  background: #5c6494;
}

.avatar.rust {
  background: #9a5a38;
}

.userchip .who {
  text-align: left;
  line-height: 1.15;
}

.userchip .who strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
}

.userchip .who span {
  font-size: 11px;
  color: var(--ink-3);
}

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
  z-index: 30;
}

.menu.is-open {
  display: block;
}

.menu button,
.menu .menu-item {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--ink);
}

.menu button:hover,
.menu .menu-item:hover {
  background: var(--paper-2);
}

.menu .danger {
  color: var(--coral-deep);
}

.menu-note {
  padding: 8px 10px 10px;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.4;
}

.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.inbox {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(240px, var(--list-w)) 6px minmax(0, 1fr);
  overflow: hidden;
}

.list-pane {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--card-warm);
  border-right: 1px solid var(--line);
}

.resizer {
  cursor: col-resize;
  background: transparent;
  position: relative;
}

.resizer::after {
  content: "";
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 2px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}

.resizer:hover::after,
.resizer.is-drag::after {
  background: var(--teal);
}

.list-head {
  flex: none;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--card-warm);
}

.list-head h2 {
  font-size: 22px;
  margin-bottom: 10px;
}

.filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.pill {
  border: 0;
  background: transparent;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill:hover {
  background: var(--paper-2);
}

.pill.is-on {
  background: var(--ink);
  color: var(--paper);
}

.count {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  opacity: 0.7;
}

.search {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 8px 10px 8px 32px;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237a7368' stroke-width='1.7'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.2 3.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 9px 50%;
}

.search:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.ticket-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.ticket-row {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 12px 14px 12px 16px;
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 10px;
  position: relative;
}

.ticket-row:hover {
  background: #faf6ef;
}

.ticket-row.is-on {
  background: var(--teal-mist);
}

.ticket-row.is-unread .t-sub {
  font-weight: 750;
}

.pri-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  background: var(--gold);
}

.pri-dot.P1 {
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(232, 93, 76, 0.18);
}

.pri-dot.P2 {
  background: var(--gold);
}

.pri-dot.P3 {
  background: var(--ink-4);
}

.t-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.t-cust {
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-2);
}

.t-time {
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.t-sub {
  font-size: 14px;
  font-weight: 600;
  margin: 2px 0 4px;
  line-height: 1.3;
}

.t-prev {
  font-size: 12.5px;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.t-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}

.unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  position: absolute;
  left: 6px;
  top: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--paper-2);
  color: var(--ink-2);
}

.badge.P1 {
  background: var(--coral-soft);
  color: var(--coral-deep);
}

.badge.P2 {
  background: var(--gold-soft);
  color: var(--gold-deep);
}

.badge.P3 {
  background: var(--paper-2);
  color: var(--ink-3);
}

.badge.tag {
  font-weight: 600;
  color: var(--teal-ink);
  background: var(--teal-soft);
}

.badge.status-open {
  background: var(--teal-soft);
  color: var(--teal-ink);
}

.badge.status-pending {
  background: var(--gold-soft);
  color: var(--gold-deep);
}

.badge.status-solved {
  background: var(--green-soft);
  color: var(--green);
}

.sla {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
}

.sla.warn {
  color: var(--amber);
}

.sla.risk {
  color: var(--coral);
}

.thread-pane {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.thread-head {
  flex: none;
  padding: 12px 18px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.96);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 42%;
  overflow: auto;
}

.thread-head h2 {
  font-size: 22px;
  line-height: 1.25;
}

.thread-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-size: 13px;
  color: var(--ink-2);
}

.thread-kicker a {
  font-weight: 650;
}

.thread-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ui-select {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath stroke='%231c1915' stroke-width='1.4' d='M1 1.2 6 6l5-4.8'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  border-radius: 9px;
  padding: 7px 30px 7px 10px;
  font-size: 13px;
  font-weight: 600;
}

.msgs {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 20px 22px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msg {
  max-width: 720px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 6px;
  padding: 12px 14px 14px;
  box-shadow: var(--shadow-sm);
}

.msg.is-agent {
  margin-left: 48px;
  background: var(--teal-mist);
  border-color: #cfe6e0;
  border-radius: 16px 16px 6px 16px;
}

.msg.is-note {
  margin-left: 48px;
  background: var(--gold-soft);
  border-color: #ead9b3;
  border-style: dashed;
}

.msg-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.msg-top strong {
  font-size: 13.5px;
}

.msg-top .role {
  font-size: 12px;
  color: var(--ink-3);
}

.msg-top time {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.msg-body {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-wrap;
}

.composer {
  flex: none;
  margin: 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 -10px 28px rgba(28, 25, 21, 0.06);
  padding: 12px 16px 14px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}

.composer-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.composer textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  resize: none;
  min-height: 72px;
  max-height: 160px;
  outline: none;
  background: var(--card-warm);
  line-height: 1.5;
  padding: 10px 12px;
}

.composer-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.note-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  user-select: none;
}

.btn {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 650;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  border-color: var(--line-strong);
  background: var(--paper);
}

.btn-teal {
  background: var(--teal);
  border-color: var(--teal-deep);
  color: #f4fffc;
}

.btn-teal:hover {
  background: var(--teal-deep);
}

.btn-ghost {
  background: transparent;
  box-shadow: none;
}

.btn-gold {
  background: var(--gold-soft);
  border-color: #e0d0aa;
  color: var(--gold-deep);
}

.btn-gold:hover {
  background: #efe3c6;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page {
  padding: 22px 26px 40px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.page-head h1 {
  font-size: 30px;
  line-height: 1.1;
}

.lede {
  color: var(--ink-3);
  margin-top: 4px;
  font-size: 14.5px;
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.cust-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.table-wrap {
  overflow: auto;
}

.cust-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbf7f0;
  white-space: nowrap;
}

.cust-table th.sortable {
  cursor: pointer;
}

.cust-table th.sortable:hover {
  color: var(--ink);
}

.cust-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.cust-table tr:last-child td {
  border-bottom: 0;
}

.cust-table tbody tr {
  cursor: pointer;
}

.cust-table tbody tr:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}

.cust-table tbody tr:hover td {
  background: var(--teal-mist);
}

.acct {
  display: flex;
  align-items: center;
  gap: 10px;
}

.acct .name {
  font-weight: 700;
}

.acct .meta {
  font-size: 12px;
  color: var(--ink-3);
}

.health {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.health-pip {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.health.good {
  color: var(--green);
}
.health.good .health-pip {
  background: var(--green);
}
.health.ok {
  color: var(--amber);
}
.health.ok .health-pip {
  background: var(--gold);
}
.health.bad {
  color: var(--coral-deep);
}
.health.bad .health-pip {
  background: var(--coral);
}

.money {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.renew-soon {
  color: var(--coral-deep);
  font-weight: 700;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-weight: 650;
  font-size: 13px;
  margin-bottom: 10px;
}

.c360 {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 16px;
  align-items: start;
}

.c360-hero {
  padding: 22px 24px 20px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.hring text {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 650;
  fill: var(--ink);
}

.hring .bg {
  fill: none;
  stroke: var(--paper-3);
  stroke-width: 4;
}

.hring .fg {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
}

.hring.good .fg {
  stroke: var(--green);
}
.hring.ok .fg {
  stroke: var(--gold);
}
.hring.bad .fg {
  stroke: var(--coral);
}

.c360-title {
  font-size: 28px;
}

.c360-sub {
  color: var(--ink-3);
  margin-top: 2px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 18px 18px;
}

.metric {
  background: var(--paper);
  border-radius: 12px;
  padding: 12px;
}

.metric .k {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}

.metric .v {
  font-family: var(--font-display);
  font-size: 22px;
  margin-top: 4px;
}

.metric .s {
  font-size: 12px;
  color: var(--ink-3);
}

.block {
  padding: 16px 18px 18px;
}

.block h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.spark {
  width: 100%;
  height: 72px;
  color: var(--teal);
}

.spark-wrap {
  background: linear-gradient(180deg, var(--teal-mist), transparent);
  border-radius: 10px;
  padding: 8px 8px 2px;
}

.spark-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-4);
  padding: 0 4px;
}

.signal-row {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}

.signal-row:last-child {
  border-bottom: 0;
}

.signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 6px;
  flex: none;
}

.notes {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  resize: vertical;
  background: var(--card-warm);
  outline: none;
}

.notes:focus {
  border-color: var(--teal);
}

.mini-tix {
  display: flex;
  flex-direction: column;
}

.mini-tix a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  font-size: 13.5px;
}

.mini-tix a:hover {
  color: var(--teal);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tl-item {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
  font-size: 13px;
}

.tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  margin-top: 4px;
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.tl-item time {
  display: block;
  color: var(--ink-3);
  font-size: 11.5px;
}

.renew-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.month-label {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 8px;
}

.renew-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
}

.renew-date {
  text-align: center;
  border-right: 1px solid var(--line);
  padding-right: 10px;
}

.renew-date .d {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
}

.renew-date .m {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.renew-main strong {
  display: block;
  font-size: 16px;
}

.renew-main .bits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  align-items: center;
}

.risk-flag {
  background: var(--coral-soft);
  color: var(--coral-deep);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.play-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.play-btns .btn {
  white-space: nowrap;
}

.done-chip {
  font-size: 12px;
  color: var(--green);
  font-weight: 650;
}

.pb-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}

.pb-nav button {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  padding: 12px 12px;
  margin-bottom: 6px;
}

.pb-nav button:hover {
  background: var(--card);
}

.pb-nav button.is-on {
  background: var(--card);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.pb-nav h3 {
  font-size: 16px;
}

.pb-nav p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding: 12px 14px;
  align-items: start;
}

.step.is-done {
  background: var(--teal-mist);
}

.step.is-done .step-title {
  text-decoration: line-through;
  color: var(--ink-3);
}

.step input {
  margin-top: 3px;
  accent-color: var(--teal);
  width: 16px;
  height: 16px;
}

.step-title {
  font-weight: 700;
}

.step-detail {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 2px;
}

.pb-progress {
  height: 8px;
  background: var(--paper-3);
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0 14px;
}

.pb-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #1d9d8d);
  border-radius: 99px;
}

.dash {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.kpi {
  padding: 16px 16px 14px;
}

.kpi .k {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}

.kpi .v {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 6px 0 2px;
}

.kpi .s {
  font-size: 12.5px;
  color: var(--ink-3);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
}

.chart-card {
  padding: 16px 18px 18px;
}

.chart-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.chart-card .hint {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.nps-chart {
  width: 100%;
  height: auto;
  display: block;
}

.bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 36px;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.bar-track {
  height: 10px;
  background: var(--paper-2);
  border-radius: 99px;
  overflow: hidden;
}

.bar-track > span {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: 99px;
}

.exp-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.exp-row:last-child {
  border-bottom: 0;
}

.stage-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--paper-2);
}

.stage-pill.signal {
  background: var(--paper-2);
}
.stage-pill.validating {
  background: var(--gold-soft);
  color: var(--gold-deep);
}
.stage-pill.proposal {
  background: var(--teal-soft);
  color: var(--teal-ink);
}
.stage-pill.verbal {
  background: var(--green-soft);
  color: var(--green);
}

.empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--ink-3);
}

.empty svg {
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
}

.empty h3 {
  color: var(--ink);
  font-size: 20px;
  margin-bottom: 6px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 13.5px;
  font-weight: 600;
  max-width: 340px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: none;
}

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 21, 0.38);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  width: min(420px, 100%);
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.modal h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.modal p {
  color: var(--ink-2);
  margin: 0 0 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.mobile-back {
  display: none;
}

.muted {
  color: var(--ink-3);
}

.gold-text {
  color: var(--gold-deep);
}

.split-note {
  font-size: 12px;
  color: var(--ink-3);
}

@media (max-width: 1100px) {
  .c360,
  .grid-2,
  .pb-layout {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash {
    grid-template-columns: repeat(2, 1fr);
  }
  .renew-row {
    grid-template-columns: 64px 1fr;
  }
  .play-btns {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 860px) {
  .topbar {
    flex-wrap: wrap;
    padding: 8px 10px 6px;
    gap: 8px;
  }
  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .brand-sub {
    display: none;
  }
  .attn {
    display: none;
  }
  .who span {
    display: none;
  }
  .inbox {
    grid-template-columns: 1fr;
  }
  .resizer {
    display: none;
  }
  .list-pane {
    border-right: 0;
  }
  .inbox.show-thread .list-pane {
    display: none;
  }
  .inbox:not(.show-thread) .thread-pane {
    display: none;
  }
  .mobile-back {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    font-weight: 700;
  }
  .page {
    padding: 16px 14px 32px;
    overflow: auto;
  }
  .msg.is-agent,
  .msg.is-note {
    margin-left: 0;
  }
  .thread-head {
    max-height: 36%;
    padding: 10px 12px;
  }
  .thread-head h2 {
    font-size: 18px;
  }
  .thread-actions {
    display: none;
  }
  .composer-foot {
    flex-wrap: wrap;
  }
  .composer-foot .btn {
    width: 100%;
    min-height: 44px;
  }
  .split-note {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: none;
  }
}
