:root {
  color-scheme: light;
  --bg: #f2f4f1;
  --surface: #ffffff;
  --surface2: #f4f7f5;
  --border: #dce5df;
  --text: #20332a;
  --text-dim: #53675c;
  --text-muted: #607367;
  --accent: #176548;
  --accent-soft: #e9f4ed;
  --accent-border: #badac7;
  --on-accent: #ffffff;
  --green: #16704d;
  --red: #b53e39;
  --danger-soft: #fbece9;
  --danger-border: #edcec6;
  --yellow: #876016;
  --warning-soft: #fff5d9;
  --shadow-sm: 0 2px 5px #18352604;
  --shadow-md: 0 12px 36px #18352608;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101814;
  --surface: #19251e;
  --surface2: #223128;
  --border: #35483c;
  --text: #edf5ef;
  --text-dim: #b4c9bc;
  --text-muted: #a5bcad;
  --accent: #92e2b0;
  --accent-soft: #213e2d;
  --accent-border: #41684e;
  --on-accent: #102519;
  --green: #8bddaa;
  --red: #ffaaa3;
  --danger-soft: #422925;
  --danger-border: #714840;
  --yellow: #edcf88;
  --warning-soft: #39301c;
  --shadow-sm: 0 2px 5px #00000015;
  --shadow-md: 0 12px 36px #00000020;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface2);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.theme-toggle > span:first-child {
  font-size: 22px;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.auth-theme-controls {
  position: absolute;
  right: 24px;
  top: 24px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 540px) {
  .theme-toggle .theme-label {
    display: none;
  }

  .auth-theme-controls {
    right: 20px;
    top: 32px;
  }

}

.current-user {
  display: block;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.4;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.brand, .brand > div { min-width: 0; }
.brand-symbol { flex-shrink: 0; }
