:root {
  --bg: #ffffff;
  --panel: #f7f8fa;
  --panel-border: #e6e8ec;
  --text: #1b1d20;
  --muted: #6b7178;
  --link: #0b57d0;
  --link-hover: #0a47ad;
  --border: #d9dde2;
  --input-bg: #ffffff;
  --chip: #eef1f5;
  --chip-hover: #e3e8ef;
  --accent: #9d2235;       /* Latvian carmine red */
  --accent-soft: #f4e3e6;
  --row-hover: #f0f2f5;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.10);
}

:root[data-theme="dark"] {
  --bg: #15171a;
  --panel: #1d2024;
  --panel-border: #2c3036;
  --text: #e9ebed;
  --muted: #9aa1a9;
  --link: #8ab4ff;
  --link-hover: #aecbff;
  --border: #31363c;
  --input-bg: #20242a;
  --chip: #262b31;
  --chip-hover: #2f353c;
  --accent: #e0556a;
  --accent-soft: #36232a;
  --row-hover: #22262b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

a, a:link, a:visited { color: var(--link); text-decoration: none; }
a:hover, a:active { color: var(--link-hover); text-decoration: underline; }

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

/* Theme toggle */
.themeToggle {
  border: 1px solid var(--border);
  background: var(--chip);
  color: var(--text);
  border-radius: 999px;
  width: 38px;
  height: 34px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.themeToggle:hover { background: var(--chip-hover); }
.themeIconSun { display: none; }
.themeIconMoon { display: inline; }
:root[data-theme="dark"] .themeIconSun { display: inline; }
:root[data-theme="dark"] .themeIconMoon { display: none; }
