:root {
  color-scheme: dark;
  --bg: #07110f;
  --surface: #0d1917;
  --surface-2: #12211e;
  --line: rgba(218, 238, 232, 0.12);
  --text: #f1f7f5;
  --muted: #91a7a0;
  --mint: #4ce3ad;
  --mint-soft: rgba(76, 227, 173, 0.12);
  --amber: #ffb657;
  --amber-soft: rgba(255, 182, 87, 0.12);
  --danger: #ff776d;
  --radius: 20px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(circle at 76% 4%, rgba(42, 116, 89, 0.17), transparent 30%), var(--bg); color: var(--text); min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1400px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 72px; }
.topbar { min-height: 92px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #06110d; background: var(--mint); font-weight: 900; font-size: 22px; box-shadow: 0 0 28px rgba(76, 227, 173, 0.2); }
.brand h1, h2, h3, p { margin: 0; }
.brand h1 { font-size: 17px; letter-spacing: -0.02em; }
.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; font-size: 10px; font-weight: 800; margin-bottom: 5px; }
.eyebrow.accent { color: var(--mint); }
.local-badge { display: flex; align-items: center; gap: 9px; color: #b8cbc5; background: rgba(255,255,255,0.035); border: 1px solid var(--line); padding: 9px 13px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.local-badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(76, 227, 173, 0.1); }
.session-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.console-nav { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: rgba(2,8,7,.3); }
.nav-button { border: 0; border-radius: 9px; padding: 9px 14px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 850; }
.nav-button.active { color: var(--text); background: var(--surface-2); }
.logout-button { color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 9px 13px; font-size: 11px; font-weight: 800; }
.logout-button:hover { color: var(--text); border-color: rgba(218,238,232,.25); }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; background: radial-gradient(circle at 50% 24%, rgba(76,227,173,.11), transparent 32%); }
.auth-card { width: min(440px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(150deg, rgba(18,33,30,.98), rgba(8,18,16,.98)); box-shadow: 0 35px 90px rgba(0,0,0,.32); }
.auth-brand { margin-bottom: 28px; }
.auth-card h1 { margin: 0; font-size: 34px; letter-spacing: -.05em; }
.auth-copy { color: var(--muted); margin-top: 12px; font-size: 13px; line-height: 1.6; }
.auth-form { margin-top: 28px; display: grid; gap: 16px; }
.auth-form label > span { margin-bottom: 8px; }
.auth-submit { width: 100%; margin-top: 5px; padding: 14px 18px; }
.auth-error { color: #ffd0cc; background: rgba(255,119,109,.1); border: 1px solid rgba(255,119,109,.27); border-radius: 11px; padding: 11px 12px; font-size: 11px; line-height: 1.5; }
.auth-footnote { color: #718a83; border-top: 1px solid var(--line); margin-top: 25px; padding-top: 18px; font-size: 10px; line-height: 1.5; }
.hero { display: grid; grid-template-columns: 1fr minmax(460px, 0.8fr); align-items: end; gap: 64px; padding: 70px 0 42px; }
.hero h2 { font-size: clamp(42px, 5vw, 70px); letter-spacing: -0.06em; line-height: 0.98; }
.hero-copy { color: var(--muted); max-width: 620px; line-height: 1.65; font-size: 15px; margin-top: 20px; }
.channel-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.channel-card { min-height: 142px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018)); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; justify-content: flex-end; box-shadow: 0 22px 45px rgba(0,0,0,.15); }
.channel-card strong { font-size: 27px; letter-spacing: -0.04em; margin: 18px 0 3px; }
.channel-card > span { color: var(--muted); font-size: 12px; }
.card-label { color: #c4d6d1; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; display: flex; gap: 8px; align-items: center; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.beta-card .status-dot { background: var(--amber); }
.notice { margin-bottom: 20px; border: 1px solid var(--line); padding: 15px 18px; border-radius: 14px; font-size: 13px; line-height: 1.5; word-break: break-word; }
.shell-notice { margin-top: 20px; margin-bottom: 0; }
.notice.success { color: #baf8df; background: var(--mint-soft); border-color: rgba(76,227,173,.3); }
.notice.error { color: #ffd0cc; background: rgba(255,119,109,.1); border-color: rgba(255,119,109,.3); }
.workspace { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr); gap: 20px; align-items: start; }
.panel { background: linear-gradient(150deg, rgba(18,33,30,.96), rgba(11,23,20,.98)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 55px rgba(0,0,0,.16); }
.release-panel { padding: 30px; }
.panel-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-heading h3, .section-heading h3 { font-size: 22px; letter-spacing: -.035em; }
.panel-heading.small h3 { font-size: 18px; }
.segmented { padding: 4px; border-radius: 12px; background: rgba(2,8,7,.42); border: 1px solid var(--line); display: flex; }
.segment { border: 0; background: transparent; color: var(--muted); border-radius: 8px; padding: 8px 16px; font-size: 12px; font-weight: 800; }
.segment.active { background: var(--surface-2); color: var(--text); box-shadow: 0 4px 12px rgba(0,0,0,.25); }
form { margin-top: 26px; }
.drop-zone { min-height: 178px; border: 1px dashed rgba(145,167,160,.35); border-radius: 17px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; padding: 24px; background: rgba(2,8,7,.18); transition: .2s ease; cursor: pointer; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--mint); background: var(--mint-soft); transform: translateY(-1px); }
.drop-zone.working { opacity: .7; pointer-events: none; }
.drop-zone input { position: absolute; opacity: 0; pointer-events: none; }
.upload-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--mint); background: var(--mint-soft); border: 1px solid rgba(76,227,173,.22); font-weight: 900; margin-bottom: 12px; }
.drop-title { font-weight: 800; font-size: 14px; }
.drop-copy { color: var(--muted); font-size: 12px; margin-top: 6px; }
.file-result { margin-top: 13px; color: var(--mint); font-size: 12px; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
form > label, .form-grid { margin-top: 18px; }
label > span { display: block; color: #c4d3ce; font-size: 11px; font-weight: 800; margin-bottom: 8px; }
label small { color: var(--muted); font-weight: 500; }
input, textarea, select { width: 100%; color: var(--text); background: rgba(2,8,7,.38); border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; outline: 0; transition: .18s ease; }
input:focus, textarea:focus, select:focus { border-color: rgba(76,227,173,.65); box-shadow: 0 0 0 3px rgba(76,227,173,.08); }
input[readonly] { color: #c7d8d3; background: rgba(255,255,255,.025); cursor: default; }
textarea { resize: vertical; min-height: 105px; }
.storage-fieldset { margin: 18px 0 0; padding: 0; border: 0; }
.storage-fieldset legend { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: 9px; font-weight: 900; margin-bottom: 8px; }
.storage-fieldset .form-grid { margin-top: 0; }
.destination-preview { margin-top: 11px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: rgba(2,8,7,.22); display: grid; gap: 6px; }
.destination-preview span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; font-weight: 900; }
.destination-preview code { color: #afc5bf; font-size: 10px; overflow-wrap: anywhere; }
.check-field { margin-top: 23px; min-height: 45px; border: 1px solid var(--line); border-radius: 11px; display: flex; align-items: center; padding: 8px 12px; background: rgba(2,8,7,.24); }
.check-field input { width: 17px; height: 17px; accent-color: var(--mint); margin-right: 10px; }
.check-field span { margin: 0; }
.check-field strong, .check-field small { display: block; font-size: 11px; }
.check-field small { margin-top: 2px; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 22px; border-top: 1px solid var(--line); margin-top: 26px; padding-top: 22px; }
.actions p { color: var(--muted); font-size: 10px; line-height: 1.4; max-width: 280px; }
.lock-icon { color: var(--mint); margin-right: 5px; }
.primary-button, .secondary-button { border: 0; border-radius: 11px; font-weight: 900; font-size: 12px; padding: 12px 17px; transition: .18s ease; }
.primary-button { color: #03100b; background: var(--mint); box-shadow: 0 8px 22px rgba(76,227,173,.17); }
.primary-button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.05); }
button:disabled { opacity: .45; cursor: not-allowed; }
.side-column { display: grid; gap: 20px; }
.preview-panel, .publish-panel, .promotion-panel, .checklist-panel { padding: 23px; }
.channel-pill, .history-channel { padding: 6px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .1em; font-size: 9px; font-weight: 900; color: var(--mint); background: var(--mint-soft); border: 1px solid rgba(76,227,173,.17); }
.channel-pill.beta, .history-channel.beta { color: var(--amber); background: var(--amber-soft); border-color: rgba(255,182,87,.18); }
.preview-list { margin: 22px 0 0; }
.preview-list > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding: 13px 0; }
.preview-list dt { color: var(--muted); font-size: 11px; }
.preview-list dd { margin: 0; font-size: 11px; font-weight: 800; text-align: right; max-width: 64%; }
.preview-list .hash { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; color: #a7bdb7; font-size: 9px; line-height: 1.45; }
.publish-status-line { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.publish-status-line .eyebrow { margin: 0; }
.publish-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.publish-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(145,167,160,.08); }
.publish-status.pending { color: var(--amber); }
.publish-status.live { color: var(--mint); }
.publish-status.disabled { color: var(--muted); }
.publish-panel h3 { margin-top: 14px; font-size: 19px; letter-spacing: -.035em; }
.publish-panel > p:not(.eyebrow) { color: var(--muted); font-size: 11px; line-height: 1.55; margin-top: 8px; }
.publish-panel .publish-meta { display: flex; flex-direction: column; gap: 4px; color: #718a83; font-size: 9px; }
.publish-meta a { color: var(--mint); text-decoration: none; }
.publish-button { width: 100%; margin-top: 17px; }
.promotion-panel { background: linear-gradient(150deg, rgba(60,42,18,.72), rgba(21,24,19,.96)); border-color: rgba(255,182,87,.22); }
.promotion-panel h3 { font-size: 20px; }
.promotion-panel > p:not(.eyebrow) { color: #c7b99f; line-height: 1.55; font-size: 12px; margin: 9px 0 17px; }
.secondary-button { width: 100%; color: #171007; background: var(--amber); }
.checklist-panel ol { padding: 0; margin: 17px 0 0; list-style: none; display: grid; gap: 12px; }
.checklist-panel li { display: flex; align-items: center; color: #b6c7c2; font-size: 11px; }
.checklist-panel li span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.05); color: var(--mint); margin-right: 10px; font-weight: 900; }
.history-section { margin-top: 38px; }
.section-heading { margin-bottom: 15px; }
.section-heading > span { color: var(--muted); font-size: 11px; }
.release-history { border-top: 1px solid var(--line); }
.release-row { width: 100%; min-height: 67px; display: grid; grid-template-columns: 1fr auto 110px; align-items: center; gap: 20px; border: 0; border-bottom: 1px solid var(--line); padding: 0 10px; color: var(--text); text-align: left; background: transparent; transition: .16s ease; }
.release-row:hover, .release-row:focus-visible { background: rgba(76,227,173,.045); outline: none; }
.release-row > div { display: flex; flex-direction: column; gap: 5px; }
.release-row strong { font-size: 13px; }
.release-row div span, .history-action { color: var(--muted); font-size: 10px; }
.history-action { text-align: right; transition: color .16s ease; }
.release-row:hover .history-action { color: var(--mint); }
.release-dialog { width: min(560px, calc(100% - 32px)); color: var(--text); background: linear-gradient(150deg, #12211e, #0a1513); border: 1px solid rgba(218,238,232,.18); border-radius: 20px; padding: 26px; box-shadow: 0 30px 100px rgba(0,0,0,.55); }
.release-dialog::backdrop { background: rgba(2,8,7,.78); backdrop-filter: blur(5px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dialog-heading h3 { font-size: 24px; letter-spacing: -.04em; }
.icon-button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.035); font-size: 22px; line-height: 1; }
.icon-button:hover { color: var(--text); border-color: rgba(218,238,232,.28); }
.detail-list { margin: 23px 0 0; }
.detail-list > div { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding: 11px 0; border-top: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-size: 11px; }
.detail-list dd { margin: 0; font-size: 11px; font-weight: 800; text-align: right; overflow-wrap: anywhere; }
.detail-list .detail-hash { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; color: #a7bdb7; }
.dialog-notes { margin: 17px 0 22px; padding: 15px; border-radius: 12px; background: rgba(2,8,7,.3); border: 1px solid var(--line); }
.dialog-notes > span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .11em; font-weight: 900; }
.dialog-notes p { margin-top: 8px; color: #c6d7d2; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.dialog-download { display: block; text-align: center; text-decoration: none; }
.management-view { padding-top: 58px; }
.management-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.management-hero h2 { font-size: clamp(40px, 5vw, 64px); letter-spacing: -.055em; }
.management-hero p:not(.eyebrow) { color: var(--muted); margin-top: 13px; max-width: 680px; line-height: 1.6; }
.management-panel { padding: 28px; }
.management-list { margin-top: 20px; border-top: 1px solid var(--line); }
.management-row { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 1fr) auto; align-items: center; gap: 22px; min-height: 76px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.management-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.provider-logo, .admin-avatar { width: 40px; height: 40px; border-radius: 11px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--mint); font-weight: 900; flex: none; }
.management-identity div, .management-meta { display: grid; gap: 4px; min-width: 0; }
.management-identity strong { font-size: 13px; overflow-wrap: anywhere; }
.management-identity span, .management-meta span { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.management-meta strong { font-size: 11px; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.row-button { border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; color: #bed0cb; background: rgba(255,255,255,.025); font-size: 10px; font-weight: 850; }
.row-button.danger { color: #ffaaa3; }
.status-pill { display: inline-flex; width: fit-content; padding: 4px 7px; border: 1px solid rgba(76,227,173,.2); border-radius: 999px; background: var(--mint-soft); color: var(--mint) !important; font-size: 8px !important; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.status-pill.disabled { color: #ffaaa3 !important; background: rgba(255,119,109,.1); border-color: rgba(255,119,109,.2); }
.management-dialog { width: min(700px, calc(100% - 32px)); }
.dialog-form { margin-top: 20px; }
.dialog-form > label { display: block; margin-top: 16px; }
.dialog-form .form-grid { margin-top: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }

@media (max-width: 980px) {
  .topbar { grid-template-columns: 1fr auto; }
  .console-nav { grid-row: 2; grid-column: 1 / -1; justify-self: center; margin-bottom: 15px; }
  .hero { grid-template-columns: 1fr; gap: 34px; }
  .workspace { grid-template-columns: 1fr; }
  .side-column { grid-template-columns: 1fr 1fr; }
  .preview-panel { grid-row: span 2; }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 26px, 1400px); }
  .topbar { min-height: 76px; gap: 12px; }
  .local-badge { font-size: 0; padding: 10px; }
  .logout-button { padding: 9px 11px; }
  .auth-card { padding: 28px 22px; }
  .hero { padding-top: 45px; }
  .hero h2 { font-size: 44px; }
  .channel-overview, .form-grid, .side-column { grid-template-columns: 1fr; }
  .release-panel { padding: 20px; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .panel-heading.small { flex-direction: row; }
  .segmented { width: 100%; }
  .segment { flex: 1; }
  .actions { align-items: stretch; flex-direction: column; }
  .primary-button { width: 100%; }
  .release-row { grid-template-columns: 1fr auto; padding: 12px 5px; }
  .history-action { display: none; }
  .detail-list > div { grid-template-columns: 105px 1fr; }
  .management-hero { align-items: stretch; flex-direction: column; }
  .management-row { grid-template-columns: 1fr; gap: 12px; padding: 16px 2px; }
  .row-actions { justify-content: flex-start; }
  .management-panel { padding: 20px; }
  .console-nav { width: 100%; }
  .nav-button { flex: 1; }
}
