/* =====================================================================
   MAIN CLEAN CSS (single file)
   - One table system: .table + .table-wrapper
   - Scoped page rules to avoid conflicts
===================================================================== */

/* =====================================================================
   0) Basis / Design Tokens
===================================================================== */

:root {
  --bg: #0f172a;
  --bg-light: #f5f7fb;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #6b7280;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --accent-dark: #1d4ed8;
  --danger: #dc2626;
  --success: #16a34a;
  --border: #e5e7eb;
  --radius: 10px;
  --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.08);
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* =====================================================================
   1) Reset / Base
===================================================================== */

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

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-light);
  color: var(--text);
  line-height: 1.5;
}

h1, h2, h3 { margin-top: 0; }

/* Base: responsive images (do not touch the topbar logo) */
img{
  max-width: 100%;
  height: auto;
}


/* =====================================================================
   2) Layout
===================================================================== */

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}
.container-narrow{
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px;
}

.page-content { padding: 24px 16px 40px; }

section { margin-bottom: 24px; }

/* =====================================================================
   3) Components: Topbar
===================================================================== */

.topbar {
  background: radial-gradient(circle at top left, #1e293b 0, #020617 45%) #020617;
  color: #e5e7eb;
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.5);
  padding: 10px 0;
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar-inner > * { min-width: 0; }

.topbar-left { display: flex; align-items: center; gap: 24px; }

.topbar-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar-nav {
  display: flex;
  gap: 12px;
  margin-left: 32px;
  flex: 0 0 auto;
  min-width: 0;
  flex-wrap: wrap;
}

.topbar-link {
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: #e5e7eb;
  white-space: nowrap;
}

.topbar-link:hover { background-color: rgba(148, 163, 184, 0.25); }

.topbar-link-active {
  background-color: #0f172a;
  color: #ffffff;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  margin-left: auto;
  min-width: 0;
  flex-wrap: wrap;
}

.topbar-user-label { color: #cbd5f5; }

.topbar-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #e5e7eb;
}

.topbar-logo-img {
  height: 46px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.7));
}

@media (max-width: 640px) {
  .topbar-logo-img { height: 36px; }
}

.topbar-logout-form{
  display: inline;
  margin: 0;
  max-width: none;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.topbar-logout-form button[type="submit"]{
  width: auto;
  margin-top: 0;
}

.topbar-logout-btn {
  border: none;
  background: none;
  padding: 4px 10px;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  color: #e5e7eb;
  cursor: pointer;
  text-decoration: none;
}

.topbar-logout-btn:hover {
  background-color: rgba(148, 163, 184, 0.25);
  color: #ffffff;
}

/* =====================================================================
   4) Components: Buttons
===================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease,
              border-color 0.15s ease, transform 0.05s ease;
  white-space: normal;
}

.btn-small { padding: 4px 10px; font-size: 13px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  color: var(--accent);
  border-color: var(--accent-soft);
}

.btn-secondary:hover { background: var(--accent-soft); }

.btn-outline {
  background: transparent;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.6);
}

.btn-outline:hover { background: rgba(148, 163, 184, 0.2); }

.btn-outline-light {
  border: 1px solid #e5e7eb;
  background: transparent;
  color: #e5e7eb;
}

.btn-outline-light:hover {
  background: #e5e7eb;
  color: #020617;
}

@media (max-width: 640px){
  .btn{ padding: 7px 12px; font-size: 13px; }
}

/* =====================================================================
   5) Components: Cards / Text helpers
===================================================================== */

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.card-title { margin: 0 0 4px; font-size: 18px; }

.text-muted { color: var(--text-muted); }

.text-muted-small {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 12px;
  background: #e5e7eb;
  color: #374151;
}

.mono, .code-pill { white-space: nowrap; font-family: monospace; }
.nowrap { white-space: nowrap; }

.page-intro { max-width: 580px; margin-bottom: 20px; }

.card-top-with-toggle {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.collapsible-section.is-collapsed { display: none; }

/* =====================================================================
   6) Components: Forms (only via .form-card)
===================================================================== */

.form-card {
  max-width: 480px;
  background: #ffffff;
  padding: 20px 20px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.form-card label {
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
}

.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="password"],
.form-card input[type="number"],
.form-card input[type="date"],
.form-card select{
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font: inherit;
  background: #fff;
}

.form-card input:focus,
.form-card select:focus{
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.form-card input[type="checkbox"]{
  width: auto;
  margin-right: 6px;
}

.form-card button[type="submit"]{
  margin-top: 8px;
  width: 100%;
}

@media (max-width: 640px) {
  .form-card { padding: 16px 14px 18px; }
}

/* =====================================================================
   7) Components: Alerts / Messages
===================================================================== */

.alert {
  max-width: 960px;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-success, .success {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.alert-error, .error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.error ul { margin: 0; padding-left: 18px; }

/* =====================================================================
   8) Components: Tables (SINGLE SYSTEM)
===================================================================== */

.table-wrapper{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td{
  padding: 6px 8px;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.table th{
  border-bottom-color: #e5e7eb;
  font-weight: 600;
  white-space: nowrap;
}

.table-wrapper form{
  max-width: none;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}
.table-wrapper form button{
  width: auto;
  margin-top: 0;
}

/* Desktop: fixed layout ONLY for non-KPI and non-logs tables */
@media (min-width: 901px){
  .table-wrapper{ overflow-x: visible; }

  .table:not(.tbl-kpi):not(.admin-logs-table){
    table-layout: fixed;
  }

  .table th, .table td{ white-space: normal; }
  .table th:last-child, .table td:last-child{ width: 190px; }
}

/* =====================================================================
   9) Components: Footer
===================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 12px 0 14px;
  font-size: 13px;
  color: var(--text-muted);
  background: #f9fafb;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.site-footer a {
  color: #2563eb;
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

/* =====================================================================
   10) Mobile Topbar
===================================================================== */

@media (max-width: 640px){
  .topbar-inner{
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
  }

  .topbar-brand{ flex: 1 1 100%; }

  .topbar-nav{
    order: 3;
    flex: 1 1 100%;
    margin-left: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .topbar-nav::-webkit-scrollbar{ display:none; }

  .topbar-user{
    order: 4;
    flex: 1 1 100%;
    justify-content: space-between;
    gap: 10px;
  }
}

/* =====================================================================
   PAGE: home.php
===================================================================== */

.home-layout{
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.home-layout .home-hero2{
  border-radius: 24px;
  padding: 22px 22px 24px;
  background:
    radial-gradient(circle at 12% 0%, rgba(59, 130, 246, 0.20) 0, rgba(59, 130, 246, 0.03) 28%, transparent 52%),
    radial-gradient(circle at 88% 0%, rgba(45, 212, 191, 0.18) 0, rgba(45, 212, 191, 0.03) 26%, transparent 50%),
    linear-gradient(135deg, #eef2ff 0%, #f9fafb 40%, #e0f2fe 100%);
  color: #111827;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
}

.home-layout .home-hero2-inner{
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.home-layout .home-hero2-title{
  margin: 0 0 8px;
  font-size: 24px;
  color: #0f172a;
}

.home-layout .home-hero2-subtitle{
  margin: 0 0 14px;
  font-size: 15px;
  color: #374151;
}

.home-layout .home-hero2-points{
  margin: 0 0 16px;
  padding-left: 18px;
  font-size: 14px;
  color: #4b5563;
}

.home-layout .home-hero2-points li + li{ margin-top: 4px; }

.home-layout .home-hero2-cta{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-layout .home-hero2-cta .btn{ width: fit-content; }

.home-layout .home-hero2-links{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
}

.home-layout .home-hero2-links a{
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.home-layout .home-hero2-links a:hover{ color: #1d4ed8; }

.home-layout .home-hero2-visual{
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.home-layout .home-hero2-card{
  border-radius: 18px;
  background: #f9fafb;
  border: 1px solid #dbeafe;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  padding: 12px 12px 10px;
  width: 100%;
  max-width: 360px;
  color: #111827;
}

.home-layout .home-hero2-chip{
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: #1d4ed8;
  border: none;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e5f0ff;
  margin-bottom: 8px;
}

.home-layout .home-hero2-screenshot{
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #ffffff;
}

.home-layout .home-hero2-screenshot img{
  display: block;
  width: 100%;
  height: auto;
}

.home-layout .home-hero2-caption{
  margin: 6px 0 0;
  font-size: 12px;
  color: #6b7280;
}

.home-layout .home-strip{
  border-radius: 16px;
  padding: 14px 16px 16px;
  background: #eef2ff;
}

.home-layout .home-strip-title{
  margin: 0 0 8px;
  font-size: 16px;
  text-align: center;
  color: #1e293b;
}

.home-layout .home-strip-items{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.home-layout .home-strip-item{
  min-width: 200px;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

.home-layout .home-strip-item span{
  display: block;
  font-weight: 400;
  color: #4b5563;
  font-size: 13px;
}

.home-layout .home-section{ margin-top: 2px; }
.home-layout .home-section-wide{ padding: 18px 18px 16px; }

.home-layout .home-section-title{
  font-size: 20px;
  margin: 0 0 12px;
  text-align: center;
}

.home-layout .home-two-col{
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 18px;
}

.home-layout .home-note-box{
  font-size: 14px;
  color: #4b5563;
  background: #f3f4ff;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
}

.home-layout .home-list{
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: #4b5563;
}

.home-layout .home-list li + li{ margin-top: 4px; }

.home-layout .hero-note{
  font-size: 13px;
  color: var(--text-muted);
}

.home-layout .home-steps-lead{ margin-top: -6px; }

.home-layout .home-steps{
  margin: 0 0 8px;
  padding-left: 0;
  list-style: none;
  font-size: 14px;
  color: #4b5563;
}

.home-layout .home-steps-timeline li{
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
}

.home-layout .home-steps-timeline li::before{
  content: "";
  position: absolute;
  left: 10px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2563eb;
}

.home-layout .home-steps-timeline li::after{
  content: "";
  position: absolute;
  left: 13px;
  top: 14px;
  width: 2px;
  bottom: -4px;
  background: #e5e7eb;
}

.home-layout .home-steps-timeline li:last-child::after{ display: none; }

.home-layout .home-step-title{
  font-weight: 600;
  display: block;
  color: #111827;
}
.home-layout .home-step-text{
  display: block;
  margin-top: 2px;
  color: #4b5563;
}

@media (max-width: 900px){
  .home-layout .home-hero2-inner{ grid-template-columns: 1fr; }
  .home-layout .home-two-col{ grid-template-columns: 1fr; }
  .home-layout .home-hero2-cta .btn{ width: 100%; }
  .home-layout .home-hero2-card{ max-width: 520px; }
}

.home-trust-row{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-badge{
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(0,0,0,.04);
  white-space: nowrap;
}



/* =====================================================================
   PAGE: admin_dashboard.php
===================================================================== */

.admin-intro{
  max-width: 540px;
  margin-bottom: 20px;
}

.admin-actions-grid{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 18px;
}

.admin-section{ margin-bottom: 18px; }

.admin-stats-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

/* important for grids (avoid shrinking weirdly) */
.admin-stats-grid > * { min-width: 0; }

.card-compact{ padding: 14px 16px; }
.admin-card-actions{ margin-top: 10px; }

.admin-ua-ellipsis{
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* KPI */
.kpi-label{
  color: #4b5563;
  width: 70%;
}
.kpi-value{
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
  width: 30%;
}

/* KPI tables: do NOT break words into letters */
.table.tbl-kpi{
  table-layout: auto;
}
.table.tbl-kpi th,
.table.tbl-kpi td{
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: normal;
}

.admin-dashboard .admin-collapse{
  border-top: 1px solid #eef2f7;
  padding-top: 6px;
}

.admin-dashboard .admin-collapse-summary{
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 2px;
  font-weight: 600;
}

.admin-dashboard .admin-collapse-hint{
  font-weight: 500;
  color: var(--text-muted);
  font-size: 13px;
}

.admin-dashboard .admin-dash-scroll{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Мобила: таблицы делаем шире экрана */
@media (max-width: 820px){
  .admin-dashboard .admin-dash-logins,
  .admin-dashboard .admin-dash-users{
    min-width: 980px;
  }
}

/* Browser: разрешаем перенос строк (и не рвать по буквам) */
.admin-dashboard .admin-ua-wrap{
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

/* Таблица логинов: первые колонки уже, Browser — на остаток */
.admin-dashboard .admin-dash-logins{
  table-layout: fixed;
  width: 100%;
}

/* Чуть компактнее отступы именно в этой таблице */
.admin-dashboard .admin-dash-logins th,
.admin-dashboard .admin-dash-logins td{
  padding: 5px 8px; /* было 6px 8px глобально — делаем чуть плотнее */
}

/* 1) Datum / Uhrzeit — узко и без переносов */
.admin-dashboard .admin-dash-logins th:nth-child(1),
.admin-dashboard .admin-dash-logins td:nth-child(1){
  width: 150px;
  white-space: nowrap;
}

/* 2) E-Mail — узко, но читаемо (можешь увеличить до 220px если надо) */
.admin-dashboard .admin-dash-logins th:nth-child(2),
.admin-dashboard .admin-dash-logins td:nth-child(2){
  width: 210px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3) IP-Adresse — узко */
.admin-dashboard .admin-dash-logins th:nth-child(3),
.admin-dashboard .admin-dash-logins td:nth-child(3){
  width: 135px;
  white-space: nowrap;
}

/* 4) Browser — занимает всё остальное + разрешаем перенос строк */
.admin-dashboard .admin-dash-logins th:nth-child(4),
.admin-dashboard .admin-dash-logins td:nth-child(4){
  width: auto;
  white-space: normal;          /* перенос строк разрешён */
  overflow-wrap: anywhere;      /* но НЕ по буквам */
  word-break: normal;
}

/* Мобила: таблица шире экрана и горизонтальный скролл (как ты просил) */
@media (max-width: 820px){
  .admin-dashboard .admin-dash-scroll{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-dashboard .admin-dash-logins{
    min-width: 920px;  /* подгони: 860/980 */
  }
  /* чтобы первые 3 колонки не ломались */
  .admin-dashboard .admin-dash-logins th:nth-child(-n+3),
  .admin-dashboard .admin-dash-logins td:nth-child(-n+3){
    white-space: nowrap;
  }
}



/* =====================================================================
   PAGE: admin_downloads.php
===================================================================== */

.admin-downloads-table td,
.admin-downloads-table th{
  vertical-align: top;
  overflow-wrap: anywhere;
}
.admin-downloads-table{ font-size: 13px; }


@media (max-width: 820px){
  /* wrapper уже есть — включаем скролл на мобиле */
  .admin-downloads-table{
    min-width: 900px; /* можешь 860/980 подстроить */
  }

  /* чтобы строки не ломались в кашу */
  .admin-downloads-table th,
  .admin-downloads-table td{
    white-space: nowrap;
  }

  /* "Produkt / Version" можно дать больше места */
  .admin-downloads-table th:nth-child(3),
  .admin-downloads-table td:nth-child(3){
    min-width: 260px;
  }

  /* "Benutzer" тоже иногда длинный (email) */
  .admin-downloads-table th:nth-child(2),
  .admin-downloads-table td:nth-child(2){
    min-width: 240px;
  }
}

/* =====================================================================
   PAGE: admin_guests.php
===================================================================== */

.admin-guests .container-narrow{
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

.admin-guests .guests-filters{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
  margin: 14px 0 14px;
}

.admin-guests .guests-filters label{
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #4b5563;
  min-width: 180px;
}

.admin-guests .guests-filters select{
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  background: #fff;
}

.admin-guests .guests-filters select:focus{
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.admin-guests .guests-summary{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 18px;
}

.admin-guests .guests-summary-item{
  padding: 10px 12px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.admin-guests .guests-summary-item .k{
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.admin-guests .guests-summary-item .v{
  font-size: 22px;
  font-weight: 700;
}

.admin-guests .guests-top-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.admin-guests .guests-top-list li{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #eef2f7;
}

.admin-guests .guests-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-guests .guests-table th,
.admin-guests .guests-table td{
  padding: 7px 8px;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
  vertical-align: top;
}

.admin-guests .guests-table th{
  border-bottom-color: #e5e7eb;
  font-weight: 600;
  white-space: nowrap;
}

.admin-guests .guests-table .muted{ color: #9ca3af; }

.admin-guests .guests-table .ref,
.admin-guests .guests-table .ua{
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-guests .visit-row{ cursor: pointer; }
.admin-guests .visit-row:hover td{ background: #f8fafc; }

.admin-guests .visit-details[aria-hidden="true"]{ display: none; }

.admin-guests .details-box{
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 10px 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.admin-guests .details-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-guests .details-content{ font-size: 13px; }

.admin-guests .badge-ok{
  background: #dcfce7;
  color: #166534;
}

.admin-guests .badge-warn{
  background: #fef3c7;
  color: #b45309;
}

@media (max-width: 900px){
  .admin-guests .guests-summary{ grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px){
  .admin-guests .guests-filters label{
    min-width: 0;
    flex: 1 1 220px;
  }

  .admin-guests .guests-table{
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-guests .guests-table th,
  .admin-guests .guests-table td{ white-space: nowrap; }

  .admin-guests .guests-table .ref,
  .admin-guests .guests-table .ua{
    white-space: normal;
    min-width: 260px;
  }
}

.admin-guests .details-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.admin-guests .details-list li{
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #eef2f7;
  background: #f9fafb;
}

.admin-guests .details-list .mono{ font-size: 12px; }

.admin-guests .details-list .uri{
  margin-top: 4px;
  font-size: 13px;
  color: #374151;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-guests .details-content .muted{ color: #9ca3af; }

/* =====================================================================
   PAGE: admin_logs.php (SCOPED styles)
===================================================================== */

/* iOS: не раздувать шрифты */
.admin-logs{ -webkit-text-size-adjust: 100%; }

/* reset (scoped) */
.admin-logs .admin-logs-filters{
  max-width: none;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 14px 0 16px;

  display: grid;
  gap: 12px;
}

.admin-logs .admin-logs-filter-row{
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
}

.admin-logs .admin-logs-filter-group{
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

.admin-logs .admin-logs-filter-group-wide{
  flex: 1 1 340px;
  min-width: 240px;
}

.admin-logs .admin-logs-filter-label{
  font-size: 13px;
  color: var(--text-muted);
}

.admin-logs .admin-logs-filter-input{
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font: inherit;
  background: #fff;
}

.admin-logs .admin-logs-filter-input:focus{
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.admin-logs .admin-logs-level-checkboxes{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.admin-logs .admin-logs-level-checkbox{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.admin-logs .admin-logs-filter-actions{
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

@media (max-width: 640px){
  .admin-logs .admin-logs-filter-group,
  .admin-logs .admin-logs-filter-group-wide{
    min-width: 0;
    flex: 1 1 100%;
  }
  .admin-logs .admin-logs-filter-actions{
    margin-left: 0;
    width: 100%;
  }
  .admin-logs .admin-logs-filter-actions .btn{
    flex: 1 1 50%;
  }
}

/* ---------- TABLE ---------- */

/* базовый размер шрифта в таблице */
.admin-logs .admin-logs-table{
  width: 100%;
  table-layout: fixed;
  font-size: 13px;
}

.admin-logs .admin-logs-table th,
.admin-logs .admin-logs-table td{
  font-size: 13px;
  line-height: 1.45;
}

/* Zeit — больше места */
.admin-logs .admin-logs-table th:nth-child(1),
.admin-logs .admin-logs-table td:nth-child(1){
  width: 190px;
  white-space: nowrap;
}

/* Level — больше места */
.admin-logs .admin-logs-table th:nth-child(2),
.admin-logs .admin-logs-table td:nth-child(2){
  width: 120px;
  white-space: nowrap;
  text-align: left;
}

/* Nachricht — перенос разрешён */
.admin-logs .admin-logs-table th:nth-child(3),
.admin-logs .admin-logs-table td:nth-child(3){
  width: auto;
  white-space: normal;     /* ключ */
  overflow-wrap: break-word;  /* ключ: не "anywhere" */
  word-break: normal;
  hyphens: auto;
}

.admin-logs .admin-logs-cell-time code{ white-space: nowrap; }

/* чтобы текст внутри Nachricht не стал больше */
.admin-logs .admin-logs-cell-message,
.admin-logs .admin-logs-cell-message *{
  font-size: inherit;
  line-height: inherit;
}

/* details */
.admin-logs .log-message-details summary{
  cursor: pointer;
  color: #2563eb;
  margin-top: 6px;
}
.admin-logs .log-message-details summary:hover{ text-decoration: underline; }

.admin-logs .log-message-context{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 12px;
  line-height: 1.35;
}

/* мобила: включаем горизонтальный скролл,
   но НЕ заставляем Nachricht быть nowrap */
@media (max-width: 820px){
  .admin-logs .admin-logs-table{
    min-width: 980px; /* можешь 900/1100 — как нравится */
  }
}

}


/* =====================================================================
   PAGE: admin_request_view.php
===================================================================== */

.request-meta{ max-width: 760px; }
.request-thread{ max-width: 960px; }

.request-thread-title{
  margin: 0 0 10px;
  font-size: 18px;
}

.request-messages{
  display: grid;
  gap: 10px;
}

.request-message{
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  background: #ffffff;
}

.request-message-meta{
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
}

.request-message-body{
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.request-message-admin{
  background: #eff6ff;
  border-color: #dbeafe;
}

.request-message-user{
  background: #f9fafb;
  border-color: #e5e7eb;
}

.form-field{ display: block; margin-bottom: 12px; }

.form-label{
  display: block;
  font-size: 13px;
  color: #374151;
  margin-bottom: 6px;
}

.form-textarea,
.form-select{
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

.form-textarea:focus,
.form-select:focus{
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.form-textarea{
  resize: vertical;
  min-height: 110px;
}

/* Generic form actions row */
.form-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

/* Mobile: actions one below another */
@media (max-width: 640px){
  .form-actions .btn{
    width: 100%;
  }
}


/* =====================================================================
   PAGE: admin_licenses.php helper
===================================================================== */

.table .js-copy-license,
.table .js-copy-activation{
  margin-left: 8px;
}

/* =====================================================================
   PAGE: admin_sales.php
===================================================================== */

.table td:last-child{ vertical-align: middle; }

.table .text-muted-small{
  margin: 0;
  display: inline-block;
}

/* =====================================================================
   PAGE: dashboard.php
===================================================================== */

.card-dashboard .link-list{
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.card-dashboard .link-list a{
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.card-dashboard .link-list a:hover{
  color: #1d4ed8;
}

/* маленькие подписи дат/версий */
.date-xs{
  font-size: 12px;
  line-height: 1.25;
}

/* “таблетка” для order_no */
.code-pill{
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #e5e7eb;
  color: #111827;
  font-size: 12px;
}

/* документы: компактно и без развала */
.doc-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* ячейка активации */
.act-cell{
  vertical-align: middle;
}

.act-row{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.act-preview{
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 12px;
}

/* кнопка-иконка (📋) */
.btn-icon{
  padding: 4px 10px;
  line-height: 1;
}

/* примечание внизу */
.dash-note{
  margin-top: 10px;
}

/* Сделаем таблицу на десктопе более управляемой (не ломая другие таблицы) */
@media (min-width: 901px){
  .card-dashboard .table th:nth-child(1),
  .card-dashboard .table td:nth-child(1){ width: 140px; }

  .card-dashboard .table th:nth-child(2),
  .card-dashboard .table td:nth-child(2){ width: 120px; }

  .card-dashboard .table th:nth-child(3),
  .card-dashboard .table td:nth-child(3){ width: 150px; }

  .card-dashboard .table th:nth-child(4),
  .card-dashboard .table td:nth-child(4){ width: 130px; }

  .card-dashboard .table th:nth-child(5),
  .card-dashboard .table td:nth-child(5){ width: 110px; }

  .card-dashboard .table th:nth-child(6),
  .card-dashboard .table td:nth-child(6){ width: 150px; }

  .card-dashboard .table th:nth-child(7),
  .card-dashboard .table td:nth-child(7){ width: auto; }
}


/* Мобила: пусть таблица скроллится (у тебя wrapper уже есть),
   но делаем читабельнее кнопки и строки */
@media (max-width: 900px){
  .doc-actions .btn{ white-space: nowrap; }
  .act-row{ white-space: nowrap; }
}

/* =====================================================================
   PAGE: datenschutz.php (legal page typography)
===================================================================== */

.legal-page{
  max-width: 920px;
}

.legal-page h1{
  font-size: 28px;
  margin: 0 0 10px;
}

.legal-page h2{
  font-size: 18px;
  margin: 18px 0 8px;
}

.legal-page p{
  margin: 10px 0;
}

.legal-page ul{
  margin: 8px 0 12px;
  padding-left: 18px;
}

.legal-page li + li{
  margin-top: 4px;
}

.legal-page a{
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-page a:hover{
  color: var(--accent-dark);
}

/* =====================================================================
   PAGE: downloads.php  (clean: no duplicates / no overrides)
===================================================================== */

.download-page{
  max-width: 980px;
  margin: 0 auto;
}

/* header */
.download-header{ margin-bottom: 14px; }
.download-title{ margin: 0 0 6px; font-size: 28px; }
.download-subtitle{ margin: 0; color: #374151; }

/* small CTA row */
.download-cta-row{
  margin: 10px 0 18px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #eef2f7;
}
.download-cta-row p{ margin: 0; }

/* section title */
.download-section-title{
  font-size: 18px;
  margin: 18px 0 10px;
}

/* grid cards */
.download-grid{
  display: grid;
  grid-template-columns: 1fr; /* Vollbreite Karte (keine 2-Spalten mehr) */
  gap: 16px;
}

.download-card{
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  padding: 14px 14px 16px;
  box-shadow: var(--shadow-soft);
  width: 100%;
}

.download-card h3{ margin: 0 0 8px; font-size: 16px; }
.download-card p{ margin: 8px 0; color: #374151; }

.download-features{
  margin: 10px 0 14px;
  padding-left: 18px;
  color: #4b5563;
}
.download-features li + li{ margin-top: 4px; }

.download-card .btn{ width: fit-content; }

/* disabled card */
.download-card-disabled{
  background: #f9fafb;
  border-style: dashed;
  opacity: 0.95;
}

/* compare list (ul/ol) */
.download-compare-list{
  margin: 8px 0 12px;
  padding-left: 18px;
  color: #4b5563;
}
.download-compare-list li + li{ margin-top: 8px; }

/* hash lines */
.hash-code{ word-break: break-all; }

/* tiny utility classes (safe, generic, no conflicts) */
.mt-10{ margin-top: 10px !important; }
.mt--6{ margin-top: -6px !important; }
.pad-16{ padding: 16px !important; }

/* responsive */
@media (max-width: 900px){
  .download-card .btn{ width: 100%; }
}


/* =====================================================================
   PAGE: impressum.php
===================================================================== */

.impressum-page{
  max-width: 900px;
  margin: 0 auto;
}

/* типографика внутри карточки */
.impressum-page h1{ margin: 0 0 8px; }
.impressum-page h2{
  margin: 18px 0 8px;
  font-size: 16px;
}

.impressum-page p{ margin: 8px 0; }
.impressum-page .text-muted-small{ margin-top: 6px; }

/* ссылки аккуратнее */
.impressum-page a{
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.impressum-page a:hover{ color: var(--accent-dark); }

/* чтобы адреса/почта не ломали верстку на мобиле */
.impressum-page a.email-link{
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* =====================================================================
   PAGE: license_buy.php + license_thanks.php
   Root: .license-page
===================================================================== */

.license-page{
  max-width: 1100px;
  margin: 0 auto;
}

/* По умолчанию: карточки одна под другой, на всю ширину */
.license-page .license-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

/* form inside card (НЕ карточка-форма) */
.license-page form{
  max-width: none;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}

/* labels + fields */
.license-page form label{
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
  color: #111827;
}

.license-page form input[type="text"],
.license-page form input[type="email"],
.license-page form input[type="password"],
.license-page form input[type="number"],
.license-page form input[type="date"],
.license-page form select{
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font: inherit;
  background: #fff;
}

.license-page form input:focus,
.license-page form select:focus{
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

/* checkbox row */
.license-page .license-accept{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0 12px;
}

.license-page .license-accept-box{
  width: auto;
  margin-top: 3px;
}

.license-page .license-accept-text{
  font-size: 14px;
  color: #111827;
}

/* submit button full width + отступ снизу */
.license-page form button[type="submit"]{
  width: 100%;
  margin-top: 8px;
  margin-bottom: 10px;
}

/* текст под кнопкой — чтобы не прилипал */
.license-page form button[type="submit"] + p{
  margin-top: 0;
}

/* key-value block (горизонтально) */
.license-page .kv{
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 6px 12px;
}

.license-page .kv .key{
  color: var(--text-muted);
  font-size: 14px;
}

.license-page .kv .val{
  font-size: 14px;
}

/* pill */
.license-page .code-pill{
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #dbeafe;
}

/* actions row */
.license-page .form-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

/* вместо <div style="height:10px"> */
.license-page .spacer-10{
  height: 10px;
}

/* мобила: kv в одну колонку */
@media (max-width: 640px){
  .license-page .kv{ grid-template-columns: 1fr; }
}



.spacer-6{ height:6px; }
.spacer-10{ height:10px; }


/* =====================================================================
   PAGE: my_invoices.php — column widths (no scroll on desktop)
   Columns: 1 Datum | 2 Bestellung | 3 Status | 4 Betrag | 5 Dokumente | 6 Aktivierung
===================================================================== */

/* ВАЖНО: не трогаем глобальный .table-wrapper — только наш */
.table-wrapper.my-invoices-wrap{
  overflow-x: visible; /* desktop: без скролла */
}

/* Десктоп: убираем min-width, чтобы таблица НЕ вылезала из card */
.table.table-my-invoices{
  width: 100%;
  table-layout: fixed;
  min-width: 0;            /* <-- ключевое */
}

/* 1) Datum */
.table.table-my-invoices th:nth-child(1),
.table.table-my-invoices td:nth-child(1){
  width: 150px;
  white-space: nowrap;
}

/* 2) Bestellung */
.table.table-my-invoices th:nth-child(2),
.table.table-my-invoices td:nth-child(2){
  width: 200px;            /* можно потом подстроить */
}

/* 3) Status — ужимаем */
.table.table-my-invoices th:nth-child(3),
.table.table-my-invoices td:nth-child(3){
  width: 110px;
  white-space: nowrap;
}

/* 4) Betrag */
.table.table-my-invoices th:nth-child(4),
.table.table-my-invoices td:nth-child(4){
  width: 110px;
  white-space: nowrap;
  text-align: right;
}

/* 5) Dokumente */
.table.table-my-invoices th:nth-child(5),
.table.table-my-invoices td:nth-child(5){
  width: 180px;
  white-space: nowrap;
}

/* 6) Aktivierung */
.table.table-my-invoices th:nth-child(6),
.table.table-my-invoices td:nth-child(6){
  width: 180px;
  white-space: nowrap;
}

/* Кнопки/строка активации — в одну линию */
.table.table-my-invoices td:nth-child(5) .btn,
.table.table-my-invoices .act-row{
  white-space: nowrap;
}

/* Mobile only: включаем горизонтальный скролл + возвращаем min-width */
@media (max-width: 820px){
  .table-wrapper.my-invoices-wrap{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table.table-my-invoices{
    min-width: 980px;      /* если нужно — увеличишь */
  }
}

/* my_invoices: выравнивание по центру */
.table.table-my-invoices th,
.table.table-my-invoices td{
  text-align: center;
  vertical-align: middle;
}


/* =====================================================================
   PAGE: presentation.php  (Screenshots & Funktionen)
   Root: .product-page
===================================================================== */

.product-page{
  max-width: 1100px;
  margin: 0 auto;
}

.product-header{
  margin-bottom: 18px;
  padding: 18px 18px 16px;
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.product-title{
  margin: 0 0 6px;
  font-size: 28px;
}

.product-subtitle{
  margin: 0;
  color: #374151;
  max-width: 760px;
}

.product-cta-row{
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-block{
  margin-top: 14px;
  padding: 16px 16px 14px;
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.product-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

/* reverse layout */
.product-grid.product-grid-reverse > :first-child{ order: 2; }
.product-grid.product-grid-reverse > :last-child{ order: 1; }

.product-block-title{
  margin: 0 0 8px;
  font-size: 18px;
  color: #0f172a;
}

.product-page p{
  margin: 8px 0;
  color: #374151;
  font-size: 14px;
}

.product-list{
  margin: 10px 0 0;
  padding-left: 18px;
  color: #4b5563;
  font-size: 14px;
}
.product-list li + li{ margin-top: 6px; }

.product-shot-inner{
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.10);
}

.product-shot-inner img{
  display: block;
  width: 100%;
  height: auto;
}

.product-shot-caption{
  margin: 8px 0 0;
  font-size: 12px;
  color: #6b7280;
}

/* bottom CTA */
.product-block.product-block-bottom{
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.product-bottom-card{
  padding: 18px 18px 16px;
  background: #eef2ff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
}

/* responsive */
@media (max-width: 900px){
  .product-grid{ grid-template-columns: 1fr; }
  .product-grid.product-grid-reverse > :first-child,
  .product-grid.product-grid-reverse > :last-child{ order: initial; }
  .product-cta-row .btn{ width: 100%; }
}
/* thumbnails вместо больших картинок */
.product-thumb{
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.10);
  text-decoration: none;
}

.product-thumb img{
  display: block;
  width: 100%;
  height: 220px;      /* превью-фикс высота */
  object-fit: cover;  /* аккуратный кроп */
}

/* небольшой hover, чтобы было понятно что кликабельно */
.product-thumb:hover{
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}

@media (max-width: 900px){
  .product-thumb img{ height: 200px; }
}

.badge-valid{
  display:inline-block;
  margin-left:10px;
  padding:3px 8px;
  border-radius:999px;
  font-size:12px;
  line-height:1.2;
  border:1px solid rgba(0,0,0,.15);
  background: rgba(0,0,0,.04);
  vertical-align: middle;
  white-space: nowrap;
}


/* =====================================================================
   PAGE: pricing.php
   Root: .pricing-page
===================================================================== */

.pricing-page{
  max-width: 920px; /* чуть шире narrow, но компактно */
}

.pricing-page h1{
  margin: 0 0 8px;
  font-size: 28px;
}

.pricing-block{
  margin-top: 18px;
}

.pricing-card{
  border-radius: 18px;
}

.pricing-title{
  margin: 0 0 10px;
  font-size: 20px;
}

.pricing-price{
  margin: 0 0 12px;
  font-size: 22px;
}

.pricing-features{
  margin-top: 0;
}

.pricing-note{
  margin-top: 10px;
}

.pricing-cta-wrap{
  margin-top: 14px;
}

.pricing-cta{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pricing-bottom-cta{
  margin-top: 10px;
}

/* pricing: обычные ссылки, но НЕ кнопки */
.pricing-page a:not(.btn){
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pricing-page a:not(.btn):hover{
  color: var(--accent-dark);
}

@media (max-width: 900px){
  .pricing-cta .btn{ width: 100%; }
}

/* =====================================================================
   PAGE: register.php
   
===================================================================== */

.form-row{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.checkbox-inline{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0 0;
  font-size: 14px;
  color: #111827;
}

.checkbox-inline input[type="checkbox"]{
  margin-top: 3px;
}

.checkbox-inline a{
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.checkbox-inline a:hover{ color: var(--accent-dark); }

@media (max-width: 640px){
  .form-row{ grid-template-columns: 1fr; }
}

/* generic form helpers (works with .form-card too) */
.form-row{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.checkbox-inline{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0 0;
  font-size: 14px;
  color: #111827;
}

.checkbox-inline input[type="checkbox"]{
  margin-top: 3px;
}

.checkbox-inline a{
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.checkbox-inline a:hover{ color: var(--accent-dark); }

@media (max-width: 640px){
  .form-row{ grid-template-columns: 1fr; }
}

/* =====================================================================
   PAGE: requests.php
===================================================================== */

.table.requests-table th:last-child,
.table.requests-table td:last-child{
  width: 140px;
  white-space: nowrap;
}

/* статусные бейджи */
.req-status{ font-weight: 600; }
.req-status-new{
  background: #dbeafe;
  color: #1d4ed8;
}
.req-status-in_progress{
  background: #fef3c7;
  color: #b45309;
}
.req-status-closed{
  background: #dcfce7;
  color: #166534;
}
/* =====================================================================
   PAGE: terms.php
===================================================================== */

.terms-page .text-muted-small{
  margin-top: -4px;
  margin-bottom: 14px;
}

/* =====================================================================
   Mobile: tables action buttons -> icon-only
===================================================================== */

.btn-action{
  gap: 8px;
}

.btn-action .btn-ico{
  font-size: 16px;
  line-height: 1;
}

@media (max-width: 820px){
  /* только внутри таблиц, чтобы не ломать обычные CTA */
  .table .btn-action{
    padding: 6px 10px;
    white-space: nowrap;
  }

  .table .btn-action .btn-text{
    display: none;
  }

  /* делаем кнопки более "иконка-кнопка" */
  .table .btn-action{
    min-width: 36px;
    justify-content: center;
  }
}

/* mobile: make tables scroll horizontally */
@media (max-width: 768px){
  .table-scroll-x{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-scroll-x table{
    min-width: 920px;      /* делаем таблицу шире экрана */
    width: 920px;
  }
  .table-scroll-x th,
  .table-scroll-x td{
    white-space: nowrap;   /* чтобы строки не ломались */
  }
}
/* --- Mobile scroll jump fix: stop scroll chaining / bounce --- */
html, body{
  overscroll-behavior-y: none; /* Android/Chrome */
}

.table-wrapper,
.topbar-nav{
  overscroll-behavior: contain; /* не отдавать "рывок" наружу */
}

/* =====================================================================
   PAGE: requests.php — mobile horizontal scroll
===================================================================== */

@media (max-width: 820px){
  .requests-card .table-wrapper{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .requests-card .requests-table{
    min-width: 920px; /* можешь 860/980 подобрать */
  }

  .requests-card .requests-table th,
  .requests-card .requests-table td{
    white-space: nowrap;
  }

  /* чтобы Betreff читался — пусть он переносится, но колонка будет шире */
  .requests-card .requests-table th:nth-child(3),
  .requests-card .requests-table td:nth-child(3){
    white-space: normal;
    min-width: 320px;
  }
}


/* =====================================================================
   layout_header.php
===================================================================== */

/* Language switch */
.topbar-lang{
  display:flex;
  gap:8px;
  align-items:center;
  margin-left:12px;
}

.topbar-lang .lang-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;         /* удобно пальцем */
  height:32px;
  padding:0 12px;
  border-radius:999px;    /* pill */
  text-decoration:none;
  font-weight:700;
  font-size:12px;
  letter-spacing:.5px;

  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.85);

  transition: transform .08s ease, background .12s ease, border-color .12s ease;
}

.topbar-lang .lang-btn:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.28);
  transform: translateY(-1px);
}

.topbar-lang .lang-btn.is-active{
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.38);
  color: #fff;
}

/* Mobile: чуть компактнее */
@media (max-width: 560px){
  .topbar-lang{ margin-left:8px; gap:6px; }
  .topbar-lang .lang-btn{ min-width:40px; height:30px; padding:0 10px; }
}


/* =====================================================================
   gewerbe_guide.php
===================================================================== */

.guide-layout{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}

.guide-layout > *{
  width: 100%;
  max-width: 100%;
}

.guide-hero{
  padding: 6px 2px;
}

.guide-title{
  margin: 0 0 8px 0;
  font-size: 28px;
  line-height: 1.15;
}

.guide-lead{
  margin: 0;
  opacity: .9;
  font-size: 15px;
  line-height: 1.55;
}

/* TOC as a normal block (no sticky) */
.guide-toc{
  padding: 14px 16px;
}

.guide-toc-title{
  margin: 0 0 10px 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .85;
}

.guide-toc-list{
  margin: 0;
  padding-left: 18px;
  columns: 2;
  column-gap: 24px;
}

.guide-toc-list li{
  margin: 6px 0;
  break-inside: avoid;
}

@media (max-width: 720px){
  .guide-toc-list{
    columns: 1;
  }
}

/* Sections / cards */
.guide-section{
  padding: 16px 18px;
}

.guide-h2{
  margin: 0 0 10px 0;
  font-size: 18px;
}

.guide-h3{
  margin: 0 0 8px 0;
  font-size: 15px;
}

.guide-p{
  margin: 0 0 10px 0;
  line-height: 1.55;
}

/* Step list inside */
.guide-steps{
  display: grid;
  gap: 12px;
}

.guide-step{
  padding: 12px 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
}

.guide-tip{
  margin: 0;
  opacity: .9;
  font-size: 13px;
  line-height: 1.45;
}

/* Lists */
.guide-list,
.guide-check{
  margin: 0;
  padding-left: 18px;
}

.guide-list li,
.guide-check li{
  margin: 6px 0;
  line-height: 1.5;
}

/* Bottom CTA block */
.guide-next{
  padding: 16px 18px;
}

.guide-cta{
  margin-top: 10px;
}

/* Safety: ensure TOC never becomes sticky even if old rules exist */
.guide-toc{
  position: static !important;
  top: auto !important;
}

/* gewerbe_guide: cards full width inside container */
.guide-layout .card,
.guide-layout .guide-section.card,
.guide-layout .guide-toc.card,
.guide-layout .guide-next.card{
  width: 100% !important;
  max-width: none !important;   /* вот это ключ */
  margin-left: 0 !important;
  margin-right: 0 !important;
}


/* kbrs_features.php */

.product-wrapfloat{
  width: 100%;
}

.product-floatshot{
  width: 520px;
  max-width: 55%;
  background: transparent;
}

.product-floatshot .product-thumb{
  display: block;
  border-radius: 16px;
  overflow: hidden;
}

.product-floatshot img{
  width: 100%;
  height: auto;
  display: block;
}

.product-floatshot .product-shot-caption{
  margin: 10px 0 0 0;
  font-size: 13px;
  opacity: .85;
  line-height: 1.4;
  padding-right: 6px;
}

.product-floatshot-right{
  float: right;
  margin: 6px 0 14px 28px;
}

.product-floatshot-left{
  float: left;
  margin: 6px 28px 12px 0;
}

.product-clear{
  clear: both;
}

@media (max-width: 980px){
  .product-floatshot,
  .product-floatshot-right,
  .product-floatshot-left{
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 12px 0;
  }
}

.product-shot-wide{
  margin-top: 12px;
}

.product-shot-wide .product-thumb img{
  width: 100%;
  height: auto;
  display: block;
}

.product-text{
  margin-top: 12px;
}
