/* ============================================================
   Secret Systems — Client portal styles
   Builds on /assets/app-shared.css tokens (--void, --deep, --card, --border,
   --cyan, --cyan-glow, --white, --text, --muted). Fonts: Syne for
   headings, Outfit for body, JetBrains Mono for small labels.

   Layout: a persistent left sidebar on desktop, an off-canvas drawer
   with a compact header below 1024px. Surfaces use tone, not borders.
   ============================================================ */

:root {
  --cp-surface: rgba(255, 255, 255, .025);
  --cp-surface-2: rgba(255, 255, 255, .045);
  --cp-line: rgba(255, 255, 255, .07);
  --cp-ok: #4eff9f;
  --cp-warn: #ffd666;
  --cp-bad: #ff3c6e;
  --cp-radius: 6px;
  --cp-sidebar: 16.25rem;
  --cp-ease: cubic-bezier(.2, .7, .2, 1);
}

.cp-shell [hidden] { display: none !important; }
#cp-shell-nav { display: contents; }
.cp-shell { min-height: 100vh; display: grid; grid-template-columns: var(--cp-sidebar) minmax(0, 1fr); background: var(--void); }
body.cp-menu-open { overflow: hidden; }

/* ── Brand ── */
.cp-brand { font-family: 'Syne', sans-serif; font-weight: 800; font-size: .92rem; letter-spacing: .04em; color: var(--white); text-decoration: none; white-space: nowrap; }
.cp-brand span { color: var(--cyan); }

/* ── Sidebar ── */
.cp-sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 1.6rem 1.1rem 1.25rem; background: var(--deep); border-right: 1px solid var(--cp-line);
}
.cp-sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0 .5rem .2rem; }
.cp-menu-close { display: none; }
.cp-biz { padding: 1.4rem .6rem 1.2rem; border-bottom: 1px solid var(--cp-line); margin-bottom: .9rem; }
.cp-biz-label { display: block; font-family: 'JetBrains Mono', monospace; font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.cp-biz-name { display: block; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem; color: var(--white); line-height: 1.3; overflow-wrap: anywhere; }
.cp-sidenav { display: flex; flex-direction: column; gap: .15rem; }
.cp-sidelink {
  position: relative; display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border-radius: var(--cp-radius);
  color: var(--text); text-decoration: none; font-size: .92rem; font-weight: 500; min-height: 44px;
  transition: color .18s var(--cp-ease), background-color .18s var(--cp-ease);
}
.cp-sidelink::before { content: ''; position: absolute; left: -1.1rem; top: 22%; height: 56%; width: 2px; border-radius: 2px; background: var(--cyan); opacity: 0; transform: scaleY(.4); transition: opacity .2s var(--cp-ease), transform .25s var(--cp-ease); }
.cp-sidelink:hover { color: var(--white); background: var(--cp-surface); }
.cp-sidelink[aria-current="page"] { color: var(--white); background: var(--cp-surface-2); }
.cp-sidelink[aria-current="page"]::before { opacity: 1; transform: scaleY(1); }
.cp-sidelink[aria-current="page"] .cp-sideicon { color: var(--cyan); }
.cp-sidelink:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.cp-sideicon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); transition: color .18s var(--cp-ease); }
.cp-sidebar-foot { margin-top: auto; padding: 1rem .6rem 0; border-top: 1px solid var(--cp-line); display: flex; flex-direction: column; gap: .7rem; }
.cp-nav-user { font-size: .76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-signout {
  background: none; border: 1px solid var(--cp-line); color: var(--text); border-radius: var(--cp-radius);
  font-family: 'JetBrains Mono', monospace; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .6rem .8rem; cursor: pointer; min-height: 40px; transition: border-color .18s, color .18s, transform .12s;
}
.cp-signout:hover { color: var(--white); border-color: rgba(0, 200, 255, .5); }

/* ── Mobile header / drawer (hidden on desktop) ── */
.cp-topbar { display: none; }
.cp-scrim { position: fixed; inset: 0; background: rgba(2, 4, 8, .7); z-index: 39; backdrop-filter: blur(2px); }
.cp-menu-btn { display: none; }

/* ── Main frame ── */
.cp-main { min-width: 0; padding: 2.75rem 3rem 5rem; max-width: 74rem; width: 100%; animation: cp-enter .38s var(--cp-ease) both; }
@keyframes cp-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cp-page-head { margin-bottom: 2.25rem; }
.cp-page-head .eyebrow { margin-bottom: .55rem; }
.cp-page-head h1 { font-family: 'Syne', sans-serif; font-weight: 800; font-size: clamp(1.6rem, 3.2vw, 2.25rem); letter-spacing: -.01em; margin: 0 0 .55rem; color: var(--white); overflow-wrap: anywhere; }
.cp-page-head p { font-size: .94rem; color: var(--text); line-height: 1.7; max-width: 44rem; }
.cp-page-head p a { color: var(--cyan); }
.cp-page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cp-switch { min-width: 14rem; }

/* ── Shared primitives ── */
.cp-link { font-family: 'JetBrains Mono', monospace; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); text-decoration: none; }
.cp-link:hover { text-decoration: underline; }
.cp-inline-link { color: var(--cyan); overflow-wrap: anywhere; }
.cp-muted { font-size: .84rem; color: var(--muted); line-height: 1.65; }
.cp-optional { color: var(--muted); text-transform: none; letter-spacing: 0; }
.btn, .cp-action { transition: transform .12s var(--cp-ease), background-color .18s, border-color .18s, color .18s, box-shadow .18s; }
.btn:active, .cp-action:active, .cp-signout:active { transform: scale(.98); }
.btn-cyan, .btn-outline { border-radius: var(--cp-radius); }
.cp-btn-sm { padding: .7rem 1.1rem; font-size: .7rem; min-height: 44px; }

.cp-badge {
  display: inline-flex; align-items: center; gap: .4rem; font-family: 'JetBrains Mono', monospace;
  font-size: .6rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .32rem .6rem; border: 1px solid var(--cp-line); border-radius: 999px; color: var(--text); white-space: nowrap; background: var(--cp-surface);
}
.cp-badge-new, .cp-badge-open { color: var(--cyan); border-color: rgba(0, 200, 255, .3); background: var(--cyan-glow); }
.cp-badge-contacted, .cp-badge-past_due { color: var(--cp-warn); border-color: rgba(255, 214, 102, .3); background: rgba(255, 214, 102, .06); }
.cp-badge-qualified, .cp-badge-converted, .cp-badge-paid, .cp-badge-active { color: var(--cp-ok); border-color: rgba(78, 255, 159, .3); background: rgba(78, 255, 159, .06); }
.cp-badge-spam, .cp-badge-archived, .cp-badge-void, .cp-badge-uncollectible { color: var(--muted); }
.cp-badge-active::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cp-ok); box-shadow: 0 0 0 3px rgba(78, 255, 159, .18); }

.cp-notice { font-size: .86rem; line-height: 1.6; padding: .85rem 1.1rem; border: 1px solid var(--cp-line); background: var(--cp-surface); margin-bottom: 1.5rem; border-radius: var(--cp-radius); color: var(--text); }
.cp-notice-ok { border-color: rgba(78, 255, 159, .3); color: var(--cp-ok); }
.cp-notice-err { border-color: rgba(255, 60, 110, .3); color: var(--cp-bad); }

/* Toolbar (search + filters) */
.cp-toolbar { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1.5rem; }
.cp-field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.cp-field label { font-family: 'JetBrains Mono', monospace; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cp-field input, .cp-field select, .cp-field textarea {
  background: var(--cp-surface); border: 1px solid var(--cp-line); color: var(--white); font-family: 'Outfit', sans-serif; font-size: .9rem;
  padding: .72rem .85rem; outline: none; border-radius: var(--cp-radius); min-width: 0; min-height: 44px; transition: border-color .18s, background-color .18s;
}
.cp-field textarea { min-height: 7rem; resize: vertical; line-height: 1.55; }
.cp-field input:focus, .cp-field select:focus, .cp-field textarea:focus { border-color: rgba(0, 200, 255, .6); background: rgba(0, 200, 255, .03); }
.cp-field-grow { flex: 1 1 16rem; }
.cp-count { font-size: .78rem; color: var(--muted); margin-left: auto; padding-bottom: .8rem; white-space: nowrap; }

/* States */
.cp-state { background: var(--cp-surface); border: 1px solid var(--cp-line); border-radius: var(--cp-radius); padding: 3.25rem 2rem; text-align: center; }
.cp-state-icon { font-size: 1.7rem; margin-bottom: 1rem; opacity: .85; }
.cp-state h2 { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.15rem; margin-bottom: .75rem; color: var(--white); }
.cp-state p { font-size: .9rem; color: var(--text); line-height: 1.7; max-width: 34rem; margin: 0 auto .5rem; }
.cp-state-err { border-color: rgba(255, 60, 110, .3); }
.cp-state-err h2 { color: var(--cp-bad); }
.cp-empty-inline p { font-size: .88rem; color: var(--muted); line-height: 1.7; }

.cp-skeleton { display: grid; gap: .6rem; }
.cp-skeleton-row { background: var(--cp-surface); border-radius: var(--cp-radius); height: 4.5rem; position: relative; overflow: hidden; }
.cp-skeleton-row::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(0, 200, 255, .06), transparent); animation: cp-shimmer 1.4s infinite; }
@keyframes cp-shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.cp-skeleton-tiles { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.cp-skeleton-tiles .cp-skeleton-row { height: 9rem; }

/* ── Leads list ── */
.cp-leads { display: flex; flex-direction: column; gap: .5rem; }
.cp-lead {
  width: 100%; text-align: left; background: var(--cp-surface); border: 1px solid transparent; border-radius: var(--cp-radius);
  padding: 1.05rem 1.25rem; cursor: pointer; color: inherit; display: grid; gap: .5rem 1.25rem; align-items: center;
  grid-template-columns: minmax(10rem, 1.3fr) minmax(8rem, 1fr) minmax(7rem, 1fr) auto auto;
  transition: background-color .18s var(--cp-ease), border-color .18s var(--cp-ease), transform .18s var(--cp-ease);
}
.cp-lead:hover { background: var(--cp-surface-2); border-color: rgba(0, 200, 255, .18); transform: translateY(-1px); }
.cp-lead:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.cp-lead-name { font-family: 'Syne', sans-serif; font-weight: 700; font-size: .98rem; color: var(--white); overflow-wrap: anywhere; }
.cp-lead-sub { font-size: .76rem; color: var(--muted); margin-top: .15rem; overflow-wrap: anywhere; }
.cp-lead-cell { font-size: .84rem; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.cp-lead-when { font-size: .74rem; color: var(--muted); white-space: nowrap; text-align: right; }

/* ── Drawer ── */
.cp-drawer-backdrop { position: fixed; inset: 0; background: rgba(2, 4, 8, .72); z-index: 40; display: flex; justify-content: flex-end; backdrop-filter: blur(2px); }
.cp-drawer { background: var(--deep); border-left: 1px solid var(--cp-line); width: min(34rem, 100%); height: 100%; overflow-y: auto; padding: 1.75rem 1.6rem 3rem; animation: cp-slide .28s var(--cp-ease) both; }
@keyframes cp-slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.cp-drawer-head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.cp-drawer-head h2 { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.3rem; flex: 1; overflow-wrap: anywhere; color: var(--white); }
.cp-drawer-close { background: none; border: 1px solid var(--cp-line); color: var(--text); font-size: 1rem; line-height: 1; padding: .55rem .75rem; cursor: pointer; border-radius: var(--cp-radius); min-height: 44px; min-width: 44px; }
.cp-drawer-close:hover { color: var(--white); border-color: var(--cyan); }
.cp-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.cp-action {
  display: inline-flex; align-items: center; gap: .45rem; font-family: 'JetBrains Mono', monospace; font-size: .66rem;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--cp-line); color: var(--text);
  padding: .65rem .95rem; cursor: pointer; background: var(--cp-surface); border-radius: var(--cp-radius); min-height: 44px;
}
.cp-action:hover { color: var(--cyan); border-color: rgba(0, 200, 255, .5); }
.cp-detail-group { border-top: 1px solid var(--cp-line); padding: 1.15rem 0; }
.cp-detail-group:first-of-type { border-top: none; }
.cp-detail-group h3 { font-family: 'JetBrains Mono', monospace; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .85rem; }
.cp-detail-row { display: grid; grid-template-columns: 8.5rem 1fr; gap: .5rem 1rem; padding: .35rem 0; }
.cp-detail-key { font-size: .76rem; color: var(--muted); }
.cp-detail-val { font-size: .88rem; color: var(--white); overflow-wrap: anywhere; }
.cp-detail-val a { color: var(--cyan); }
.cp-message { font-size: .9rem; color: var(--text); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.cp-raw { margin-top: .5rem; }
.cp-raw summary { font-size: .78rem; color: var(--muted); cursor: pointer; padding: .4rem 0; }
.cp-raw summary:hover { color: var(--text); }
.cp-raw pre { background: var(--void); border: 1px solid var(--cp-line); padding: .9rem; font-size: .74rem; color: var(--text); overflow-x: auto; margin-top: .5rem; border-radius: var(--cp-radius); }

/* ── Sections / cards ── */
.cp-section + .cp-section { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--cp-line); }
.cp-section-title { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.3rem; margin-bottom: 1.5rem; color: var(--white); }
.cp-block { margin-bottom: 2.25rem; }
.cp-block-title { font-family: 'JetBrains Mono', monospace; font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.cp-cards { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin-bottom: 1.25rem; }
.cp-card { background: var(--cp-surface); border: 1px solid var(--cp-line); border-radius: var(--cp-radius); padding: 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .9rem; min-width: 0; transition: border-color .18s var(--cp-ease); }
.cp-card:hover { border-color: rgba(0, 200, 255, .16); }
.cp-card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.cp-card-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem; color: var(--white); }
.cp-card-price { display: flex; align-items: baseline; gap: .15rem; }
.cp-card-amount { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.8rem; color: var(--white); letter-spacing: -.01em; }
.cp-card-interval { font-size: .86rem; color: var(--muted); }
.cp-kv { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1.25rem; margin: 0; }
.cp-kv dt { font-size: .76rem; color: var(--muted); }
.cp-kv dd { font-size: .88rem; color: var(--text); margin: 0; }
.cp-kv-wide { grid-template-columns: minmax(8rem, 11rem) 1fr; }
.cp-kv-wide dd { color: var(--white); overflow-wrap: anywhere; }
.cp-btn-row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.cp-manage-btn[disabled] { opacity: .6; cursor: progress; }

/* Tables (billing, access) */
.cp-table-wrap { overflow-x: auto; border: 1px solid var(--cp-line); background: var(--cp-surface); border-radius: var(--cp-radius); }
.cp-table { width: 100%; border-collapse: collapse; min-width: 44rem; }
.cp-table th { text-align: left; font-family: 'JetBrains Mono', monospace; font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: .9rem 1rem; border-bottom: 1px solid var(--cp-line); white-space: nowrap; }
.cp-table td { padding: .95rem 1rem; border-bottom: 1px solid var(--cp-line); font-size: .86rem; color: var(--text); vertical-align: middle; }
.cp-table tbody tr:last-child td { border-bottom: none; }
.cp-table tbody tr:hover td { background: rgba(0, 200, 255, .03); }
.cp-td-num { font-family: 'JetBrains Mono', monospace; font-size: .76rem; color: var(--white); white-space: nowrap; }
.cp-td-desc { color: var(--white); }
.cp-td-amt { font-weight: 700; color: var(--white); white-space: nowrap; }
.cp-td-period { white-space: nowrap; color: var(--muted); }
.cp-td-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }

/* ── Dashboard tiles / panels ── */
.cp-tiles { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-bottom: 1.5rem; }
.cp-tile { background: var(--cp-surface); border: 1px solid var(--cp-line); border-radius: var(--cp-radius); padding: 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .7rem; min-width: 0; transition: border-color .18s var(--cp-ease), transform .18s var(--cp-ease); }
.cp-tile:hover { border-color: rgba(0, 200, 255, .16); transform: translateY(-1px); }
.cp-tile-hero { grid-column: 1 / -1; background: linear-gradient(135deg, rgba(0, 200, 255, .07), rgba(255, 255, 255, .02) 55%); border-color: rgba(0, 200, 255, .18); }
.cp-tile-hero.is-live { background: linear-gradient(135deg, rgba(78, 255, 159, .08), rgba(255, 255, 255, .02) 55%); border-color: rgba(78, 255, 159, .22); }
.cp-tile-hero.is-attention { background: linear-gradient(135deg, rgba(255, 214, 102, .08), rgba(255, 255, 255, .02) 55%); border-color: rgba(255, 214, 102, .22); }
.cp-tile-hero .cp-tile-value { font-size: 2.1rem; }
.cp-tile-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.cp-tile-title { font-family: 'JetBrains Mono', monospace; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.cp-tile-value { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.6rem; color: var(--white); letter-spacing: -.01em; overflow-wrap: anywhere; line-height: 1.15; }
.cp-tile-value-sm { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 1.02rem; letter-spacing: 0; line-height: 1.4; }
.cp-tile-desc { font-size: .86rem; color: var(--text); line-height: 1.65; }
.cp-tile-actions { margin-top: auto; padding-top: .4rem; display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; }

.cp-columns { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
.cp-columns-form { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); margin-bottom: 2.5rem; }
.cp-panel { background: var(--cp-surface); border: 1px solid var(--cp-line); border-radius: var(--cp-radius); padding: 1.4rem 1.5rem; min-width: 0; }
.cp-panel-quiet { background: transparent; }
.cp-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.cp-panel-head .cp-block-title { margin-bottom: 0; }

.cp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cp-list-item + .cp-list-item { border-top: 1px solid var(--cp-line); }
.cp-list-link { display: grid; grid-template-columns: 1fr auto; gap: .2rem .75rem; padding: .85rem 0; text-decoration: none; color: inherit; }
.cp-list-link:hover .cp-list-primary { color: var(--cyan); }
.cp-list-primary { font-family: 'Syne', sans-serif; font-weight: 700; font-size: .95rem; color: var(--white); overflow-wrap: anywhere; transition: color .15s; }
.cp-list-secondary { font-size: .78rem; color: var(--text); grid-column: 1; overflow-wrap: anywhere; }
.cp-list-when { font-size: .74rem; color: var(--muted); white-space: nowrap; grid-column: 2; grid-row: 1; }

.cp-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.cp-timeline-item { display: grid; grid-template-columns: 1rem 1fr; gap: .85rem; padding: .6rem 0; position: relative; }
.cp-timeline-item::before { content: ''; position: absolute; left: .45rem; top: 1.55rem; bottom: -.45rem; width: 1px; background: var(--cp-line); }
.cp-timeline-item:last-child::before { display: none; }
.cp-timeline-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--muted); margin-top: .38rem; margin-left: .15rem; }
.cp-timeline-live .cp-timeline-dot { background: var(--cp-ok); box-shadow: 0 0 0 3px rgba(78, 255, 159, .15); }
.cp-timeline-building .cp-timeline-dot, .cp-timeline-testing .cp-timeline-dot, .cp-timeline-launching .cp-timeline-dot { background: var(--cyan); }
.cp-timeline-attention .cp-timeline-dot { background: var(--cp-warn); }

/* Website page */
.cp-section-card + .cp-section-card { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--cp-line); }
.cp-status-hero { background: linear-gradient(135deg, rgba(0, 200, 255, .07), rgba(255, 255, 255, .02) 55%); border: 1px solid rgba(0, 200, 255, .18); border-radius: var(--cp-radius); padding: 1.75rem 1.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.cp-status-live { background: linear-gradient(135deg, rgba(78, 255, 159, .08), rgba(255, 255, 255, .02) 55%); border-color: rgba(78, 255, 159, .22); }
.cp-status-attention { background: linear-gradient(135deg, rgba(255, 214, 102, .08), rgba(255, 255, 255, .02) 55%); border-color: rgba(255, 214, 102, .22); }
.cp-status-paused { border-color: var(--cp-line); background: var(--cp-surface); }
.cp-status-title-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: .2rem 0 .5rem; }
.cp-status-title { font-family: 'Syne', sans-serif; font-weight: 800; font-size: clamp(1.5rem, 3vw, 2rem); color: var(--white); letter-spacing: -.01em; }
.cp-status-url { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: .78rem; color: var(--cyan); text-decoration: none; overflow-wrap: anywhere; margin-bottom: .5rem; }
.cp-status-url:hover { text-decoration: underline; }
.cp-status-desc { font-size: .92rem; color: var(--text); line-height: 1.7; max-width: 40rem; }

/* Domain (customer-owned domain) flow */
.cp-domain { margin: 0 0 .75rem; }
.cp-domain-body { display: grid; gap: 1.25rem; }
.cp-domain-step { border-top: 1px solid var(--cp-line); padding-top: 1.1rem; display: grid; gap: .7rem; }
.cp-domain-step:first-child { border-top: 0; padding-top: 0; }
.cp-domain-step-title { font-size: 1.02rem; margin: 0; color: var(--white); }
.cp-domain-row { align-items: flex-end; }
.cp-domain-row .cp-field { flex: 1 1 16rem; }
.cp-domain-row .cp-field input { width: 100%; }
.cp-provider { display: grid; gap: .75rem; }
.cp-provider-line { margin: 0; font-size: .95rem; }
.cp-cred-form { display: grid; gap: .8rem; max-width: 28rem; }
.cp-cred-form input { width: 100%; }
.cp-domain-live { margin: 0; color: var(--muted); font-size: .9rem; }
.cp-domain-big { font-family: 'JetBrains Mono', monospace; font-size: 1.35rem; color: var(--cyan); text-decoration: none; word-break: break-all; }
.cp-domain-big:hover { text-decoration: underline; }
.cp-records td, .cp-records th { white-space: nowrap; }
.cp-records td:nth-child(3) { white-space: normal; }
.cp-copy { cursor: pointer; font-family: 'JetBrains Mono', monospace; font-size: .8rem; background: rgba(255,255,255,.04); padding: .15rem .4rem; border-radius: 4px; border: 1px solid var(--cp-line); word-break: break-all; }
.cp-copy.is-copied { border-color: var(--cp-ok); color: var(--cp-ok); }
@media (max-width: 640px) { .cp-domain-row { flex-direction: column; align-items: stretch; } .cp-domain-row .btn { width: 100%; justify-content: center; } }

.cp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.cp-step { display: grid; grid-template-columns: 1.8rem 1fr; gap: .8rem; align-items: start; padding: .55rem 0; font-size: .9rem; color: var(--muted); position: relative; }
.cp-step::before { content: ''; position: absolute; left: .85rem; top: 2.1rem; bottom: -.3rem; width: 1px; background: var(--cp-line); }
.cp-step:last-child::before { display: none; }
.cp-step-index { width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 1px solid var(--cp-line); display: inline-flex; align-items: center; justify-content: center; font-family: 'JetBrains Mono', monospace; font-size: .64rem; background: var(--deep); position: relative; z-index: 1; transition: border-color .25s, color .25s, background-color .25s; }
.cp-step-label { color: inherit; padding-top: .3rem; }
.cp-step-note { display: block; font-size: .76rem; color: var(--muted); margin-top: .15rem; }
.cp-step-done { color: var(--text); }
.cp-step-done .cp-step-index { border-color: var(--cp-ok); color: var(--cp-ok); }
.cp-step-current { color: var(--white); }
.cp-step-current .cp-step-index { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-glow); box-shadow: 0 0 0 4px rgba(0, 200, 255, .12); }
.cp-step-attention .cp-step-index { border-color: var(--cp-warn); color: var(--cp-warn); }

/* Content page */
.cp-content-group { background: var(--cp-surface); border: 1px solid var(--cp-line); border-radius: var(--cp-radius); padding: 1.4rem 1.5rem; margin-bottom: .75rem; }
.cp-managed { font-family: 'JetBrains Mono', monospace; font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: .4rem; }
.cp-managed::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); opacity: .7; }
.cp-value-list { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; }
.cp-value-object { display: grid; gap: .15rem; }
.cp-value-object > :first-child { color: var(--white); }
.cp-value-object > :not(:first-child) { color: var(--text); font-size: .84rem; }
.cp-asset-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-bottom: 1rem; }
.cp-asset-cat { background: var(--deep); border: 1px solid var(--cp-line); border-radius: var(--cp-radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.cp-file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.cp-file-list li { display: flex; justify-content: space-between; gap: .75rem; font-size: .8rem; }
.cp-file-name { color: var(--text); overflow-wrap: anywhere; min-width: 0; }
.cp-file-meta { color: var(--muted); white-space: nowrap; font-size: .74rem; }

/* Requests page */
#cp-req-form .cp-field { margin-bottom: 1rem; }
#cp-req-form input, #cp-req-form select, #cp-req-form textarea { width: 100%; }
.cp-how { margin: 0 0 1rem; padding-left: 1.2rem; display: grid; gap: .65rem; font-size: .88rem; color: var(--text); line-height: 1.6; }
.cp-how strong { color: var(--white); }
.cp-req-items { display: flex; flex-direction: column; gap: .5rem; }
.cp-req-item { background: var(--cp-surface); border: 1px solid var(--cp-line); border-radius: var(--cp-radius); padding: 1.05rem 1.25rem; display: flex; flex-direction: column; gap: .35rem; }
.cp-req-details { margin-top: .35rem; }

/* ── Login ── */
.cp-login-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--void); }
.cp-login-top { padding: 1.4rem 2rem; border-bottom: 1px solid var(--cp-line); }
.cp-login-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 4rem 1.5rem; }
.cp-login { background: var(--cp-surface); border: 1px solid var(--cp-line); border-radius: var(--cp-radius); padding: 2.5rem; max-width: 27rem; width: 100%; animation: cp-enter .38s var(--cp-ease) both; }
.cp-login h1 { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.5rem; margin-bottom: .75rem; color: var(--white); }
.cp-login p { font-size: .9rem; color: var(--text); line-height: 1.7; margin-bottom: 1.75rem; }
.cp-login .cp-field { margin-bottom: 1.25rem; }
.cp-login .cp-field input { width: 100%; }
.cp-login-btn { width: 100%; justify-content: center; min-height: 48px; }
.cp-msg { font-size: .86rem; line-height: 1.6; margin-top: 1.1rem; }
.cp-msg-ok { color: var(--cp-ok); }
.cp-msg-err { color: var(--cp-bad); }
.cp-login-note { font-size: .78rem; color: var(--muted); line-height: 1.6; margin-top: 1.5rem; }

/* ── Responsive ── */
@media (max-width: 1180px) {
  .cp-main { padding: 2.25rem 2rem 4rem; }
}
@media (max-width: 1023px) {
  .cp-shell { grid-template-columns: minmax(0, 1fr); }
  .cp-topbar { display: flex; align-items: center; gap: 1rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--cp-line); background: rgba(7, 13, 20, .92); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 30; min-width: 0; }
  .cp-topbar-biz { font-size: .78rem; color: var(--muted); margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .cp-menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--cp-radius); border: 1px solid var(--cp-line); background: var(--cp-surface); color: var(--white); cursor: pointer; flex-shrink: 0; }
  .cp-menu-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .cp-sidebar { position: fixed; top: 0; left: 0; bottom: 0; height: auto; width: min(19rem, 86vw); z-index: 40; transform: translateX(-104%); transition: transform .3s var(--cp-ease); box-shadow: 0 0 60px rgba(0, 0, 0, .5); }
  .cp-sidebar.is-open { transform: none; }
  .cp-menu-close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--cp-radius); border: 1px solid var(--cp-line); background: none; color: var(--text); cursor: pointer; }
  .cp-menu-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .cp-main { padding: 1.75rem 1.25rem 4rem; }
  .cp-page-head { margin-bottom: 1.5rem; }
}
@media (max-width: 860px) {
  .cp-lead { grid-template-columns: 1fr; gap: .35rem; padding: 1.05rem 1.1rem; }
  .cp-lead-when { order: -1; text-align: left; }
  .cp-count { margin-left: 0; padding-bottom: 0; }
  .cp-columns-form { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .cp-table { min-width: 0; }
  .cp-table thead { display: none; }
  .cp-table tbody tr { display: grid; grid-template-columns: 1fr; gap: .45rem; padding: 1rem; border-bottom: 1px solid var(--cp-line); }
  .cp-table tbody tr:last-child { border-bottom: none; }
  .cp-table td { display: flex; justify-content: space-between; gap: 1rem; padding: 0; border: none; }
  .cp-table td[data-label]::before { content: attr(data-label); font-size: .64rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; font-family: 'JetBrains Mono', monospace; }
  .cp-td-actions { justify-content: flex-start; padding-top: .35rem; }
  .cp-td-period { white-space: normal; }
  .cp-kv-wide { grid-template-columns: 1fr; gap: .15rem .5rem; }
  .cp-kv-wide dt { margin-top: .55rem; }
  .cp-status-hero { padding: 1.35rem 1.2rem; }
  .cp-status-hero .btn { width: 100%; justify-content: center; }
  .cp-tile-hero .cp-tile-value { font-size: 1.7rem; }
  .cp-tiles { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cp-detail-row { grid-template-columns: 1fr; gap: .15rem; }
  .cp-drawer { padding: 1.5rem 1.15rem 3rem; }
  .cp-topbar-biz { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cp-main, .cp-login, .cp-drawer { animation: none; }
  .cp-skeleton-row::after { animation: none; }
  .cp-sidebar, .cp-sidelink, .cp-sidelink::before, .cp-tile, .cp-card, .cp-lead, .btn, .cp-action { transition: none; }
  .cp-tile:hover, .cp-lead:hover { transform: none; }
}
