/* ===== Grundlayout ===== */
:root{
  --bg: #f8f9fb;
  --surface: #fff;
  --text: #111;
  --muted: #667085;

  --primary: #111;          /* wie .btn-primary */
  --primary-ink: #fff;
  --accent: #7c3aed;        /* Fokus */
  --danger: #e11d48;
  --success:#16a34a;

  --radius: 12px;
  --shadow: 0 8px 28px rgba(0,0,0,.08);

  --gap-1: .5rem;
  --gap-2: .75rem;
  --gap-3: 1rem;
  --gap-4: 1.5rem;
}


/* Layout */

.page{ /* Seite mit Innenabstand */
  padding: clamp(16px, 3vw, 24px);
}
.padding1{
 padding-inline: 1.5rem;
}
.padding2{
  padding-inline: 5rem;
}
.container{ /* max. Breite wie Login-Karte */
 width:min(1580px, 96vw);
 margin-inline:auto;
}
.toolbar1{ /* horizontale Leiste: Titel links, Aktionen rechts */
  display:flex; align-items:center; justify-content:space-between;
  gap:var(--gap-2); margin-bottom: var(--gap-4);
}
.toolbar2{ /* horizontale Leiste: Titel links, Aktionen rechts */
  display:flex; align-items:center;;
  gap:var(--gap-2);
}
.stack{ /* vertikale Stacks (Abstände zwischen Elementen) */
  display:grid; 
  gap:var(--gap-3); 
}
.grid-2{ /* kompakter 2/3-Spalten Grid für Form & Listen */
  display:grid;
  grid-template-columns: 1fr 1fr; 
  gap:var(--gap-3); 
}
@media (max-width: 820px){ .grid-2{ grid-template-columns: 1fr; } }
.cluster{ 
  display:flex; gap:var(--gap-2); 
  flex-wrap:wrap; align-items:center; 
}
.center {
  align-items: left;
}
.flex {
  display: flex;
}




/* Text*/
.page-title{
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 50px;
  font-weight: 750;
  color: var(--text);
}
.text1{
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 15px; color: #111;
}
.text2{
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 25px;
}
.bold{
  font-weight: 750;
}
.abstand{
  word-spacing: 100px;
}
body{
  background:var(--bg);
  color:var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}


/* Flächen */
.box{
  background:var(--surface);
  box-shadow:var(--shadow); padding: clamp(16px, 2.5vw, 22px);
}
.card{
  background:var(--surface); border-radius:var(--radius);
  box-shadow:var(--shadow); padding: clamp(16px, 2.5vw, 22px);
}


/* Knöpfe */
.btn {
  padding: 0.65rem 1rem;
  border: 1px solid #111;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.btn2 {
  padding: 0.65rem 1rem;
  border: 1px solid #d0d5dd;
  background: #fff;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-primary {
  background: #111;
  color: #fff;
}
.btn-outline {
  border: 1px solid #d0d5dd;
  background: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-outline:hover {
  background: #f3f4f6;
}







/* Layout und Container */





/* Navigation */
.topbar{
  background:var(--surface); box-shadow:var(--shadow);
  border-radius: var(--radius); padding:.6rem .9rem; margin-bottom: var(--gap-4);
  display:flex; align-items:center; justify-content:space-between; gap:var(--gap-2);
}
.topbar__brand{ font-weight:700; letter-spacing:.2px; }
.topbar__nav{ display:flex; gap:1rem; list-style:none; margin:0; padding:0; }
.topbar__nav a{ color:var(--text); text-decoration:none; }
.topbar__nav a:hover{ text-decoration:underline; }




/*Karten, Sektionen, Headlines */

.card--inset{ padding:12px; }
.section-title{ margin:0; font-weight:700; }
.muted{ color:var(--muted); }








/* Formulare */
.form{ display:grid; gap:var(--gap-3); }
.form-row{ display:grid; gap:.4rem; }
.form-inline{ display:flex; gap:var(--gap-2); align-items:end; flex-wrap:wrap; }

select, textarea{
  padding:.6rem .75rem; border:1px solid #d0d5dd; border-radius:10px; background:#fff;
}
textarea{ min-height: 120px; resize:vertical; }

.help{ font-size:.9rem; color:var(--muted); }




/* Tabellen */
.table{
  width:100%; border-collapse: collapse; background:var(--surface);
  border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow);
}
.table th, .table td{ padding:.8rem 1rem; border-bottom:1px solid #eef1f4; text-align:left; }
.table th{ background:#f3f4f6; font-weight:700; }
.table tr:last-child td{ border-bottom:0; }
.table--striped tbody tr:nth-child(odd){ background:#fafbfc; }
.table .actions{ display:flex; gap:.5rem; justify-content:flex-end; }




/* Badges und Status */
.badge{
  display:inline-block; padding:.2rem .5rem; border-radius:999px;
  font-size:.85rem; background:#eef1f4; color:#475467;
}
.badge--ok{ background: #e7f7ed; color: #166534; }
.badge--warn{ background:#fff7ed; color:#b45309; }
.badge--err{ background:#fee2e2; color:#991b1b; }




/* Alerts */
.alert{
  padding:.75rem 1rem; border-radius: var(--radius);
  background:#eef1f4; color:#111; border:1px solid #e5e7eb;
}
.alert--ok{ background:#e7f7ed; border-color:#bbf7d0; color:#166534; }
.alert--err{ background:#fee2e2; border-color:#fecaca; color:#991b1b; }




/* Utilities */
.text-right{ text-align:right; }
.text-center{ text-align:center; }
.mt-1{ margin-top:.5rem } .mt-2{ margin-top:1rem } .mt-3{ margin-top:1.5rem }
.mb-1{ margin-bottom:.5rem } .mb-2{ margin-bottom:1rem } .mb-3{ margin-bottom:1.5rem }
.hidden{ display:none !important; }








/* ===== Login-Seite ===== */
.page-auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f8f9fb;
}

.auth {
  width: min(420px, 92vw);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  padding: 28px;
}

.auth__title {
  margin: 0 0 10px;
  font-weight: 600;
  text-align: center;
}

.auth__form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field__label {
  font-weight: 600;
}

input[type="text"],
input[type="password"] {
  padding: 0.6rem 0.75rem;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
}

input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}



/* Fehlermeldungen */
.msg {
  min-height: 1.2rem;
  text-align: center;
}

.msg.error {
  color: #b00020;
}

.msg.ok {
  color: #0a7a2f;
}





/* === Navigation === */
.nav-bar {
  background: #fff;
  border-bottom: 1px solid #e4e7ec;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 10;

}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: #7c3aed;
  text-decoration: none;
}

.nav-list {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #7c3aed;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.inline-form {
  display: inline;
}

.small {
  font-size: 0.875rem;
}

.muted {
  color: #6b7280;
}

/* Logout-Button */
.btn-outline {
  border: 1px solid #d0d5dd;
  background: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background: #f3f4f6;
}







/* Info-Zeilen */
.info-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
  padding:0.9rem 1.2rem;
  border-radius:10px;
  background:#f9f9f9;
  margin-bottom:0.75rem;
}
.info-row--start{ align-items:flex-start; }     /* für QR-Bild */
.info-label{ font-weight:600; color:#111; }
.info-value{
  flex:1;
  text-align:right;
  color:#333;
  word-break:break-word;
  margin-left:1rem;
}
.qr{ display:block; max-width:256px; height:auto; }






.table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 0px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  font-size: 0.95rem;
}

.table-modern thead {
  background: #f8fafc;
  text-align: left;
}

.table-modern th {
  font-weight: 600;
  color: #333;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.table-modern td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  color: #444;
}

.table-modern tr:last-child td {
  border-bottom: none;
}

.table-modern tr:hover {
  background: #f9fafb;
  transition: background 0.15s ease-in-out;
}

.table-modern .btn {
  font-size: 0.85rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.table-modern .btn:hover {
  background: #f3f4f6;
}

.table-modern .btn-danger {
  border-color: #dc2626;
  color: #dc2626;
}

.table-modern .btn-danger:hover {
  background: #fee2e2;
}

.table-modern .muted {
  color: #999;
}