/* Sportzk — light theme «Arctic Sport»
   Cool paper white + mint accent + violet secondary.
   High contrast, readable outdoors, matches dark brand. */

[data-theme="light"] {
  color-scheme: light;
  --bg-app: #f2f5f9;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-glass: rgba(255, 255, 255, 0.92);
  --bg-input: #eef2f7;
  --bg-table-alt: #f8fafc;
  --accent: #00996e;
  --accent-dim: #007a58;
  --glow: #6347e8;
  --text-primary: #141a26;
  --text-muted: #5c6678;
  --text-dim: #8a94a6;
  --border: rgba(15, 23, 42, 0.1);
  --border-accent: rgba(0, 153, 110, 0.32);
  --shadow-glow: 0 4px 20px rgba(0, 153, 110, 0.12), 0 8px 28px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] body.app-shell {
  background: var(--bg-app);
}

[data-theme="light"] .app-header {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-app) 100%);
  border-bottom-color: var(--border);
}

[data-theme="light"] .card {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .bottom-nav {
  background: rgba(255, 255, 255, 0.94);
  border-top-color: var(--border);
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .btn-glow {
  box-shadow: 0 4px 18px rgba(0, 153, 110, 0.22);
}

[data-theme="light"] .flash-success {
  background: rgba(0, 153, 110, 0.08);
  color: var(--accent-dim);
}

[data-theme="light"] .flash-info {
  background: rgba(99, 71, 232, 0.07);
  border-color: rgba(99, 71, 232, 0.22);
  color: #4c3bb8;
}

[data-theme="light"] .flash-error {
  background: rgba(220, 38, 38, 0.07);
  color: #b91c1c;
}

[data-theme="light"] .text-green-400 { color: #059669 !important; }
[data-theme="light"] .text-amber-400 { color: #d97706 !important; }
[data-theme="light"] .text-gray-400,
[data-theme="light"] .text-gray-500 { color: var(--text-muted) !important; }

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--border);
}

[data-theme="light"] .settings-card--attention {
  border-color: rgba(0, 153, 110, 0.35);
  background: linear-gradient(135deg, rgba(0, 153, 110, 0.05), rgba(99, 71, 232, 0.04));
}

[data-theme="light"] .settings-details {
  border-color: var(--border);
}

[data-theme="light"] .diary-page {
  --diary-accent: #00996e;
  --diary-accent-dim: rgba(0, 153, 110, 0.1);
  --diary-accent-border: rgba(0, 153, 110, 0.28);
  --diary-violet: #6347e8;
  --diary-violet-dim: rgba(99, 71, 232, 0.1);
  --diary-surface: rgba(255, 255, 255, 0.96);
  --diary-card: #ffffff;
}

[data-theme="light"] .diary-hero {
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .diary-action,
[data-theme="light"] .diary-card,
[data-theme="light"] .diary-panel,
[data-theme="light"] .diary-entry,
[data-theme="light"] .diary-program-week,
[data-theme="light"] .diary-program-day {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

[data-theme="light"] .diary-sets-table {
  background: var(--bg-input);
}

[data-theme="light"] .diary-session-form__actions {
  background: linear-gradient(180deg, transparent, var(--bg-app) 30%);
}

[data-theme="light"] .progress-panel,
[data-theme="light"] .progress-hero,
[data-theme="light"] .home-feed__card {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .flatpickr-calendar {
  background: #fff;
  border-color: var(--border);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
}

/* Theme picker (settings) */
.theme-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.theme-picker__option {
  position: relative;
  cursor: pointer;
  margin: 0;
}

.theme-picker__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-picker__card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: var(--bg-surface);
  transition: border-color 0.15s, box-shadow 0.15s;
  height: 100%;
}

.theme-picker__option input:checked + .theme-picker__card {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.theme-picker__swatch {
  display: flex;
  gap: 0.35rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.theme-picker__swatch span {
  flex: 1;
}

.theme-picker__swatch--dark span:nth-child(1) { background: #0b0e14; }
.theme-picker__swatch--dark span:nth-child(2) { background: #1a2030; }
.theme-picker__swatch--dark span:nth-child(3) { background: #00e5a0; }

.theme-picker__swatch--light span:nth-child(1) { background: #f2f5f9; }
.theme-picker__swatch--light span:nth-child(2) { background: #ffffff; }
.theme-picker__swatch--light span:nth-child(3) { background: #00996e; }

.theme-picker__label {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.theme-picker__desc {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-muted);
  margin: 0;
}

.theme-palette-note {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(99, 71, 232, 0.04);
}

.theme-palette-note strong {
  color: var(--text-primary);
}
