:root {
  --bg: #eef3f4;
  --panel: #ffffff;
  --sidebar: #18363a;
  --primary: #2f6f75;
  --primary-hover: #285f64;
  --accent-soft: #dcebed;
  --text: #243238;
  --muted: #6b7a80;
  --border: #d5dde0;
  --input: #f7f9fa;
  --danger: #b34242;
  --shadow: 0 18px 50px rgba(20, 40, 45, .12);
}

html[data-theme="blue"] {
  --bg: #f1f5fa;
  --sidebar: #17375e;
  --primary: #2f68a3;
  --primary-hover: #285a8c;
  --accent-soft: #dfeaf6;
}

html[data-theme="green"] {
  --bg: #f2f6f1;
  --sidebar: #244637;
  --primary: #4f7f64;
  --primary-hover: #416b54;
  --accent-soft: #e1eee6;
}

html[data-theme="graphite"] {
  --bg: #f3f1ed;
  --sidebar: #2f3336;
  --primary: #7b6a4f;
  --primary-hover: #675943;
  --accent-soft: #ebe4d8;
}

html[data-theme="burgundy"] {
  --bg: #f7f2f3;
  --sidebar: #4b2831;
  --primary: #884757;
  --primary-hover: #733b49;
  --accent-soft: #f0dfe3;
}

html[data-theme="arkoolitus"] {
  --bg: #f6f1ed;
  --sidebar: #4a2a24;
  --primary: #9a2f25;
  --primary-hover: #7f251d;
  --accent-soft: #f1dfd7;
  --text: #2a211f;
  --muted: #786964;
  --border: #dfd1cb;
  --input: #fbf8f6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 38%) minmax(360px, 1fr);
}

.brand-panel {
  background: var(--sidebar);
  color: white;
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.brand-panel h1 { margin: 0 0 8px; font-size: 32px; }
.brand-panel p { margin: 0; opacity: .75; }

.brand-logo-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 18px;
  padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.brand-logo-card img {
  display: block;
  width: min(280px, 100%);
  height: auto;
}

.brand-mark {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.2);
  font-size: 25px;
  font-weight: 800;
}

.auth-card {
  align-self: center;
  justify-self: center;
  width: min(520px, calc(100% - 48px));
  background: var(--panel);
  padding: 42px;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin: 12px 0 8px;
  font-size: 30px;
}

.muted {
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.5;
}

.status-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--primary);
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 650;
  font-size: 14px;
}

input, select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  padding: 13px 14px;
  border-radius: 12px;
  font-size: 15px;
  outline: none;
}

input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

button, .secondary {
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.primary {
  background: var(--primary);
  color: white;
}
.primary:hover { background: var(--primary-hover); }

.secondary {
  display: block;
  color: var(--primary);
  background: var(--accent-soft);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 13px;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.theme-box {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.theme-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.theme-links a, .text-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 650;
}
.theme-links a {
  background: var(--accent-soft);
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 13px;
}
.text-link {
  display: inline-block;
  margin-top: 22px;
}

@media (max-width: 780px) {
  .auth-shell { grid-template-columns: 1fr; }
  .brand-panel {
    padding: 24px;
    min-height: 150px;
  }
  .brand-panel h1 { font-size: 24px; }
  .brand-mark { width: 56px; height: 56px; border-radius: 16px; }
  .auth-card {
    margin: 28px auto;
    padding: 28px;
  }
}

/* v1.5.42 billing notices */
.billing-alert{padding:12px 15px;border-radius:12px;margin:0 0 16px;font-weight:750;line-height:1.4;background:#fff1db;color:#7a4a00;border:1px solid #f0d3a3}
.billing-admin_locked,.billing-school_locked{background:#fde7e7;color:#8b2929;border-color:#efbcbc}
