@font-face { font-family: "Bebas Neue"; src: url("./fonts/bebas-neue.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("./fonts/space-grotesk.woff2") format("woff2"); font-style: normal; font-weight: 300 700; font-display: swap; }

:root {
  color-scheme: dark;
  --cp-black: #030405;
  --cp-panel: #07090b;
  --cp-panel-2: #0b0e12;
  --cp-white: #f6f5f2;
  --cp-muted: #8d9299;
  --cp-faint: #5f646d;
  --cp-line: #282d34;
  --cp-line-purple: #392f45;
  --cp-blue: #5f8dff;
  --cp-blue-strong: #3f73f5;
  --cp-purple: #ab70ff;
  --cp-green: #67dd91;
  --cp-yellow: #f4c94f;
  --cp-red: #ff6565;
  --cp-display: "Bebas Neue", Impact, sans-serif;
  --cp-body: "Space Grotesk", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--cp-black); }
body { min-height: 100vh; margin: 0; background: var(--cp-black); color: var(--cp-white); font-family: var(--cp-body); font-size: 14px; line-height: 1.45; letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--cp-blue); outline-offset: 2px; }
img { display: block; max-width: 100%; }
svg { width: 18px; height: 18px; stroke-width: 1.7; }
[hidden], .hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; }

.cp-logo { width: 164px; height: auto; object-fit: contain; }
.cp-kicker { margin: 0; color: var(--cp-blue); font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; }
.cp-display { margin: 0; font-family: var(--cp-display); font-weight: 400; line-height: 0.92; letter-spacing: 0; text-transform: uppercase; }
.cp-muted { color: var(--cp-muted); }
.cp-line { border-color: var(--cp-line); }
.cp-icon-button, .cp-button {
  min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--cp-line-purple); border-radius: 0; padding: 0 13px; background: transparent;
  color: var(--cp-white); font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
}
.cp-icon-button { width: 38px; padding: 0; }
.cp-button:hover, .cp-icon-button:hover { border-color: var(--cp-blue); color: var(--cp-blue); }
.cp-button.primary { border-color: var(--cp-blue); background: var(--cp-blue); color: #050609; }
.cp-button.primary:hover { background: #78a0ff; color: #050609; }
.cp-button.danger { border-color: #743838; color: var(--cp-red); }
.cp-status { display: inline-flex; align-items: center; gap: 6px; color: var(--cp-muted); font-size: 9px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; white-space: nowrap; }
.cp-status::before { content: ""; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.cp-status.green { color: var(--cp-green); }
.cp-status.blue { color: var(--cp-blue); }
.cp-status.yellow { color: var(--cp-yellow); }
.cp-status.red { color: var(--cp-red); }
.cp-status.purple { color: var(--cp-purple); }
.cp-tag { display: inline-flex; align-items: center; min-height: 25px; border: 1px solid var(--cp-line); padding: 0 8px; color: #b6bac0; font-size: 9px; letter-spacing: .8px; text-transform: uppercase; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-progress { width: 100%; height: 4px; overflow: hidden; background: #272b31; }
.cp-progress > span { display: block; height: 100%; background: var(--cp-blue); }
.cp-avatar { width: 40px; height: 40px; overflow: hidden; border: 1px solid var(--cp-line-purple); background: #14161b; }
.cp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cp-avatar .avatar-initials { width: 100%; height: 100%; display: grid; place-items: center; background: #20132b; color: var(--cp-white); font-family: var(--cp-display); font-size: 17px; text-transform: uppercase; }
.cp-empty { min-height: 180px; display: grid; place-items: center; padding: 24px; color: var(--cp-muted); text-align: center; }
.cp-empty strong { display: block; margin-bottom: 4px; color: var(--cp-white); font-family: var(--cp-display); font-size: 24px; font-weight: 400; text-transform: uppercase; }

.portal-shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.portal-rail { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 224px; display: flex; flex-direction: column; border-right: 1px solid var(--cp-line); padding: 20px 14px; background: #020304; }
.portal-brand { min-height: 74px; display: flex; align-items: flex-start; border: 0; padding: 0 6px; background: transparent; }
.portal-nav { display: grid; gap: 2px; margin-top: 24px; }
.portal-label { margin: 0 0 8px; padding: 0 9px; color: var(--cp-faint); font-size: 9px; font-weight: 600; letter-spacing: 1.7px; text-transform: uppercase; }
.portal-nav button { min-height: 44px; display: flex; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 0; padding: 0 10px; background: transparent; color: #c0c3c8; text-align: left; }
.portal-nav button span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--cp-display); font-size: 18px; letter-spacing: .7px; text-transform: uppercase; }
.portal-nav button b { min-width: 24px; text-align: right; color: var(--cp-muted); font-size: 10px; }
.portal-nav button:hover { color: #fff; }
.portal-nav button.active { border-color: #35517f; box-shadow: inset 2px 0 0 var(--cp-blue); color: var(--cp-white); background: #0a0d12; }
.portal-nav button.active svg { color: var(--cp-blue); }
.portal-foot { display: grid; gap: 14px; margin-top: auto; border-top: 1px solid var(--cp-line); padding: 16px 8px 0; }
.portal-foot small { color: var(--cp-muted); font-size: 9px; letter-spacing: 1px; text-transform: uppercase; }
.portal-workspace { grid-column: 2; min-width: 0; }
.portal-topbar { position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--cp-line); padding: 0 28px; background: rgba(3, 4, 5, .96); }
.portal-context { min-width: 0; display: grid; gap: 1px; }
.portal-context strong { overflow: hidden; font-family: var(--cp-display); font-size: 19px; font-weight: 400; letter-spacing: .6px; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.portal-context small { color: var(--cp-muted); font-size: 9px; letter-spacing: 1px; text-transform: uppercase; }
.portal-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.portal-main { width: min(1480px, 100%); margin: 0 auto; padding: 32px 34px 52px; }
.portal-page-head { min-height: 94px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; border-bottom: 2px solid var(--cp-blue); margin-bottom: 18px; padding-bottom: 16px; }
.portal-page-head h1 { margin: 4px 0 4px; font-family: var(--cp-display); font-size: clamp(48px, 6vw, 78px); font-weight: 400; line-height: .9; text-transform: uppercase; }
.portal-page-head p:last-child { max-width: 680px; margin: 0; color: var(--cp-muted); font-size: 12px; }
.portal-head-actions { display: flex; gap: 8px; padding-top: 7px; }
.portal-grid { display: grid; gap: 14px; }
.portal-grid.two { grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); }
.portal-grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cp-panel { min-width: 0; border: 1px solid var(--cp-line); background: var(--cp-panel); }
.cp-panel-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--cp-line); padding: 11px 14px; }
.cp-panel-head h2, .cp-panel-head h3 { margin: 2px 0 0; font-family: var(--cp-display); font-size: 27px; font-weight: 400; line-height: 1; text-transform: uppercase; }
.cp-row { min-width: 0; display: grid; align-items: center; gap: 12px; border-bottom: 1px solid var(--cp-line); padding: 13px 14px; }
.cp-row:is(button) { width: 100%; border-top: 0; border-right: 0; border-left: 0; background: transparent; color: inherit; text-align: left; }
.cp-row:last-child { border-bottom: 0; }
.cp-row:hover { background: #0a0d11; }
.cp-row-copy { min-width: 0; display: grid; gap: 2px; }
.cp-row-copy strong { overflow: hidden; font-family: var(--cp-display); font-size: 19px; font-weight: 400; letter-spacing: .4px; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.cp-row-copy small { overflow: hidden; color: var(--cp-muted); font-size: 10px; letter-spacing: .4px; text-overflow: ellipsis; white-space: nowrap; }
.campaign-progress { min-width: 0; display: grid; gap: 6px; }
.campaign-progress small { color: var(--cp-muted); font-size: 9px; text-transform: uppercase; }
.cp-stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--cp-line); margin-bottom: 14px; }
.cp-stat { min-width: 0; display: grid; grid-template-columns: 35px minmax(0, 1fr); align-items: center; gap: 10px; border-right: 1px solid var(--cp-line); padding: 16px; }
.cp-stat:last-child { border-right: 0; }
.cp-stat svg { color: var(--cp-blue); }
.cp-stat strong { display: block; font-family: var(--cp-display); font-size: 31px; font-weight: 400; line-height: 1; }
.cp-stat small { display: block; color: var(--cp-muted); font-size: 9px; letter-spacing: .7px; text-transform: uppercase; }
.cp-table-wrap { overflow-x: auto; }
.cp-table { width: 100%; min-width: 720px; border-collapse: collapse; table-layout: fixed; }
.cp-table th { height: 38px; border-bottom: 1px solid var(--cp-line); padding: 0 12px; color: var(--cp-muted); font-size: 9px; letter-spacing: 1.2px; text-align: left; text-transform: uppercase; }
.cp-table td { min-height: 56px; border-bottom: 1px solid var(--cp-line); padding: 12px; color: #d3d5d8; font-size: 11px; }
.cp-table tr:last-child td { border-bottom: 0; }
.cp-table tbody tr:hover { background: #0a0d11; }
.cp-form { display: grid; gap: 14px; }
.cp-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cp-field { min-width: 0; display: grid; gap: 6px; }
.cp-field.full { grid-column: 1 / -1; }
.cp-field span { color: #a9adb3; font-size: 9px; font-weight: 600; letter-spacing: 1.1px; text-transform: uppercase; }
.cp-field input, .cp-field select, .cp-field textarea { width: 100%; border: 1px solid var(--cp-line); border-radius: 0; background: #050709; color: var(--cp-white); }
.cp-field input, .cp-field select { height: 42px; padding: 0 10px; }
.cp-field textarea { min-height: 105px; resize: vertical; padding: 10px; }
.cp-modal { position: fixed; inset: 0; z-index: 100; }
.cp-modal-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(0, 0, 0, .82); }
.cp-modal-sheet { position: relative; z-index: 1; width: min(640px, calc(100vw - 28px)); max-height: calc(100vh - 28px); overflow-y: auto; border: 1px solid var(--cp-line-purple); margin: 14px auto; background: #050607; }
.cp-modal-head { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--cp-line); padding: 12px 16px; }
.cp-modal-head h2 { margin: 2px 0 0; font-family: var(--cp-display); font-size: 31px; font-weight: 400; text-transform: uppercase; }
.cp-modal-body { padding: 18px; }
.cp-modal-actions { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--cp-line); margin: 18px -18px -18px; padding: 13px 18px; }
.cp-toast-region { position: fixed; z-index: 150; right: 18px; bottom: 18px; width: min(350px, calc(100vw - 36px)); }
.cp-toast { border: 1px solid var(--cp-blue); padding: 12px; background: #080b10; color: var(--cp-white); font-size: 11px; }

@media (max-width: 980px) {
  .portal-grid.two, .portal-grid.equal { grid-template-columns: minmax(0, 1fr); }
  .cp-stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-stat:nth-child(2) { border-right: 0; }
  .cp-stat:nth-child(-n + 2) { border-bottom: 1px solid var(--cp-line); }
}

@media (max-width: 720px) {
  .portal-shell { display: block; }
  .portal-rail { display: none; }
  .portal-workspace { width: 100%; }
  .portal-topbar { height: 58px; padding: 0 12px; }
  .portal-main { padding: 22px 12px 88px; }
  .portal-page-head { min-height: 0; align-items: flex-start; gap: 12px; }
  .portal-page-head h1 { font-size: 50px; }
  .portal-head-actions .cp-button:not(.primary) { display: none; }
  .cp-form-grid { grid-template-columns: minmax(0, 1fr); }
  .cp-field.full { grid-column: auto; }
  .cp-stat { padding: 12px; }
  .cp-stat strong { font-size: 25px; }
}
