:root {
  --ink: #121116;
  --ink-soft: #222027;
  --paper: #f4f0e9;
  --paper-bright: #fffdf8;
  --muted: #7c7881;
  --line: rgba(18, 17, 22, 0.12);
  --coral: #ff6b5e;
  --peach: #ffb277;
  --lime: #d9ff70;
  --violet: #7657f6;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 24px 80px rgba(27, 22, 35, 0.13);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 780; letter-spacing: -0.04em; }
.brand__mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(145deg, var(--coral), var(--peach)); box-shadow: 0 8px 24px rgba(255, 107, 94, 0.28); }
.brand__mark img { width: 20px; filter: brightness(0) invert(1); }
.brand--light { color: #fff; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.08fr) minmax(480px, 0.92fr); }
.login-story { position: relative; isolation: isolate; overflow: hidden; padding: 44px clamp(38px, 5vw, 84px); display: flex; flex-direction: column; color: #fff; background: var(--ink); }
.login-story::before { content: ""; position: absolute; z-index: -2; width: 620px; height: 620px; right: -160px; top: -170px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(255,178,119,.75), rgba(255,107,94,.34) 30%, rgba(118,87,246,.13) 55%, transparent 70%); filter: blur(4px); }
.login-story::after { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(to bottom right, #000, transparent 68%); }
.story-copy { margin: auto 0 44px; max-width: 670px; }
.eyebrow { margin: 0 0 22px; display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.62); font-size: 12px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow span { width: 22px; height: 2px; background: var(--coral); }
.story-copy h1 { max-width: 650px; margin: 0; font-size: clamp(52px, 6.1vw, 92px); line-height: .93; letter-spacing: -.066em; font-weight: 680; }
.story-copy h1 em { color: var(--peach); font-family: Georgia, serif; font-weight: 400; }
.story-lead { max-width: 570px; margin: 30px 0 0; color: rgba(255,255,255,.66); font-size: clamp(16px, 1.5vw, 20px); line-height: 1.65; }
.story-footnote { margin: 34px 0 0; color: rgba(255,255,255,.38); font-size: 12px; letter-spacing: .04em; }

.signal-card { width: min(480px, 80%); padding: 20px 22px; border: 1px solid rgba(255,255,255,.12); border-radius: 22px; background: rgba(255,255,255,.075); backdrop-filter: blur(18px); box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.signal-card__top, .signal-card__meta { display: flex; align-items: center; justify-content: space-between; }
.signal-card__top { font-size: 12px; color: rgba(255,255,255,.52); text-transform: uppercase; letter-spacing: .09em; }
.signal-card__status { color: var(--lime); }
.signal-chart { height: 75px; display: flex; gap: 8px; align-items: flex-end; margin: 20px 0; }
.signal-chart span { flex: 1; height: var(--height); min-width: 6px; border-radius: 4px 4px 1px 1px; background: linear-gradient(to top, var(--violet), var(--coral)); opacity: .92; }
.signal-card__meta strong { font-size: 14px; }
.signal-card__meta span { color: rgba(255,255,255,.46); font-size: 12px; }

.login-panel { display: grid; place-items: center; padding: 44px clamp(34px, 6vw, 94px); background: var(--paper); position: relative; }
.login-panel::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 100% 100%, rgba(255,178,119,.25), transparent 38%); }
.login-card { width: min(440px, 100%); position: relative; z-index: 1; }
.mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 54px; font-size: 20px; font-weight: 780; }
.section-kicker { margin: 0 0 10px; color: var(--coral); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.login-card h2 { margin: 0; font-size: clamp(32px, 3.1vw, 45px); line-height: 1.05; letter-spacing: -.052em; }
.login-intro { margin: 15px 0 34px; color: var(--muted); line-height: 1.6; }
.messages { margin: 0 0 20px; }
.message { padding: 13px 15px; border-radius: 12px; font-size: 13px; line-height: 1.45; }
.message--error { color: #952d28; background: #ffe2dc; border: 1px solid #ffc4ba; }
.message--success { color: #275d3a; background: #ddf4e5; border: 1px solid #bae5c8; }
.login-form { display: grid; }
.login-form label { margin: 0 0 9px; font-size: 13px; font-weight: 720; }
.label-row { display: flex; align-items: center; justify-content: space-between; margin-top: 21px; }
.label-row label { margin: 0; }
.label-row span { color: #9d98a1; font-size: 11px; }
.field-wrap { position: relative; }
.field-wrap input { width: 100%; height: 54px; padding: 0 16px; border: 1px solid #d8d2ca; border-radius: 13px; color: var(--ink); background: rgba(255,253,248,.72); outline: none; transition: border-color .18s, box-shadow .18s, background .18s; }
.field-wrap input::placeholder { color: #aaa4ad; }
.field-wrap input:focus { border-color: var(--violet); background: var(--paper-bright); box-shadow: 0 0 0 4px rgba(118,87,246,.11); }
.field-wrap--password input { padding-right: 52px; }
.password-toggle { position: absolute; top: 50%; right: 10px; width: 36px; height: 36px; padding: 0; transform: translateY(-50%); display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; cursor: pointer; }
.password-toggle:hover { background: #eee9e2; }
.password-toggle img { width: 18px; opacity: .52; }
.password-toggle .icon-hide { display: none; }
.password-toggle[aria-pressed="true"] .icon-show { display: none; }
.password-toggle[aria-pressed="true"] .icon-hide { display: block; }
.primary-button { height: 56px; margin-top: 28px; padding: 0 17px 0 21px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 13px; color: #fff; background: var(--ink); font-weight: 720; cursor: pointer; box-shadow: 0 12px 28px rgba(18,17,22,.18); transition: transform .18s, background .18s; }
.primary-button:hover { transform: translateY(-2px); background: #2b2830; }
.primary-button img { width: 19px; filter: invert(1); }
.security-note { display: flex; align-items: flex-start; gap: 12px; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.security-note img { width: 19px; margin-top: 2px; opacity: .68; }
.security-note p { display: grid; gap: 4px; margin: 0; }
.security-note strong { font-size: 12px; }
.security-note span { color: var(--muted); font-size: 11px; line-height: 1.5; }

.dashboard-page { min-height: 100vh; background: var(--paper); }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 32px 24px 22px; display: flex; flex-direction: column; color: #fff; background: var(--ink); }
.primary-nav { margin-top: 52px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; color: rgba(255,255,255,.6); font-size: 14px; font-weight: 650; }
.nav-item img { width: 18px; filter: invert(1); opacity: .6; }
.nav-item--active { color: #fff; background: rgba(255,255,255,.09); }
.nav-item--active img { opacity: 1; }
.nav-placeholder { margin: 30px 14px 0; padding-top: 25px; border-top: 1px solid rgba(255,255,255,.09); }
.nav-placeholder span { color: rgba(255,255,255,.34); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.nav-placeholder p { color: rgba(255,255,255,.36); font-size: 12px; line-height: 1.6; }
.sidebar-user { margin-top: auto; padding-top: 18px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; border-top: 1px solid rgba(255,255,255,.1); }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--ink); background: var(--peach); font-weight: 800; }
.sidebar-user div { min-width: 0; display: grid; }
.sidebar-user strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
.sidebar-user div span { color: rgba(255,255,255,.4); font-size: 10px; }
.sidebar-user button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; cursor: pointer; }
.sidebar-user button:hover { background: rgba(255,255,255,.08); }
.sidebar-user button img { width: 16px; filter: invert(1); opacity: .55; }

.workspace { min-width: 0; padding: 48px clamp(30px, 5vw, 78px) 70px; }
.workspace-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.eyebrow--dark { margin-bottom: 14px; color: var(--muted); }
.workspace-header h1 { margin: 0; font-size: clamp(36px, 4.2vw, 62px); letter-spacing: -.06em; line-height: 1; }
.workspace-header > div > p:last-child { margin: 14px 0 0; color: var(--muted); }
.date-chip { flex: none; padding: 10px 14px; border: 1px solid var(--line); border-radius: 100px; color: var(--muted); background: rgba(255,255,255,.4); font-size: 12px; font-weight: 700; }
.dashboard-messages { margin: 25px 0 -5px; }
.welcome-card { position: relative; isolation: isolate; overflow: hidden; min-height: 320px; margin-top: 42px; padding: clamp(30px, 5vw, 58px); display: flex; align-items: center; border-radius: var(--radius-lg); color: #fff; background: var(--ink-soft); box-shadow: var(--shadow); }
.welcome-card::before { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .09; background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 19px 19px; mask-image: linear-gradient(90deg, transparent 30%, #000); }
.welcome-card__copy { width: min(620px, 62%); position: relative; z-index: 1; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid rgba(255,255,255,.13); border-radius: 100px; color: rgba(255,255,255,.68); font-size: 11px; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(217,255,112,.1); }
.welcome-card h2 { margin: 22px 0 17px; font-size: clamp(31px, 3.5vw, 52px); line-height: 1.02; letter-spacing: -.055em; }
.welcome-card p { margin: 0; color: rgba(255,255,255,.58); line-height: 1.7; }
.orbit-visual { position: absolute; width: 330px; height: 330px; right: clamp(20px, 5vw, 74px); top: 50%; transform: translateY(-50%); }
.orbit { position: absolute; inset: 20px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.orbit--two { inset: 66px; border-color: rgba(255,178,119,.28); }
.orbit__core { position: absolute; inset: 112px; display: grid; place-items: center; border-radius: 32px; background: linear-gradient(145deg, var(--coral), var(--peach)); box-shadow: 0 18px 60px rgba(255,107,94,.33); transform: rotate(-8deg); }
.orbit__core img { width: 48px; filter: invert(1); transform: rotate(8deg); }
.orbit__dot { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 18px rgba(217,255,112,.65); }
.orbit__dot--one { top: 53px; left: 61px; }
.orbit__dot--two { right: 47px; bottom: 91px; width: 8px; height: 8px; background: var(--peach); }
.workspace-grid { margin-top: 22px; display: grid; grid-template-columns: minmax(180px, .72fr) minmax(180px, .72fr) minmax(300px, 1.3fr); gap: 20px; }
.info-card, .roadmap-card { min-height: 230px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,253,248,.72); }
.info-card { position: relative; }
.info-card > img { width: 25px; margin: 36px 0 22px; }
.info-card__number { position: absolute; right: 20px; top: 18px; color: #bbb5ad; font-family: Georgia, serif; font-size: 13px; }
.info-card h3, .roadmap-card h3 { margin: 0 0 10px; font-size: 18px; letter-spacing: -.025em; }
.info-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.info-card--accent { background: #efe8ff; border-color: #ded2ff; }
.roadmap-card h3 { max-width: 340px; margin-bottom: 25px; font-size: 21px; line-height: 1.25; }
.roadmap-row { display: grid; grid-template-columns: 45px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 12px; }
.roadmap-row span { color: var(--coral); font-weight: 800; text-transform: uppercase; font-size: 9px; letter-spacing: .1em; }
.roadmap-row--muted strong { color: var(--muted); }
.roadmap-row--muted span { color: var(--muted); }

/* Closed-loop control panel */
.primary-nav { display: grid; gap: 4px; }
.control-header { align-items: center; }
.button { min-height: 42px; padding: 0 17px; border: 0; border-radius: 11px; color: #fff; background: var(--ink); font-weight: 720; cursor: pointer; }
.button:hover { background: #2c2931; }
.button-danger { background: #b93d35; }
.button-danger:hover { background: #9c2e28; }
.button-secondary { color: var(--ink); background: #ebe5dd; }
.button-secondary:hover { background: #ddd5cc; }
.button-small { min-height: 34px; padding-inline: 12px; font-size: 12px; }
.metric-grid { margin-top: 34px; display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: 16px; }
.metric-card { min-height: 142px; padding: 22px; display: grid; align-content: space-between; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,253,248,.76); }
.metric-card span, .metric-card small { color: var(--muted); font-size: 11px; }
.metric-card > strong { margin-block: 11px; font-size: 27px; letter-spacing: -.04em; }
.good { color: #28704a; }.warn { color: #a94d25; }
.content-columns { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .8fr); gap: 20px; }
.panel { margin-top: 20px; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,253,248,.78); }
.panel h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-heading > a { color: var(--violet); font-size: 12px; font-weight: 750; }
.table-wrap { overflow-x: auto; margin-top: 20px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { color: var(--muted); font-size: 10px; text-align: left; text-transform: uppercase; letter-spacing: .08em; }
th, td { padding: 13px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-note { margin-top: 5px; display: block; color: var(--muted); }
.state { display: inline-flex; padding: 5px 8px; border-radius: 100px; color: #56515b; background: #e9e3db; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.state--approved,.state--published,.state--passed,.state--succeeded,.state--active,.state--healthy,.state--high { color: #226042; background: #d9f1e1; }
.state--failed,.state--quarantined,.state--rejected,.state--critical { color: #922f29; background: #f9dcd8; }
.state--review,.state--proposed,.state--warning,.state--medium { color: #815119; background: #f7e8c8; }
.state--running,.state--publishing,.state--generating,.state--scheduled { color: #45329c; background: #e4defd; }
.activity-list { margin-top: 17px; display: grid; }
.activity-list > div { display: grid; grid-template-columns: 10px 1fr; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.activity-list p { margin: 0; display: grid; gap: 4px; font-size: 12px; }
.activity-list small { color: var(--muted); }
.severity { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #9a949c; }
.severity--warning { background: #e49a39; }.severity--error,.severity--critical { background: #d34d44; }
.empty-state { color: var(--muted); line-height: 1.6; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.strategy-card { display: grid; gap: 12px; }
.detail-list { display: grid; grid-template-columns: 100px 1fr; gap: 9px 15px; font-size: 12px; }
.detail-list dt { color: var(--muted); }.detail-list dd { margin: 0; }
pre { overflow: auto; max-height: 280px; padding: 13px; border-radius: 10px; background: #eee9e2; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; line-height: 1.5; }
.subcard,.fact-card,.job-row { margin-top: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.45); }
.subcard > span { float: right; }.subcard p { color: var(--muted); line-height: 1.5; }
.inline-actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 9px; }
.create-panel summary { font-weight: 760; cursor: pointer; }
.form-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.form-grid label,.upload-form label { display: grid; gap: 8px; color: #4f4b52; font-size: 12px; font-weight: 700; }
.form-grid input,.form-grid select,.form-grid textarea,.upload-form input,.inline-form input { width: 100%; padding: 11px 12px; border: 1px solid #d8d2ca; border-radius: 10px; color: var(--ink); background: var(--paper-bright); font: inherit; }
.form-grid textarea { min-height: 92px; resize: vertical; }.form-grid .full { grid-column: 1 / -1; }
.compact-form { padding-block: 15px; border-block: 1px solid var(--line); }
.variant-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.variant-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 14px; }
.asset-strip { margin: 14px 0; display: grid; grid-template-columns: repeat(auto-fit,minmax(100px,1fr)); gap: 8px; }
.asset-strip img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 9px; background: #e5ded5; }
.caption-preview { white-space: pre-wrap; line-height: 1.55; }
.quality-results { max-height: 190px; }
.inline-form { display: flex; gap: 8px; min-width: 300px; }
.auto-moved { display: inline-flex; margin-top: 5px; color: #815119; font-size: 10px; font-weight: 700; }
.upload-form { margin-top: 16px; display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: 10px; }
.revision-tools { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.revision-tools summary { color: var(--violet); font-size: 12px; font-weight: 750; cursor: pointer; }
.test-list,.source-list { display: grid; gap: 12px; }
.source-list > div { display: grid; gap: 4px; padding-bottom: 11px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.source-list small,.job-row small { color: var(--muted); }
.job-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.job-row > div { display: grid; gap: 5px; }.job-row p { grid-column: 1/-1; margin: 0; color: #922f29; font-size: 11px; }
.settings-form h2 { margin: 28px 0 0; }.settings-form h2:first-of-type { margin-top: 0; }
.switch-grid { margin-top: 15px; display: flex; flex-wrap: wrap; gap: 10px; }
.switch-grid label { padding: 11px 15px; border: 1px solid var(--line); border-radius: 10px; background: #f9f5ef; font-size: 13px; }
.form-note { color: var(--muted); font-size: 12px; }

@media (max-width: 960px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-panel { min-height: 100vh; }
  .mobile-brand { display: flex; }
  .app-shell { grid-template-columns: 82px 1fr; }
  .sidebar { padding-inline: 16px; align-items: center; }
  .sidebar .brand > span:last-child, .nav-item span, .nav-placeholder, .sidebar-user div { display: none; }
  .primary-nav { width: 100%; }
  .nav-item { justify-content: center; }
  .sidebar-user { grid-template-columns: 1fr; }
  .sidebar-user form { display: grid; place-items: center; }
  .welcome-card__copy { width: 65%; }
  .orbit-visual { right: -45px; opacity: .72; }
  .workspace-grid { grid-template-columns: 1fr 1fr; }
  .roadmap-card { grid-column: 1 / -1; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .content-columns,.card-grid,.variant-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .login-panel { padding: 28px 22px; align-items: start; }
  .login-card { margin-top: 8px; }
  .mobile-brand { margin-bottom: 66px; }
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 17px 20px; flex-direction: row; justify-content: space-between; }
  .sidebar .brand > span:last-child { display: inline; }
  .primary-nav, .sidebar-user .avatar, .sidebar-user div { display: none; }
  .sidebar-user { margin: 0; padding: 0; border: 0; display: block; }
  .workspace { padding: 34px 20px 48px; }
  .workspace-header { align-items: flex-start; }
  .date-chip { display: none; }
  .welcome-card { min-height: 430px; align-items: flex-start; padding: 30px; }
  .welcome-card__copy { width: 100%; }
  .orbit-visual { width: 250px; height: 250px; right: -20px; top: auto; bottom: -115px; transform: none; }
  .orbit__core { inset: 86px; border-radius: 24px; }
  .orbit__core img { width: 34px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .roadmap-card { grid-column: auto; }
  .metric-grid,.form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .control-header { display: grid; }
}

@media (prefers-reduced-motion: no-preference) {
  .orbit--one { animation: orbit-spin 28s linear infinite; }
  .orbit__core { animation: soft-float 5s ease-in-out infinite; }
  @keyframes orbit-spin { to { transform: rotate(360deg); } }
  @keyframes soft-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
}
