/* Gleiche Design-Tokens wie App und Next.js-Katalog (tailwind.config.ts) */
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('/assets/fonts/ee40bb094c99a29a-s.p.woff2') format('woff2'); }
@font-face { font-family: 'DynaPuff'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/dfa8b79dd9cddf0f-s.p.woff2') format('woff2'); }
:root {
  --sand-chip: #F9F1E6;
  --sand-border: #F0E7D8;
  --sand-soft: #F7F1E8;
  --sand-divider: #E9E5DD;
  --coral: #F46C4C;
  --coral-soft: #FFECE7;
  --blue: #2D6EA1;
  --blue-dark: #23577E;
  --blue-soft: #E9F3FA;
  --navy: #203B4E;
  --ink: #2B241C;
  --ink-slate: #4E5E6D;
  --ink-secondary: #72757E;
  --ink-muted: #6B7268;
  --success: #4A9A68;
  --success-soft: #EAF5EA;
  --success-text: #2F6B45;
  --warning: #FFB33C;
  --warning-soft: #FFF3D9;
  --warning-text: #B8742E;
  --danger: #E6433A;
  --danger-soft: #FFEEEB;
  --danger-text: #B3362E;
  --bg-top: #FEF8EF;
  --radius-card: 16px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-top);
  color: var(--ink);
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 768px) { .login-shell { grid-template-columns: 1fr 1fr; } }
.login-aside {
  background: var(--navy); color: #fff; padding: 60px 48px;
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
}
.login-aside h1 { font-size: 30px; font-weight: 800; margin: 0; }
.login-aside p { color: #C9D6E0; line-height: 1.55; margin: 0; }
.login-form-wrap { padding: 60px 48px; display: flex; flex-direction: column; justify-content: center; gap: 16px; max-width: 420px; }
.login-form-wrap h2 { font-size: 26px; font-weight: 800; margin: 0 0 6px; }
.login-page .login-shell { min-height: calc(100vh - 68px); }
.login-page-footer { min-height: 68px; border-top: 1px solid var(--sand-border); padding: 24px 48px; font-size: 13px; font-weight: 600; color: var(--ink-secondary); }
.login-form { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.login-role-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.login-role-field legend { font-size: 13px; font-weight: 800; color: var(--ink-slate); margin-bottom: 8px; padding: 0; }
.login-role-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 5px; border: 1px solid var(--sand-border); border-radius: 15px; background: var(--sand-soft); }
.login-role-option { position: relative; cursor: pointer; min-width: 0; }
.login-role-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.login-role-option span { display: flex; align-items: center; justify-content: center; min-height: 43px; border: 1px solid transparent; border-radius: 11px; color: var(--ink-slate); font-size: 14px; font-weight: 800; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.login-role-option:hover span { color: var(--blue-dark); }
.login-role-option input:checked + span { background: #fff; border-color: #c8deed; color: var(--blue-dark); box-shadow: 0 2px 7px #203b4e12; }
.login-role-option input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.login-form .field input { width: 100%; min-height: 49px; }
.login-form .btn { width: 100%; min-height: 49px; }
@media (max-width: 767px) {
  .login-aside { padding: 34px 28px; }
  .login-form-wrap { padding: 38px 28px; max-width: none; }
  .login-page-footer { padding: 22px 28px; }
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-slate); }
input[type=text], input[type=email], input[type=password], input[type=url], textarea, select {
  border: 1px solid var(--sand-border); border-radius: 12px; padding: 12px 14px;
  font-size: 15px; font-family: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 80px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--blue); outline-offset: 1px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px; font-weight: 800; font-size: 14px;
  border: none; cursor: pointer; text-decoration: none;
}
.btn-coral { background: var(--coral); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-soft { background: var(--sand-soft); color: var(--ink); }
.btn-danger { background: var(--danger-soft); color: var(--danger-text); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }

.error-msg { background: var(--danger-soft); color: var(--danger-text); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; font-weight: 600; }
.notice { background: var(--success-soft); color: var(--success-text); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; font-weight: 700; margin-bottom: 14px; }

.shell { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.topbar .brand { font-family: 'DynaPuff', 'Nunito', sans-serif; font-weight: 700; font-size: 22px; color: var(--coral); }
.topbar .who { font-size: 13px; color: var(--ink-secondary); display: flex; align-items: center; gap: 12px; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 22px; }
@media (min-width: 700px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card { background: #fff; border-radius: var(--radius-card); box-shadow: inset 0 0 0 1px var(--sand-border); padding: 16px; }
.stat-card .label { font-size: 12.5px; color: var(--ink-muted); font-weight: 700; }
.stat-card .value { font-size: 24px; font-weight: 800; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius-card); overflow: hidden; box-shadow: inset 0 0 0 1px var(--sand-border); }
th, td { text-align: left; padding: 12px 14px; font-size: 13.5px; border-bottom: 1px solid var(--sand-divider); }
th { color: var(--ink-muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }

.badge { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.badge-live { background: var(--success-soft); color: var(--success-text); }
.badge-review { background: var(--warning-soft); color: var(--warning-text); }
.badge-draft { background: var(--sand-soft); color: var(--ink-secondary); }

.card { background: #fff; border-radius: var(--radius-card); box-shadow: inset 0 0 0 1px var(--sand-border); padding: 20px; margin-bottom: 18px; }
.card h3 { margin: 0 0 14px; font-size: 16px; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.row-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.row-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--sand-chip); border-radius: 10px; font-size: 13.5px; }
.row-item .grow { flex: 1; min-width: 0; }
.row-item .muted { color: var(--ink-muted); font-size: 12px; }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; }
.add-row input { flex: 1; min-width: 140px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }

/* BackendShell: Seitenleiste + Inhalt, 1:1 nach dem Next.js-Entwurf */
.shell-wrap { display: flex; align-items: flex-start; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--sand-border);
  display: flex; flex-direction: column; gap: 22px; padding: 22px 14px;
  position: sticky; top: 0; height: 100vh; box-sizing: border-box;
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.sidebar-toggle, .sidebar-toggle-label { display: none; }
.wordmark-sm { font-family: 'DynaPuff', 'Nunito', sans-serif; font-weight: 700; font-size: 24px; color: var(--navy); }
.role-badge { border-radius: 8px; padding: 3px 8px; font-size: 10px; font-weight: 800; background: #FBE4CE; color: var(--warning-text); }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-row { display: flex; align-items: center; gap: 12px; min-height: 44px; flex-shrink: 0; padding: 4px 12px; border-radius: 12px; font-size: 14.5px; font-weight: 700; color: var(--ink-slate); text-decoration: none; }
.nav-row:hover { background: var(--sand-soft); text-decoration: none; }
.nav-row svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-row.on { background: #EAF0F4; color: var(--blue); }
.sidebar-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 12px; background: var(--sand-soft); text-decoration: none; color: var(--ink); }
.sidebar-avatar { width: 36px; height: 36px; border-radius: 50%; background: #F8D9B7; flex-shrink: 0; }
.sidebar-user-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sidebar-user-text strong { font-size: 13px; font-weight: 800; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-text small { font-size: 11px; color: var(--ink-muted); }

.shell-content { flex: 1; min-width: 0; min-height: 100vh; padding: 26px 32px; box-sizing: border-box; display: flex; flex-direction: column; }
.backend-footer { margin-top: auto; padding-top: 32px; font-size: 13px; color: var(--ink-muted); text-align: left; }
.shell-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.shell-heading h1 { font-size: 26px; font-weight: 800; margin: 0 0 4px; line-height: 1.2; }
.shell-heading p { font-size: 14px; color: var(--ink-muted); margin: 0; }
.shell-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.pill { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--sand-border); font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none; }
.pill svg { width: 16px; height: 16px; flex-shrink: 0; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.filter-row input[type=text] { border: none; outline: none; font-size: 13px; font-family: inherit; background: transparent; flex: 1; min-width: 120px; }

.placeholder-card { background: #fff; border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--sand-border); padding: 48px 32px; text-align: center; color: var(--ink-muted); }
.placeholder-card svg { width: 40px; height: 40px; margin: 0 auto 14px; color: var(--sand-border); }
.placeholder-card h2 { font-size: 18px; font-weight: 800; color: var(--ink); margin: 0 0 6px; }
.placeholder-card p { font-size: 14px; margin: 0; }

@media (max-width: 900px) {
  .shell-wrap { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; }
  .sidebar-toggle { display: block; position: absolute; width: 1px; height: 1px; opacity: 0; }
  .sidebar-toggle-label { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--sand-border); border-radius: 999px; background: var(--sand-soft); color: var(--ink-slate); font-size: 13px; font-weight: 800; cursor: pointer; }
  .sidebar-toggle:focus-visible + .sidebar-toggle-label { outline: 2px solid var(--blue); outline-offset: 2px; }
  .sidebar-nav { display: none; width: 100%; max-height: min(60vh, 480px); overflow-y: auto; flex-direction: column; flex-wrap: nowrap; border-top: 1px solid var(--sand-border); padding-top: 8px; }
  .sidebar-toggle:checked ~ .sidebar-nav { display: flex; }
  .sidebar-user { width: 100%; margin-top: 0; }
  .shell-content { padding: 18px; }
}
