@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Sora:wght@500;600;700&display=swap");

:root {
  /* surfaces — light, engineered */
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e9edf2;
  --line-2: #dce2ea;
  --field-bg: #ffffff;

  /* text */
  --text: #101a2b;
  --muted: #5a6776;
  --muted-2: #8a94a4;

  /* VESS brand (teal → lime), used app-wide */
  --accent: #0f9fb4;       /* VESS teal */
  --accent-2: #7fa829;     /* VESS lime */
  --accent-soft: #e4f4f7;
  --accent-2-soft: #eef5dd;
  --brand: #0f9fb4;        /* per-company override target */
  --danger: #e5484d;

  /* asset categories */
  --standalone: #0f9fb4;
  --colocation: #7fa829;
  --oze: #2e9e6b;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.05);
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 12px 28px -8px rgba(16, 24, 40, 0.12);
  --shadow-lg: 0 24px 60px -16px rgba(16, 24, 40, 0.22);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 14px;
}

/* ciemny motyw — przełączany jednym przyciskiem (data-theme="dark") */
[data-theme="dark"] {
  --bg: #0c1119;
  --surface: #141b25;
  --surface-2: #1a222e;
  --line: #232d3b;
  --line-2: #2f3b4b;
  --field-bg: #1a222e;
  --text: #eef2f8;
  --muted: #9aa6b7;
  --muted-2: #6b7787;
  --accent-soft: #0e2b31;
  --accent-2-soft: #1e2810;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 14px 30px -10px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 28px 64px -18px rgba(0, 0, 0, 0.65);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  background: var(--bg);
}

/* ---------- Lock screen ---------- */
body.locked .shell { display: none; }
body:not(.locked) .lock-screen { display: none; }

.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background: var(--bg);
}
.lock-aurora { display: none; }

.lock-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 392px;
  text-align: center;
  padding: 38px 34px 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: fade-in 460ms var(--ease);
}
.lock-mark {
  display: inline-grid;
  place-items: center;
  margin-bottom: 18px;
}
.lock-mark img { height: 30px; width: auto; display: block; }
.lock-eyebrow {
  margin: 0 0 4px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.lock-title {
  margin: 0 0 24px;
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}
.lock-sub { margin: 10px 0 24px; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

.lock-field { margin-bottom: 12px; }
.lock-field input,
.lock-field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.96rem;
  text-align: center;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.lock-field select { text-align-last: center; cursor: pointer; appearance: none; }
.lock-field select option { background: #fff; color: var(--text); }
.lock-field input:focus,
.lock-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lock-label { display: block; text-align: left; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 5px 2px; }

.lock-error { margin: 0 0 12px; color: var(--danger); font-size: 0.85rem; }
.lock-error.is-success { color: var(--accent); }
.lock-submit { width: 100%; padding: 12px; font-size: 0.98rem; }
.lock-reset { width: 100%; margin-top: 10px; padding: 10px 12px; font-size: 0.9rem; }

.lock-card.shake { animation: lock-shake 420ms; }
@keyframes lock-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

.lock-remember {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 16px; color: var(--muted-2); font-size: 0.82rem; cursor: pointer;
}
.lock-remember input { accent-color: var(--accent); cursor: pointer; }

.shell {
  position: relative;
  display: grid;
  grid-template-columns: clamp(256px, 22vw, 320px) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

/* VESS logo — najważniejszy element marki */
.brand { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.brand-mark { display: block; }
.brand-mark img { height: 30px; width: auto; display: block; }
.brand > div:last-child { min-width: 0; }

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.sidebar h1 {
  margin: 0;
  font-family: "Sora", "Inter", sans-serif;
  font-weight: 600;
  line-height: 1.25;
  font-size: 1.04rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.lede {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.82rem;
}

.nav { display: grid; gap: 3px; margin: 22px 0; }

.nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 160ms var(--ease);
}
.nav button:hover { color: var(--text); background: var(--surface-2); }
.nav button.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}
.nav button.is-active .nav-ico { color: var(--accent); }
.nav-ico { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }

.sidebar-foot { display: flex; flex-direction: column; gap: 14px; }
.sidebar-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 14px 16px;
}
.sidebar-label { font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
.sidebar-value {
  margin-top: 6px;
  font-family: "Sora", sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.sidebar-meta { margin-top: 2px; color: var(--muted); font-size: 0.8rem; }

/* „Powered by VESS Energy" */
.vess-logo {
  display: flex; align-items: center; gap: 8px;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.vess-by { font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); }
.vess-mark { flex-shrink: 0; }
.vess-word { font-family: "Sora", sans-serif; font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.vess-strong { font-weight: 700; color: var(--accent); }

/* per-company branding (właściciel — na dole belki, obok przełącznika motywu) */
.company-brand { flex: 1; min-width: 0; }
.company-brand:empty { display: none; }
.company-brand::before { content: "Właściciel"; display: block; font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 4px; }
.company-brand .company-wordmark { font-size: 1.02rem; }
.company-brand .company-user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-logo { display: flex; align-items: center; min-height: 28px; }
.company-logo img { max-height: 30px; max-width: 100%; object-fit: contain; }
.company-wordmark { font-family: "Sora", sans-serif; font-weight: 700; font-size: 1.16rem; letter-spacing: 0.02em; color: var(--brand, var(--text)); }
.company-user { margin-top: 3px; font-size: 0.76rem; color: var(--muted-2); }

/* ---------- Content ---------- */
.content { padding: 24px clamp(20px, 3vw, 48px) 64px; }

.topbar { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-bottom: 22px; }

.user-pill {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: default; color: var(--text);
  border: 1px solid var(--line-2); background: var(--surface);
  padding: 7px 8px 7px 15px; border-radius: 999px; font-size: 0.82rem;
}
.user-pill[hidden] { display: none; }
.user-pill-logout {
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted);
  font: inherit; font-size: 0.74rem; padding: 4px 11px; border-radius: 999px; cursor: pointer;
  transition: all 150ms var(--ease);
}
.user-pill-logout:hover { color: var(--danger); border-color: var(--danger); }

.topbar-pill {
  padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--muted); font: inherit; font-size: 0.82rem;
  cursor: pointer; transition: all 160ms var(--ease);
}
.topbar-pill:hover { color: var(--text); border-color: var(--accent); }
.topbar-pill--accent { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.topbar-pill--danger:hover { border-color: var(--danger); color: var(--danger); }

.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.hero h2 { margin: 6px 0 0; font-family: "Sora", sans-serif; font-weight: 600; font-size: 1.85rem; letter-spacing: -0.025em; }
.hero-sub { margin: 8px 0 0; color: var(--muted); max-width: 64ch; line-height: 1.55; }

/* ---------- Screens ---------- */
.app-screen { display: none; }
.app-screen.is-active { display: block; animation: fade-in 360ms var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.panel { border: none; }

.section-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 16px; }
.section-title h3 { margin: 0; font-family: "Sora", sans-serif; font-weight: 600; font-size: 1.12rem; letter-spacing: -0.015em; }
.section-title p { margin: 4px 0 0; color: var(--muted); font-size: 0.88rem; }

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  background: var(--surface);
  padding: 22px 24px;
}
.card + .card { margin-top: 16px; }

.sections-host {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(640px, 1fr));
  gap: 16px;
  align-items: start;
}
.sections-host > .card { margin-top: 0; }

.card-expand-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(16, 24, 40, 0.4);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 48px 28px 28px; overflow: auto; animation: fade-in 180ms ease;
}
.card.is-expanded { width: 100%; max-width: 1500px; margin: 0; box-shadow: var(--shadow-lg); }
.expand-only { display: none; }
.card.is-expanded .expand-only { display: block; }
.card.is-expanded .collapse-only { display: none; }

/* ---------- Metrics ---------- */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  transition: transform 180ms var(--ease), box-shadow 180ms ease;
}
.metric-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.metric-label { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); }
.metric-value { margin-top: 8px; font-family: "Sora", sans-serif; font-size: 1.8rem; font-weight: 600; letter-spacing: -0.025em; }
.metric-unit { font-size: 0.9rem; color: var(--muted); font-weight: 500; margin-left: 4px; font-family: "Inter", sans-serif; }
.metric-sub { margin-top: 4px; color: var(--muted); font-size: 0.8rem; }

/* ---------- Asset cards ---------- */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.asset-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  overflow: hidden;
  transition: transform 180ms var(--ease), box-shadow 180ms ease;
}
.asset-card::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: var(--cat-color, var(--accent));
}
.asset-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.asset-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 15px; }
.asset-name { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.01em; }
.asset-loc { color: var(--muted-2); font-size: 0.82rem; margin-top: 2px; }

.type-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; white-space: nowrap;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
}
.type-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.type-Standalone { color: var(--standalone); background: var(--accent-soft); }
.type-Colocation { color: var(--colocation); background: var(--accent-2-soft); }
.type-OZE { color: var(--oze); background: #e6f5ee; }

.asset-tag {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 500; cursor: pointer;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--line-2);
  transition: all 140ms var(--ease);
}
.asset-tag:hover { color: var(--accent); border-color: var(--accent); }

.asset-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 16px; }
.spec { min-width: 0; }
.spec-label { font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
.spec-value { margin-top: 3px; font-size: 1.02rem; font-weight: 600; font-family: "Sora", sans-serif; }
.asset-actions { display: flex; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- Buttons ---------- */
.primary-button, .ghost-button, .mini-button { font: inherit; cursor: pointer; border-radius: 10px; transition: all 150ms var(--ease); }
.primary-button:disabled, .ghost-button:disabled, .mini-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  box-shadow: none;
}

.primary-button {
  padding: 11px 20px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.primary-button:hover { background: color-mix(in srgb, var(--accent) 88%, #000); box-shadow: var(--shadow); }

.ghost-button { padding: 11px 18px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); }
.ghost-button:hover { color: var(--text); border-color: var(--accent); }

.mini-button { flex: 1; padding: 9px 12px; font-size: 0.82rem; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); }
.mini-button:hover { color: var(--text); border-color: var(--accent); }
.mini-button--danger:hover { color: var(--danger); border-color: var(--danger); }

.plan-tab {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 180px;
}
.plan-tab .mini-button { width: 100%; }
.plan-tab--disabled::before,
.plan-tab--disabled::after {
  position: absolute;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 140ms var(--ease), transform 140ms var(--ease);
  z-index: 20;
}
.plan-tab--disabled::after {
  content: attr(data-tooltip);
  bottom: calc(100% + 10px);
  width: 240px;
  max-width: calc(100vw - 32px);
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--text);
  color: var(--surface);
  box-shadow: var(--shadow);
  font-size: 0.74rem;
  line-height: 1.25;
  text-align: center;
}
.plan-tab--disabled::before {
  content: "";
  bottom: calc(100% + 4px);
  border: 6px solid transparent;
  border-top-color: var(--text);
}
.plan-tab--disabled:hover::before,
.plan-tab--disabled:hover::after,
.plan-tab--disabled:focus::before,
.plan-tab--disabled:focus::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Empty ---------- */
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty-mark { font-size: 2.4rem; margin-bottom: 12px; color: var(--accent); }
.empty h4 { margin: 0 0 6px; font-family: "Sora", sans-serif; font-size: 1.14rem; font-weight: 600; color: var(--text); }
.empty p { margin: 0 auto 18px; max-width: 42ch; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.field label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.field input, .field select {
  padding: 10px 13px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--field-bg); color: var(--text); font: inherit; font-size: 0.92rem;
  outline: none; transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field select option { background: #fff; color: var(--text); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-section-label {
  font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
  margin: 6px 0 12px; padding-top: 15px; border-top: 1px solid var(--line);
}
.form-section-label:first-child { border-top: none; padding-top: 0; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(16, 24, 40, 0.4); backdrop-filter: blur(4px);
  animation: fade-in 180ms ease;
}
.modal-overlay[hidden] { display: none; }
.modal {
  width: 100%; max-width: 460px; max-height: 88vh;
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow-lg);
}
.modal--wide { max-width: 560px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 21px 24px 12px; }
.modal-header h3 { margin: 0; font-family: "Sora", sans-serif; font-weight: 600; letter-spacing: -0.01em; }
.modal-close { border: none; background: none; color: var(--muted-2); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 8px 24px; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 22px; }

/* ---------- Table ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th { text-align: left; padding: 9px 12px; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); border-bottom: 1px solid var(--line-2); }
.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tr:last-child td { border-bottom: none; }

/* ---------- Charts ---------- */
.chart-wrap { width: 100%; overflow-x: auto; }
.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 210px; padding-top: 10px; }
.bar { flex: 1; min-width: 6px; border-radius: 4px 4px 0 0; background: var(--accent); }
.bar--price { background: var(--accent-2); }
.chart-axis { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted-2); font-size: 0.74rem; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; color: var(--muted); }
.legend-item.is-current { color: var(--text); font-weight: 600; }
.legend-dot { width: 11px; height: 11px; border-radius: 4px; }

.forecast-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.forecast-file-list { display: grid; gap: 8px; margin-top: 10px; }
.forecast-file-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2);
}
.forecast-file-row.is-current { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-2)); background: var(--accent-soft); }
.forecast-file-row.is-muted { opacity: 0.62; }
.forecast-file-main { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.forecast-file-main input { flex: none; margin-top: 3px; accent-color: var(--accent); }
.forecast-file-copy { min-width: 0; }
.forecast-file-title { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.forecast-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }
.forecast-file-meta { margin-top: 2px; color: var(--muted); font-size: 0.78rem; }
.forecast-current-control { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.forecast-current-control input { accent-color: var(--accent); }
.forecast-current-pill {
  display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  .forecast-file-row { grid-template-columns: 1fr; }
  .forecast-current-control, .forecast-file-row > .mini-button { justify-self: start; }
}

/* ---------- Misc ---------- */
.placeholder-note {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; margin-top: 16px;
  border: 1px solid var(--line-2); border-left: 3px solid var(--accent);
  border-radius: 10px; background: var(--surface-2);
  color: var(--muted); font-size: 0.86rem; line-height: 1.5;
}
.placeholder-note strong { color: var(--text); }

.row-actions { display: flex; gap: 8px; }
.text-muted { color: var(--muted); }
.mb-0 { margin-bottom: 0; }

input[type="range"] { accent-color: var(--accent); }

/* dół belki bocznej: właściciel/użytkownik + przełącznik motywu obok */
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--surface-2); color: var(--muted); font: inherit; font-size: 0.88rem; font-weight: 500;
  cursor: pointer; transition: all 150ms var(--ease);
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent); }
.theme-toggle--compact { flex: none; width: 42px; height: 42px; padding: 0; justify-content: center; }

@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
}
