/* Extracted from Inuvet-Styleguide/inuvet.css — tokens & components used by Konversions-Analyse */

:root {
  --base: 1rem;
  --module: clamp(1.5rem, 1rem + 2.7vw, 3rem);
  --half-module: clamp(0.75rem, 0.5rem + 1.35vw, 1.5rem);

  --gutter: var(--module);
  --margin: var(--module);
  --section-gap: var(--module);

  --text-xs: 0.667rem;
  --text-sm: 0.8rem;
  --text-base: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
  --text-m: clamp(1.25rem, 1rem + 0.7vw, 1.5rem);
  --text-l: clamp(1.5rem, 1rem + 1.7vw, 2.25rem);
  --text-xl: clamp(2rem, 1rem + 3.2vw, 3.375rem);

  --lh-base: 1.5;
  --lh-h3: 1.2;
  --lh-h2: 1.17;
  --lh-h1: 1.11;

  --fg: #2E2E2E;
  --fg-hover: #333;
  --fg-muted: #666;
  --bg: #fff;
  --border: #cccccc;
  --border-light: #e0e0e0;
  --accent-bg: #f2f2f2;

  --border-focus: var(--fg);
  --border-active: var(--fg-hover);

  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;
  --focus-ring-color: var(--green);

  --green: #78b41b;
  --green-hover: #58990F;
  --green-light: #f0fae6;

  --color-action: var(--green);
  --color-action-hover: var(--green-hover);
  --color-success: var(--green);
  --color-link: var(--green);
  --color-amber: #E8A020;
  --color-notice-bg: #FEFFDA;
  --color-error: #c00;

  --cat-beruhigung: #C3D7EE;

  --font: "schnebel-sans-me", sans-serif;

  --anim-fast: 0.2s ease;
  --anim-mid: 0.3s ease;
  --anim-base: 0.4s ease;

  --container-max: 1536px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] {
  display: none !important;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: var(--lh-base);
}

:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

h1 {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: var(--lh-h1);
  letter-spacing: -0.02em;
  margin-bottom: var(--half-module);
}

h2 {
  font-size: var(--text-l);
  font-weight: 700;
  line-height: var(--lh-h2);
  margin-bottom: var(--half-module);
}

h3 {
  font-size: var(--text-m);
  font-weight: 700;
  line-height: var(--lh-h3);
  margin-bottom: var(--half-module);
}

.label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg-muted);
  margin-bottom: var(--half-module);
}

.text-sm { font-size: var(--text-sm); }
.text-muted { color: var(--fg-muted); }

.page {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--module);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--half-module);
  padding-bottom: var(--module);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--module);
}

.header .btn.--ghost {
  min-width: 80px;
  text-align: right;
}

.panel {
  border: 1px solid var(--border);
  padding: var(--module);
  margin-bottom: var(--module);
}

.panel.--error {
  border-color: var(--color-error);
  background: #fff5f5;
}

.section-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg-muted);
  padding-bottom: var(--half-module);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--half-module);
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1;
  padding: 1.125rem var(--half-module);
  width: fit-content;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--anim-fast), color var(--anim-fast), border-color var(--anim-fast);
  text-decoration: none;
}

.btn.--primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.btn.--primary:hover {
  background: var(--fg);
  border-color: var(--fg);
  box-shadow: 0 0 0 2px var(--fg);
}

.btn.--secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--fg);
  border-color: var(--fg);
}

.btn.--secondary:hover {
  background: var(--fg);
  color: var(--bg);
  box-shadow: 0 0 0 2px var(--fg);
}

.btn.--ghost {
  background: transparent;
  color: var(--fg);
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
}

.btn.--ghost::after {
  content: " →";
  transition: margin-left var(--anim-fast);
  margin-left: 0.25rem;
}

.btn.--ghost:hover::after {
  margin-left: 0.5rem;
}

.btn.--full { width: 100%; text-align: center; }

/* Notice */
.notice {
  background: var(--color-notice-bg);
  padding: var(--half-module);
  display: flex;
  flex-direction: column;
  gap: calc(var(--base) * 0.35);
  margin-bottom: var(--module);
}

.notice p { margin: 0; font-size: var(--text-base); line-height: var(--lh-base); }
.notice__title { font-weight: 700; font-size: var(--text-base); margin: 0; }

/* Forms */
.form-field {
  position: relative;
  margin-bottom: var(--half-module);
}

.form-field input,
.form-field select {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  color: var(--fg);
  background: var(--green-light);
  border: 1px solid var(--border-light);
  padding: calc(var(--base) * 1.25) calc(var(--base) * 0.75) calc(var(--base) * 0.5);
  width: 100%;
  min-width: 0;
  outline: none;
  transition: border-color var(--anim-fast), background var(--anim-fast);
}

.form-field select {
  appearance: none;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23000' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--border-focus);
  background: var(--bg);
}

.form-field input:focus-visible,
.form-field select:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.form-field label {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--fg-muted);
  pointer-events: none;
  transition: all var(--anim-fast);
  background: transparent;
  padding: 0 0.25rem;
}

.form-field input:focus ~ label,
.form-field input:not(:placeholder-shown) ~ label,
.form-field select:focus ~ label,
.form-field select:valid ~ label {
  top: 0;
  transform: translateY(-50%);
  font-size: var(--text-xs);
  color: var(--fg);
  background: var(--bg);
}

.form-row {
  display: flex;
  align-items: center;
  gap: var(--half-module);
  flex-wrap: wrap;
}

.form-row > label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--fg-muted);
}

/* Tables (from inuvet .rte table) */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: calc(var(--base) * 0.4) calc(var(--base) * 0.75) calc(var(--base) * 0.4) 0;
  border-bottom: 1px solid var(--border-light);
  font-size: var(--text-base);
  vertical-align: top;
}

.data-table th {
  font-weight: 700;
  border-bottom-color: var(--border);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* Login */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: var(--module);
}

.login-panel {
  width: 100%;
  max-width: 24rem;
  border: 1px solid var(--border);
  padding: var(--module);
  display: flex;
  flex-direction: column;
  gap: var(--half-module);
}

.login-panel__header {
  display: flex;
  flex-direction: column;
  gap: calc(var(--base) * 0.15);
}

.login-panel__title {
  font-size: var(--text-m);
  font-weight: 700;
  margin: 0;
  line-height: var(--lh-h3);
}

.login-panel__sub {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  margin: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: calc(var(--base) * 0.5);
}

.flash-alert {
  color: var(--color-error);
  font-size: var(--text-sm);
}
