@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap");

:root {
  color-scheme: light;
  font-family: "Space Grotesk", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f6faff;
  color: #0f172a;
  --ink: #0f172a;
  --muted: #516074;
  --paper: #f5f9ff;
  --surface: #ffffff;
  --line: rgba(15, 65, 122, 0.14);
  --accent: #0f4c81;
  --accent-dark: #0a3358;
  --accent-soft: #e8f1fb;
  --accent-contrast: #ffffff;
  --accent-border: rgba(15, 76, 129, 0.18);
  --accent-border-strong: rgba(15, 76, 129, 0.30);
  --danger: #b42318;
  --danger-soft: #fdecec;
  --danger-text: #b42318;
  --success-soft: #e7f7ef;
  --success-text: #166534;
  --warning-soft: #e6f3ff;
  --warning-text: #0f4c81;
  --body-bg:
    radial-gradient(circle at 10% 16%, rgba(14, 165, 233, 0.10), transparent 24rem),
    radial-gradient(circle at 88% 0%, rgba(15, 76, 129, 0.10), transparent 22rem),
    linear-gradient(145deg, #f8fbff 0%, #edf4fb 100%);
  --auth-hero-bg:
    radial-gradient(circle at 78% 18%, rgba(20, 184, 166, 0.18), transparent 26rem),
    radial-gradient(circle at 10% 82%, rgba(14, 165, 233, 0.14), transparent 24rem),
    linear-gradient(135deg, #f8fbff 0%, #eef7ff 48%, #dff7f3 100%);
  --auth-panel-bg: rgba(255, 255, 255, 0.76);
  --sidebar-bg: linear-gradient(180deg, rgba(7, 25, 48, 0.96), rgba(11, 44, 78, 0.96));
  --panel-bg: rgba(255, 255, 255, 0.84);
  --field-bg: #ffffff;
  --field-hover-bg: #f2f8ff;
  --field-focus: rgba(15, 76, 129, 0.13);
  --select-arrow:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5.75 7.75L10 12.25L14.25 7.75' stroke='%230f4c81' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --secondary-bg: #f7fbff;
  --secondary-hover: #eaf3fb;
  --nav-text: #dbeafe;
  --nav-hover-bg: rgba(255, 255, 255, 0.08);
  --nav-active-bg: linear-gradient(135deg, rgba(37, 99, 235, 0.34), rgba(14, 165, 233, 0.18));
  --nav-border: var(--accent-border);
  --nav-active-border: var(--accent-border-strong);
  --chip-bg: #eef4fb;
  --chip-text: #0f172a;
  --callout-bg: rgba(255, 255, 255, 0.92);
  --callout-text: #0f172a;
  --callout-muted: #516074;
  --workspace-hero-bg:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.14), transparent 28%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(232, 241, 251, 0.94));
  --workspace-hero-text: #0f172a;
  --workspace-hero-muted: #516074;
  --workspace-hero-card-bg: rgba(255, 255, 255, 0.72);
  --workspace-hero-stat-bg: rgba(15, 76, 129, 0.08);
  --workspace-hero-stat-label: #516074;
  --pre-bg: #0f172a;
  --pre-text: #dbeafe;
  --toast-bg: #f7fbff;
  --toast-text: #0f172a;
  --shadow: 0 24px 60px rgba(8, 15, 32, 0.10);
  --accent-shadow: 0 18px 40px rgba(15, 76, 129, 0.20);
  --toast-shadow: 0 24px 70px rgba(23, 32, 51, 0.26);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  background: #080b14;
  color: #e7edf8;
  --ink: #e7edf8;
  --muted: #99a8bd;
  --paper: #111827;
  --surface: #121a2a;
  --line: #263348;
  --accent: #7cc4ff;
  --accent-dark: #bae6fd;
  --accent-soft: rgba(124, 196, 255, 0.14);
  --accent-contrast: #111827;
  --accent-border: rgba(124, 196, 255, 0.20);
  --accent-border-strong: rgba(124, 196, 255, 0.32);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.16);
  --danger-text: #fecdd3;
  --success-soft: rgba(34, 197, 94, 0.16);
  --success-text: #bbf7d0;
  --warning-soft: rgba(245, 158, 11, 0.16);
  --warning-text: #fde68a;
  --body-bg:
    radial-gradient(circle at 12% 20%, rgba(14, 165, 233, 0.18), transparent 28rem),
    radial-gradient(circle at 86% 0%, rgba(45, 212, 191, 0.10), transparent 24rem),
    linear-gradient(135deg, #07111f 0%, #0d1c31 100%);
  --auth-hero-bg:
    radial-gradient(circle at 76% 16%, rgba(14, 165, 233, 0.22), transparent 26rem),
    radial-gradient(circle at 10% 78%, rgba(45, 212, 191, 0.14), transparent 24rem),
    linear-gradient(135deg, #061321 0%, #0b1f35 52%, #0e363a 100%);
  --auth-panel-bg: rgba(12, 18, 30, 0.76);
  --sidebar-bg: rgba(12, 18, 30, 0.9);
  --panel-bg: rgba(17, 24, 39, 0.78);
  --field-bg: #0f172a;
  --field-hover-bg: #131d30;
  --field-focus: rgba(139, 147, 255, 0.16);
  --select-arrow:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5.75 7.75L10 12.25L14.25 7.75' stroke='%237cc4ff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --secondary-bg: #111827;
  --secondary-hover: #1b2638;
  --nav-text: #aab6c8;
  --nav-hover-bg: rgba(255, 255, 255, 0.08);
  --nav-active-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.24), rgba(14, 165, 233, 0.14));
  --nav-border: rgba(231, 237, 248, 0.10);
  --nav-active-border: rgba(139, 147, 255, 0.30);
  --chip-bg: #142033;
  --chip-text: #dbeafe;
  --callout-bg: #10233f;
  --callout-text: #e7edf8;
  --callout-muted: rgba(231, 237, 248, 0.72);
  --workspace-hero-bg:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(120deg, #071427, #114277 52%, #0ea5a3);
  --workspace-hero-text: #eff6ff;
  --workspace-hero-muted: rgba(239, 246, 255, 0.84);
  --workspace-hero-card-bg: rgba(255, 255, 255, 0.10);
  --workspace-hero-stat-bg: rgba(255, 255, 255, 0.10);
  --workspace-hero-stat-label: rgba(224, 242, 254, 0.74);
  --pre-bg: #050816;
  --pre-text: #dbeafe;
  --toast-bg: #e5eefc;
  --toast-text: #111827;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.24);
  --accent-shadow: 0 12px 30px rgba(14, 165, 233, 0.18);
  --toast-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--body-bg);
  color: var(--ink);
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 4.8rem);
  letter-spacing: -0.06em;
  line-height: 0.95;
}

h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
  letter-spacing: -0.035em;
}

h3 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select,
button,
textarea {
  width: 100%;
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--field-bg);
  color: var(--ink);
  padding: 13px 14px;
  font: inherit;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  padding-right: 54px;
}

.password-field > .password-toggle {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 8px;
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0 !important;
  box-shadow: none;
  flex: 0 0 38px;
  margin: auto 0;
  appearance: none;
  z-index: 1;
}

.password-field > .password-toggle span {
  font-size: 0;
  line-height: 0;
}

.password-field > .password-toggle span::before {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Cpath d='M1.5 9C3.12 5.82 5.78 4.25 9 4.25C12.22 4.25 14.88 5.82 16.5 9C14.88 12.18 12.22 13.75 9 13.75C5.78 13.75 3.12 12.18 1.5 9Z' stroke='%23667186' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='9' cy='9' r='2.3' stroke='%23667186' stroke-width='1.4'/%3E%3C/svg%3E")
    center / 18px 18px no-repeat;
}

.password-field > .password-toggle:hover,
.password-field > .password-toggle:focus-visible,
.password-field > .password-toggle.is-active {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.password-field > .password-toggle:hover span::before,
.password-field > .password-toggle:focus-visible span::before,
.password-field > .password-toggle.is-active span::before {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Cpath d='M1.5 9C3.12 5.82 5.78 4.25 9 4.25C12.22 4.25 14.88 5.82 16.5 9C14.88 12.18 12.22 13.75 9 13.75C5.78 13.75 3.12 12.18 1.5 9Z' stroke='%233730a3' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='9' cy='9' r='2.3' stroke='%233730a3' stroke-width='1.4'/%3E%3C/svg%3E")
    center / 18px 18px no-repeat;
}

select {
  appearance: none;
  background-color: var(--field-bg);
  background-image: var(--select-arrow);
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  cursor: pointer;
  font-weight: 800;
  padding-right: 46px;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select .native-select {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
}

.custom-select-trigger {
  width: 100%;
  min-height: 50px;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    var(--select-arrow) right 14px center / 18px 18px no-repeat,
    var(--field-bg);
  color: var(--ink);
  padding: 13px 46px 13px 16px;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.custom-select-trigger:hover,
.custom-select.open .custom-select-trigger {
  border-color: var(--accent-border-strong);
  background:
    var(--select-arrow) right 14px center / 18px 18px no-repeat,
    var(--field-hover-bg);
  box-shadow: 0 0 0 4px var(--field-focus);
  transform: none;
}

.custom-select.is-disabled .custom-select-trigger {
  cursor: not-allowed;
  opacity: 0.62;
  background:
    var(--select-arrow) right 14px center / 18px 18px no-repeat,
    var(--chip-bg);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 25;
  display: none;
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--accent-border-strong);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--toast-shadow);
  padding: 6px;
}

.custom-select.open .custom-select-menu {
  display: grid;
  gap: 4px;
  animation: dropdownReveal 140ms ease both;
}

.custom-select-option {
  width: 100%;
  min-height: 38px;
  justify-content: flex-start;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  padding: 9px 12px;
  text-align: left;
  box-shadow: none;
}

.custom-select-option:hover,
.custom-select-option.selected {
  background: var(--nav-active-bg);
  color: var(--ink);
  transform: none;
}

select:hover,
input:hover,
textarea:hover {
  border-color: var(--accent-border-strong);
  background-color: var(--field-hover-bg);
}

select:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  background-color: var(--chip-bg);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--field-focus);
  outline: 0;
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 44px;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

button:hover,
.button-link:hover {
  background: var(--accent-dark);
  box-shadow: var(--accent-shadow);
  transform: translateY(-1px);
}

button.secondary,
.button-link.secondary {
  border: 1px solid var(--line);
  background: var(--secondary-bg);
  color: var(--ink);
}

button.secondary:hover,
.button-link.secondary:hover {
  background: var(--secondary-hover);
  box-shadow: none;
}

button.danger {
  background: var(--danger);
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(390px, 0.82fr);
  min-height: 100vh;
  overflow: hidden;
  background: var(--auth-hero-bg);
}

.auth-hero {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 36px;
  min-height: 100vh;
  padding: clamp(28px, 5vw, 78px);
  color: var(--ink);
  isolation: isolate;
}

.auth-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(248, 251, 255, 0.96) 0%, rgba(248, 251, 255, 0.82) 34%, rgba(248, 251, 255, 0.18) 72%),
    var(--auth-hero-bg);
}

:root[data-theme="dark"] .auth-hero::before {
  background:
    linear-gradient(90deg, rgba(6, 19, 33, 0.98) 0%, rgba(6, 19, 33, 0.78) 34%, rgba(6, 19, 33, 0.18) 72%),
    var(--auth-hero-bg);
}

.auth-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 680px;
  align-self: end;
  display: grid;
  gap: 24px;
}

.auth-hero .muted {
  max-width: 590px;
  color: var(--muted);
  font-size: 1.08rem;
}

.auth-hero h1 {
  max-width: 720px;
  color: var(--ink);
  font-size: clamp(3rem, 5vw, 5.6rem);
  line-height: 0.94;
}

.auth-brand {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.auth-brand .brand-mark {
  margin: 0;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: block;
  object-fit: cover;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 18px 38px rgba(15, 76, 129, 0.18);
}

.auth-visual {
  position: absolute;
  top: 48px;
  right: -9vw;
  bottom: 34px;
  z-index: -1;
  width: min(72vw, 1040px);
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 34px 100px rgba(9, 32, 56, 0.22);
}

.auth-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(248, 251, 255, 0.92) 0%, rgba(248, 251, 255, 0.42) 30%, rgba(248, 251, 255, 0.06) 64%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(15, 23, 42, 0.18));
}

:root[data-theme="dark"] .auth-visual::after {
  background:
    linear-gradient(90deg, rgba(6, 19, 33, 0.94) 0%, rgba(6, 19, 33, 0.42) 30%, rgba(6, 19, 33, 0.08) 64%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(2, 8, 23, 0.36));
}

.auth-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  display: block;
}

.deploy-orbit {
  position: absolute;
  z-index: 1;
  display: grid;
  gap: 3px;
  min-width: 190px;
  border: 1px solid rgba(14, 165, 233, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  color: #0f172a;
  padding: 14px 16px 14px 44px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(18px);
}

.deploy-orbit span {
  position: absolute;
  left: 16px;
  top: 18px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.16);
}

.deploy-orbit strong {
  font-size: 0.88rem;
}

.deploy-orbit small {
  color: #516074;
  font-size: 0.76rem;
  font-weight: 700;
}

.deploy-orbit-primary {
  right: 12%;
  bottom: 16%;
}

.deploy-orbit-secondary {
  top: 16%;
  left: 44%;
}

.deploy-orbit-secondary span {
  background: #14b8a6;
  box-shadow: 0 0 0 6px rgba(20, 184, 166, 0.16);
}

.auth-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(28px, 4vw, 64px);
  background: var(--auth-panel-bg);
  border-left: 1px solid rgba(15, 76, 129, 0.12);
  backdrop-filter: blur(30px);
}

.auth-card {
  width: min(100%, 450px);
  display: grid;
  gap: 0;
  margin: 0 auto;
  border: 1px solid rgba(15, 76, 129, 0.14);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.82);
  padding: clamp(24px, 4vw, 38px);
  box-shadow: 0 28px 70px rgba(8, 15, 32, 0.14);
}

:root[data-theme="dark"] .auth-card {
  border-color: rgba(124, 196, 255, 0.16);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.30);
}

.auth-card-head {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.auth-card-icon {
  width: 50px;
  height: 50px;
  display: block;
  object-fit: cover;
  border-radius: 17px;
  box-shadow: 0 16px 34px rgba(15, 76, 129, 0.18);
}

.auth-panel h2 {
  margin-bottom: 10px;
  font-size: 2rem;
  line-height: 1;
}

.form-stack {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.instruction-box {
  display: grid;
  gap: 10px;
  border: 1px solid var(--accent-border);
  border-radius: 16px;
  background: var(--accent-soft);
  padding: 16px;
}

.instruction-box .eyebrow {
  margin-bottom: 0;
}

.instruction-box ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.instruction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.instruction-grid .panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(15, 76, 129, 0.12);
  background:
    radial-gradient(circle at 96% 0%, rgba(20, 184, 166, 0.10), transparent 14rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.86));
}

:root[data-theme="dark"] .instruction-grid .panel {
  border-color: rgba(124, 196, 255, 0.14);
  background:
    radial-gradient(circle at 96% 0%, rgba(20, 184, 166, 0.12), transparent 14rem),
    linear-gradient(135deg, rgba(17, 24, 39, 0.90), rgba(15, 23, 42, 0.84));
}

.instruction-grid .panel::after {
  content: '';
  position: absolute;
  top: 18px;
  right: 18px;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(15, 76, 129, 0.10), rgba(20, 184, 166, 0.14)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72' fill='none'%3E%3Crect x='17' y='14' width='38' height='44' rx='8' fill='%23fff' opacity='.72'/%3E%3Cpath d='M25 27h22M25 38h16M25 49h20' stroke='%230f4c81' stroke-width='3' stroke-linecap='round' opacity='.54'/%3E%3Ccircle cx='51' cy='23' r='8' fill='%2322c55e'/%3E%3Cpath d='M47.5 23l2.3 2.4 4.8-5.4' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / 72px 72px no-repeat;
  opacity: 0.38;
  pointer-events: none;
}

.instruction-grid .panel > * {
  position: relative;
  z-index: 1;
}

.instruction-wide {
  grid-column: 1 / -1;
}

.instruction-steps,
.instruction-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.instruction-list {
  padding-left: 20px;
}

.instruction-list li::marker {
  color: var(--accent);
  font-weight: 900;
}

.form-stack button {
  width: 100%;
  margin-top: 4px;
}

.form-actions {
  display: flex;
  gap: 10px;
}

.switch-copy {
  margin-top: 24px;
  color: var(--muted);
}

.switch-copy a {
  color: var(--accent);
  font-weight: 800;
}

.auth-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.auth-proof span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 900;
}

.workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 220ms ease;
}

.workspace.sidebar-collapsed {
  grid-template-columns: 86px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg);
  backdrop-filter: blur(24px);
  transition: padding 220ms ease, box-shadow 220ms ease;
}

.sidebar-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  min-height: 46px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 46px;
  color: #eff6ff;
  font-weight: 900;
  text-decoration: none;
}

.brand-name {
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 160ms ease, transform 160ms ease, width 180ms ease;
}

.brand-dot {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: cover;
  flex: 0 0 auto;
  border-radius: 14px;
}

.sidebar-toggle {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  display: grid;
  place-content: center;
  gap: 4px;
}

.sidebar-toggle span {
  width: 17px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  transition: transform 180ms ease, opacity 180ms ease, width 180ms ease;
}

.workspace.sidebar-collapsed .sidebar {
  align-items: center;
  padding: 24px 0;
}

.workspace.sidebar-collapsed .sidebar-head {
  width: 42px;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 12px;
  min-height: 100px;
}

.workspace.sidebar-collapsed .sidebar-brand {
  width: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
}

.workspace.sidebar-collapsed .brand-name,
.workspace.sidebar-collapsed .user-label,
.workspace.sidebar-collapsed .sidebar-footer button {
  width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-8px);
}

.workspace.sidebar-collapsed .sidebar-toggle {
  position: static;
  transform: none;
}

.workspace.sidebar-collapsed .sidebar-toggle span:nth-child(1) {
  transform: translateX(-2px);
}

.workspace.sidebar-collapsed .sidebar-toggle span:nth-child(2) {
  width: 11px;
}

.workspace.sidebar-collapsed .sidebar-toggle span:nth-child(3) {
  transform: translateX(2px);
}

.nav-list {
  display: grid;
  gap: 8px;
  margin-top: 34px;
}

.workspace.sidebar-collapsed .nav-list {
  width: 42px;
  justify-items: center;
  margin-top: 26px;
}

.nav-list a {
  position: relative;
  min-height: 46px;
  display: flex;
  align-items: center;
  border: 1px solid var(--nav-border);
  border-radius: 14px;
  padding: 13px 14px;
  background: transparent;
  color: var(--nav-text);
  font-weight: 800;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-list a:hover {
  border-color: var(--nav-active-border);
  background: var(--nav-hover-bg);
  color: #eff6ff;
  transform: translateX(2px);
}

.nav-list a.active {
  border-color: var(--nav-active-border);
  background: var(--nav-active-bg);
  color: #eff6ff;
}

.workspace.sidebar-collapsed .nav-list a {
  display: grid;
  width: 42px;
  height: 42px;
  min-height: 42px;
  place-items: center;
  padding: 0;
  font-size: 0;
  line-height: 1;
}

.workspace.sidebar-collapsed .nav-list a:hover {
  transform: none;
}

.workspace.sidebar-collapsed .nav-list a::before {
  content: attr(data-short);
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  align-items: center;
  justify-items: center;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  transform: translateY(0.5px);
}

.sidebar-footer {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.sidebar-footer button {
  width: 100%;
}

.user-label {
  color: rgba(219, 234, 254, 0.76);
  font-size: 0.86rem;
  line-height: 1.45;
  word-break: break-word;
}

.workspace-main {
  min-width: 0;
  padding: clamp(24px, 4vw, 56px);
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.page-head,
.section-head,
.project-row-main {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.page-head {
  margin-bottom: 0;
}

.teacher-dashboard-head {
  position: relative;
  min-height: 310px;
  align-items: end;
  overflow: hidden;
  border: 1px solid rgba(15, 76, 129, 0.14);
  border-radius: 34px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.96) 0%, rgba(238, 247, 255, 0.86) 46%, rgba(223, 247, 243, 0.54) 100%),
    var(--auth-hero-bg);
  box-shadow: 0 28px 80px rgba(8, 15, 32, 0.12);
  padding: clamp(24px, 4vw, 42px);
  isolation: isolate;
}

:root[data-theme="dark"] .teacher-dashboard-head {
  border-color: rgba(124, 196, 255, 0.14);
  background:
    linear-gradient(100deg, rgba(8, 17, 32, 0.98) 0%, rgba(9, 31, 53, 0.84) 48%, rgba(14, 54, 58, 0.58) 100%),
    var(--auth-hero-bg);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.teacher-dashboard-head > div:first-child {
  position: relative;
  z-index: 2;
  max-width: 660px;
}

.teacher-dashboard-head h1 {
  font-size: clamp(2.6rem, 5vw, 4.9rem);
  line-height: 0.94;
}

.dashboard-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-title-row .eyebrow {
  margin-bottom: 0;
}

.dashboard-mark {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(15, 76, 129, 0.18);
}

.dashboard-hero-visual {
  position: absolute;
  top: 20px;
  right: -90px;
  bottom: 18px;
  z-index: -1;
  width: min(620px, 54vw);
  border-radius: 28px;
  overflow: hidden;
  opacity: 0.72;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
}

.dashboard-hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.58) 42%, rgba(255, 255, 255, 0.04) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(15, 23, 42, 0.12));
}

:root[data-theme="dark"] .dashboard-hero-visual::after {
  background:
    linear-gradient(90deg, rgba(8, 17, 32, 0.98) 0%, rgba(8, 17, 32, 0.56) 42%, rgba(8, 17, 32, 0.08) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(2, 8, 23, 0.26));
}

.dashboard-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  display: block;
}

.classrooms-page-head {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid rgba(15, 76, 129, 0.14);
  border-radius: 34px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 250, 255, 0.86) 45%, rgba(225, 248, 244, 0.52) 100%),
    var(--auth-hero-bg);
  box-shadow: 0 28px 80px rgba(8, 15, 32, 0.12);
  padding: clamp(24px, 4vw, 42px);
  isolation: isolate;
}

:root[data-theme="dark"] .classrooms-page-head {
  border-color: rgba(124, 196, 255, 0.14);
  background:
    linear-gradient(100deg, rgba(8, 17, 32, 0.98) 0%, rgba(9, 31, 53, 0.86) 45%, rgba(14, 54, 58, 0.58) 100%),
    var(--auth-hero-bg);
}

.classrooms-page-head > div:first-child {
  position: relative;
  z-index: 2;
  max-width: 670px;
  align-self: end;
}

.classrooms-page-head h1 {
  font-size: clamp(2.5rem, 4.8vw, 4.55rem);
  line-height: 0.95;
}

.classroom-mark {
  background: linear-gradient(135deg, #0f4c81, #22c55e);
}

.classrooms-hero-visual {
  position: absolute;
  top: 20px;
  right: -110px;
  bottom: 20px;
  z-index: -1;
  width: min(700px, 58vw);
  overflow: hidden;
  border-radius: 30px;
  opacity: 0.72;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
}

.classrooms-hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.58) 42%, rgba(255, 255, 255, 0.04) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(15, 23, 42, 0.12));
}

:root[data-theme="dark"] .classrooms-hero-visual::after {
  background:
    linear-gradient(90deg, rgba(8, 17, 32, 0.98) 0%, rgba(8, 17, 32, 0.58) 42%, rgba(8, 17, 32, 0.08) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(2, 8, 23, 0.26));
}

.classrooms-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  display: block;
}

.operations-page-head {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid rgba(15, 76, 129, 0.14);
  border-radius: 34px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 250, 255, 0.86) 45%, rgba(225, 248, 244, 0.52) 100%),
    var(--auth-hero-bg);
  box-shadow: 0 28px 80px rgba(8, 15, 32, 0.12);
  padding: clamp(24px, 4vw, 42px);
  isolation: isolate;
}

:root[data-theme="dark"] .operations-page-head {
  border-color: rgba(124, 196, 255, 0.14);
  background:
    linear-gradient(100deg, rgba(8, 17, 32, 0.98) 0%, rgba(9, 31, 53, 0.86) 45%, rgba(14, 54, 58, 0.58) 100%),
    var(--auth-hero-bg);
}

.operations-page-head > div:first-child {
  position: relative;
  z-index: 2;
  max-width: 670px;
  align-self: end;
}

.operations-page-head h1 {
  font-size: clamp(2.5rem, 4.8vw, 4.55rem);
  line-height: 0.95;
}

.deliveries-mark {
  background: linear-gradient(135deg, #0f4c81, #f59e0b);
}

.projects-mark {
  background: linear-gradient(135deg, #0f4c81, #14b8a6);
}

.instructions-mark {
  box-shadow: 0 16px 34px rgba(15, 76, 129, 0.18);
}

.operations-hero-visual {
  position: absolute;
  top: 20px;
  right: -110px;
  bottom: 20px;
  z-index: -1;
  width: min(700px, 58vw);
  overflow: hidden;
  border-radius: 30px;
  opacity: 0.72;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
}

.operations-hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.58) 42%, rgba(255, 255, 255, 0.04) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(15, 23, 42, 0.12));
}

:root[data-theme="dark"] .operations-hero-visual::after {
  background:
    linear-gradient(90deg, rgba(8, 17, 32, 0.98) 0%, rgba(8, 17, 32, 0.58) 42%, rgba(8, 17, 32, 0.08) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(2, 8, 23, 0.26));
}

.operations-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  display: block;
}

.instructions-hero-visual img {
  object-position: center right;
}

.teacher-dashboard-head #refreshButton {
  position: relative;
  z-index: 2;
  align-self: flex-start;
}

.page-head .muted {
  max-width: 720px;
  margin-top: 12px;
}

.panel,
.callout,
.empty-state,
.project-row,
.toolbar {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.panel,
.callout,
.empty-state,
.project-row {
  padding: 24px;
}

.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  border-color: rgba(20, 184, 166, 0.22);
  background:
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.12), transparent 18rem),
    var(--callout-bg);
  color: var(--callout-text);
}

.teacher-dashboard-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.dashboard-entry-card {
  position: relative;
  display: grid;
  gap: 16px;
  overflow: hidden;
  border: 1px solid rgba(15, 76, 129, 0.12);
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 0%, rgba(20, 184, 166, 0.12), transparent 14rem),
    rgba(255, 255, 255, 0.86);
  color: var(--ink);
  box-shadow: 0 22px 60px rgba(8, 15, 32, 0.10);
  padding: 24px;
}

:root[data-theme="dark"] .dashboard-entry-card {
  border-color: rgba(124, 196, 255, 0.14);
  background:
    radial-gradient(circle at 90% 0%, rgba(20, 184, 166, 0.14), transparent 14rem),
    rgba(17, 24, 39, 0.82);
}

.dashboard-entry-card.selected {
  border-color: rgba(20, 184, 166, 0.34);
  box-shadow: 0 24px 70px rgba(15, 76, 129, 0.18);
}

.dashboard-entry-card::after {
  content: '';
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(15, 76, 129, 0.10), rgba(20, 184, 166, 0.16)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='76' height='76' viewBox='0 0 76 76' fill='none'%3E%3Cpath d='M18 43.5C26 34 33 46 41 36.5C49 27 56 36.5 61 30' stroke='%2314b8a6' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M18 53H58' stroke='%230f4c81' stroke-width='3' stroke-linecap='round' opacity='.55'/%3E%3Ccircle cx='23' cy='24' r='7' fill='%2314b8a6' opacity='.85'/%3E%3Cpath d='M21 24L23 26L27 21' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / 76px 76px no-repeat;
  opacity: 0.46;
  pointer-events: none;
}

.dashboard-entry-card-wide {
  grid-column: 1 / -1;
}

.dashboard-entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.dashboard-entry-card > .muted,
.dashboard-module-list {
  position: relative;
  z-index: 1;
}

.dashboard-module-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-module-chip {
  width: auto;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: rgba(255, 255, 255, 0.76);
  color: var(--accent-dark);
  padding: 9px 14px;
  font-weight: 800;
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.dashboard-module-chip.active,
.dashboard-module-chip:hover {
  border-color: var(--accent-border-strong);
  background: linear-gradient(135deg, rgba(15, 76, 129, 0.14), rgba(20, 184, 166, 0.16));
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.callout .muted {
  color: var(--callout-muted);
}

.panel:hover,
.project-row:hover,
.toolbar:hover,
.callout:hover {
  border-color: var(--accent-border-strong);
}

#auditCard {
  margin-top: 26px;
}

.academic-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  min-width: min(100%, 820px);
}

.academic-filters label {
  color: var(--callout-text);
}

.academic-filters .button-link {
  min-height: 48px;
  padding: 13px 18px;
  white-space: nowrap;
}

.project-form {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  margin-top: 22px;
}

.project-form label:nth-of-type(1) {
  grid-column: span 3;
}

.project-form label:nth-of-type(2) {
  grid-column: span 5;
}

.project-form label:nth-of-type(3),
.project-form label:nth-of-type(4) {
  grid-column: span 2;
}

.project-form label:nth-of-type(5),
.project-form label:nth-of-type(6),
.project-form button[type="submit"] {
  grid-column: span 4;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px;
  gap: 14px;
  margin: 22px 0;
  padding: 18px;
}

#createProjectCard,
.toolbar {
  position: relative;
  overflow: hidden;
  border-color: rgba(15, 76, 129, 0.12);
  background:
    radial-gradient(circle at 96% 0%, rgba(20, 184, 166, 0.10), transparent 18rem),
    rgba(255, 255, 255, 0.86);
}

:root[data-theme="dark"] #createProjectCard,
:root[data-theme="dark"] .toolbar {
  border-color: rgba(124, 196, 255, 0.14);
  background:
    radial-gradient(circle at 96% 0%, rgba(20, 184, 166, 0.12), transparent 18rem),
    rgba(17, 24, 39, 0.82);
}

.projects-list {
  display: grid;
  gap: 22px;
}

.project-row {
  display: grid;
  gap: 18px;
  position: relative;
  overflow: hidden;
  border-color: rgba(15, 76, 129, 0.12);
  border-radius: 28px;
  background:
    radial-gradient(circle at 96% 0%, rgba(20, 184, 166, 0.10), transparent 14rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.86));
  box-shadow: 0 22px 60px rgba(8, 15, 32, 0.10);
  padding: 24px;
}

:root[data-theme="dark"] .project-row {
  border-color: rgba(124, 196, 255, 0.14);
  background:
    radial-gradient(circle at 96% 0%, rgba(20, 184, 166, 0.12), transparent 14rem),
    linear-gradient(135deg, rgba(17, 24, 39, 0.90), rgba(15, 23, 42, 0.84));
}

.project-row::after {
  content: '';
  position: absolute;
  top: 22px;
  right: 22px;
  width: 84px;
  height: 84px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(15, 76, 129, 0.10), rgba(20, 184, 166, 0.14)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84' fill='none'%3E%3Crect x='18' y='18' width='48' height='18' rx='6' fill='%230f4c81' opacity='.58'/%3E%3Crect x='18' y='43' width='48' height='18' rx='6' fill='%2314b8a6' opacity='.72'/%3E%3Cpath d='M28 27h18M28 52h12' stroke='white' stroke-width='3' stroke-linecap='round' opacity='.86'/%3E%3Ccircle cx='58' cy='52' r='6' fill='%2322c55e'/%3E%3Cpath d='M55.5 52l2 2 4.5-5' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / 84px 84px no-repeat;
  opacity: 0.42;
  pointer-events: none;
}

.project-row > * {
  position: relative;
  z-index: 1;
}

.repo-line {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  word-break: break-all;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.project-meta span,
.pill {
  border-radius: 999px;
  background: var(--chip-bg);
  padding: 8px 12px;
}

.pill {
  color: var(--chip-text);
  font-size: 0.82rem;
  font-weight: 900;
}

.pill.running {
  background: var(--success-soft);
  color: var(--success-text);
}

.pill.failed {
  background: var(--danger-soft);
  color: var(--danger-text);
}

.pill.building {
  background: var(--warning-soft);
  color: var(--warning-text);
  animation: pulse 1.2s ease-in-out infinite;
}

.pill.approved {
  background: var(--success-soft);
  color: var(--success-text);
}

.pill.pending {
  background: var(--warning-soft);
  color: var(--warning-text);
}

.pill.rejected {
  background: var(--danger-soft);
  color: var(--danger-text);
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 2px;
}

.project-actions a,
.project-actions button {
  padding: 10px 13px;
}

pre {
  max-height: 320px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 18px;
  background: var(--pre-bg);
  color: var(--pre-text);
  padding: 16px;
  font-size: 0.88rem;
}

.audit-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.audit-list,
.settings-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.audit-list {
  max-height: 720px;
  overflow-y: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
  scrollbar-color: var(--accent-border-strong) transparent;
  scrollbar-width: thin;
}

.audit-list::-webkit-scrollbar {
  width: 10px;
}

.audit-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: transparent;
}

.audit-list::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--accent-border-strong);
  background-clip: padding-box;
}

.audit-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  background-clip: padding-box;
}

.audit-row {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: var(--surface);
}

.audit-row p {
  margin-top: 8px;
  color: var(--muted);
}

.audit-row pre {
  margin-top: 12px;
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.classroom-management-layout {
  display: grid;
  gap: 18px;
  margin-top: 4px;
}

.classroom-management-layout > .panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(15, 76, 129, 0.12);
  background:
    radial-gradient(circle at 94% 0%, rgba(20, 184, 166, 0.10), transparent 18rem),
    rgba(255, 255, 255, 0.86);
}

:root[data-theme="dark"] .classroom-management-layout > .panel {
  border-color: rgba(124, 196, 255, 0.14);
  background:
    radial-gradient(circle at 94% 0%, rgba(20, 184, 166, 0.12), transparent 18rem),
    rgba(17, 24, 39, 0.82);
}

.classroom-management-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: flex-end;
}

.classroom-filter {
  min-width: 220px;
  max-width: 280px;
}

.student-overview {
  margin-bottom: 0;
}

.student-projects-page,
#studentProjectsPage {
  gap: 28px;
}

.student-classroom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.student-classroom-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  padding: 18px;
}

.classroom-title-button {
  min-height: auto;
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: none;
}

.classroom-title-button:hover,
.classroom-title-button:focus-visible {
  background: transparent;
  color: var(--accent);
  box-shadow: none;
  transform: none;
}

.classroom-title-button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  opacity: 0.72;
}

.activity-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--ink);
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 800;
}

button.activity-chip {
  border: 1px solid var(--line);
  cursor: pointer;
}

button.activity-chip.active {
  background: var(--nav-active-bg);
  border-color: var(--accent-border-strong);
}

.invite-notice {
  margin-top: 16px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 16px;
  background: var(--nav-active-bg);
  color: var(--ink);
  padding: 14px 16px;
  font-weight: 800;
}

.classroom-list {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.classroom-card {
  position: relative;
  display: grid;
  gap: 18px;
  overflow: hidden;
  border: 1px solid rgba(15, 76, 129, 0.12);
  border-radius: 28px;
  background:
    radial-gradient(circle at 96% 6%, rgba(34, 197, 94, 0.10), transparent 14rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.86));
  box-shadow: 0 22px 60px rgba(8, 15, 32, 0.10);
  padding: 24px;
}

:root[data-theme="dark"] .classroom-card {
  border-color: rgba(124, 196, 255, 0.14);
  background:
    radial-gradient(circle at 96% 6%, rgba(34, 197, 94, 0.12), transparent 14rem),
    linear-gradient(135deg, rgba(17, 24, 39, 0.90), rgba(15, 23, 42, 0.84));
}

.classroom-card::after {
  content: '';
  position: absolute;
  top: 22px;
  right: 22px;
  width: 84px;
  height: 84px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(15, 76, 129, 0.10), rgba(34, 197, 94, 0.14)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84' fill='none'%3E%3Crect x='16' y='20' width='22' height='18' rx='5' fill='%2314b8a6' opacity='.9'/%3E%3Crect x='44' y='20' width='24' height='18' rx='5' fill='%230f4c81' opacity='.48'/%3E%3Crect x='16' y='46' width='52' height='18' rx='5' fill='%2322c55e' opacity='.34'/%3E%3Cpath d='M23 29h8M51 29h10M24 55h25' stroke='white' stroke-width='3' stroke-linecap='round' opacity='.86'/%3E%3Ccircle cx='62' cy='55' r='5' fill='%2322c55e'/%3E%3Cpath d='M60 55l2 2 4-5' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / 84px 84px no-repeat;
  opacity: 0.44;
  pointer-events: none;
}

.classroom-section {
  display: grid;
  position: relative;
  z-index: 1;
  gap: 12px;
  border-top: 1px solid rgba(15, 76, 129, 0.10);
  padding-top: 18px;
}

.classroom-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-right: 92px;
}

.invite-link {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  word-break: break-all;
}

.invite-card {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.10), rgba(14, 165, 233, 0.08)),
    rgba(255, 255, 255, 0.62);
  padding: 16px;
  backdrop-filter: blur(12px);
}

.invite-card .eyebrow {
  color: var(--accent);
}

.invite-card button {
  flex: 0 0 auto;
}

.member-list {
  display: grid;
  gap: 8px;
}

.member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(15, 76, 129, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  padding: 12px;
}

:root[data-theme="dark"] .member-row {
  background: rgba(255, 255, 255, 0.06);
}

.member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-actions button,
.classroom-actions button {
  min-height: 38px;
  padding: 8px 11px;
}

.classroom-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.folder-tree {
  display: grid;
  gap: 8px;
}

.folder-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-left: calc(var(--folder-level) * 24px);
  border: 1px solid rgba(15, 76, 129, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  padding: 14px;
}

:root[data-theme="dark"] .folder-row {
  background: rgba(255, 255, 255, 0.06);
}

.folder-row::before {
  content: "";
  width: 10px;
  min-width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.folder-row > div:first-of-type {
  flex: 1;
}

.folder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.folder-actions button {
  min-height: 34px;
  padding: 7px 10px;
}

.module-list {
  display: grid;
  gap: 12px;
}

.module-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(15, 76, 129, 0.10);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(248, 251, 255, 0.68));
  padding: 16px;
}

:root[data-theme="dark"] .module-row {
  background: rgba(255, 255, 255, 0.06);
}

.module-row h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.module-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.module-actions button {
  min-height: 34px;
  padding: 7px 10px;
}

.module-workspace-content {
  margin-top: 22px;
}

#studentProjectsPage .panel {
  display: grid;
  gap: 6px;
}

.teacher-shell {
  display: grid;
  gap: 18px;
}

.teacher-hero {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  color: var(--workspace-hero-text);
  background: var(--workspace-hero-bg);
  box-shadow: 0 32px 90px rgba(2, 6, 23, 0.20);
}

.teacher-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.teacher-hero-copy {
  display: grid;
  gap: 10px;
}

.teacher-hero-copy h3 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  max-width: 12ch;
}

.teacher-hero-copy p {
  max-width: 58ch;
  color: var(--workspace-hero-muted);
}

.teacher-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 14px;
}

.teacher-hero-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--accent-border);
  border-radius: 22px;
  padding: 18px;
  background: var(--workspace-hero-card-bg);
  backdrop-filter: blur(8px);
}

.teacher-hero-card .muted {
  color: var(--workspace-hero-muted);
}

.teacher-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.teacher-hero-stat {
  border-radius: 18px;
  padding: 12px;
  background: var(--workspace-hero-stat-bg);
}

.teacher-hero-stat span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--workspace-hero-stat-label);
}

.teacher-hero-stat strong {
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.module-workspace-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.4fr);
  gap: 18px;
}

.module-brief,
.module-deliveries,
.delivery-card,
.module-workspace-empty {
  border: 1px solid rgba(15, 76, 129, 0.12);
  border-radius: 24px;
  background:
    radial-gradient(circle at 96% 0%, rgba(20, 184, 166, 0.10), transparent 14rem),
    rgba(255, 255, 255, 0.86);
  padding: 18px;
}

:root[data-theme="dark"] .module-brief,
:root[data-theme="dark"] .module-deliveries,
:root[data-theme="dark"] .delivery-card,
:root[data-theme="dark"] .module-workspace-empty {
  border-color: rgba(124, 196, 255, 0.14);
  background:
    radial-gradient(circle at 96% 0%, rgba(20, 184, 166, 0.12), transparent 14rem),
    rgba(17, 24, 39, 0.82);
}

.module-deliveries {
  display: grid;
  gap: 14px;
}

.module-deliveries-premium {
  padding: 22px;
  box-shadow: 0 22px 60px rgba(8, 15, 32, 0.10);
}

.delivery-list {
  display: grid;
  gap: 24px;
}

.delivery-list-dashboard {
  gap: 10px;
}

.delivery-table-head,
.delivery-card-dashboard {
  display: grid;
  grid-template-columns: 1.05fr 0.92fr 0.72fr 1fr auto;
  gap: 10px;
  align-items: center;
}

.delivery-table-head {
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.delivery-card {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.delivery-card-dashboard {
  border-radius: 18px;
  padding: 14px;
  gap: 10px;
}

.delivery-card.selected {
  border-color: rgba(20, 184, 166, 0.34);
  box-shadow: 0 24px 70px rgba(15, 76, 129, 0.18);
}

.delivery-student strong,
.delivery-published-link,
.delivery-commit-cell {
  word-break: break-word;
}

.delivery-student strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.96rem;
}

.delivery-student span,
.delivery-published-link,
.delivery-commit-cell {
  color: var(--muted);
  font-size: 0.84rem;
}

.delivery-status-cell,
.delivery-action-cell {
  display: flex;
  align-items: center;
}

.delivery-action-cell {
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.delivery-action-cell button,
.delivery-action-cell .button-link {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 0.84rem;
}

.delivery-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.delivery-head h4 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.delivery-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 2px;
}

.delivery-modal-stack {
  display: grid;
  gap: 14px;
}

.deployment-history-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.status-light {
  width: 9px;
  height: 9px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 1.2s ease-in-out infinite;
}

.pill.running,
.pill.building {
  background: #dbeafe;
  color: #1d4ed8;
}

.pill.failed {
  background: #fee2e2;
  color: #b91c1c;
}

.pill.offline {
  background: var(--chip-bg);
  color: var(--muted);
}

.folder-option-source {
  display: none;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: 380px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 18px;
  background: var(--toast-bg);
  color: var(--toast-text);
  padding: 16px 18px;
  box-shadow: var(--toast-shadow);
}

.theme-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 30;
  min-height: 40px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(10px);
}

.modal {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  padding: 24px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.28);
}

.modal.wide {
  width: min(920px, 100%);
}

.modal-body {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.modal-close {
  min-height: 38px;
  padding: 8px 12px;
}

@media (max-width: 1020px) {
  .auth-layout,
  .workspace {
    grid-template-columns: 1fr;
  }

  .workspace.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    min-height: 58vh;
    padding: 28px;
  }

  .auth-panel {
    min-height: auto;
    border-left: 0;
    border-top: 1px solid rgba(15, 76, 129, 0.12);
  }

  .auth-hero-copy {
    max-width: 620px;
  }

  .auth-hero h1 {
    font-size: 3.45rem;
  }

  .auth-visual {
    top: 122px;
    right: -180px;
    bottom: 24px;
    width: min(900px, 110vw);
    opacity: 0.78;
  }

  .deploy-orbit-secondary {
    left: auto;
    right: 42%;
  }

  .auth-card {
    width: min(100%, 560px);
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workspace.sidebar-collapsed .sidebar {
    padding: 24px;
  }

  .workspace.sidebar-collapsed .sidebar-head,
  .workspace.sidebar-collapsed .sidebar-brand {
    justify-content: space-between;
  }

  .workspace.sidebar-collapsed .sidebar-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    justify-items: stretch;
    min-height: 46px;
  }

  .workspace.sidebar-collapsed .brand-name,
  .workspace.sidebar-collapsed .user-label,
  .workspace.sidebar-collapsed .sidebar-footer button {
    width: auto;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
    transform: none;
  }

  .workspace.sidebar-collapsed .sidebar-toggle {
    position: static;
    transform: none;
  }

  .workspace.sidebar-collapsed .sidebar-toggle span {
    width: 17px;
    transform: none;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 22px;
  }

  .workspace.sidebar-collapsed .nav-list {
    margin-top: 22px;
  }

  .workspace.sidebar-collapsed .nav-list a {
    display: block;
    padding: 13px 14px;
    font-size: inherit;
  }

  .workspace.sidebar-collapsed .nav-list a::before {
    content: none;
  }

  .sidebar-footer {
    margin-top: 22px;
  }

  .project-form,
  .audit-filters,
  .settings-grid,
  .instruction-grid,
  .module-workspace-grid {
    grid-template-columns: 1fr;
  }

  .teacher-hero-grid {
    grid-template-columns: 1fr;
  }

  .teacher-hero-copy h3 {
    max-width: none;
  }

  .teacher-dashboard-head {
    min-height: 360px;
    align-items: flex-end;
  }

  .teacher-dashboard-head h1 {
    font-size: 3.35rem;
  }

  .dashboard-hero-visual {
    top: 110px;
    right: -210px;
    bottom: 18px;
    width: 720px;
    opacity: 0.52;
  }

  .classrooms-page-head {
    min-height: 360px;
  }

  .classrooms-page-head h1 {
    font-size: 3.2rem;
  }

  .classrooms-hero-visual {
    top: 116px;
    right: -230px;
    bottom: 18px;
    width: 760px;
    opacity: 0.52;
  }

  .operations-page-head {
    min-height: 360px;
  }

  .operations-page-head h1 {
    font-size: 3.2rem;
  }

  .operations-hero-visual {
    top: 116px;
    right: -230px;
    bottom: 18px;
    width: 760px;
    opacity: 0.52;
  }
}

@media (max-width: 720px) {
  .auth-layout {
    min-height: 100vh;
    overflow: visible;
  }

  .auth-hero {
    min-height: 520px;
    padding: 22px;
  }

  .auth-hero h1 {
    font-size: 2.72rem;
    line-height: 0.98;
  }

  .auth-hero .muted {
    font-size: 1rem;
  }

  .auth-brand {
    gap: 10px;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .auth-visual {
    top: 188px;
    right: -310px;
    bottom: 18px;
    width: 760px;
    border-radius: 26px;
    opacity: 0.62;
  }

  .deploy-orbit {
    display: none;
  }

  .auth-panel {
    padding: 18px;
  }

  .auth-card {
    border-radius: 24px;
    padding: 22px;
  }

  .auth-card-head {
    grid-template-columns: 1fr;
  }

  .auth-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
  }

  .auth-panel h2 {
    font-size: 1.65rem;
  }

  .teacher-dashboard-head {
    min-height: 420px;
    border-radius: 26px;
    padding: 22px;
  }

  .teacher-dashboard-head h1 {
    font-size: 2.7rem;
  }

  .dashboard-title-row {
    margin-bottom: 14px;
  }

  .dashboard-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .dashboard-hero-visual {
    top: 176px;
    right: -300px;
    bottom: 18px;
    width: 700px;
    border-radius: 22px;
    opacity: 0.42;
  }

  .teacher-dashboard-head #refreshButton {
    align-self: stretch;
  }

  .dashboard-entry-card {
    border-radius: 24px;
    padding: 20px;
  }

  .classrooms-page-head {
    min-height: 420px;
    border-radius: 26px;
    padding: 22px;
  }

  .classrooms-page-head h1 {
    font-size: 2.56rem;
  }

  .classrooms-hero-visual {
    top: 178px;
    right: -330px;
    bottom: 18px;
    width: 760px;
    border-radius: 22px;
    opacity: 0.42;
  }

  .classroom-card {
    border-radius: 24px;
    padding: 20px;
  }

  .classroom-card-head {
    padding-right: 0;
  }

  .classroom-card::after {
    opacity: 0.22;
  }

  .operations-page-head {
    min-height: 420px;
    border-radius: 26px;
    padding: 22px;
  }

  .operations-page-head h1 {
    font-size: 2.56rem;
  }

  .operations-hero-visual {
    top: 178px;
    right: -330px;
    bottom: 18px;
    width: 760px;
    border-radius: 22px;
    opacity: 0.42;
  }

  .project-row {
    border-radius: 24px;
    padding: 20px;
  }

  .project-row::after {
    opacity: 0.22;
  }

  .page-head,
  .section-head,
  .project-row-main,
  .callout,
  .academic-filters,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .callout {
    display: grid;
  }

  .teacher-dashboard-overview {
    grid-template-columns: 1fr;
  }

  .folder-row,
  .member-row,
  .invite-card,
  .classroom-management-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .classroom-filter {
    max-width: none;
    width: 100%;
  }

  .delivery-table-head {
    display: none;
  }

  .delivery-card-dashboard {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .delivery-action-cell {
    justify-content: stretch;
  }

  button,
  .button-link {
    width: 100%;
  }

  .password-field > .password-toggle {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    flex-basis: 38px;
  }

  .sidebar-toggle {
    width: 42px;
  }
}

@keyframes pulse {
  0% {
    opacity: 0.62;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.62;
  }
}

@keyframes dropdownReveal {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
