﻿/* ============================================
   base.css â€” Reset, variables, typography
   ============================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

:root {
  --bg-primary: #f5f6fa;
  --bg-secondary: #ffffff;
  --bg-sidebar: #1e2330;
  --text-primary: #1f2430;
  --text-muted: #6b7280;
  --text-inverse: #ffffff;

  --border: #e5e7eb;
  --border-strong: #d1d5db;

  --accent: #4f6ef7;
  --accent-hover: #3a57e0;
  --accent-soft: #eef1fe;

  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  --dot-done: #22c55e;
  --dot-missed: #ef4444;
  --dot-rest: #d1d5db;
  --dot-future: #374151;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;

  --sidebar-width: 260px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

  --transition: 0.2s ease;
}

.hidden {
  display: none !important;
}

.text-muted {
  color: var(--text-muted);
}

.text-sm {
  font-size: var(--font-size-sm);
}

.hint {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
/* ============================================
   THEMES
   html[data-theme] overrides the :root variables
   ============================================ */

/* ---- Light (default, matches :root) ---- */
html[data-theme=light] {
  --bg-primary: #f5f6fa;
  --bg-secondary: #ffffff;
  --bg-sidebar: #1e2330;
  --text-primary: #1f2430;
  --text-muted: #6b7280;
  --text-inverse: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --accent: #4f6ef7;
  --accent-hover: #3a57e0;
  --accent-soft: #eef1fe;
}

/* ---- Dark ---- */
html[data-theme=dark] {
  --bg-primary: #12141a;
  --bg-secondary: #1e222b;
  --bg-sidebar: #0c0e13;
  --text-primary: #e5e8ef;
  --text-muted: #9096a3;
  --text-inverse: #ffffff;
  --border: #2a2f3a;
  --border-strong: #3a4150;
  --accent: #4f8cff;
  --accent-hover: #2f6fe0;
  --accent-soft: #1d2638;
}

/* ---- Solar (warm light) ---- */
html[data-theme=solar] {
  --bg-primary: #faf6f0;
  --bg-secondary: #ffffff;
  --bg-sidebar: #3a2f2a;
  --text-primary: #33292a;
  --text-muted: #8a7d70;
  --text-inverse: #ffffff;
  --border: #e8ded2;
  --border-strong: #d3c4b4;
  --accent: #e8753a;
  --accent-hover: #cc5e2c;
  --accent-soft: #fbeadf;
}


/* ---- Sepia (warm paper/retro) — corrected ---- */
html[data-theme=sepia] {
  --bg-primary: #f1e6d5;
  --bg-secondary: #faf3e6;
  --bg-sidebar: #3d3325;
  --text-primary: #3d3226;
  --text-muted: #8c7c66;
  --text-inverse: #ffffff;
  --border: #e0d2ba;
  --border-strong: #c9b89c;
  --accent: #a16207;
  --accent-hover: #854d0e;
  --accent-soft: #eadcc7;
}