:root {
  --habana-ink: #0c1019;
  --habana-surface: #141a26;
  --habana-line: #ffffff20;
  --habana-text: #f6f1e8;
  --habana-muted: #b5c0d0;
  --habana-gold: #efba69;
}
body {
  background: radial-gradient(ellipse at 78% 5%, #20243b 0, transparent 56%), #0c1019 !important;
  color: var(--habana-text);
}
body::before { background: linear-gradient(90deg, #235ab9 0 41%, #eee9de 41% 62%, #d3434b 62% 91%, var(--habana-gold) 91%); }
.auth-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  padding: clamp(16px, 4vw, 68px);
  place-items: center;
}
.auth-shell.hidden, .release-card .hidden, .signin-links .hidden { display: none !important; }
.auth-stage {
  min-height: min(720px, 87vh);
  width: min(1260px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(360px, 1fr);
  overflow: hidden;
  border: 1px solid var(--habana-line);
  border-radius: 28px;
  box-shadow: 0 36px 110px #03050aa8;
}
.auth-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 430px;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(ellipse at 40% 20%, #253e6d 0, #161e36 52%, #101525 90%);
}
.auth-art::before, .workspace-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #10182b99 0%, #12182d00 43%, #0a101a15 66%, #090d18e8 100%), url('/static/img/malecon-habana.webp') center bottom / cover no-repeat;
}
.art-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .18;
  background: repeating-linear-gradient(135deg, transparent 0 4px, #ffffff20 4px 5px);
  mask-image: linear-gradient(#000, transparent 75%);
}
.art-brand, .art-footer {
  position: absolute;
  z-index: 1;
  inset-inline: clamp(18px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.art-brand { top: 26px; justify-content: flex-start; gap: 11px; font-weight: 750; letter-spacing: -.035em; font-size: 1.15rem; }
.art-brand img { height: 40px; width: 40px; border-radius: 11px; box-shadow: 0 4px 20px #070b16a0; }
.art-footer {
  bottom: 26px;
  border-top: 1px solid #ffffff52;
  padding-top: 16px;
  color: #f6f1e8;
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .14em;
}
.art-footer b { color: var(--habana-gold); }
.flag-scene {
  position: relative;
  width: min(95%, 680px);
  aspect-ratio: 720 / 490;
  flex: none;
  pointer-events: none;
  filter: drop-shadow(0 24px 26px #0008);
}
.flag-pole {
  position: absolute;
  left: 8.4%;
  top: 14%;
  height: 83%;
  width: clamp(3px, .8vw, 8px);
  border-radius: 6px;
  background: linear-gradient(90deg, #57422d, #ffe2a8 47%, #8f704a 100%);
  mask-image: linear-gradient(#000 70%, transparent);
}
.flag-pole::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 150%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(at 37% 26%, #ffebb8, #987344 71%);
  transform: translate(-50%, -50%);
}
.cloth-flag { width: 100%; height: 100%; display: block; visibility: hidden; }
.cloth-fallback { position: absolute; left: 9%; top: 19%; width: 78%; border-radius: 2px; }
.flag-scene.is-rendered .cloth-flag { visibility: visible; }
.flag-scene.is-rendered .cloth-fallback { display: none; }
.auth-signin {
  padding: clamp(27px, 5vw, 70px);
  background: var(--habana-surface);
  background-image: radial-gradient(ellipse at 97% 0%, #24283a, transparent 65%);
  display: grid;
  align-items: center;
}
.signin-content { min-width: 0; }
.signin-section, .workspace-heading > p { color: var(--habana-gold); font-weight: 650; font-size: .88rem; }
.auth-signin h1 { color: var(--habana-text); font-size: clamp(3rem, 5.4vw, 5.4rem) !important; margin: 7px 0 12px; font-weight: 850; }
.auth-signin h1 span { color: var(--habana-gold); }
.signin-description { color: var(--habana-muted); margin-bottom: 30px; line-height: 1.6; }
#loginForm label { color: var(--habana-text); display: block; margin: 0 0 7px; font-size: .9rem; font-weight: 650; }
#loginForm { display: block; }
#loginForm > * + * { margin-top: 0; }
#loginForm input { background: #0c111c !important; border: 1px solid #93a7c342; border-radius: 12px; min-height: 48px; }
#loginForm input + label, #loginForm > div + div { margin-top: 16px; }
#loginForm input:autofill, #loginForm input:-webkit-autofill {
  box-shadow: 0 0 0 60px #151d2b inset !important;
  -webkit-text-fill-color: #f6f1e8 !important;
  caret-color: white;
}
#loginForm button { margin-top: 19px; min-height: 48px; background: linear-gradient(112deg, #2d5bd1, #1541a3) !important; }
#loginErr:not(.hidden) { margin-top: 10px; }
.signin-links { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 24px; font-size: .86rem; }
.signin-links a, .release-card a { color: #c6d6fc; text-decoration: underline; text-underline-offset: 4px; }
.workspace-hero { isolation: isolate; background: #141d32; min-height: 208px; max-height: 256px; }
.workspace-hero::before { background: linear-gradient(90deg, #101623f5 4%, #10162394 55%, #1016231c), url('/static/img/malecon-habana.webp') center 72% / cover no-repeat; }
.workspace-heading { z-index: 1; }
.workspace-heading h2 { font-size: clamp(2rem, 5vw, 4rem); color: var(--habana-text); }
.workspace-stripe { height: 3px; width: 96px; margin-top: 17px; background: linear-gradient(90deg,#4378df 0 46%,#efe5d5 46% 70%,#dc4b52 70%); }
.workspace-hero .flag-scene { width: clamp(155px, 39vw, 355px); }
.release-grid { display: grid; grid-template-columns: 1.13fr 1fr; gap: 20px; }
.release-card { padding: clamp(20px, 4vw, 32px); border-radius: 20px; border: 1px solid var(--habana-line); background: var(--habana-surface); min-width: 0; }
.release-card h2, .release-card h3 { color: var(--habana-text); font-size: 1.23rem; font-weight: 750; margin: 0 0 7px; }
.release-card p { color: var(--habana-muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.release-form { display: grid; gap: 10px; margin-top: 22px; }
.release-form label { font-size: .92rem; color: var(--habana-text); }
.release-form input, .release-form textarea { width: 100%; padding: 10px; border: 1px solid var(--habana-line); border-radius: 10px; background: #0c1019; }
.release-form input::file-selector-button { background: #263452; color: white; margin-right: 10px; padding: 6px 9px; border: 0; border-radius: 6px; }
.release-form button { justify-self: start; margin-top: 4px; }
.release-action, .release-secondary { padding: 9px 14px; color: white; border-radius: 10px; font-size: .9rem; font-weight: 700; }
.release-action { background: #2959cf; }
.release-secondary { background: #282e42; }
.release-state strong { display: block; color: var(--habana-gold); font-size: 1.9rem; overflow-wrap: anywhere; }
.release-state p, .release-state a { margin-top: 12px; }
.release-state a { display: inline-block; }
.release-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.release-card .release-feedback { color: #bfd3ff; }
@media (max-width: 800px) {
  .auth-shell { padding: 16px; }
  .auth-stage { grid-template-columns: minmax(0, 1fr); max-width: 580px; min-height: 0; }
  .auth-art { min-height: 265px; height: clamp(265px, 56vw, 355px); }
  .auth-art .flag-scene { width: min(73%, 410px); }
  .art-brand { top: 15px; }
  .art-brand img { height: 29px; width: 29px; }
  .art-footer { bottom: 13px; padding-top: 7px; font-size: .68rem; }
  .auth-signin { padding: 26px; }
  .signin-description { margin-bottom: 20px; }
  .release-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 500px) {
  .workspace-hero { min-height: 152px; }
  .workspace-hero .flag-scene { width: 37vw; margin-right: -13px; }
  .workspace-heading h2 { font-size: 1.9rem; }
  .auth-art { min-height: 230px; height: 61vw; }
  .auth-art .flag-scene { width: 78%; }
}
