:root {
  color-scheme: light;
  --bg: #f4f8f6;
  --surface: #ffffff;
  --surface-2: #eef7f5;
  --ink: #172927;
  --muted: #657572;
  --line: #dbe7e4;
  --brand: #11806f;
  --brand-2: #2f66d0;
  --warm: #f2c96d;
  --danger: #c84545;
  --shadow: 0 18px 50px rgba(27, 55, 51, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(17, 128, 111, 0.08), transparent 34%),
    linear-gradient(240deg, rgba(47, 102, 208, 0.08), transparent 36%),
    var(--bg);
}

button, input, textarea, select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

textarea { resize: vertical; }
label {
  display: grid;
  gap: 8px;
  color: #304642;
  font-weight: 700;
}

img { max-width: 100%; display: block; }

.boot-screen,
.center-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.boot-screen {
  grid-template-columns: auto auto;
  gap: 16px;
  background:
    radial-gradient(circle at 50% 42%, rgba(17, 128, 111, 0.1), transparent 34%),
    var(--bg);
  animation: bootFade 600ms ease both;
}

.brand-mark {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), #75d8c3);
  color: white;
  font-size: 28px;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.boot-screen .brand-mark {
  animation: bootPulse 1.3s ease-in-out infinite;
}

@keyframes bootPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 18px 50px rgba(17, 128, 111, 0.16); }
  50% { transform: scale(1.04); box-shadow: 0 22px 60px rgba(17, 128, 111, 0.26); }
}

@keyframes bootFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.brand-mark.small {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 17px;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.switch-btn {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-btn {
  background: #11806f;
  color: #fff;
  box-shadow: 0 10px 24px rgba(17, 128, 111, 0.22);
}

.primary-btn.large { min-height: 52px; padding: 0 22px; }
.secondary-btn { background: #e5f2ef; color: #0f665a; }
.ghost-btn { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.danger-btn { background: #feecec; color: var(--danger); }
.switch-btn { background: #172927; color: white; }

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover,
.switch-btn:hover {
  transform: translateY(-1px);
}

.loader {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid #dce9e6;
  border-top-color: var(--brand);
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.muted { color: var(--muted); }
.success-text { color: var(--brand); font-weight: 800; }

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 700;
}
.alert.danger { background: #feecec; color: var(--danger); }
.alert.warning { background: #fff5d9; color: #765500; }
