/* =====================================================================
   Praktikumsbörse – Stylesheet
   Sachlich-modernes Design, schultauglich, keine externen Abhängigkeiten
   Breakpoints: 480 · 768 · 1024px
   ===================================================================== */

/* ── Variablen ──────────────────────────────────────────────────────── */
:root {
  /* Primärfarbe: ruhiges Schulblau */
  --blue-900: #0f2d56;
  --blue-700: #1a4a8a;
  --blue-500: #2563b0;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;

  /* Akzentfarbe: gedämpftes Teal für Bewertungen/Erfolg */
  --teal-600: #0d7a5a;
  --teal-100: #ccf0e4;

  /* Warnung / Neutral */
  --amber-600: #c07700;
  --amber-100: #fef3c7;

  /* Fehler */
  --red-600:   #b91c1c;
  --red-100:   #fee2e2;

  /* Grautöne */
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;
  --white:    #ffffff;

  /* Abstände & Form */
  --radius-sm: 5px;
  --radius:    8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 2px 8px rgba(0,0,0,.09), 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
}

/* ── Reset & Basis ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--gray-100);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--blue-500); text-decoration: none; }
a:hover { text-decoration: underline; }

img { display: block; max-width: 100%; }

/* ── Layout ─────────────────────────────────────────────────────────── */
.main-content { flex: 1; }
.container { max-width: 1160px; margin: 0 auto; padding: 1.5rem 1.25rem; }
.container-narrow { max-width: 740px; }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  background: var(--blue-900);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,.30);
}

.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; opacity: .9; }

/* Desktop-Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex: 1;
}

.main-nav a {
  color: rgba(255,255,255,.78);
  font-size: .88rem;
  padding: .35rem .7rem;
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--white); background: rgba(255,255,255,.12); text-decoration: none; }

/* Primär-Aktionsbutton in der Nav */
.btn-nav {
  background: var(--blue-500) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
  padding: .35rem .85rem !important;
}
.btn-nav:hover { background: var(--blue-700) !important; }

.btn-admin {
  background: var(--amber-600) !important;
  color: var(--white) !important;
}
.btn-admin:hover { filter: brightness(.9); }

.guest-hint {
  color: rgba(255,255,255,.45);
  font-size: .8rem;
  font-style: italic;
  white-space: nowrap;
}

/* User-Info rechts */
.user-info {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-left: auto;
  flex-shrink: 0;
}
.user-info span {
  color: rgba(255,255,255,.75);
  font-size: .85rem;
  white-space: nowrap;
}
.btn-logout {
  color: rgba(255,255,255,.8);
  font-size: .85rem;
  padding: .3rem .75rem;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-sm);
  transition: .15s;
  white-space: nowrap;
}
.btn-logout:hover { color: var(--white); background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); text-decoration: none; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: .4rem;
  margin-left: auto;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
/* X-Animation */
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav Overlay */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--blue-900);
  border-top: 1px solid rgba(255,255,255,.1);
  padding: .5rem 0;
}
.mobile-nav a {
  color: rgba(255,255,255,.8);
  font-size: .95rem;
  padding: .7rem 1.5rem;
  display: block;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.mobile-nav a:hover { background: rgba(255,255,255,.08); color: var(--white); text-decoration: none; }
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav.open { display: flex; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--blue-900);
  color: rgba(255,255,255,.45);
  text-align: center;
  padding: 1.1rem 1rem;
  font-size: .8rem;
  margin-top: 2.5rem;
}

/* ── Login-Seite ─────────────────────────────────────────────────────── */
body.login-page {
  background: var(--gray-100);
}

.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.login-box {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.25rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
}

.login-logo {
  width: 52px;
  height: 52px;
  background: var(--blue-50);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}

.login-box h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blue-900);
  text-align: center;
  margin-bottom: .25rem;
}

.login-subtitle {
  color: var(--gray-500);
  text-align: center;
  font-size: .88rem;
  margin-bottom: 1.75rem;
}

.login-hint {
  color: var(--gray-500);
  font-size: .82rem;
  text-align: center;
  margin-top: 1rem;
  border-top: 1px solid var(--gray-200);
  padding-top: .75rem;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, opacity .15s;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--blue-500);
  color: var(--white);
  border-color: var(--blue-500);
}
.btn-primary:hover { background: var(--blue-700); border-color: var(--blue-700); }

.btn-ghost {
  background: var(--white);
  color: var(--gray-700);
  border-color: var(--gray-300);
}
.btn-ghost:hover { background: var(--gray-100); }

.btn-danger {
  background: var(--white);
  color: var(--red-600);
  border-color: var(--red-600);
}
.btn-danger:hover { background: var(--red-100); }

.btn-full { width: 100%; justify-content: center; padding: .6rem 1rem; }

.btn-sm { padding: .25rem .65rem; font-size: .8rem; }

/* ── Alerts ─────────────────────────────────────────────────────────── */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .88rem;
  border-left: 4px solid;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}
.alert-success {
  background: var(--teal-100);
  border-color: var(--teal-600);
  color: var(--teal-600);
}
.alert-error {
  background: var(--red-100);
  border-color: var(--red-600);
  color: var(--red-600);
}

/* ── Seiten-Header ───────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.page-header h2 { font-size: 1.35rem; font-weight: 700; color: var(--blue-900); }

.badge {
  background: var(--blue-100);
  color: var(--blue-700);
  padding: .2rem .6rem;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 700;
}

/* ── Suchleiste ──────────────────────────────────────────────────────── */
.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  background: var(--white);
  padding: .9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
.search-bar input[type=text] {
  flex: 1;
  min-width: 180px;
  padding: .45rem .8rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: inherit;
  transition: border-color .15s;
}
.search-bar input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px var(--blue-100); }
.search-bar select {
  padding: .45rem .75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: .88rem;
  cursor: pointer;
  font-family: inherit;
}

/* ── Karten-Grid ─────────────────────────────────────────────────────── */
.card-grid[hidden], .company-list-view[hidden] { display: none; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
}

.profile-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: .35rem;
  transition: box-shadow .2s, transform .2s;
  color: var(--gray-900);
  text-decoration: none;
}
.profile-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}

.card-industry {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--blue-500);
}

.card-company {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue-900);
  line-height: 1.3;
}

.card-location {
  color: var(--gray-500);
  font-size: .83rem;
  display: flex;
  align-items: center;
  gap: .25rem;
}

.card-meta {
  display: flex;
  gap: .6rem;
  font-size: .78rem;
  color: var(--gray-500);
  flex-wrap: wrap;
  padding-top: .1rem;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .95rem;
  margin-top: .1rem;
}
.avg-num { font-weight: 700; font-size: .95rem; }

.recommend-badge {
  font-size: .78rem;
  color: var(--teal-600);
  font-weight: 600;
}

.card-author {
  font-size: .76rem;
  color: var(--gray-400, #9ca3af);
  margin-top: auto;
  padding-top: .6rem;
  border-top: 1px solid var(--gray-200);
}

/* ── Sterne ──────────────────────────────────────────────────────────── */
.star       { color: var(--gray-300); font-size: .95em; }
.star.filled { color: #d97706; }

/* ── Formulare ───────────────────────────────────────────────────────── */
.form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  margin-top: 1rem;
}

fieldset {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--gray-50);
}

legend {
  font-weight: 700;
  font-size: .88rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 0 .5rem;
  color: var(--blue-700);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin-bottom: .85rem;
}
.form-group:last-child { margin-bottom: 0; }

.form-group label {
  font-size: .83rem;
  font-weight: 600;
  color: var(--gray-700);
}

.form-group input[type=text],
.form-group input[type=number],
.form-group input[type=password],
.form-group input[type=email],
.form-group input[type=tel],
.form-group select,
.form-group textarea {
  padding: .5rem .75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  line-height: 1.5;
  font-family: inherit;
  background: var(--white);
  color: var(--gray-900);
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px var(--blue-100);
}
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}
.form-group textarea { resize: vertical; line-height: 1.55; }

.form-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: .85rem; }
.form-row:last-child { margin-bottom: 0; }
.form-row .form-group { flex: 1; min-width: 140px; }
.form-group-wide  { flex: 2 !important; }
.form-group-small { flex: 0 0 100px !important; min-width: 80px !important; }

.required { color: var(--red-600); }

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 400;
  cursor: pointer;
  font-size: .9rem;
}
.checkbox-group input { width: 1rem; height: 1rem; cursor: pointer; accent-color: var(--blue-500); }

.form-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.subtitle { color: var(--gray-500); margin-bottom: 1rem; font-size: .9rem; }

/* ── Sterne-Auswahl ──────────────────────────────────────────────────── */
.rating-grid { display: flex; flex-direction: column; gap: .8rem; }
.rating-row  { display: flex; align-items: center; gap: 1rem; }
.rating-label { min-width: 175px; font-size: .88rem; color: var(--gray-700); }

.star-select { display: flex; gap: .1rem; }
.star-select label { cursor: pointer; line-height: 1; }
.star-select input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-btn { font-size: 1.8rem; color: var(--gray-300); transition: color .1s; display: block; }
.star-btn.hover,
.star-btn.selected { color: #d97706; }

/* ── Autocomplete ────────────────────────────────────────────────────── */
.autocomplete-wrap { position: relative; }
.autocomplete-list {
  position: absolute;
  top: calc(100% + 2px);
  left: 0; right: 0;
  z-index: 300;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-height: 220px;
  overflow-y: auto;
}
.autocomplete-list[hidden] { display: none; }
.ac-item {
  padding: .6rem .85rem;
  cursor: pointer;
  font-size: .9rem;
  border-bottom: 1px solid var(--gray-200);
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: var(--blue-50); }
.ac-city  { color: var(--gray-500); font-size: .83rem; margin-left: .4rem; }
.ac-badge { background: var(--blue-100); color: var(--blue-700); font-size: .73rem; padding: .1rem .4rem; border-radius: 99px; margin-left: .35rem; }
.field-hint { font-size: .8rem; min-height: 1.2rem; }
.hint-ok { color: var(--teal-600); font-weight: 600; }

/* Gesperrte Firmen-Felder nach Autocomplete-Auswahl */
.field-locked {
  background: var(--gray-100) !important;
  color: var(--gray-500) !important;
  cursor: not-allowed;
  border-color: var(--gray-200) !important;
}

/* Hinweisleiste über den Adressfeldern */
.existing-notice[hidden] { display: none; }
.existing-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  background: var(--teal-100);
  border: 1px solid var(--teal-600);
  border-radius: var(--radius-sm);
  padding: .5rem .85rem;
  font-size: .85rem;
  color: var(--teal-600);
  font-weight: 600;
  margin-bottom: .85rem;
}

.btn-unlock {
  background: none;
  border: 1px solid var(--teal-600);
  color: var(--teal-600);
  border-radius: var(--radius-sm);
  padding: .2rem .65rem;
  font-size: .8rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background .15s;
}
.btn-unlock:hover { background: rgba(13,122,90,.1); }

/* ── Firmen-Detailseite ──────────────────────────────────────────────── */
.breadcrumb { font-size: .85rem; margin-bottom: 1rem; }
.breadcrumb a { color: var(--blue-500); }

.company-header {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.company-header-info h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--blue-900);
  margin: .3rem 0 .4rem;
  line-height: 1.25;
}

.industry-tag {
  display: inline-block;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: .73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .2rem .65rem;
  border-radius: 99px;
}

.company-address { color: var(--gray-500); font-size: .9rem; margin-top: .25rem; }

.company-stats { text-align: center; flex-shrink: 0; }
.stat-big { font-size: 2.75rem; font-weight: 900; line-height: 1; }
.stat-stars { font-size: 1rem; display: block; margin-top: .1rem; }
.stat-sub { color: var(--gray-500); font-size: .82rem; margin-top: .3rem; }
.stat-rec { color: var(--teal-600); font-size: .82rem; font-weight: 600; margin-top: .15rem; }

/* Bewertungsbalken */
.rating-overview {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.1rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.rating-bar-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .5rem;
}
.rating-bar-row:last-child { margin-bottom: 0; }
.rbl { width: 105px; font-size: .82rem; color: var(--gray-500); flex-shrink: 0; }
.rbar-outer { flex: 1; background: var(--gray-200); border-radius: 99px; height: 8px; overflow: hidden; }
.rbar-inner  { height: 100%; border-radius: 99px; transition: width .4s; }
.rval { width: 32px; font-size: .85rem; font-weight: 700; text-align: right; flex-shrink: 0; }

/* Berichte */
.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: .9rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--gray-200);
}

.profile-list { display: flex; flex-direction: column; gap: .85rem; }

.profile-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.pi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}

.pi-meta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.pi-meta strong { font-size: .95rem; }

.pi-year, .pi-weeks {
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: .77rem;
  padding: .15rem .5rem;
  border-radius: 99px;
  font-weight: 500;
}

.pi-rating { display: flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .9rem; }

.pi-ratings {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .85rem;
  padding: .65rem .9rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}

.mini-rating { display: flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--gray-500); }
.mini-stars .star { font-size: .85rem; }

.pi-section { margin-bottom: .75rem; }
.pi-section strong { font-size: .8rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; display: block; margin-bottom: .25rem; }
.pi-section p { font-size: .9rem; line-height: 1.65; color: var(--gray-700); }

.pi-actions {
  margin-top: .85rem;
  display: flex;
  gap: .5rem;
  border-top: 1px solid var(--gray-200);
  padding-top: .75rem;
}

/* ── Empty State ──────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--gray-500);
  background: var(--white);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  margin-top: .5rem;
}
.empty-icon { font-size: 2.5rem; margin-bottom: .75rem; opacity: .6; }
.empty-state h3 { font-size: 1.1rem; color: var(--gray-700); margin-bottom: .4rem; font-weight: 600; }
.empty-state p  { font-size: .88rem; }

/* ── Firmen-Kontakt ──────────────────────────────────────────────────── */
.company-contact {
  color: var(--gray-500);
  font-size: .88rem;
  margin-top: .3rem;
}
.company-contact a { color: var(--blue-500); text-decoration: none; }
.company-contact a:hover { text-decoration: underline; }

/* ── Bericht-Datum & Typ ──────────────────────────────────────────────── */
.pi-date {
  background: var(--gray-100);
  color: var(--gray-400);
  font-size: .75rem;
  padding: .15rem .5rem;
  border-radius: 99px;
  font-weight: 500;
}
.pi-type {
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: .74rem;
  padding: .15rem .55rem;
  border-radius: 99px;
  font-weight: 600;
  border: 1px solid var(--blue-200);
}

/* ── Ansicht-Toggle ───────────────────────────────────────────────────── */
.view-toggle-bar {
  display: flex;
  gap: .4rem;
  justify-content: flex-end;
  margin-bottom: .75rem;
}
.view-toggle-btn {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .8rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--gray-500);
  font-size: .82rem;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.view-toggle-btn:hover { border-color: var(--blue-400); color: var(--blue-600); }
.view-toggle-btn.active {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: var(--white);
}

/* ── Firmen-Listenansicht ─────────────────────────────────────────────── */
.company-list-view { overflow-x: auto; }
.company-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.company-table thead th {
  text-align: left;
  padding: .55rem .85rem;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-500);
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}
.company-list-row {
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
  transition: background .1s;
}
.company-list-row:hover { background: var(--blue-50); }
.company-list-row td { padding: .65rem .85rem; vertical-align: middle; }
.cl-name { font-weight: 600; color: var(--blue-700); }
.cl-city, .cl-year { color: var(--gray-500); font-size: .85rem; }
.cl-count { color: var(--gray-600); text-align: center; }
.cl-rating { display: flex; align-items: center; gap: .3rem; font-weight: 700; font-size: .88rem; white-space: nowrap; }
.industry-tag-sm {
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: .72rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 99px;
  white-space: nowrap;
}

/* ── Admin-Konfiguration ──────────────────────────────────────────────── */
.config-block { margin-bottom: 2rem; }
.config-block h3 { font-size: 1rem; font-weight: 700; margin-bottom: .75rem; color: var(--blue-900); }
.inline-add-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.inline-add-form input[type=text] {
  flex: 1; min-width: 180px;
  padding: .45rem .75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-family: inherit;
}
.inline-add-form input[type=text]:focus { outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }

/* ── Admin ───────────────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 0;
}

.tab-btn {
  padding: .6rem 1.1rem;
  font-size: .88rem;
  color: var(--gray-500);
  transition: color .15s, background .15s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  cursor: pointer;
}
.tab-btn:hover { color: var(--blue-500); background: var(--blue-50); text-decoration: none; }
.tab-btn.active {
  color: var(--blue-700);
  border-bottom-color: var(--blue-700);
  font-weight: 700;
  background: var(--white);
}

.admin-section {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

/* scrollt auf kleinen Screens horizontal */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  white-space: nowrap;
}
.admin-table th {
  background: var(--gray-50);
  font-weight: 700;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-500);
  padding: .6rem .85rem;
  border-bottom: 2px solid var(--gray-200);
  text-align: left;
}
.admin-table td {
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
  white-space: normal;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: var(--blue-50); }

.row-admin td   { background: var(--amber-100) !important; }
.row-inactive td { opacity: .5; }

.status-ok  { color: var(--teal-600);  font-weight: 700; font-size: .82rem; }
.status-off { color: var(--red-600);   font-weight: 700; font-size: .82rem; }
.badge-admin { background: var(--amber-100); color: var(--amber-600); font-size: .72rem; padding: .1rem .45rem; border-radius: 99px; font-weight: 700; }

.actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.text-muted { color: var(--gray-500); font-size: .82rem; }

/* Generierte Tabelle */
.generated-table-wrap { margin-top: 1.5rem; }
.hint-print { color: var(--red-600); font-size: .85rem; margin-bottom: .75rem; font-weight: 600; padding: .5rem .75rem; background: var(--red-100); border-radius: var(--radius-sm); }
.generated-table code { background: var(--gray-100); padding: .15rem .45rem; border-radius: 4px; font-size: .88rem; font-family: "Consolas", "Menlo", monospace; }

/* ── Print ───────────────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .tab-bar, .form-card > .form-actions, .btn { display: none !important; }
  .generated-table-wrap, .admin-section { box-shadow: none; border: none; }
  body { background: #fff; font-size: 12pt; }
  .admin-table th, .admin-table td { border: 1px solid #ccc; }
}

/* ── Responsive: Tablet (≤ 900px) ───────────────────────────────────── */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .company-header { padding: 1.25rem; }
  .company-header-info h1 { font-size: 1.35rem; }
}

/* ── Responsive: Mobile (≤ 768px) ───────────────────────────────────── */
@media (max-width: 768px) {
  /* Header: Nav verstecken, Hamburger zeigen */
  .main-nav, .user-info { display: none; }
  .hamburger { display: flex; }

  .card-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }

  .form-card { padding: 1.1rem 1rem; }
  fieldset   { padding: .9rem 1rem 1rem; }

  .rating-row { flex-direction: column; align-items: flex-start; gap: .35rem; }
  .rating-label { min-width: unset; }

  .company-header { flex-direction: column; gap: 1rem; }
  .company-stats  { align-self: flex-start; display: flex; align-items: center; gap: 1rem; }
  .stat-big { font-size: 2rem; }

  .pi-ratings { gap: .6rem; }
}

/* ── Responsive: Smartphone (≤ 480px) ──────────────────────────────── */
@media (max-width: 480px) {
  .container { padding: 1rem .85rem; }
  .card-grid { grid-template-columns: 1fr; }
  .profile-card { padding: 1rem; }

  .search-bar { gap: .4rem; }
  .search-bar input[type=text] { min-width: 100%; }

  .form-row .form-group-small { flex: 0 0 80px !important; }

  .admin-section { padding: 1rem .75rem; }
}
