/* ==========================================================================
   DC PEANUTS WORINGEN (STEELDART EST. 2009) – OFFICIAL DESIGN SYSTEM
   Farbwelt basierend auf Vereinswappen (@dcpeanuts) & Vereinstrikots:
   - Steeldart Pitch Black & Jersey Charcoal (#0B0C0E / #131519 / #1C2026)
   - Trikot Signal-Orange (#F27A1A / #FF8C2B)
   - Wappen Erdnuss-Goldbraun (#C87D32 / #7C4716)
   - Dartboard Crisp White (#F9FAFB)
   ========================================================================== */

:root {
  --bg-950: #0b0c0e;
  --bg-900: #131519;
  --bg-850: #1b1e24;
  --bg-800: #252932;
  --border-800: #262a34;
  --border-700: #383e4c;

  --text-100: #f9fafb;
  --text-200: #e5e7eb;
  --text-300: #d1d5db;
  --text-400: #9ca3af;
  --text-500: #6b7280;

  /* DC Peanuts Brand Colors */
  --peanut-300: #ffb36b;
  --peanut-400: #ff8c2b;
  --peanut-500: #f27a1a;
  --peanut-600: #d9650b;
  --peanut-shell: #c87d32;
  --peanut-shell-dark: #7c4716;

  /* Legacy alias variables used across templates */
  --amber-300: var(--peanut-300);
  --amber-400: var(--peanut-400);
  --amber-500: var(--peanut-500);
  --amber-600: var(--peanut-600);

  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --rose-400: #fb7185;
  --rose-500: #f43f5e;
  --violet-400: #c084fc;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-950);
  color: var(--text-100);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  overscroll-behavior-y: none;
  user-select: none;
  -webkit-user-select: none;
}

input, textarea, select {
  user-select: text;
  -webkit-user-select: text;
  font-family: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  transition: transform 0.07s ease, background-color 0.15s ease, opacity 0.15s ease;
}

button:active:not(:disabled) {
  transform: scale(0.96);
}

button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

/* ==========================================
   HEADER MIT VEREINSWAPPEN
   ========================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(19, 21, 25, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 2px solid rgba(242, 122, 26, 0.35);
  padding: calc(7px + var(--safe-top)) 12px 7px 12px;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
  border: 2px solid var(--peanut-500);
  box-shadow: 0 2px 10px rgba(242, 122, 26, 0.35);
  object-fit: contain;
}

.brand-title {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: var(--text-100);
  margin: 0;
  line-height: 1.1;
}

.brand-title span {
  color: var(--peanut-400);
}

.brand-subtitle {
  font-size: 10px;
  color: var(--text-400);
  margin: 1px 0 0 0;
  font-weight: 600;
}

.header-stats {
  display: flex;
  gap: 7px;
  align-items: center;
}

.header-stat-box {
  text-align: right;
  background: rgba(242, 122, 26, 0.1);
  border: 1px solid rgba(242, 122, 26, 0.35);
  padding: 3px 9px;
  border-radius: 10px;
}

.header-stat-label {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--peanut-300);
  display: block;
  font-weight: 700;
}

.header-stat-val {
  font-size: 14px;
  font-weight: 900;
  color: var(--peanut-400);
}

.app-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 10px calc(80px + var(--safe-bottom)) 10px;
}

/* ==========================================
   CARDS & SURFACES
   ========================================== */
.card {
  background: var(--bg-900);
  border: 1px solid var(--border-800);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 12px;
}

.card-sub {
  background: var(--bg-950);
  border: 1px solid var(--border-800);
  border-radius: 14px;
  padding: 11px 12px;
}

.section-title {
  font-size: 17px;
  font-weight: 900;
  color: var(--peanut-400);
  margin: 0 0 4px 0;
}

.section-desc {
  font-size: 12px;
  color: var(--text-400);
  margin: 0 0 12px 0;
  line-height: 1.4;
}

/* ==========================================
   LIVE-SUCHE AM TRESEN (KOMPAKT)
   ========================================== */
.search-sticky {
  position: sticky;
  top: calc(54px + var(--safe-top));
  z-index: 20;
  background: var(--bg-900);
  border: 1px solid var(--border-700);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  margin-bottom: 8px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 11px;
  font-size: 14px;
  pointer-events: none;
}

.input-field {
  width: 100%;
  background: var(--bg-950);
  border: 1px solid var(--border-700);
  border-radius: 11px;
  padding: 8px 11px;
  color: var(--text-100);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.input-field:focus {
  border-color: var(--peanut-400);
}

.search-input {
  padding-left: 34px;
  padding-right: 34px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.clear-search-btn {
  position: absolute;
  right: 7px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-800);
  color: var(--text-300);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-dropdown {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--border-800);
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.suggestion-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-950);
  border: 1px solid rgba(242, 122, 26, 0.45);
  border-radius: 11px;
  padding: 9px 11px;
  text-align: left;
}

.suggestion-btn.new-guest {
  background: rgba(6, 78, 59, 0.35);
  border-color: rgba(16, 185, 129, 0.5);
}

/* ==========================================
   FILTER PILLS & CHIPS
   ========================================== */
.toolbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.pill-btn {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 9px;
  background: var(--bg-900);
  border: 1px solid var(--border-800);
  color: var(--text-400);
}

.pill-btn.active {
  background: rgba(242, 122, 26, 0.18);
  border-color: var(--peanut-500);
  color: var(--peanut-400);
}

.action-chip-btn {
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 9px;
  background: rgba(242, 122, 26, 0.16);
  border: 1px solid rgba(242, 122, 26, 0.45);
  color: var(--peanut-400);
}

/* ==========================================
   SPIELER-KACHELN AM TRESEN (2 SPALTEN HANDY / 3-4 SPALTEN TABLET)
   Damit 12–16+ Personen ohne Scrollen auf 1 Blick sichtbar sind!
   ========================================== */
.players-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.players-list.view-list {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .players-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }
  .players-list.view-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .players-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }
}

.player-card {
  background: var(--bg-900);
  border: 1px solid var(--border-800);
  border-radius: 13px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  cursor: pointer;
  min-height: 54px;
  transition: transform 0.07s ease, border-color 0.15s ease;
}

.players-list.view-list .player-card {
  flex-direction: row;
  align-items: center;
  padding: 10px 13px;
}

.player-card:active {
  transform: scale(0.975);
  background: var(--bg-850);
}

.player-card.has-open {
  border-color: rgba(242, 122, 26, 0.75);
  background: linear-gradient(135deg, rgba(242, 122, 26, 0.09), var(--bg-900));
}

.player-card.is-paid {
  border-color: rgba(16, 185, 129, 0.45);
  opacity: 0.78;
}

.player-card.is-tabbed {
  border-color: rgba(192, 132, 252, 0.55);
}

.player-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  width: 100%;
}

.player-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-100);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-amount {
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.player-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.player-badges {
  font-size: 11px;
  color: var(--text-400);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.status-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 5px;
  flex-shrink: 0;
}

.tag-open {
  background: rgba(242, 122, 26, 0.18);
  color: var(--peanut-300);
}

.tag-paid {
  background: rgba(16, 185, 129, 0.16);
  color: var(--emerald-400);
}

.tag-tabbed {
  background: rgba(192, 132, 252, 0.18);
  color: var(--violet-400);
}

.tag-carry {
  background: rgba(200, 125, 50, 0.25);
  color: var(--peanut-300);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 5px;
}

/* ==========================================
   BOTTOM NAVIGATION
   ========================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: rgba(19, 21, 25, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-800);
  padding-bottom: var(--safe-bottom);
}

.bottom-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 4px 6px;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 2px;
  color: var(--text-400);
  border-radius: 12px;
}

.nav-btn.active {
  color: var(--peanut-400);
  background: rgba(242, 122, 26, 0.12);
}

.nav-icon {
  font-size: 19px;
  line-height: 1.1;
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
  margin-top: 2px;
}

/* ==========================================
   SPIELER-DECKEL SHEET (SCHNELL-BEDIENUNG AUF HANDY & TABLET!)
   ========================================== */
.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--bg-950);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sheet-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(19, 21, 25, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-800);
  padding: calc(9px + var(--safe-top)) 14px 9px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sheet-body {
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 10px 12px 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sheet-items-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

@media (min-width: 640px) {
  .sheet-items-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* Fester, prominenter Daumen-Abschlussbereich unten im Deckel */
.sheet-footer-sticky {
  position: sticky;
  bottom: 0;
  z-index: 15;
  background: rgba(19, 21, 25, 0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-700);
  padding: 9px 14px calc(11px + var(--safe-bottom)) 14px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.55);
}

.sheet-footer-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-done-giant {
  width: 100%;
  background: linear-gradient(135deg, var(--peanut-500), var(--peanut-600));
  color: #ffffff;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.3px;
  padding: 15px 18px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(242, 122, 26, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Getränke-Zeilen im Deckel */
.drink-row {
  background: var(--bg-900);
  border: 1px solid var(--border-800);
  border-radius: 14px;
  padding: 8px 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drink-row.active-count {
  border-color: var(--peanut-500);
  background: linear-gradient(90deg, rgba(242, 122, 26, 0.11), var(--bg-900));
}

.counter-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-minus {
  width: 44px;
  height: 42px;
  border-radius: 11px;
  background: var(--bg-800);
  color: var(--text-200);
  font-size: 21px;
  font-weight: 800;
}

.btn-plus {
  width: 54px;
  height: 42px;
  border-radius: 11px;
  background: var(--peanut-500);
  color: #ffffff;
  font-size: 23px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(242, 122, 26, 0.3);
}

.count-display {
  width: 28px;
  text-align: center;
  font-size: 19px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

/* Kompakter, ausklappbarer Freier-Betrag-Drawer */
.compact-custom-drawer {
  background: var(--bg-900);
  border: 1px dashed var(--border-700);
  border-radius: 14px;
  overflow: hidden;
}

.compact-custom-drawer summary {
  list-style: none;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-300);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.compact-custom-drawer summary::-webkit-details-marker {
  display: none;
}

.compact-custom-drawer[open] {
  border-style: solid;
  border-color: rgba(242, 122, 26, 0.5);
}

.compact-custom-body {
  padding: 0 12px 12px 12px;
  border-top: 1px solid var(--border-800);
  padding-top: 10px;
}

/* ==========================================
   MODALS
   ========================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(11, 12, 14, 0.88);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  background: var(--bg-900);
  border: 1px solid var(--border-700);
  border-radius: 22px;
  max-width: 440px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow-y: auto;
}

/* ==========================================
   BUTTONS & GRIDS
   ========================================== */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--peanut-500), var(--peanut-600));
  color: #ffffff;
  font-weight: 900;
  font-size: 14px;
  padding: 13px 16px;
  border-radius: 14px;
  text-align: center;
}

.btn-emerald {
  width: 100%;
  background: var(--emerald-600);
  color: #ffffff;
  font-weight: 900;
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 13px;
  text-align: center;
}

.btn-sky {
  width: 100%;
  background: var(--sky-500);
  color: var(--bg-950);
  font-weight: 900;
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 13px;
  text-align: center;
}

.btn-violet {
  width: 100%;
  background: rgba(192, 132, 252, 0.16);
  border: 1px solid rgba(192, 132, 252, 0.45);
  color: var(--violet-400);
  font-weight: 800;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-align: center;
}

.btn-secondary {
  background: var(--bg-800);
  color: var(--text-200);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 12px;
}

.btn-danger {
  background: rgba(136, 19, 55, 0.35);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: var(--rose-400);
  font-weight: 700;
  font-size: 12px;
  padding: 10px 14px;
  border-radius: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat-tile {
  background: var(--bg-950);
  border: 1px solid var(--border-800);
  border-radius: 14px;
  padding: 11px 12px;
}

.stat-tile-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-400);
  display: block;
}

.stat-tile-val {
  font-size: 19px;
  font-weight: 900;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

.quick-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.quick-chip {
  background: var(--bg-950);
  border: 1px solid var(--border-700);
  color: var(--peanut-300);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 8px;
}

.member-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px 0;
}

.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-950);
  border: 1px solid var(--border-800);
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-200);
}

/* Beamer Toggle Switch Card */
.beamer-toggle-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-700);
  background: var(--bg-950);
  text-align: left;
}

.beamer-toggle-btn.active {
  border-color: var(--peanut-500);
  background: rgba(242, 122, 26, 0.14);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  top: calc(14px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  width: 90%;
  max-width: 380px;
}

.toast {
  background: var(--bg-850);
  border: 1px solid var(--peanut-500);
  color: #fff;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0,0,0,0.65);
  text-align: center;
  animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   PIN-SPERRE & NUMMERNBLOCK (VORSTAND / KASSIER)
   ========================================== */
.lock-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-700);
  background: var(--bg-850);
  color: var(--text-300);
}

.lock-status-btn.unlocked {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(6, 78, 59, 0.35);
  color: var(--emerald-400);
}

/* ==========================================
   HEADER BADGES (SYNC & ROLE STATUS)
   ========================================== */
.badge-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: 9px;
  border: 1px solid var(--border-700);
  background: var(--bg-850);
  color: var(--text-200);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.15s ease;
}

.badge-status:active {
  transform: scale(0.95);
}

.badge-sync.sync-online {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(6, 78, 59, 0.4);
  color: var(--emerald-400);
}

.badge-sync.sync-busy {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(14, 165, 233, 0.22);
  color: var(--sky-400);
  animation: pulseSync 1.4s infinite ease-in-out;
}

@keyframes pulseSync {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.badge-sync.sync-local {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(180, 83, 9, 0.28);
  color: #fbbf24;
}

.badge-sync.sync-error {
  border-color: rgba(244, 63, 94, 0.55);
  background: rgba(159, 18, 57, 0.35);
  color: var(--rose-400);
}

.badge-role.role-tresen {
  border-color: rgba(242, 122, 26, 0.45);
  background: rgba(242, 122, 26, 0.14);
  color: var(--peanut-300);
}

.badge-role.role-kassier {
  border-color: rgba(242, 122, 26, 0.85);
  background: rgba(242, 122, 26, 0.32);
  color: #fff;
  box-shadow: 0 0 10px rgba(242, 122, 26, 0.4);
}

/* ==========================================
   LOGIN-GATE OVERLAY
   ========================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: radial-gradient(circle at center, #1b1e24 0%, #0b0c0e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.login-card {
  background: var(--bg-900);
  border: 1px solid rgba(242, 122, 26, 0.45);
  border-radius: 24px;
  padding: 24px 20px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(242, 122, 26, 0.15);
  margin: auto;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
  text-align: left;
}

.login-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
  border: 2px solid var(--peanut-500);
  box-shadow: 0 3px 12px rgba(242, 122, 26, 0.4);
  object-fit: contain;
  flex-shrink: 0;
}

.login-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--peanut-400);
  background: rgba(242, 122, 26, 0.12);
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid rgba(242, 122, 26, 0.3);
  margin-bottom: 2px;
}

.login-title {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  margin: 0;
  line-height: 1.15;
}

.login-subtitle {
  font-size: 11px;
  color: var(--peanut-300);
  margin: 2px 0 0 0;
  font-weight: 700;
}

.login-desc {
  font-size: 12px;
  color: var(--text-300);
  margin: 0 0 14px 0;
  line-height: 1.4;
}

.login-input-row {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.login-input {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 6px;
  text-align: center;
  color: #fff;
  padding: 10px 42px 10px 14px;
  width: 100%;
}

.login-eye-btn {
  position: absolute;
  right: 10px;
  font-size: 18px;
  padding: 4px;
  color: var(--text-400);
  cursor: pointer;
}

.login-error {
  color: var(--rose-400);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
  animation: shakePin 0.3s ease;
}

.login-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 270px;
  margin: 0 auto 12px auto;
}

.login-key {
  height: 50px;
  border-radius: 14px;
  background: var(--bg-950);
  border: 1px solid var(--border-700);
  color: var(--text-100);
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-key:active {
  background: var(--peanut-500);
  border-color: var(--peanut-400);
  color: #fff;
}

.login-key.sub {
  font-size: 16px;
  color: var(--text-400);
}

.login-btn {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  margin-bottom: 8px;
}

.login-offline-btn {
  width: 100%;
  padding: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-400);
  border-radius: 9px;
  border: 1px dashed var(--border-700);
  background: transparent;
  margin-bottom: 8px;
}

.login-offline-btn:hover, .login-offline-btn:active {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.login-hint {
  font-size: 10px;
  color: var(--text-500);
  margin: 0;
}

.login-hint strong {
  color: var(--peanut-400);
}

/* ==========================================
   SERVER BACKUPS & SNAPSHOTS LIST
   ========================================== */
.backup-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-950);
  border: 1px solid var(--border-800);
  border-radius: 11px;
}

.backup-meta {
  min-width: 0;
  flex: 1;
}

.backup-title {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.backup-time {
  font-size: 10px;
  color: var(--text-400);
}

.pin-dots-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 18px 0 22px 0;
}

.pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-700);
  background: var(--bg-950);
  transition: all 0.12s ease;
}

.pin-dot.filled {
  background: var(--peanut-400);
  border-color: var(--peanut-400);
  box-shadow: 0 0 12px rgba(242, 122, 26, 0.65);
  transform: scale(1.1);
}

.pin-dot.error {
  background: var(--rose-500);
  border-color: var(--rose-500);
  animation: shakePin 0.3s ease;
}

@keyframes shakePin {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 280px;
  margin: 0 auto;
}

.pin-key {
  height: 58px;
  border-radius: 16px;
  background: var(--bg-950);
  border: 1px solid var(--border-700);
  color: var(--text-100);
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-key:active {
  background: var(--peanut-500);
  border-color: var(--peanut-400);
  color: #fff;
}

/* ==========================================
   DRUCK-ANSICHT (DIN A4 VERMIETER-ABRECHNUNG)
   ========================================== */
.print-only {
  display: none;
}

@media print {
  .no-print {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
  }
  .print-sheet {
    padding: 10mm;
    color: #000;
  }
  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
  }
  .print-table th, .print-table td {
    border: 1px solid #333;
    padding: 6px 8px;
    text-align: left;
    font-size: 9.5pt;
  }
  .print-table th {
    background: #f3f4f6;
  }
}
