/* Design-System adaptiert von rewert.ch (Light-Theme).
   Farben: Schwarz/Weiss + Akzent-Grün #61FF93. Helvetica, scharfe Ecken. */

:root {
  --rw-black: #000000;
  --rw-white: #ffffff;
  --rw-green: #61ff93;
  --rw-text: #000000;
  --rw-muted: #4a5568;
  --rw-border: #e2e5ea;
  --rw-bg: #ffffff;
  --rw-surface: #ffffff;
  --rw-danger: #b82105;

  --rw-shadow-card: 0 15px 15px -10px rgba(0, 0, 0, 0.05);
  --rw-shadow-btn-hover: 0 15px 25px -7px rgba(0, 0, 0, 0.1);

  --rw-radius: 0px;
  --rw-content-max: 1280px;
  --rw-content-narrow: 842px;
  --rw-edge-pad: 2rem;

  --rw-font:
    Helvetica, 'Helvetica Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--rw-font);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  background: var(--rw-bg);
  color: var(--rw-text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--rw-font);
  font-weight: 400;
  line-height: 1.5;
  color: var(--rw-text);
  margin: 0;
}

h1 {
  font-size: 32px;
}
h2 {
  font-size: 28px;
}
h3 {
  font-size: 24px;
}
h4 {
  font-size: 22px;
}
h5 {
  font-size: 20px;
}
h6 {
  font-size: 18px;
}

a {
  color: var(--rw-black);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover,
a:focus-visible {
  color: var(--rw-green);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header — weisser Hintergrund, schwarzes Logo, grüner Hover. */
.site-header {
  background: var(--rw-white);
  border-bottom: 1px solid var(--rw-border);
}

.site-header-inner {
  max-width: var(--rw-content-max);
  margin: 0 auto;
  padding: 1.25rem var(--rw-edge-pad);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.site-header .brand img {
  display: block;
  max-width: 180px;
  height: auto;
}

.site-header .spacer {
  flex: 1;
}

.env-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rw-white);
  background: var(--rw-black);
  border-radius: var(--rw-radius);
}

.env-local {
  background: var(--rw-muted);
}
.env-test {
  background: var(--rw-black);
  color: var(--rw-green);
}
.env-prod {
  background: var(--rw-black);
}

.site-header .version {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  color: var(--rw-muted);
}

/* Hauptbereich. */
main {
  max-width: var(--rw-content-narrow);
  margin: 5rem auto;
  padding: 0 var(--rw-edge-pad);
  display: grid;
  gap: 2rem;
}

@media (max-width: 1024px) {
  main {
    margin: 3rem auto;
  }
}

@media (max-width: 767px) {
  main {
    margin: 2rem auto;
    padding: 0 1.5rem;
  }
  .site-header-inner {
    padding: 1rem 1.5rem;
  }
}

.card {
  background: var(--rw-surface);
  padding: 2rem;
  box-shadow: var(--rw-shadow-card);
  border-radius: var(--rw-radius);
}

@media (max-width: 767px) {
  .card {
    padding: 1.5rem;
  }
}

.card h2 {
  margin: 0 0 1.25rem 0;
  font-size: 22px;
}

/* Formular. */
form {
  display: flex;
  gap: 0.75rem;
}

input[type='text'] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rw-border);
  border-radius: var(--rw-radius);
  font: inherit;
  color: var(--rw-text);
  background: var(--rw-white);
  transition: border-color 0.15s ease;
}

input[type='text']:focus {
  outline: none;
  border-color: var(--rw-black);
}

/* Buttons — schwarz/weiss, grüner Hover wie rewert.ch. */
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: var(--rw-black);
  color: var(--rw-white);
  border: 0;
  border-radius: var(--rw-radius);
  font: inherit;
  font-weight: 400;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.2s ease;
}

button:hover:not(:disabled),
button:focus-visible:not(:disabled),
.button:hover,
.button:focus-visible {
  background: var(--rw-green);
  color: var(--rw-white);
  box-shadow: var(--rw-shadow-btn-hover);
}

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

button.del {
  background: transparent;
  color: var(--rw-danger);
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

button.del:hover:not(:disabled) {
  background: var(--rw-black);
  color: var(--rw-green);
  box-shadow: none;
}

/* Item-Liste. */
ul.items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

ul.items li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.875rem 1rem;
  border: 1px solid var(--rw-border);
  border-radius: var(--rw-radius);
  background: var(--rw-white);
  transition: border-color 0.15s ease;
}

ul.items li:hover {
  border-color: var(--rw-black);
}

ul.items .name {
  font-weight: 400;
}

ul.items .created {
  color: var(--rw-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
}

.empty {
  color: var(--rw-muted);
  font-style: italic;
  margin: 0;
}

.error {
  margin: 0.75rem 0 0 0;
  color: var(--rw-danger);
}
