:root{
  font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  background:#0c1015;
  color:#f7fafc;
  --shell-max:1400px;
  --shell-pad:clamp(18px,2vw,28px);
  --panel-bg:#141b22;
  --panel-border:#28343c;
}
*{box-sizing:border-box}
html,body{min-height:100%}
body{margin:0;background:#0c1015;color:#f7fafc}
button,input{font:inherit}
button{border:1px solid #438a66;background:#1c8758;color:#fff;padding:11px 17px;border-radius:9px;cursor:pointer;font-weight:700}
button:hover{filter:brightness(1.15)}
button:disabled{opacity:.4;cursor:not-allowed}
.ghost{background:#18222a;border-color:#35404a}.block{width:100%}
.top{border-bottom:1px solid #273138;display:flex;justify-content:space-between;align-items:center;gap:18px;padding:17px var(--shell-pad)}
.identity{display:flex;align-items:center;gap:14px;min-width:0}
.identity > span:last-child{display:flex;flex-direction:column;justify-content:center;min-width:0}
.identity small{display:block;letter-spacing:.18em;font-size:10px;color:#aab7c2;white-space:nowrap}
.identity strong{font-size:16px;letter-spacing:.1em;line-height:1.1}
.logo{flex:0 0 auto;height:44px;width:44px;border-radius:12px;background:#134a37;display:grid;place-items:center;font-size:23px;font-weight:850;position:relative}
.dot{position:absolute;right:-4px;bottom:-7px;color:#fbcf51;font-size:16px;line-height:1}
.status{flex:0 0 auto;color:#b1f1d2;font-weight:750;border:1px solid #285c4b;border-radius:100px;padding:9px 14px;font-size:11px;letter-spacing:.08em;white-space:nowrap}
main{max-width:var(--shell-max);margin:0 auto;padding:32px var(--shell-pad) 56px}
.hero{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(260px,.55fr);gap:22px;align-items:center;margin-bottom:26px}
.eyebrow{font-size:11px;letter-spacing:.16em;color:#7cddad;font-weight:800}
h1{font-size:clamp(32px,4.4vw,58px);margin:10px 0 8px;line-height:1.05}
h1 em{font-style:normal;color:#7cdab5}
p{color:#a8b3bf;margin:6px 0 15px;line-height:1.5}
.heroTag{border-left:1px solid #34424c;padding-left:28px;display:flex;gap:14px;align-items:flex-start;justify-self:end;max-width:320px}
.heroTag span{font-size:40px;line-height:1;color:#80cfaa}.heroTag small{color:#abb9c5;font-size:14px;line-height:1.35}
.message{background:#152c29;border:1px solid #265c4b;border-radius:10px;padding:12px 16px;font-size:13px;margin-bottom:18px;color:#e4faf0}
.message.error{background:#381d24;border-color:#824253;color:#fff}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}.stats article{border:1px solid #26313a;border-radius:12px;padding:18px 19px;background:var(--panel-bg);min-height:98px;display:flex;flex-direction:column;justify-content:space-between}.stats span{font-size:12px;color:#9caebc;display:block}.stats b{font-size:24px;display:block;margin-top:7px}
.layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(320px,1fr);gap:20px;align-items:start}.primary,aside{display:flex;flex-direction:column;gap:20px}
.panel{background:var(--panel-bg);border:1px solid var(--panel-border);border-radius:13px;padding:22px;min-width:0;overflow:hidden}.panel h2{margin:0;font-size:18px;line-height:1.2}.ph{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.ph p,.hint{font-size:12px;color:#a9b6c1}.tag{border-radius:6px;background:#233c34;color:#a6edc9;padding:8px 10px;white-space:nowrap;font-size:10px;font-weight:700;height:fit-content}.upload{border:1px dashed #446058;border-radius:10px;padding:16px;margin-top:12px}.upload label{font-size:12px;display:block;margin-bottom:12px}.inputrow,.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.inputrow input{flex:1;min-width:170px;font-size:12px;color:#d6e7ec}.list{display:flex;flex-direction:column;gap:9px;margin-top:14px}.item{border:1px solid #2b3942;border-radius:8px;padding:13px;background:#101820}.itemHead{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;align-items:center}.item b{font-size:13px}.item small{font-size:11px;color:#aebdc5}.item .actions{margin-top:10px}.item button{font-size:11px;padding:7px 10px}.pill{font-size:10px;background:#25443a;color:#beecd5;padding:5px 9px;border-radius:99px}.steps>div{display:flex;gap:12px;align-items:flex-start;margin:20px 0}.steps i{border-radius:50%;font-style:normal;background:#263b33;color:#a8e6c5;font-weight:800;min-width:27px;height:27px;display:grid;place-items:center}.steps b{display:block;font-size:12px}.steps small{display:block;font-size:11px;color:#9dabba;margin-top:4px}.panel .block{margin-top:8px}footer{text-align:center;color:#748592;font-size:11px;margin-top:35px}
@media (min-width:1401px){.top,main{max-width:var(--shell-max);margin-left:auto;margin-right:auto}}
@media(max-width:980px){.hero{grid-template-columns:1fr}.heroTag{justify-self:start;border-left:none;border-top:1px solid #34424c;padding-left:0;padding-top:16px;max-width:none}.layout{grid-template-columns:1fr}.status{font-size:10px}.top{padding:15px var(--shell-pad)}}
@media(max-width:720px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.top{align-items:flex-start;flex-wrap:wrap}.status{order:3}.identity strong{font-size:15px}.identity small{font-size:9px}}
@media(max-width:430px){main{padding:20px 14px 44px}.top{padding:14px 14px}.logo{height:40px;width:40px;font-size:21px}.stats{grid-template-columns:1fr}.inputrow button{width:100%}.status{max-width:100%;text-align:center;width:auto}}

/* V1.2: original SCUZO artwork in a contained header mark. */
.logo.logo-brand{height:50px;width:94px;min-width:94px;border-radius:10px;background:#f9f4f0;padding:2px;display:flex;align-items:center;justify-content:center;overflow:hidden;font-size:initial}
.logo-brand img{height:100%;width:100%;object-fit:contain;display:block}
@media (max-width:430px){.logo.logo-brand{width:76px;min-width:76px;height:44px}.identity{gap:10px}.identity strong{font-size:14px}.identity small{letter-spacing:.1em;font-size:8px}}

/* SCUZO Central Release Manager v1.3: compact, stable desktop dashboard.
   Presentation-only. Existing JavaScript, routes and API behaviour unchanged. */
html,body{max-width:100%;overflow-x:hidden}
main,.hero,.stats,.layout,.primary,aside,.panel,.item,.itemHead{min-width:0}
.stats article{min-width:0;overflow:hidden}
.stats article b{max-width:100%;min-width:0}
#current{
  font-size:clamp(11px,0.93vw,14px);
  line-height:1.35;
  letter-spacing:0;
  overflow-wrap:anywhere;
  word-break:break-word;
  white-space:normal;
  font-weight:750;
}
.itemHead b,.item>small{
  min-width:0;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.itemHead b{flex:1 1 auto}
.inputrow{min-width:0}
.inputrow input[type=file]{min-width:0;max-width:100%}

/* On desktop the dashboard shell stays in place. Each column scrolls only
   when its contents outgrow the available window height. Mobile remains
   naturally scrollable and does not use the fixed-shell treatment. */
@media (min-width:981px) and (min-height:700px){
  html{height:100%;overflow:hidden}
  body{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
  .top{flex:0 0 auto;width:100%;padding-top:12px;padding-bottom:12px}
  main{
    flex:1 1 auto;
    width:100%;
    min-height:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    padding-top:16px;
    padding-bottom:10px;
  }
  .hero{flex:0 0 auto;margin-bottom:12px;gap:14px}
  h1{font-size:clamp(29px,3vw,43px);margin:6px 0 4px;line-height:1.08}
  .hero p{font-size:12px;margin:4px 0 6px}
  .heroTag{padding-left:18px;gap:10px}
  .heroTag span{font-size:30px}
  .heroTag small{font-size:12px}
  .message{flex:0 0 auto;padding:9px 12px;margin-bottom:10px}
  .stats{flex:0 0 auto;gap:10px;margin-bottom:12px}
  .stats article{min-height:73px;padding:11px 14px}
  .stats b{font-size:21px;margin-top:5px}
  .stats #current{font-size:clamp(11px,0.93vw,14px)}
  .layout{
    flex:1 1 auto;
    min-height:0;
    align-items:stretch;
    gap:12px;
    overflow:hidden;
  }
  .primary,aside{
    min-height:0;
    min-width:0;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
    padding-right:3px;
    gap:12px;
  }
  .panel{flex:0 0 auto;padding:17px}
  .steps>div{margin:14px 0}
  .list{margin-top:10px}
  .item{padding:10px}
  footer{flex:0 0 auto;margin-top:8px;font-size:10px}
}

/* SCUZO_RELEASE_MANAGER_LAYOUT_FIX_20261025_V1 — visual-only; no app logic or auth changes */
/* One document scrollbar. No clipped, frozen 120px centre panes. */
:root { --shell-max: 1560px; --shell-pad: clamp(16px, 2vw, 28px); }
html, body {
  min-height: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow-x: clip !important;
}
html { overflow-y: auto !important; }
body { display: block !important; overflow-y: visible !important; }
.top {
  position: static !important;
  inset: auto !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
  transform: none !important;
  z-index: auto !important;
}
main {
  position: static !important;
  display: block !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding-top: 26px;
  padding-bottom: 50px;
}
main > .hero,
main > .message,
main > .stats,
main > .layout,
main > footer {
  position: static !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  inset: auto !important;
  transform: none !important;
}
.hero { margin-bottom: 18px; }
h1 { font-size: clamp(30px,3.1vw,46px); line-height: 1.1; }
.stats { margin-bottom: 18px !important; gap: 12px; }
.stats article { min-height: 76px !important; padding: 13px 16px; }
.stats b { font-size: 23px; }
.layout {
  display: grid !important;
  grid-template-columns: minmax(0,1.65fr) minmax(330px, .95fr) !important;
  gap: 20px !important;
  align-items: start !important;
  min-height: 0 !important;
}
.layout > .primary,
.layout > aside {
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
  min-width: 0 !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
  position: static !important;
  inset: auto !important;
  transform: none !important;
}
.layout .panel,
.layout .list,
.layout .item,
.layout #releaseList,
.layout #v2ArtifactList,
.layout #backupsList,
.layout #auditList,
.layout #devicesList {
  min-width: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  position: static !important;
  inset: auto !important;
  transform: none !important;
}
.layout .panel { padding: clamp(16px, 1.8vw, 22px); }
.layout .panel button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.layout .panel .ph { flex-wrap: wrap; }
.layout .panel .item { overflow-wrap: anywhere; }
.layout .panel input,
.layout .panel select { max-width: 100%; }
/* Compact independent seasonal actions, placed above release vault, never sticky. */
#sczSeasonalPanel {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto !important;
  column-gap: 22px !important;
  row-gap: 8px !important;
  align-items: center !important;
  padding: 14px 18px !important;
  margin: 0 0 22px !important;
  border: 1px solid #3a7167 !important;
  height: auto !important;
  max-height: none !important;
  min-width: 0 !important;
  overflow: visible !important;
  position: static !important;
  inset: auto !important;
  transform: none !important;
}
#sczSeasonalPanel > .ph { grid-column: 1; grid-row: 1; min-width: 0; align-items: center; }
#sczSeasonalPanel h2 { font-size: clamp(15px,1.4vw,18px); line-height:1.2; }
#sczSeasonalPanel .ph p { margin: 4px 0 0; line-height:1.35; }
#sczSeasonalPanel .tag { flex-shrink: 0; }
#sczSeasonalStatus {
  grid-column: 1; grid-row: 2;
  margin: 0 !important;
  color: #d5e4e9 !important;
  overflow-wrap: anywhere;
}
#sczSeasonalPanel > .actions {
  grid-column: 2; grid-row: 1 / 3;
  display: flex !important;
  justify-content: flex-end;
  gap: 8px !important;
  flex-wrap: wrap !important;
  min-width: 0;
}
#sczSeasonalPanel > .actions button { padding: 9px 12px; font-size: 12px; white-space: normal; }
#sczSeasonalPanel > p.hint:last-child {
  grid-column: 1 / -1; grid-row: 3;
  margin: 0 !important;
  font-size: 11px;
  color: #c0ced5 !important;
}
/* Contrast and visible keyboard navigation: do not restyle safety-disabled actions. */
:where(.layout,#sczSeasonalPanel) button:focus-visible,
:where(.layout,#sczSeasonalPanel) select:focus-visible,
:where(.layout,#sczSeasonalPanel) input:focus-visible {
  outline: 3px solid #9ef0c2;
  outline-offset: 2px;
}
@media (max-width: 1150px) {
  .layout { grid-template-columns: minmax(0,1fr) !important; }
  #sczSeasonalPanel { grid-template-columns: minmax(0,1fr) !important; }
  #sczSeasonalPanel > .ph,
  #sczSeasonalStatus,
  #sczSeasonalPanel > .actions,
  #sczSeasonalPanel > p.hint:last-child { grid-column: 1 !important; grid-row: auto !important; }
  #sczSeasonalPanel > .actions { justify-content: flex-start; }
}
@media (max-width: 720px) {
  main { padding-top: 18px; }
  .hero { gap: 12px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stats article { min-height: 72px !important; padding: 12px 14px; }
  .layout { gap: 16px !important; }
  .layout .primary, .layout aside { gap: 16px !important; }
  #sczSeasonalPanel { padding: 14px !important; }
  #sczSeasonalPanel .ph { flex-wrap: wrap; }
  #sczSeasonalPanel > .actions button { flex: 1 1 150px; }
}
@media (max-width: 430px) {
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .stats article { min-width:0; }
  h1 { font-size: 30px; }
  #sczSeasonalPanel .tag { white-space: normal; }
}

/* SCUZO_RM_BALANCED_GRID_20261025_V2 — dashboard CSS only; no action logic changes. */
/* Arrange independent existing panels into a deliberate, balanced responsive grid. */
.layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1.58fr) minmax(0, 1fr) !important;
  grid-template-areas:
    "release safety"
    "upgrade upgrade"
    "publish publish"
    "staging canary"
    "backup devices"
    "audit audit" !important;
  gap: 18px !important;
  align-items: start !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
/* display:contents preserves original DOM ancestors, IDs, event handlers and permissions. */
.layout > .primary,
.layout > aside {
  display: contents !important;
}
.layout > .primary > section:nth-of-type(1) { grid-area: release; }
.layout > .primary > section:nth-of-type(2) { grid-area: upgrade; }
.layout > .primary > section:nth-of-type(3) { grid-area: publish; }
.layout > .primary > section:nth-of-type(4) { grid-area: staging; }
.layout > .primary > section:nth-of-type(5) { grid-area: canary; }
.layout > .primary > section:nth-of-type(6) { grid-area: backup; }
.layout > aside > section:nth-of-type(1) { grid-area: safety; }
.layout > aside > section:nth-of-type(2) { grid-area: devices; }
.layout > aside > section:nth-of-type(3) { grid-area: audit; }
.layout > .primary > section,
.layout > aside > section {
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  position: static !important;
}
.layout #p9Panel { border-color: #3b574d; }
.layout #p9Panel .actions,
.layout #p8Panel .actions,
.layout #p5Panel .actions { flex-wrap: wrap !important; }
.layout #v2Panel .upload { max-width: 960px; }
/* Log tiles expand across the available bottom section instead of a narrow right rail. */
.layout #auditList {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-items: start !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
.layout #auditList > *,
.layout #backupsList > * { min-width: 0 !important; overflow-wrap: anywhere; }
.layout #backupsList {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "release"
      "safety"
      "upgrade"
      "publish"
      "staging"
      "canary"
      "backup"
      "devices"
      "audit" !important;
    gap: 16px !important;
  }
  .layout #auditList { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 700px) {
  .layout { gap: 14px !important; }
  .layout #auditList,
  .layout #backupsList { grid-template-columns: minmax(0, 1fr) !important; }
  .layout .panel { padding: 15px !important; }
  .layout .ph { flex-wrap: wrap; }
  .layout .inputrow button { flex: 1 1 auto; }
}

/* SCUZO_RM_FORM_POLISH_20261025_V3 — CSS only, V2 grid retained. */
/* Full Upgrade: occupy the card, place fields in a deliberate two-column form. */
.layout #v2Panel #artifactForm {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: 18px !important;
  row-gap: 7px !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  align-items: start !important;
}
.layout #v2Panel #artifactForm > label {
  display: block !important;
  margin: 0 !important;
  min-width: 0 !important;
  color: #e0eaf0 !important;
  font-weight: 650;
  line-height: 1.4;
  font-size: 13px !important;
}
.layout #v2Panel #artifactForm > label[for="v2ReleaseId"] { grid-column: 1; grid-row: 1; }
.layout #v2Panel #artifactForm > #v2ReleaseId { grid-column: 1; grid-row: 2; }
.layout #v2Panel #artifactForm > label[for="v2Kind"] { grid-column: 2; grid-row: 1; }
.layout #v2Panel #artifactForm > #v2Kind { grid-column: 2; grid-row: 2; }
.layout #v2Panel #artifactForm > label[for="v2Notes"] { grid-column: 1 / -1; grid-row: 3; margin-top: 5px !important; }
.layout #v2Panel #artifactForm > #v2Notes { grid-column: 1 / -1; grid-row: 4; }
.layout #v2Panel #artifactForm > label[for="v2File"] { grid-column: 1 / -1; grid-row: 5; margin-top: 5px !important; }
.layout #v2Panel #artifactForm > .inputrow { grid-column: 1 / -1; grid-row: 6; justify-content: space-between; gap: 12px; }
.layout #v2Panel #artifactForm > .hint { grid-column: 1 / -1; grid-row: 7; margin: 2px 0 0; }
.layout #v2Panel #artifactForm > #v2ReleaseId,
.layout #v2Panel #artifactForm > #v2Kind,
.layout #v2Panel #artifactForm > #v2Notes {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 46px !important;
  padding: 11px 13px !important;
  margin: 0 !important;
  font: inherit !important;
  font-size: 14px !important;
  border: 1px solid #718796 !important;
  border-radius: 8px !important;
  background: #16232c !important;
  color: #f8fafc !important;
}
.layout #v2Panel #artifactForm input::placeholder {
  color: #c4d0d9 !important;
  opacity: 1 !important;
}
.layout #v2Panel #artifactForm > .inputrow > input[type="file"] {
  flex: 1 1 320px;
  min-width: 0 !important;
  max-width: 100% !important;
  font-size: 13px !important;
  color: #e4eef2 !important;
}
.layout #v2Panel #artifactForm > .inputrow > button { flex: 0 0 auto; }
/* Staging and production readiness: make the label/select legible and aligned. */
.layout #p9Panel label[for="p9ReleaseSelect"],
.layout #p8Panel label[for="p8ReleaseSelect"] {
  display: block !important;
  margin: 16px 0 8px !important;
  font-size: 13px !important;
  font-weight: 650;
  color: #e0eaf0 !important;
}
.layout #p9Panel #p9ReleaseSelect,
.layout #p8Panel #p8ReleaseSelect {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 44px !important;
  padding: 10px 12px !important;
  border: 1px solid #718796 !important;
  border-radius: 8px !important;
  background: #16232c !important;
  color: #f8fafc !important;
  font-size: 14px !important;
  margin: 0 0 12px !important;
}
.layout #p9Panel #p9ReleaseSelect { max-width: 620px !important; }
.layout #p8Panel #p8ReleaseSelect { max-width: none !important; }
.layout :is(#v2ReleaseId,#v2Kind,#v2Notes,#p9ReleaseSelect,#p8ReleaseSelect):focus-visible {
  outline: 3px solid #82deb7 !important;
  outline-offset: 2px !important;
}
@media(max-width: 740px) {
  .layout #v2Panel #artifactForm { grid-template-columns: minmax(0,1fr) !important; }
  .layout #v2Panel #artifactForm > * { grid-column: 1 !important; grid-row: auto !important; }
  .layout #v2Panel #artifactForm > .inputrow { align-items: stretch; flex-direction: column; }
  .layout #v2Panel #artifactForm > .inputrow > input[type="file"] { flex: 0 0 auto !important; width: 100% !important; height: auto !important; min-height: 34px !important; }
  .layout #v2Panel #artifactForm > .inputrow > button { width: 100%; }
}
