:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #1e293b;
  background: #f3f6fa;
  font-synthesis: none;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1240px; margin: 0 auto; padding: 2rem; }
.app-footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #dce3ec; color: #64748b; font-size: .8rem; text-align: center; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 1.55rem; line-height: 1.3; letter-spacing: -.025em; }
h2 { margin-bottom: .65rem; font-size: 1.2rem; }
h3 { font-size: 1rem; }
a { color: #155e75; text-underline-offset: .15em; }
button, input { font: inherit; }
button, summary, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, summary:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid #0891b2;
  outline-offset: 3px;
}
button {
  display: inline-flex; align-items: center; justify-content: center;
  background: #155e75; color: white; padding: .65rem 1rem; border: 1px solid #155e75;
  border-radius: .5rem; cursor: pointer; font-weight: 600; min-height: 42px;
  margin: .3rem .4rem .3rem 0;
}
button:hover:not(:disabled) { background: #164e63; }
button:disabled { opacity: .55; cursor: not-allowed; }
.button-secondary { background: white; color: #334155; border-color: #cbd5e1; }
.button-secondary:hover:not(:disabled) { background: #f1f5f9; }
.app-header, .brand, .header-actions, .workspace-heading { display: flex; align-items: center; gap: 1rem; }
.app-header, .workspace-heading { justify-content: space-between; }
.app-header { padding-bottom: 1.3rem; border-bottom: 1px solid #dce3ec; flex-wrap: wrap; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0; border-radius: .8rem; background: #155e75; color: white; font-size: .85rem; font-weight: 800; letter-spacing: .03em; }
.eyebrow { color: #64748b; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .4rem; }
.header-actions { flex-wrap: wrap; gap: .75rem; }
.header-actions button { margin: 0; }
.current-user { color: #475569; font-size: .85rem; overflow-wrap: anywhere; }
.badge { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; font-size: .75rem; font-weight: 700; padding: .35rem .7rem; border-radius: 2rem; white-space: nowrap; }
.environment-note { display: flex; flex-wrap: wrap; gap: .25rem .5rem; font-size: .82rem; color: #64748b; margin: 1rem 0; }
.environment-note span { margin-left: auto; }
.environment-note a { overflow-wrap: anywhere; }
.workspace-heading { margin: 1.8rem 0 1.2rem; flex-wrap: wrap; }
.workspace-heading h2 { margin-bottom: .2rem; font-size: 1.35rem; }
.workspace-heading p { margin-bottom: 0; }
.workspace-heading button { margin: 0; }
.dashboard { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.45fr); gap: 1.4rem; align-items: start; }
#jobs { display: contents; }
.panel { background: white; border: 1px solid #dce3ec; border-radius: .9rem; padding: 1.5rem; box-shadow: 0 2px 6px #0f172a05; min-width: 0; }
.login-panel { max-width: 440px; margin: 3rem auto; }
.login-panel button, #upload-form button { width: 100%; margin-right: 0; }
label { display: block; margin: .9rem 0; font-size: .9rem; font-weight: 500; }
input:not([type=checkbox]) { display: block; padding: .7rem; margin-top: .4rem; width: 100%; min-width: 0; border: 1px solid #cbd5e1; border-radius: .45rem; background: white; color: #1e293b; }
input:disabled { background: #f1f5f9; }
input[type=checkbox] { accent-color: #155e75; }
.file-picker { position: relative; background: #f8fafc; border: 1px dashed #94a3b8; border-radius: .7rem; padding: 1rem; margin: .9rem 0; font-size: .9rem; }
.selected-filename { margin: .65rem 0; overflow-wrap: anywhere; font-size: .85rem; }
input[type=file] { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.file-select-button { display: inline-flex; align-items: center; min-height: 42px; margin: 0; padding: .45rem .7rem; border: 1px solid #cbd5e1; border-radius: .35rem; cursor: pointer; }
input[type=file]:focus-visible + .file-select-button { outline: 3px solid #0891b2; outline-offset: 3px; }
.upload-guidance { border-top: 1px solid #e2e8f0; margin-top: 1.3rem; padding-top: 1.3rem; }
.upload-guidance h3 { margin-bottom: .5rem; font-size: .9rem; }
.upload-guidance ul { padding-left: 1.2rem; color: #475569; font-size: .85rem; }
.upload-guidance li { margin-bottom: .5rem; }
.upload-panel > p:last-child { margin-bottom: 0; }
.latest-panel { grid-column: 2; }
article { min-width: 0; }
article h3 { margin: .8rem 0 .6rem; overflow-wrap: anywhere; font-size: 1.05rem; }
.status-badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: .3rem .65rem; border-radius: .4rem; margin: .3rem 0 0; }
.status-active { color: #075985; background: #e0f2fe; }
.status-success { color: #166534; background: #dcfce7; }
.status-error { color: #9f1239; background: #ffe4e6; }
.status-waiting { color: #92400e; background: #fef3c7; }
.status-neutral { color: #475569; background: #f1f5f9; }
.job-metadata { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; color: #64748b; font-size: .8rem; margin-bottom: 1rem; }
.revision { font-weight: 700; color: #334155; }
.muted { color: #64748b; font-size: .85rem; }
.warning, .error { color: #9a3412; background: #fff7ed; padding: .85rem 1rem; border: 1px solid #fed7aa; border-left: 3px solid #ea580c; border-radius: .4rem; font-size: .85rem; overflow-wrap: anywhere; }
#message:not(:empty) { padding: .75rem 1rem; border-radius: .5rem; background: #e0f2fe; color: #075985; font-size: .9rem; }
#message.error:not(:empty) { background: #fff7ed; color: #9a3412; }
#message:empty { margin: 0; }
.deployment-progress { padding: 1rem; border: 1px solid #e2e8f0; border-radius: .65rem; background: #f8fafc; margin: 1rem 0; }
.progress-heading { font-weight: 700; font-size: .9rem; margin-bottom: .65rem; }
progress { display: block; width: 100%; height: .7rem; accent-color: #155e75; border: 0; border-radius: 1rem; overflow: hidden; background: #e2e8f0; }
progress::-webkit-progress-bar { background: #e2e8f0; }
progress::-webkit-progress-value { background: #155e75; border-radius: 1rem; }
progress::-moz-progress-bar { background: #155e75; border-radius: 1rem; }
.deployment-progress > .muted { font-size: .75rem; margin: .6rem 0 1rem; }
.deployment-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1.6rem; padding-left: 1.2rem; color: #64748b; font-size: .78rem; margin-bottom: 0; }
.step-complete { color: #166534; }
.step-current { color: #155e75; font-weight: 700; }
.step-state { display: block; font-size: .7rem; }
summary { cursor: pointer; font-weight: 600; }
.technical-details { margin: 1rem 0; padding: .7rem 0; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; font-size: .8rem; color: #475569; }
.technical-details summary { padding: .15rem 0; }
.technical-details[open] summary { margin-bottom: .8rem; }
.hash { overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: .75rem; }
.hash:last-child { margin-bottom: 0; }
.approval-form { padding-top: .25rem; }
.deployment-checks { font-size: .85rem; color: #475569; }
.job-history { grid-column: 1 / -1; }
.job-history > summary { padding: .2rem 0; font-size: .95rem; }
.job-history article { border-top: 1px solid #e2e8f0; margin-top: 1.2rem; padding-top: 1.2rem; }
.empty-title { margin-top: 2.5rem; color: #334155; font-weight: 600; }
@media (max-width: 780px) {
  main { padding: 1.2rem; }
  h1 { font-size: 1.25rem; }
  .dashboard { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .latest-panel { grid-column: 1; }
  .panel { padding: 1.2rem; }
  .environment-note span { margin-left: 0; width: 100%; }
}
@media (max-width: 420px) {
  main { padding: .9rem; }
  .brand { gap: .7rem; }
  .brand-mark { width: 40px; height: 40px; font-size: .75rem; }
  .panel { padding: 1rem; }
  .deployment-steps { grid-template-columns: minmax(0, 1fr); }
}
[hidden] { display: none !important; }
