:root {
  color-scheme: light dark;
  --color-bg: #0e251b;
  --color-surface: #ffffff;
  --color-surface-alt: #e6ecfb;
  --color-border: rgba(34, 41, 57, 0.12);
  --color-text: #1f2533;
  --color-muted: #4a5060;
  --color-primary: #1e7a46;
  --color-primary-dark: #145a33;
  --color-success: #10ac84;
  --color-warning: #ff9800;
  --color-danger: #ff4757;
  --radius-large: 20px;
  --radius-medium: 14px;
  --radius-small: 10px;
  --shadow-soft: 0 20px 45px rgba(31, 37, 51, 0.12);
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Visually hidden but accessible to screen readers */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  font-family: var(--font-family);
  color: var(--color-text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  /* remove blue overlay */
  background: none;
  pointer-events: none;
  z-index: -1;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 36px clamp(20px, 6vw, 72px) 16px;
  background: #0c2017;
  border-bottom: 1px solid rgba(46, 139, 87, 0.35);
}

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

.brand-logo {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--color-primary), #2fa36f);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* Image replacement for brand logo */
.brand-logo-img {
  height: 58px;
  width: auto;
  display: block;
  border-radius: 10px;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.8rem, 2vw, 2.2rem);
  color: #fff;
}

.brand p {
  margin: 4px 0 0;
  color: #fff;
}

.brand .brand-subtitle {
  color: #fff;
}

.header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.mode-indicator {
  background: #fff;
  color: var(--color-primary);
  font-weight: 600;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.9rem;
  box-shadow: 0 12px 24px rgba(30, 122, 70, 0.15);
}

button {
  appearance: none;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease;
}

button:active {
  transform: scale(0.97);
}

button.primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  padding: 14px 24px;
  box-shadow: 0 14px 32px rgba(30, 122, 70, 0.45);
}

button.primary:hover {
  box-shadow: 0 18px 38px rgba(30, 122, 70, 0.55);
}

button.ghost,
button.ghost-button {
  background: #ffffff;
  color: var(--color-primary);
  border: 1px solid rgba(30, 122, 70, 0.2);
  padding: 12px 20px;
}

button.ghost:hover,
button.ghost-button:hover {
  background: rgba(30, 122, 70, 0.08);
}

button.danger {
  background: rgba(255, 71, 87, 0.12);
  color: var(--color-danger);
  border: 1px solid rgba(255, 71, 87, 0.35);
  padding: 12px 18px;
}

button.danger:hover {
  background: rgba(255, 71, 87, 0.18);
}

.app-shell {
  padding: 12px clamp(20px, 6vw, 72px) 24px;
  background: #0e251b;
}

.view {
  display: none;
  background: #10291d;
  border-radius: var(--radius-large);
  padding: clamp(28px, 4vw, 40px);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(46, 139, 87, 0.35);
}

.view.active {
  display: block;
}

.view-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 28px;
}

.view-header.with-back {
  flex-direction: row;
  align-items: center;
  gap: 18px;
}

.view-header h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.2vw, 2rem);
}

.view-header p {
  margin: 0;
  color: var(--color-muted);
}

.back-button {
  min-width: 140px;
}

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

.tile-button {
  border-radius: var(--radius-medium);
  background: rgba(10, 35, 24, 0.92);
  padding: 20px;
  border: 1px solid rgba(46, 139, 87, 0.35);
  text-align: left;
  display: grid;
  gap: 6px;
  box-shadow: 0 16px 38px rgba(3, 10, 7, 0.25);
}

.tile-button strong {
  font-size: 1.25rem;
  color: var(--color-text);
}

.tile-button span {
  color: rgba(31, 37, 51, 0.72);
  font-size: 0.95rem;
}

/* Admin menu tile subtitles in white for clarity */
#adminMenu .tile-button span {
  color: #fff;
}

/* Make admin menu tiles dark so white text is readable */
#adminMenu .tile-button {
  background: linear-gradient(150deg, #2b2f3a 0%, #1c2029 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
#adminMenu .tile-button strong { color: #fff; }

/* CTA label on member tiles for 'Jetzt buchen' */
#memberButtonGrid .tile-button .cta-label {
  display: inline-block;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

/* === Grün statt Blau: Buttons & Admin-Kacheln (Overrides) === */
.mode-indicator {
  box-shadow: 0 12px 24px rgba(30, 122, 70, 0.22);
}

button.primary { box-shadow: 0 14px 32px rgba(30, 122, 70, 0.45); }
button.primary:hover { box-shadow: 0 18px 38px rgba(30, 122, 70, 0.55); }

button.ghost,
button.ghost-button {
  border: 1px solid rgba(30, 122, 70, 0.28);
  background: #fff;
  color: var(--color-primary);
}
button.ghost:hover,
button.ghost-button:hover { background: rgba(30, 122, 70, 0.10); }

/* Admin-Kacheln in Grün */
#adminMenu .tile-button {
  background: linear-gradient(150deg, #1e3a2e 0%, #11271d 100%);
  border: 1px solid rgba(46, 139, 87, 0.35);
  color: #fff;
}
#adminMenu .tile-button strong,
#adminMenu .tile-button span { color: #fff; }

/* Green container theme across app containers */
.view {
  background: #10291d;
  border: 1px solid rgba(46, 139, 87, 0.35);
  color: #fff;
}
.view-header p { color: rgba(255, 255, 255, 0.85); }

.tile-button {
  background: rgba(10, 35, 24, 0.92);
  border: 1px solid rgba(46, 139, 87, 0.35);
}
.tile-button strong { color: #fff; }
.tile-button span { color: #fff; }

.summary-item {
  background: rgba(10, 35, 24, 0.92);
  border: 1px solid rgba(46, 139, 87, 0.35);
}
.summary-toggle div strong { color: #fff; }
.summary-toggle span { color: #fff; }
.summary-details li { color: rgba(255, 255, 255, 0.9); }

.tile-button:hover,
.tile-button:focus {
  border-color: var(--color-primary);
  box-shadow: 0 18px 36px rgba(30, 122, 70, 0.22);
  outline: none;
}

.tile-button[data-selected="true"] {
  border-color: var(--color-primary);
  box-shadow: 0 20px 40px rgba(30, 122, 70, 0.28);
}

.summary-list {
  display: grid;
  gap: 16px;
}

.summary-item {
  background: rgba(10, 35, 24, 0.92);
  border-radius: var(--radius-medium);
  border: 1px solid rgba(46, 139, 87, 0.35);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(3, 10, 7, 0.25);
}

.summary-toggle {
  width: 100%;
  background: transparent;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 0;
}

.summary-toggle span { display: block; color: #fff; font-weight: 500; font-size: 0.9rem; }

.summary-toggle div {
  display: grid;
  gap: 4px;
  text-align: left;
}

.summary-toggle div strong {
  font-size: 1.25rem;
  color: #fff;
}

.summary-toggle > strong {
  font-size: 1.2rem;
  color: var(--color-text);
}

/* Status coloring for booking summary balances */
.summary-toggle > strong.status-success { color: var(--color-success); }
.summary-toggle > strong.status-warning { color: var(--color-warning); }
.summary-toggle > strong.status-danger  { color: var(--color-danger); }
.summary-details .hint strong.status-success { color: var(--color-success); }
.summary-details .hint strong.status-warning { color: var(--color-warning); }
.summary-details .hint strong.status-danger  { color: var(--color-danger); }

.summary-item[open] .summary-toggle {
  background: rgba(30, 122, 70, 0.12);
}

.summary-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0 22px;
}

.summary-details.active {
  max-height: 400px;
  padding-bottom: 18px;
}

.summary-details ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.summary-details li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 35, 24, 0.92);
  border-radius: var(--radius-small);
  border: 1px solid rgba(46, 139, 87, 0.35);
  padding: 12px 16px;
  color: #fff;
}

.summary-details li span { color: #fff; }

.summary-details li span strong { color: #fff; font-weight: 700; }

.summary-details li strong.amount {
  color: var(--color-primary);
}

.summary-details li strong {
  color: var(--color-text);
  font-weight: 600;
}

.management-columns {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.management-card.stats-card {
  grid-column: span 2;
}

@media (max-width: 960px) {
  .management-card.stats-card {
    grid-column: span 1;
  }
}

.management-card {
  background: linear-gradient(150deg, #1a3025 0%, #101c15 100%);
  color: #fff;
  border-radius: var(--radius-medium);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 26px;
  display: grid;
  gap: 20px;
  box-shadow: 0 22px 44px rgba(10, 12, 18, 0.4);
}


.admin-member-stats {
  display: grid;
  gap: 16px;
}

.admin-member-item {
  background: rgba(10, 35, 24, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-medium);
  padding: 20px;
  display: grid;
  gap: 14px;
  box-shadow: 0 18px 36px rgba(8, 11, 24, 0.45);
}

.admin-member-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-member-header h4 {
  margin: 0;
  font-size: 1.2rem;
  color: #fff;
}

.admin-member-header .metrics {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: #fff;
}

.admin-member-header .metrics span {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.admin-member-header .metrics strong {
  font-size: 1.05rem;
  color: #fff;
}

.admin-member-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-member-breakdown {
  display: grid;
  gap: 10px;
}

/* Ensure hidden sections truly collapse even if display is set elsewhere */
.admin-member-breakdown[hidden] { display: none !important; }

.admin-member-breakdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.admin-member-breakdown li {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-small);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.9);
}

.admin-payment-history {
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 12px;
  display: grid;
  gap: 8px;
}

.admin-payment-history h5 {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.6);
}

.admin-payment-history ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.admin-payment-history li {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  justify-content: space-between;
}

.admin-payment-history li strong {
  color: #fff;
}

.admin-member-empty {
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

.admin-member-list-toggle {
  background: rgba(30, 122, 70, 0.16);
  color: #fff;
  border: 1px solid rgba(46, 139, 87, 0.35);
}

.admin-member-list-toggle:hover {
  background: rgba(30, 122, 70, 0.24);
}

.modal-content.payment {
  width: min(420px, 100%);
  background: linear-gradient(170deg, #1f3b2d, #13251c 70%);
  color: #fff;
  border: none;
  box-shadow: 0 26px 52px rgba(9, 12, 22, 0.55);
}

.modal-content.payment label {
  color: rgba(255, 255, 255, 0.85);
}

.modal-content.payment input {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.modal-content.payment input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.modal-content.payment .primary {
  background: linear-gradient(135deg, #61e4a7, #37c188);
  color: #fff;
  box-shadow: 0 18px 36px rgba(55, 193, 136, 0.45);
}

.modal-content.payment .ghost {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.modal-content.payment .ghost:hover {
  background: rgba(255, 255, 255, 0.26);
}
.management-card header h3 {
  margin: 0;
}

.management-card header p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.7);
}

.stack {
  display: grid;
  gap: 12px;
}

label {
  font-weight: 600;
  color: rgba(31, 37, 51, 0.76);
  font-size: 0.9rem;
}

.management-card label {
  color: rgba(255, 255, 255, 0.85);
}

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

input,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-small);
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 1rem;
  color: var(--color-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Do not stretch native check controls */
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(30, 122, 70, 0.18);
}

input::placeholder,
select::placeholder,
textarea::placeholder {
  color: rgba(31, 37, 51, 0.5);
}

.modal-content input::placeholder {
  color: rgba(31, 37, 51, 0.5);
}

.optional {
  color: rgba(31, 37, 51, 0.55);
  font-weight: 400;
}


.management-card input,
.management-card select {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
}

/* Keep native look for checkboxes/radios inside dark cards */
.management-card input[type="checkbox"],
.management-card input[type="radio"] {
  background: transparent;
  border: none;
}

.management-card input:focus,
.management-card select:focus {
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}

.management-card input::placeholder,
.management-card select::placeholder {
  color: rgba(255, 255, 255, 0.55);
}
.management-card .hint {
  color: #fff;
}
.management-card .optional {
  color: rgba(255, 255, 255, 0.6);
}

.table-wrapper {
  border-radius: var(--radius-medium);
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
  background: rgba(10, 35, 24, 0.92);
  box-shadow: 0 22px 40px rgba(3, 10, 7, 0.48);
}

.table-wrapper .ghost-button {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(46, 139, 87, 0.35);
  box-shadow: none;
}

.table-wrapper .ghost-button:hover {
  background: rgba(255, 255, 255, 0.26);
  color: #fff;
}

.table-wrapper.compact table th,
.table-wrapper.compact table td {
  padding: 12px 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

thead {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
}

thead th {
  text-align: left;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tbody td {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  vertical-align: middle;
}

tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.06);
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.1);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.16);
}

.danger-zone {
  margin-top: 32px;
  background: rgba(255, 71, 87, 0.18);
  border-radius: var(--radius-medium);
  border: 1px solid rgba(255, 139, 154, 0.45);
  padding: 26px;
  display: grid;
  gap: 18px;
  color: #fff;
  box-shadow: 0 18px 38px rgba(10, 12, 18, 0.35);
}

/* Admin tables: column widths and action layout */
#memberTable th:nth-child(1),
#memberTable td:nth-child(1) { width: 40%; }
#memberTable th:nth-child(2),
#memberTable td:nth-child(2) { width: 35%; }
#memberTable th:nth-child(3),
#memberTable td:nth-child(3) { width: 25%; }

#memberTable td:nth-child(1),
#memberTable td:nth-child(2) {
  white-space: normal;
  word-break: break-word;
}

#beverageTable th:nth-child(1),
#beverageTable td:nth-child(1) { width: 45%; }
#beverageTable th:nth-child(2),
#beverageTable td:nth-child(2) { width: 15%; text-align: right; }
#beverageTable th:nth-child(3),
#beverageTable td:nth-child(3) { width: 15%; text-align: center; }
#beverageTable th:nth-child(4),
#beverageTable td:nth-child(4) { width: 25%; }

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 900px) {
  #memberTable th:nth-child(1),
  #memberTable td:nth-child(1) { width: 48%; }
  #memberTable th:nth-child(2),
  #memberTable td:nth-child(2) { width: 32%; }
  #memberTable th:nth-child(3),
  #memberTable td:nth-child(3) { width: 20%; }

  #beverageTable th:nth-child(1),
  #beverageTable td:nth-child(1) { width: 50%; }
  #beverageTable th:nth-child(2),
  #beverageTable td:nth-child(2) { width: 18%; }
  #beverageTable th:nth-child(3),
  #beverageTable td:nth-child(3) { width: 12%; }
  #beverageTable th:nth-child(4),
  #beverageTable td:nth-child(4) { width: 20%; }
}

.pin-config {
  display: grid;
  gap: 12px;
}

.inline-field {
  display: flex;
  gap: 10px;
}

.inline-field input {
  flex: 1;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 26, 0.45);
  display: grid;
  place-items: center;
  padding: 24px;
  backdrop-filter: blur(6px);
  z-index: 1000;
}

.modal[hidden] {
  display: none;
}

.modal-content {
  width: min(440px, 100%);
  background: #fff;
  border-radius: var(--radius-large);
  padding: 26px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 18px;
  max-height: 90vh;
  overflow: auto;
}

.modal-content.quantity {
  width: min(480px, 100%);
  background: linear-gradient(172deg, #1e3c2d 0%, #0f2319 100%);
  border: none;
  color: #fff;
  box-shadow: 0 30px 68px rgba(8, 11, 24, 0.6);
  border-radius: 28px;
}

.modal-content.admin {
  background: linear-gradient(145deg, #27346d, #1b2450);
  background: linear-gradient(145deg, #1c3b2e, #13261d);
  color: #fff;
  border: none;
  box-shadow: 0 26px 60px rgba(15, 18, 26, 0.55);
}

.modal-content.admin .hint {
  color: rgba(255, 255, 255, 0.75);
}

.modal-content.admin input {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.modal-content.admin input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.modal-content.admin .primary {
  background: linear-gradient(135deg, #28c76f, #179657);
  box-shadow: 0 18px 40px rgba(23, 150, 87, 0.45);
}

.modal-content.admin .ghost-button {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.modal-content.admin .ghost-button:hover {
  background: rgba(255, 255, 255, 0.28);
}

.modal-header {
  color: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}


.modal-content input {
  background: #fff;
  border: 1px solid rgba(30, 122, 70, 0.26);
  border-radius: var(--radius-small);
  padding: 12px 16px;
  font-size: 1rem;
  color: var(--color-text);
}

.modal-content input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(30, 122, 70, 0.2);
  outline: none;
}

.modal-content .ghost-button {
  background: rgba(30, 122, 70, 0.12);
  color: var(--color-primary);
  border: 1px solid rgba(30, 122, 70, 0.28);
}

.modal-content .ghost-button:hover {
  background: rgba(30, 122, 70, 0.2);
  color: #fff;
}

.modal-header h2 {
  margin: 0;
}

.icon-button {
  border-radius: 12px;
  padding: 0 14px;
  min-width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: var(--color-primary);
  border: 1px solid rgba(30, 122, 70, 0.2);
}

.icon-button:hover {
  background: rgba(30, 122, 70, 0.08);
}

.hint {
  color: rgba(31, 37, 51, 0.75);
  font-size: 0.9rem;
  margin: 0;
}

.modal-content.quantity .hint {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.modal-content.quantity label {
  color: #fff;
}

.modal-content.quantity .primary {
  background: linear-gradient(135deg, #3ddc97, #1e7a46);
  color: #fff;
  box-shadow: 0 20px 42px rgba(30, 122, 70, 0.5);
}

.modal-content.quantity .primary:hover {
  box-shadow: 0 24px 48px rgba(92, 161, 255, 0.58);
}

.modal-content.quantity .ghost-button {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.modal-content.quantity .ghost-button:hover {
  background: rgba(255, 255, 255, 0.28);
}

.quantity-body {
  display: grid;
  gap: 24px;
  background: rgba(255, 255, 255, 0.1);
  padding: 26px;
  border-radius: var(--radius-medium);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
}

.quantity-body strong {
  color: #fff;
  font-size: 1.25rem;
}

.quantity-body p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.quantity-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: center;
}

.quantity-stepper button {
  height: 64px;
  border-radius: 18px;
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 18px 36px rgba(5, 7, 15, 0.45);
  transition: transform 0.16s ease, background 0.2s ease;
}

.quantity-stepper button:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.quantity-stepper div {
  text-align: center;
  display: grid;
  gap: 8px;
  justify-items: center;
}

#quantityValue {
  font-size: 2.8rem;
  color: #fff;
  font-weight: 700;
}

/* Fridge quantity input styling (dark modal) */
#fridgeQtyInput {
  width: 96px;
  text-align: center;
  font-size: 1.2rem;
  border-radius: 12px;
  padding: 10px 12px;
}
/* Quick add buttons for fridge */
@media (prefers-color-scheme: dark) {
  #fridgeQtyInput {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
  }
}

/* Fridge count modal input text should be black for readability */
#fridgeCountModal input[type="number"],
#fridgeCountModal input[type="text"],
#fridgeCountModal input[type="tel"] {
  color: #000;
  background: #fff;
}

.quantity-stepper div strong {
  font-size: 2.4rem;
  color: #fff;
  font-weight: 700;
}

.quantity-stepper div span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

#quantityValueLabel {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.9rem;
}

.quantity-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.32);
  padding: 20px 24px;
  border-radius: var(--radius-medium);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.quantity-total span {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.72);
}

.quantity-total strong {
  font-size: 1.9rem;
  color: #fff;
  font-weight: 700;
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

[data-admin-only] {
  display: none;
}

body.admin-mode [data-admin-only] {
  display: block;
}

/* Admin menu/sections */
#adminMenu { margin-bottom: 16px; }
[data-admin-section] { display: none; }
.admin-section-active [data-admin-section][data-visible="true"] { display: block; }

body.admin-mode .mode-indicator {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 22px);
  padding: 14px 24px;
  border-radius: 999px;
  background: rgba(31, 37, 51, 0.9);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1200;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast[data-tone="success"] {
  background: linear-gradient(135deg, #1dd1a1, #10ac84);
}

.toast[data-tone="danger"] {
  background: linear-gradient(135deg, #ff6b6b, #ff4757);
}

.toast[data-tone="warning"] {
  background: linear-gradient(135deg, #ffaf40, #ff9f1a);
}

.toast[data-tone="info"] {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}

@media (max-width: 960px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .header-actions {
    width: 100%;
  }

  .view-header.with-back {
    flex-direction: column;
    align-items: flex-start;
  }

  .tile-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .quantity-stepper {
    grid-template-columns: repeat(3, minmax(0, auto));
  }

  /* Enable horizontal scroll for wide tables on small screens */
  .table-wrapper {
    overflow-x: auto;
  }
  table {
    min-width: 560px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0e251b;
    --color-surface: #151b28;
    --color-surface-alt: #1c2436;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-text: #f5f7ff;
    --color-muted: rgba(240, 243, 255, 0.72);
    --shadow-soft: 0 20px 45px rgba(0, 0, 0, 0.55);
  }

  input,
  select {
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
  }

  .tile-button {
    background: rgba(255, 255, 255, 0.06);
  }

  .summary-item {
    background: rgba(255, 255, 255, 0.06);
  }

  button.ghost,
  button.ghost-button {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  button.ghost:hover,
  button.ghost-button:hover {
    background: rgba(255, 255, 255, 0.16);
  }

  /* Improve readability of sublines in Bookings view on dark */
  .summary-toggle span { color: #fff; }
  .summary-details .hint { color: #fff; }
  .summary-details li span { color: #fff; }

  /* Make admin payment headings and lines fully white for clarity */
  .admin-payment-history h5 { color: #fff; }
  .admin-payment-history li { color: #fff; }

  /* Beverage selection tiles: make price (span) clearly visible on dark */
  #beverageButtonGrid .tile-button span { color: #fff; }
}

.danger-zone .hint {
  color: rgba(255, 255, 255, 0.72);
}
