:root {
  --font: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --bg: #f4f6f9;
  --bg-soft: #f8fafc;
  --surface: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-soft: #eef2f6;
  --brand: #0c2340;
  --brand-2: #1e4d7b;
  --brand-soft: rgba(30, 77, 123, 0.08);
  --accent: #0f766e;
  --danger: #b91c1c;
  --warning: #b45309;
  --success: #0f766e;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.1);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

:root[data-theme="dark"] {
  --bg: #0b1120;
  --bg-soft: #0f172a;
  --surface: #131c2e;
  --card: #151f33;
  --text: #e8eef6;
  --muted: #94a3b8;
  --line: #243044;
  --line-soft: #1a2438;
  --brand: #081726;
  --brand-2: #5b9fd4;
  --brand-soft: rgba(91, 159, 212, 0.12);
  --accent: #2dd4bf;
  --danger: #f87171;
  --warning: #fbbf24;
  --success: #2dd4bf;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.6;
  background: var(--bg);
  background-image: radial-gradient(ellipse 90% 60% at 50% -10%, rgba(30, 77, 123, 0.07), transparent 55%);
  color: var(--text);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

:root[data-theme="dark"] body {
  background-image: radial-gradient(ellipse 90% 60% at 50% -10%, rgba(91, 159, 212, 0.08), transparent 55%);
}

a { color: var(--brand-2); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: var(--brand-2); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 { letter-spacing: -0.03em; font-weight: 700; }

.topbar {
  min-height: 64px;
  background: rgba(12, 35, 64, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  padding: 0 clamp(16px, 4vw, 36px);
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

:root[data-theme="dark"] .topbar {
  background: rgba(8, 17, 38, 0.94);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.02rem;
  color: #fff;
  letter-spacing: -0.025em;
  white-space: nowrap;
  text-decoration: none;
}

.brand:hover { text-decoration: none; color: #fff; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
}

.main-nav {
  display: flex;
  gap: 6px;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
}

.nav-link {
  color: rgba(232, 241, 251, 0.82);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: #fff;
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.nav-admin { color: #ffdca8; }
.nav-admin.active { background: rgba(255, 190, 90, 0.18); color: #ffe8c2; }

.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.konto {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.86rem;
}

.konto-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.konto-email { color: #e8f1fb; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.settings-gear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.settings-gear:hover,
.settings-gear.active {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.pill-warn { background: rgba(183, 121, 31, 0.18); color: var(--warning); }

.pending-card {
  max-width: 520px;
  margin: 56px auto 0;
  text-align: center;
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.pending-card h1 { margin-bottom: 12px; }

.admin-badge {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffdca8;
  background: rgba(255, 190, 90, 0.16);
  padding: 2px 7px;
  border-radius: 999px;
}

.konto a { color: rgba(232, 241, 251, 0.88); font-size: 0.84rem; font-weight: 500; }
.konto a:hover { color: #fff; }

.theme-button {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  box-shadow: none;
  transition: background 0.18s var(--ease);
}

.theme-button:hover { background: rgba(255, 255, 255, 0.14); filter: none; }

.error {
  color: #fff;
  background: var(--danger);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0;
}

main {
  max-width: 1120px;
  margin: 32px auto 80px;
  padding: 0 24px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 8px;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(1.65rem, 3.2vw, 2.15rem);
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.page-intro {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.7;
  font-size: 0.95rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.section-head h2 { margin: 0; font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; }

.card {
  background: var(--card);
  padding: 26px 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.card:last-child { margin-bottom: 0; }

.card h2 {
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.card-grid > .card { margin-bottom: 0; }

.card-wide { grid-column: 1 / -1; }

.kicker, .eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kicker { color: #d9ebff; }
.eyebrow { color: var(--brand-2); margin: 0 0 8px; opacity: 0.9; }

.notice {
  background: var(--brand-soft);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 0.9rem;
  line-height: 1.55;
}

.notice.ok-notice { border-left: 3px solid var(--success); }
.notice.warn-notice { border-left: 3px solid var(--warning); }

form { display: grid; gap: 14px; margin: 0; }
label { font-size: 0.84rem; font-weight: 600; display: grid; gap: 7px; color: var(--text); }

.field-select { gap: 8px; }

.field-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-hint {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: -2px;
}

.select-wrap {
  position: relative;
  display: block;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
  opacity: 0.75;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.select-wrap:focus-within::after {
  border-color: var(--brand-2);
  transform: translateY(-35%) rotate(225deg);
}

input, select, button, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.92rem;
  background: var(--bg-soft);
  color: var(--text);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}

select,
.select-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 12px 42px 12px 14px;
  background-color: var(--card);
  cursor: pointer;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), var(--shadow-sm);
}

:root[data-theme="dark"] select,
:root[data-theme="dark"] .select-control {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow-sm);
}

select option {
  background: var(--card);
  color: var(--text);
  padding: 8px;
}

input:hover, select:hover, textarea:hover {
  border-color: #cbd5e1;
}

select:hover,
.select-control:hover {
  border-color: var(--brand-2);
  background-color: var(--card);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-2);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

select:focus,
.select-control:focus {
  box-shadow: 0 0 0 3px var(--brand-soft), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

form > select:not(.select-control),
.card select:not(.select-control) {
  margin-top: 0;
}

button, .button-link {
  background: var(--brand-2);
  color: #fff;
  border: 0;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  display: inline-block;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  transition: filter 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
  box-shadow: var(--shadow-sm);
}

button:hover, .button-link:hover {
  text-decoration: none;
  filter: brightness(1.06);
}

button:active, .button-link:active { transform: scale(0.99); }

.button-link:hover { text-decoration: none; }
.secondary { background: #475569; }
.danger { background: var(--danger); }
.mail, .success { background: var(--success); }
.compact { width: auto; padding: 7px 12px; font-size: 0.8rem; }
.full-width { width: 100%; }

.sub-nav {
  display: flex;
  gap: 4px;
  margin: 0 0 24px;
  flex-wrap: wrap;
  padding-bottom: 0;
  border-bottom: 1px solid var(--line);
}

.sub-nav-link {
  padding: 11px 16px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: -1px;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.sub-nav-link:hover {
  color: var(--text);
  text-decoration: none;
}

.sub-nav-link.active {
  background: transparent;
  border-color: transparent;
  border-bottom-color: var(--brand-2);
  color: var(--brand-2);
}

.sub-nav-secondary {
  margin-top: -4px;
  margin-bottom: 20px;
  border-bottom: none;
  gap: 8px;
}

.sub-nav-secondary .sub-nav-link {
  border-radius: 999px;
  border: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
  padding: 8px 14px;
  background: var(--card);
}

.sub-nav-secondary .sub-nav-link.active {
  background: var(--brand-2);
  border-color: var(--brand-2);
  color: #fff;
}

.list-item, .history-item {
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.list-item:first-child, .history-item:first-child { border-top: 0; padding-top: 0; }

.list-item small, .history-item small, .news-meta, .subtle, .hint, .empty, .hint-inline {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.empty { padding: 12px 0; font-style: italic; }

.pill {
  display: inline-block;
  margin: 0 6px 4px 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-2);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.pill-quality { background: rgba(15, 118, 110, 0.1); color: var(--accent); }
.pill-warn { background: rgba(180, 83, 9, 0.1); color: var(--warning); }

.auth {
  max-width: 420px;
  margin: 64px auto;
  padding: 32px 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.auth h1 {
  font-size: 1.85rem;
  margin: 0.15rem 0 0.5rem;
  letter-spacing: -0.04em;
}

.auth .subtle { margin-bottom: 8px; }

.auth form { margin-top: 20px; }

.auth > p:last-child {
  margin: 20px 0 0;
  text-align: center;
  font-size: 0.88rem;
}

.hero {
  background: linear-gradient(135deg, #0c2340 0%, #1f5a96 55%, #2f7ec0 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 34px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin: 6px 0 10px;
  letter-spacing: -0.04em;
}

.hero p { max-width: 680px; margin: 0; opacity: 0.92; line-height: 1.55; }
.hero form { margin: 0; min-width: 240px; }
.hero-button { background: #fff; color: #123456; }
.hero-compact { padding: 28px 32px; }
.hero-compact h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }

.dashboard-hero-unit {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: stretch;
  padding: 32px 34px 28px;
  border-radius: 0;
  background:
    radial-gradient(circle at top right, rgba(47, 126, 192, 0.28), transparent 42%),
    linear-gradient(135deg, #0c2340 0%, #173e66 52%, #1f5a96 100%);
  color: #fff;
  box-shadow: none;
  margin-bottom: 0;
}

.dashboard-hero-dock {
  padding: 18px 34px 22px;
  background: linear-gradient(180deg, rgba(8, 23, 38, 0.94) 0%, rgba(12, 35, 64, 0.98) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.dashboard-dock-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(217, 235, 255, 0.72);
}

.dashboard-dock-hint {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(237, 245, 255, 0.72);
}

.dashboard-dock-hint a {
  color: #d9ebff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dashboard-dock-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-dock-items li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-dock-items li.is-ok { border-color: rgba(49, 167, 141, 0.35); }
.dashboard-dock-items li.is-warn { border-color: rgba(212, 160, 23, 0.38); }

.dashboard-dock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(237, 245, 255, 0.92);
}

.dashboard-dock-items li.is-ok .dashboard-dock-icon {
  background: rgba(49, 167, 141, 0.18);
  color: #7ee0c8;
}

.dashboard-dock-items li.is-warn .dashboard-dock-icon {
  background: rgba(212, 160, 23, 0.18);
  color: #f0c96a;
}

.dashboard-dock-items strong {
  display: block;
  font-size: 0.9rem;
  color: rgba(237, 245, 255, 0.96);
}

.dashboard-dock-items small {
  color: rgba(217, 235, 255, 0.68);
  font-size: 0.8rem;
}

.dashboard-briefing-wide { margin-bottom: 0; }

.dashboard-hero-action {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.dashboard-hero-briefing {
  display: grid;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.dashboard-briefing-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(217, 235, 255, 0.72);
}

.dashboard-hero-briefing .dashboard-briefing-date {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.dashboard-hero-briefing .dashboard-briefing-time {
  margin: -2px 0 0;
  font-size: 0.9rem;
  color: rgba(217, 235, 255, 0.78);
}

.dashboard-briefing-meta-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 0;
}

.dashboard-briefing-meta-hero div {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.dashboard-briefing-meta-hero dt {
  margin: 0 0 3px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(217, 235, 255, 0.62);
}

.dashboard-briefing-meta-hero dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(237, 245, 255, 0.96);
}

.dashboard-briefing-open {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: 2px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dashboard-briefing-open:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
  text-decoration: none;
}

.dashboard-briefing-empty-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(237, 245, 255, 0.82);
}

.dashboard-hero-action form { margin: 0; }

.dashboard-eyebrow {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(217, 235, 255, 0.88);
}

.dashboard-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3.6vw, 2.55rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.dashboard-lead {
  margin: 0;
  max-width: 640px;
  line-height: 1.65;
  color: rgba(237, 245, 255, 0.92);
}

.dashboard-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.dashboard-meta-item {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.88rem;
  color: rgba(237, 245, 255, 0.92);
}

.dashboard-meta-item strong {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(217, 235, 255, 0.72);
}

.dashboard-cta {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 1rem;
  font-weight: 700;
  color: #123456;
  background: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16); }
.dashboard-cta:disabled { opacity: 0.72; cursor: wait; transform: none; }

.dashboard-cta-hint {
  margin: 12px 0 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: rgba(237, 245, 255, 0.78);
  text-align: center;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.dashboard-metric:hover {
  border-color: var(--brand-2);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.dashboard-metric-label {
  font-size: 0.82rem;
  color: var(--muted);
}

.dashboard-metric-value {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.dashboard-briefing-card {
  background: linear-gradient(180deg, var(--card), var(--bg-soft));
}

.dashboard-briefing-body { display: grid; gap: 12px; }

.dashboard-briefing-date {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.dashboard-briefing-time {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.dashboard-briefing-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.dashboard-briefing-meta div {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
}

.dashboard-briefing-meta dt {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.dashboard-briefing-meta dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.dashboard-briefing-link {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
}

.dashboard-briefing-empty p { margin: 0 0 8px; }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.quick-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.quick-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-2);
  text-decoration: none;
}

.quick-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-2);
  font-size: 1rem;
  margin-bottom: 10px;
}

.quick-card h3 { margin: 0 0 6px; font-size: 1rem; }
.quick-card p { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.45; }

.card-grid-single { grid-template-columns: 1fr; }

.setup-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.setup-list li {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.setup-list li.ok { border-color: rgba(13, 122, 79, 0.25); }
.setup-list li.warn { border-color: rgba(183, 121, 31, 0.35); }

.admin-danger-zone { border-color: rgba(180, 35, 24, 0.25); }
.admin-actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.admin-actions form { margin: 0; flex: 1; min-width: 220px; }

code {
  font-family: Consolas, monospace;
  font-size: 0.88em;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 6px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.stat {
  display: flex;
  flex-direction: column;
  background: var(--card);
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

a.stat:hover { border-color: var(--brand-2); box-shadow: var(--shadow); text-decoration: none; }
.stat span { font-size: 0.82rem; color: var(--muted); }
.stat b { font-size: 1.45rem; margin-top: 6px; letter-spacing: -0.03em; font-weight: 800; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 8px; align-items: center; }
.check input { width: auto; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions form, .list-item form, .history-item form { margin: 0; }
.muted { opacity: 0.58; }

.catalog-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.catalog-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  transition: border-color 0.18s var(--ease);
}

.catalog-item:hover { border-color: #cbd5e1; }

.catalog-item.imported { opacity: 0.72; }
.catalog-item input { width: auto; margin-top: 4px; }
.catalog-item h4 { margin: 0 0 4px; font-size: 0.98rem; }

.briefing pre {
  white-space: pre-wrap;
  margin: 0;
  font: inherit;
  line-height: 1.68;
}

.briefing-content { line-height: 1.65; }

.briefing-block {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.briefing-block:last-child { border-bottom: 0; }
.briefing-block h2 {
  margin: 0 0 10px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-2);
}

.news-brief-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 14px;
  background: var(--bg-soft);
}

.news-brief-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.news-brief-head h3 { margin: 0; font-size: 1.02rem; line-height: 1.4; font-weight: 700; }

.relevance {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.relevance-hoch { background: rgba(15, 118, 110, 0.12); color: var(--accent); }
.relevance-mittel { background: rgba(180, 83, 9, 0.1); color: var(--warning); }
.relevance-niedrig { background: rgba(100, 116, 139, 0.12); color: var(--muted); }

.fund-relevance-list { margin-top: 12px; }
.fund-relevance-item { flex-direction: column; align-items: stretch; gap: 8px; }
.fund-relevance-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}
.relevance-pct { font-weight: 700; white-space: nowrap; }
.relevance-bar-wrap {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.relevance-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-2), var(--accent));
  min-width: 2px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 14px 0 0;
}

.meta-grid div { margin: 0; }
.meta-grid dt { font-size: 0.76rem; color: var(--muted); margin-bottom: 2px; }
.meta-grid dd { margin: 0; font-size: 0.92rem; }
.meta-grid .impact { font-weight: 700; color: var(--brand-2); }

.source-link {
  display: inline-block;
  margin-top: 10px;
  font-weight: 650;
  font-size: 0.9rem;
}

.relevance-rationale {
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  border-left: 3px solid var(--brand-2);
}

.relevance-rationale strong {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: 6px;
}

.relevance-rationale p {
  margin: 0;
  line-height: 1.62;
  color: var(--text);
  font-size: 0.92rem;
}

.bullet-list { margin: 0; padding-left: 18px; }
.bullet-list li { margin-bottom: 8px; }

.search { grid-template-columns: 1fr auto auto; align-items: end; }

.article-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.9fr) auto auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 8px;
}

.article-filters .field-select { margin: 0; }

.field-search input {
  background: var(--card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), var(--shadow-sm);
}

.filter-check {
  align-self: end;
  padding-bottom: 11px;
  white-space: nowrap;
}

.filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-actions form { margin: 0; }

.filter-summary { margin: 4px 0 16px; }

.news-card {
  padding: 22px 0;
  border-top: 1px solid var(--line-soft);
}

.news-card:first-of-type { border-top: 0; padding-top: 0; }
.news-card h3 { font-size: 1.08rem; margin: 8px 0; line-height: 1.4; font-weight: 700; }
.news-card h3 a { color: var(--text); text-decoration: none; }
.news-card h3 a:hover { color: var(--brand-2); text-decoration: underline; }
.news-card p { line-height: 1.65; color: var(--muted); font-size: 0.9rem; }
.news-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.admin-user-search {
  margin-bottom: 18px;
}

.news-list-item { margin-bottom: 10px; }

.fund-card {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.fund-card:first-of-type { border-top: 0; padding-top: 0; }
.fund-card h3 { font-size: 1.08rem; margin: 0 0 8px; }

.fund-news-analysis-list { display: grid; gap: 12px; margin-top: 12px; }

.fund-news-analysis {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--surface);
}

.fund-news-analysis h4 {
  font-size: 1rem;
  margin: 0;
  line-height: 1.35;
}

.fund-news-analysis p { margin: 8px 0 0; line-height: 1.55; color: var(--muted); }

.fund-news-analysis .news-brief-head { margin-bottom: 4px; }
.fund-list-item .holdings-line { display: block; margin-top: 6px; color: var(--muted); }
.fund-edit { margin-top: 10px; }
.fund-edit summary { cursor: pointer; color: var(--brand-2); font-size: 0.92rem; }
.fund-edit form { margin-top: 10px; display: grid; gap: 8px; }
.etf-section { margin-top: 24px; }

.history-item b { display: inline-block; margin-bottom: 4px; }

.progress-card {
  max-width: 520px;
  margin: 56px auto;
  text-align: center;
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.progress-bar-wrap {
  height: 14px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin: 22px 0 14px;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand-2), var(--accent));
  border-radius: 999px;
  transition: width 0.35s ease;
}

.progress-step {
  color: var(--muted);
  min-height: 1.4em;
}

.compact-progress { max-width: none; margin: 0; text-align: left; }

.progress-bar-indeterminate {
  width: 40%;
  animation: progress-indeterminate 1.4s ease-in-out infinite;
}

@keyframes progress-indeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

.analysis-text {
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 1.2rem;
  white-space: pre-wrap;
}

.impact-text {
  padding: 14px 16px;
  background: var(--brand-soft);
  color: var(--text);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.fund-picker-list { list-style: none; padding: 0; margin: 0; }
.fund-picker-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.fund-picker-item:last-child { border-bottom: none; }

.external-link { margin-left: 6px; }

button:disabled { opacity: 0.55; cursor: not-allowed; }

/* Kalender, System-Monitoring */
.calendar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.calendar-list.compact { gap: 8px; }
.calendar-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.calendar-item.importance-hoch { border-left: 3px solid var(--accent); }
.calendar-item.importance-mittel { border-left: 3px solid var(--muted); }
.calendar-time, .calendar-date { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.calendar-day { margin-bottom: 18px; }
.calendar-day h3 { margin: 0 0 10px; font-size: 1rem; }
.calendar-weekday { color: var(--muted); font-weight: 500; font-size: 0.88rem; }
.calendar-groups { display: grid; gap: 8px; }
.dashboard-calendar .page-head.compact { margin-bottom: 12px; }
.system-checks .is-ok dd { color: var(--ok, #1a7f4b); }
.system-checks .is-warn dd { color: var(--warn, #b45309); }
.backup-list { margin: 14px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.9rem; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); padding: 6px 10px; font-size: 0.82rem; }

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  font-weight: 600;
}
.explore-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.explore-group { margin-bottom: 16px; }
.explore-group h3 { margin: 0 0 8px; font-size: 0.95rem; color: var(--muted); }
.explore-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.explore-chip {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.82rem;
  text-decoration: none;
  color: inherit;
  max-width: 100%;
}
.explore-chip.active,
.explore-chip:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
}

.explore-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.explore-search-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}
.explore-search-form label span {
  font-size: 0.82rem;
  color: var(--muted);
}
.explore-search-form input,
.explore-search-form select {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: inherit;
}
.explore-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.explore-metrics-compact {
  margin-top: 8px;
}
.explore-metric {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.explore-metric-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}

/* Explore detail dashboard */
.explore-dashboard {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
}
.explore-panel {
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 88%, var(--accent)), var(--surface-2));
}
.explore-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.explore-panel-head h3 {
  margin: 0;
  font-size: 1rem;
}
.explore-panel-head small {
  color: var(--muted);
  font-size: 0.78rem;
}
.explore-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.explore-stat-card {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}
.explore-stat-label {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 6px;
  line-height: 1.3;
}
.explore-stat-value {
  display: block;
  font-size: 0.95rem;
  line-height: 1.35;
  word-break: break-word;
}
.explore-dashboard-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.explore-perf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.explore-perf-card {
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
}
.explore-perf-value {
  display: block;
  font-size: 1.15rem;
  margin-top: 4px;
}
.explore-tone-positive {
  border-color: color-mix(in srgb, #15803d 35%, var(--border));
  background: color-mix(in srgb, #15803d 8%, var(--surface));
}
.explore-tone-positive .explore-perf-value { color: #15803d; }
.explore-tone-negative {
  border-color: color-mix(in srgb, #b91c1c 35%, var(--border));
  background: color-mix(in srgb, #b91c1c 8%, var(--surface));
}
.explore-tone-negative .explore-perf-value { color: #b91c1c; }
.explore-tone-neutral .explore-perf-value { color: inherit; }
html[data-theme="dark"] .explore-tone-positive {
  border-color: color-mix(in srgb, #4ade80 35%, var(--border));
  background: color-mix(in srgb, #4ade80 10%, var(--surface));
}
html[data-theme="dark"] .explore-tone-positive .explore-perf-value { color: #4ade80; }
html[data-theme="dark"] .explore-tone-negative {
  border-color: color-mix(in srgb, #f87171 35%, var(--border));
  background: color-mix(in srgb, #f87171 10%, var(--surface));
}
html[data-theme="dark"] .explore-tone-negative .explore-perf-value { color: #f87171; }
.explore-risk-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.explore-risk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}
.explore-risk-label {
  font-size: 0.82rem;
  color: var(--muted);
  flex: 1 1 auto;
}
.explore-risk-value {
  font-size: 0.95rem;
  white-space: nowrap;
}
.explore-allocation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.explore-tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.explore-tag {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.84rem;
  line-height: 1.3;
}
.explore-bar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.explore-bar-row {
  display: grid;
  grid-template-columns: minmax(72px, 34%) 1fr auto;
  align-items: center;
  gap: 10px;
}
.explore-bar-label {
  font-size: 0.8rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.explore-bar-track {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 55%, transparent);
  overflow: hidden;
}
.explore-bar-fill {
  height: 100%;
  border-radius: inherit;
  min-width: 2px;
  transition: width 0.25s ease;
}
.explore-bar-fill-country {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, #2563eb), var(--accent));
}
.explore-bar-fill-sector {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, #7c3aed), color-mix(in srgb, var(--accent) 55%, #a855f7));
}
.explore-bar-value {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 44px;
  text-align: right;
  white-space: nowrap;
}
.explore-holdings-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.explore-holdings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.explore-holdings-table th,
.explore-holdings-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.explore-holdings-table th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
}
.explore-holdings-table tbody tr:last-child td {
  border-bottom: none;
}
.explore-holdings-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.explore-holdings-rank {
  width: 42px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.explore-holdings-weight {
  width: 88px;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.explore-holdings-name {
  word-break: break-word;
}
.explore-holdings-empty {
  margin: 0;
}

.explore-search-form label.explore-search-wide {
  flex: 1 1 220px;
  min-width: 220px;
}
.explore-search-hint {
  margin: 12px 0 0;
}
.explore-chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.explore-chart-area {
  fill: color-mix(in srgb, var(--accent) 22%, transparent);
  stroke: none;
}
.explore-chart {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--surface-2)), var(--surface-2));
  border: 1px solid var(--border);
}
.explore-chart-label {
  fill: var(--muted);
  font-size: 11px;
}
.explore-chart-wrap { margin: 20px 0; }
.explore-chart-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 10px;
}
.explore-chart-head h3 { margin: 0; }
.explore-chart-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--border);
}
.explore-chart-period {
  display: inline-block;
  padding: 8px 12px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.explore-chart-period:hover {
  color: inherit;
}
.explore-chart-period.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.explore-chart-wrap.is-loading {
  opacity: 0.65;
  pointer-events: none;
}
.hidden { display: none !important; }
.explore-chart-error { margin: 0 0 10px; }
.explore-chart-label-end {
  font-weight: 600;
}
.chart-up { color: #15803d; }
.chart-down { color: #b91c1c; }
html[data-theme="dark"] .chart-up { color: #4ade80; }
html[data-theme="dark"] .chart-down { color: #f87171; }

@media (max-width: 960px) {
  .topbar { flex-wrap: wrap; padding: 12px 18px; }
  .nav-toggle { display: inline-block; margin-left: auto; }
  .main-nav {
    order: 4;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding-top: 8px;
  }
  body.nav-open .main-nav { display: flex; }
  .nav-link { border-radius: 10px; }
  .konto-email { display: none; }
  .explore-dashboard-split {
    grid-template-columns: 1fr;
  }
  .explore-bar-row {
    grid-template-columns: minmax(64px, 38%) 1fr auto;
  }
  .card-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { align-items: flex-start; flex-direction: column; }
  .hero form { width: 100%; }
  .dashboard-hero { grid-template-columns: 1fr; }
  .dashboard-dock-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-dock-head { flex-direction: column; align-items: flex-start; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { grid-template-columns: 1fr; }
  .article-filters { grid-template-columns: 1fr 1fr; }
  .filter-actions { grid-column: 1 / -1; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .meta-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  main { padding: 0 14px; }
  .stats { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .hero { padding: 26px 22px; }
  .dashboard-metrics { grid-template-columns: 1fr; }
  .dashboard-hero { padding: 24px 20px 20px; }
  .dashboard-hero-dock { padding: 16px 20px 18px; }
  .dashboard-dock-items { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .article-filters { grid-template-columns: 1fr; }
  .list-item, .history-item { align-items: flex-start; flex-direction: column; }
  .actions { width: 100%; }
  .actions form { flex: 1; }
  .actions button { width: 100%; }
  .catalog-item { grid-template-columns: auto 1fr; }
}
