/*
 * Verwaltungsbereich – Schneiderei Stichfest
 * Gleiches Designsystem wie die Hauptseite (Lora/Karla, Ink #1a1a1a),
 * bewusst reduziert auf das, was ein internes Tool braucht: kein Marketing-
 * Schnickschnack, aber konsistente Typografie/Farben/Radien.
 */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #f2f2f2;
  font-family: 'Karla', Arial, sans-serif;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
}

a { color: #1a1a1a; }
a:hover, a:focus-visible { color: #000000; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
  border-radius: 4px;
}

.aw-topbar {
  background: #1a1a1a;
  color: #ffffff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.aw-topbar .aw-brand {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.2px;
}

.aw-topbar .aw-user {
  font-size: 14px;
  color: #cccccc;
  display: flex;
  align-items: center;
  gap: 16px;
}

.aw-logout {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 14px;
  font-weight: 600;
}

.aw-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px;
}

.aw-login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.aw-card {
  background: #ffffff;
  border-radius: 6px;
  padding: 36px;
  box-shadow: 0 20px 44px -20px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 420px;
}

.aw-card h1 {
  margin: 0 0 6px;
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 24px;
}

.aw-card .aw-subtitle {
  margin: 0 0 28px;
  font-size: 14px;
  color: #666666;
}

.aw-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}

.aw-label {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
}

.aw-input,
.aw-textarea {
  width: 100%;
  border: 1px solid #cccccc;
  border-radius: 8px;
  padding: 12px 14px;
  font-family: 'Karla', Arial, sans-serif;
  font-size: 15px;
  color: #1a1a1a;
  background: #ffffff;
  min-height: 44px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.aw-textarea {
  min-height: 140px;
  resize: vertical;
}

.aw-input:hover, .aw-textarea:hover { border-color: #1a1a1a; }
.aw-input:focus-visible, .aw-textarea:focus-visible {
  border-color: #1a1a1a;
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}

.aw-input[aria-invalid="true"], .aw-textarea[aria-invalid="true"] { border-color: #b3261e; }

.aw-error {
  font-size: 13px;
  color: #b3261e;
  margin: 6px 0 0;
}

.aw-alert {
  font-size: 14px;
  line-height: 1.6;
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.aw-alert.aw-alert-error {
  background: #fdecea;
  border: 1px solid #b3261e;
  color: #7a1a13;
}

.aw-alert.aw-alert-success {
  background: #f2f2f2;
  border: 1px solid #cccccc;
  color: #1a1a1a;
}

.aw-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.aw-toggle-row input {
  width: 22px;
  height: 22px;
  accent-color: #1a1a1a;
  cursor: pointer;
}

.aw-toggle-row label {
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.aw-hint {
  font-size: 13px;
  color: #767676; /* 4.5:1 Kontrast auf Weiß, erfüllt WCAG AA */
  margin: -10px 0 22px;
}

.aw-button {
  background: #1a1a1a;
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 8px;
  cursor: pointer;
  min-height: 46px;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.aw-button:hover:not(:disabled) { background: #000000; transform: translateY(-2px); }
.aw-button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.aw-preview {
  margin-top: 36px;
  padding: 24px;
  background: #1a1a1a;
  border-radius: 8px;
}

.aw-preview-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #999999;
  margin: 0 0 14px;
}

.aw-preview-card {
  background: #1a1a1a;
  border-radius: 8px;
  display: flex;
  gap: 16px;
}

.aw-preview-card p { margin: 0 0 8px; color: #ffffff; }
.aw-preview-card p:last-child { margin-bottom: 0; color: #d4d4d4; font-size: 14px; }

.aw-section-gap { margin-top: 28px; }

.aw-recipient-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.aw-recipient-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid #eeeeee;
}

.aw-recipient-row:last-child { border-bottom: none; }

.aw-recipient-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #1a1a1a;
  cursor: pointer;
  flex-shrink: 0;
}

.aw-recipient-email {
  font-size: 15px;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.aw-button-remove {
  background: transparent;
  border: none;
  color: #767676; /* 4.5:1 Kontrast auf Weiß, erfüllt WCAG AA */
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 6px 4px;
  flex-shrink: 0;
  min-height: 32px;
}

.aw-button-remove:hover { color: #b3261e; }

.aw-inline-form {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.aw-inline-form .aw-input { flex: 1; min-width: 220px; margin: 0; }

.aw-button-secondary {
  background: transparent;
  color: #1a1a1a;
  border: 1.5px solid #1a1a1a;
  font-weight: 700;
  font-size: 15px;
  padding: 11px 22px;
  border-radius: 8px;
  cursor: pointer;
  min-height: 46px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.aw-button-secondary:hover { background: #1a1a1a; color: #ffffff; transform: translateY(-2px); }
