:root {
  --page: #f5faf9;
  --panel: #ffffff;
  --panel-soft: #edf7f4;
  --line: #dbe9e6;
  --text: #20342f;
  --muted: #6f8580;
  --brand: #168d78;
  --brand-strong: #0f6f60;
  --accent: #2678dd;
  --shadow: 0 24px 70px rgba(39, 77, 69, .12);
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--page);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input { font: inherit; }

a { color: inherit; }

.utility {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  min-height: 74px;
  padding: 20px 4vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--brand-strong);
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  border-radius: 8px;
  background: var(--brand);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 24%, transparent);
}

.brand-mark i {
  display: block;
  border-radius: 2px;
  background: #fff;
}

.brand-mark i:nth-child(2),
.brand-mark i:nth-child(3) { opacity: .58; }

.concept-link {
  min-height: 34px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.concept-link::before {
  content: "\2190";
  color: var(--brand);
  font-size: 16px;
}

.shell {
  min-height: 100vh;
  padding: 96px 5vw 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 460px);
  gap: clamp(40px, 7vw, 110px);
  align-items: center;
}

.story {
  min-width: 0;
  display: grid;
  gap: 28px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: currentColor;
}

.story h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(36px, 4.6vw, 68px);
  line-height: 1.02;
  font-weight: 760;
}

.story-copy > p {
  max-width: 590px;
  margin: 19px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.visual {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.visual-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.metric-strip {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 7px;
  overflow: hidden;
  background: rgba(255,255,255,.88);
  box-shadow: 0 12px 36px rgba(23, 75, 67, .12);
  backdrop-filter: blur(14px);
}

.metric {
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid rgba(32, 76, 68, .1);
}

.metric:last-child { border-right: 0; }

.metric span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-pane {
  width: 100%;
  justify-self: end;
}

.login-card {
  width: 100%;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.form-intro { margin-bottom: 26px; }

.login-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.15;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
  font-size: 12px;
  font-weight: 760;
}

.field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  background: color-mix(in srgb, var(--panel) 91%, var(--panel-soft));
  color: var(--text);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.field input:focus {
  border-color: var(--brand);
  background: var(--panel);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 13%, transparent);
}

.field input::placeholder { color: color-mix(in srgb, var(--muted) 62%, transparent); }

.form-row {
  margin: 2px 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}

.forgot {
  color: var(--brand-strong);
  text-decoration: none;
  font-weight: 750;
}

.submit {
  width: 100%;
  height: 46px;
  border: 1px solid var(--brand);
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--brand) 24%, transparent);
  transition: transform .18s ease, filter .18s ease;
}

.submit:hover { filter: brightness(.96); transform: translateY(-1px); }
.submit:active { transform: translateY(0); }

.submit:disabled {
  cursor: wait;
  filter: grayscale(.15);
  opacity: .72;
  transform: none;
}

.form-error {
  display: none;
  margin: -4px 0 16px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, #c4483e 28%, var(--line));
  border-radius: 6px;
  background: color-mix(in srgb, #c4483e 8%, var(--panel));
  color: #b03d35;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.form-error.visible { display: block; }

.meta {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #33aa72;
  box-shadow: 0 0 0 3px rgba(51,170,114,.12);
}

/* 01 Clean Focus */
.theme-01 .visual { max-width: 720px; }
.theme-01 .login-card { border-top: 3px solid var(--brand); }

/* 02 Rail Workspace */
.theme-02 {
  --page: #eef5f3;
  --panel: #fbfdfc;
  --panel-soft: #e7f3ef;
  --brand: #087f6d;
  --brand-strong: #075f54;
}

.theme-02 .utility {
  position: fixed;
  right: auto;
  bottom: 0;
  width: 94px;
  min-height: 100vh;
  padding: 30px 0;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.theme-02 .brand { flex-direction: column; font-size: 0; }
.theme-02 .brand::after { content: "L"; font-size: 12px; }
.theme-02 .concept-link { width: 38px; padding: 0; justify-content: center; font-size: 0; }
.theme-02 .concept-link::before { content: "\2190"; }
.theme-02 .shell {
  padding: 42px 5vw 42px 150px;
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
  gap: clamp(50px, 8vw, 130px);
}
.theme-02 .login-pane { order: 1; justify-self: start; }
.theme-02 .story { order: 2; }
.theme-02 .story h1 { font-size: clamp(38px, 4vw, 62px); }
.theme-02 .visual { min-height: 360px; border-radius: 2px; }
.theme-02 .login-card { box-shadow: none; border-radius: 2px; }

/* 03 Midnight Operations */
.theme-03 {
  --page: #081311;
  --panel: #0e1d1a;
  --panel-soft: #132723;
  --line: #24413b;
  --text: #eef9f6;
  --muted: #8da9a2;
  --brand: #35d3b3;
  --brand-strong: #7fe9d3;
  --accent: #60a5fa;
  --shadow: 0 28px 80px rgba(0,0,0,.36);
}
.theme-03 .utility { border-bottom: 1px solid var(--line); background: rgba(8,19,17,.84); }
.theme-03 .shell { padding-top: 112px; }
.theme-03 .story h1 { max-width: 780px; }
.theme-03 .visual { min-height: 330px; border-radius: 0; }
.theme-03 .visual-image { opacity: .68; filter: saturate(.8) brightness(.72); }
.theme-03 .metric-strip { border-color: #31554d; background: rgba(10,29,25,.9); }
.theme-03 .metric { border-color: #31554d; }
.theme-03 .login-card { border-radius: 0; box-shadow: var(--shadow); }
.theme-03 .field input { color-scheme: dark; }
.theme-03 .submit { color: #06231d; }

/* 04 Editorial Ledger */
.theme-04 {
  --page: #f7f3ec;
  --panel: #fffdf8;
  --panel-soft: #eee7da;
  --line: #ded5c6;
  --text: #24221f;
  --muted: #766f65;
  --brand: #b44c35;
  --brand-strong: #853725;
  --shadow: 0 24px 60px rgba(74, 51, 35, .11);
}
.theme-04 .shell { grid-template-columns: minmax(0, 1fr) minmax(380px, 500px); }
.theme-04 .story { grid-template-columns: minmax(280px, .8fr) minmax(320px, 1.2fr); align-items: end; }
.theme-04 .story h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.theme-04 .story-copy > p { font-family: Georgia, "Times New Roman", serif; font-size: 16px; }
.theme-04 .visual { min-height: 520px; border-radius: 0; }
.theme-04 .visual-image { object-position: 38% center; }
.theme-04 .metric-strip { left: 0; right: 0; bottom: 0; border-radius: 0; }
.theme-04 .login-card { border-radius: 0; border-left: 4px solid var(--brand); }
.theme-04 .submit { border-radius: 0; }
.theme-04 .field input { border-radius: 0; }

/* 05 Immersive Canvas */
.theme-05 {
  --page: #eaf7f5;
  --panel: #ffffff;
  --panel-soft: #e7f4f1;
  --brand: #147d72;
  --brand-strong: #0b6158;
}
.theme-05 .shell {
  position: relative;
  display: block;
  padding: 0;
}
.theme-05 .story { min-height: 100vh; display: block; }
.theme-05 .story-copy {
  position: absolute;
  z-index: 3;
  left: 5vw;
  top: 19vh;
  max-width: min(47vw, 680px);
  padding: 28px;
  border-left: 4px solid var(--brand);
  background: rgba(245,250,249,.82);
  backdrop-filter: blur(12px);
}
.theme-05 .visual { position: absolute; inset: 0; min-height: 100vh; border: 0; border-radius: 0; }
.theme-05 .visual-image { object-position: center; }
.theme-05 .metric-strip { left: 5vw; right: auto; width: min(560px, 44vw); bottom: 7vh; }
.theme-05 .login-pane {
  position: absolute;
  z-index: 5;
  top: 50%;
  right: 5vw;
  width: min(420px, 38vw);
  transform: translateY(-50%);
}
.theme-05 .login-card { background: rgba(255,255,255,.94); backdrop-filter: blur(18px); }

/* 06 Warm Business */
.theme-06 {
  --page: #fbf8f4;
  --panel: #ffffff;
  --panel-soft: #f6eee6;
  --line: #eadfd4;
  --text: #332a26;
  --muted: #806f66;
  --brand: #c75d47;
  --brand-strong: #984330;
  --accent: #228a77;
  --shadow: 0 26px 62px rgba(96, 60, 42, .1);
}
.theme-06 .shell { grid-template-columns: minmax(360px, 470px) minmax(0, 1fr); }
.theme-06 .login-pane { order: 1; justify-self: start; }
.theme-06 .story { order: 2; grid-template-columns: .8fr 1.2fr; align-items: center; }
.theme-06 .story h1 { font-size: clamp(38px, 4.1vw, 64px); }
.theme-06 .visual { min-height: 540px; }
.theme-06 .visual-image { object-position: 40% center; }
.theme-06 .login-card { border-radius: 8px; box-shadow: none; }
.theme-06 .submit { border-radius: 23px; }

/* 07 Cobalt Structure */
.theme-07 {
  --page: #152b50;
  --panel: #ffffff;
  --panel-soft: #edf3fb;
  --line: #d9e3f0;
  --text: #192c49;
  --muted: #6f8098;
  --brand: #2368d3;
  --brand-strong: #dceaff;
  --accent: #16a38d;
  --shadow: 0 32px 80px rgba(2, 18, 45, .3);
}
.theme-07 .utility .brand { color: #fff; }
.theme-07 .concept-link { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #dce8f9; }
.theme-07 .story-copy { padding: 34px; border: 1px solid rgba(255,255,255,.16); color: #fff; }
.theme-07 .story-copy > p { color: #b9cae0; }
.theme-07 .kicker { color: #75e1ce; }
.theme-07 .visual { border-color: rgba(255,255,255,.18); }
.theme-07 .visual-image { filter: saturate(.85); }
.theme-07 .login-card { border: 0; }
.theme-07 .submit { background: #2368d3; border-color: #2368d3; }

/* 08 Signal Terminal */
.theme-08 {
  --page: #11110f;
  --panel: #191916;
  --panel-soft: #22211d;
  --line: #3c392f;
  --text: #f2efe5;
  --muted: #9e998b;
  --brand: #ff9f43;
  --brand-strong: #ffb86c;
  --accent: #6ed6a4;
  --shadow: 0 26px 70px rgba(0,0,0,.4);
}
.theme-08 { font-family: "IBM Plex Mono", "Cascadia Code", Consolas, monospace; }
.theme-08 .utility { border-bottom: 1px dashed var(--line); }
.theme-08 .brand-mark { border-radius: 1px; }
.theme-08 .concept-link,
.theme-08 .visual,
.theme-08 .metric-strip,
.theme-08 .login-card,
.theme-08 .field input,
.theme-08 .submit { border-radius: 1px; }
.theme-08 .story h1 { font-size: clamp(34px, 4.2vw, 60px); font-weight: 620; }
.theme-08 .visual-image { filter: grayscale(.68) sepia(.18) brightness(.6); }
.theme-08 .metric-strip { border-color: var(--line); background: rgba(25,25,22,.91); }
.theme-08 .metric { border-color: var(--line); }
.theme-08 .login-card { border-top: 2px solid var(--brand); }
.theme-08 .field input { color-scheme: dark; }
.theme-08 .submit { color: #20150a; }

/* 09 Quiet Modal */
.theme-09 {
  --page: #eaf1ef;
  --panel: #ffffff;
  --panel-soft: #eef5f3;
  --brand: #197866;
  --brand-strong: #115b4d;
}
.theme-09 .shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  place-items: center;
  padding: 100px 24px 50px;
  background: linear-gradient(rgba(231,241,238,.72), rgba(231,241,238,.88)), url("assets/lumadsp-login-visual.png") center / cover no-repeat;
}
.theme-09 .story { display: none; }
.theme-09 .login-pane { width: min(440px, 100%); justify-self: center; }
.theme-09 .login-card { padding: 42px; box-shadow: 0 32px 90px rgba(26,68,60,.2); }
.theme-09 .form-intro { text-align: center; }
.theme-09 .brand-mark { border-radius: 50%; }
.theme-09 .submit { border-radius: 23px; }
.theme-09 .meta::before { content: "LumaDSP Access Gateway  /  "; }

/* 10 Horizontal Access */
.theme-10 {
  --page: #f9fbfc;
  --panel: #ffffff;
  --panel-soft: #eef3f8;
  --line: #dce5ed;
  --text: #243444;
  --muted: #748394;
  --brand: #246b9f;
  --brand-strong: #174e77;
  --accent: #1a9b85;
}
.theme-10 .shell {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(390px, 1fr) auto;
  align-items: stretch;
  gap: 28px;
  padding-bottom: 34px;
}
.theme-10 .story { grid-template-columns: .72fr 1.28fr; align-items: center; }
.theme-10 .story h1 { font-size: clamp(36px, 4.3vw, 64px); }
.theme-10 .visual { min-height: 390px; }
.theme-10 .login-pane { justify-self: stretch; }
.theme-10 .login-card {
  display: grid;
  grid-template-columns: minmax(210px, .8fr) minmax(180px, 1fr) minmax(180px, 1fr) minmax(170px, .75fr);
  gap: 16px;
  align-items: end;
  padding: 22px;
  box-shadow: 0 14px 38px rgba(31, 65, 91, .08);
}
.theme-10 .form-intro,
.theme-10 .field { margin: 0; }
.theme-10 .form-intro { align-self: center; }
.theme-10 .login-card h2 { font-size: 21px; }
.theme-10 .hint { font-size: 11px; }
.theme-10 .form-row { grid-column: 1 / 3; margin: 0; align-self: center; }
.theme-10 .submit { grid-column: 4; grid-row: 1; }
.theme-10 .meta { grid-column: 3 / 5; margin: 0; text-align: right; align-self: center; }
.theme-10 .form-error { grid-column: 1 / -1; margin: 0; }

@media (max-width: 1080px) {
  .shell { grid-template-columns: minmax(0, 1fr) minmax(340px, 410px); gap: 38px; }
  .story h1 { font-size: clamp(36px, 5vw, 56px); }
  .theme-04 .story,
  .theme-06 .story { grid-template-columns: 1fr; }
  .theme-04 .visual,
  .theme-06 .visual { min-height: 300px; }
  .theme-05 .story-copy { max-width: 42vw; }
  .theme-10 .login-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theme-10 .submit { grid-column: 2; grid-row: auto; }
  .theme-10 .form-row { grid-column: 1; }
  .theme-10 .meta { grid-column: 2; }
}

@media (max-width: 820px) {
  .utility { position: relative; min-height: 70px; padding: 17px 22px; }
  .shell,
  .theme-02 .shell,
  .theme-04 .shell,
  .theme-06 .shell,
  .theme-10 .shell {
    min-height: calc(100vh - 70px);
    padding: 34px 22px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 32px;
  }
  .story h1 { font-size: clamp(34px, 10vw, 52px); }
  .visual { min-height: 280px; }
  .login-pane { justify-self: stretch; }
  .theme-02 .utility {
    position: relative;
    width: auto;
    min-height: 70px;
    padding: 17px 22px;
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .theme-02 .brand { flex-direction: row; font-size: 22px; }
  .theme-02 .brand::after { display: none; }
  .theme-02 .concept-link { width: auto; padding: 0 13px; font-size: 12px; }
  .theme-02 .login-pane,
  .theme-06 .login-pane { order: 2; }
  .theme-02 .story,
  .theme-06 .story { order: 1; }
  .theme-04 .story,
  .theme-06 .story,
  .theme-10 .story { grid-template-columns: 1fr; }
  .theme-05 .shell { display: grid; padding: 0; }
  .theme-05 .story { min-height: 480px; position: relative; }
  .theme-05 .story-copy { top: 90px; left: 22px; right: 22px; max-width: none; }
  .theme-05 .visual { min-height: 480px; }
  .theme-05 .metric-strip { left: 22px; right: 22px; bottom: 20px; width: auto; }
  .theme-05 .login-pane { position: relative; top: auto; right: auto; width: auto; padding: 24px 22px 40px; transform: none; }
  .theme-10 .login-card { display: block; }
  .theme-10 .form-intro,
  .theme-10 .field { margin-bottom: 16px; }
  .theme-10 .form-row { margin-bottom: 22px; }
  .theme-10 .meta { margin-top: 18px; text-align: center; }
}

@media (max-width: 520px) {
  .brand { font-size: 19px; }
  .brand-mark { width: 31px; height: 31px; }
  .concept-link { width: 36px; padding: 0; justify-content: center; font-size: 0; }
  .login-card { padding: 26px 22px; }
  .metric-strip { left: 10px; right: 10px; bottom: 10px; }
  .metric { padding: 10px 8px; }
  .metric strong { font-size: 14px; }
  .theme-04 .story { display: block; }
  .theme-04 .visual { margin-top: 26px; }
  .theme-05 .story-copy { padding: 20px; }
  .theme-05 .story-copy > p { display: none; }
  .theme-09 .login-card { padding: 32px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
