:root {
  --bg: #0b1120;
  --surface: #111827;
  --surface-2: #1e293b;
  --border: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --amber: #f59e0b;
  --blue: #3b82f6;
  --emerald: #10b981;
  --red: #ef4444;
  --purple: #8b5cf6;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #172554 0%, var(--bg) 55%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, sans-serif;
  min-height: 100vh;
}

a {
  color: inherit;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.container-narrow {
  max-width: 560px;
}

.card {
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(8px);
}

.stack-sm > * + * {
  margin-top: 8px;
}
.stack-md > * + * {
  margin-top: 14px;
}
.stack-lg > * + * {
  margin-top: 22px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

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

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b1120;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.brand-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 2px 0 0;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge-admin {
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.4);
}
.badge-garson {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.4);
}
.badge-kasa {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}
.badge-nargile {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.4);
}
.badge-muted {
  background: rgba(148, 163, 184, 0.15);
  color: var(--muted);
  border-color: rgba(148, 163, 184, 0.3);
}
.badge-danger {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

/* Customer 4-Button Grid */
.table-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.table-pill {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fcd34d;
}

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

@media (max-width: 480px) {
  .call-grid {
    grid-template-columns: 1fr;
  }
}

.call-btn {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 18px;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  color: var(--text);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

.call-btn:hover {
  transform: translateY(-2px);
}

.call-btn:active {
  transform: scale(0.98);
}

.call-btn[data-type='waiter'] {
  border-color: rgba(59, 130, 246, 0.45);
}
.call-btn[data-type='waiter']:hover {
  box-shadow: 0 10px 28px rgba(59, 130, 246, 0.22);
}

.call-btn[data-type='hookah'] {
  border-color: rgba(245, 158, 11, 0.45);
}
.call-btn[data-type='hookah']:hover {
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.22);
}

.call-btn[data-type='coal'] {
  border-color: rgba(239, 68, 68, 0.45);
}
.call-btn[data-type='coal']:hover {
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.22);
}

.call-btn[data-type='bill'] {
  border-color: rgba(16, 185, 129, 0.45);
}
.call-btn[data-type='bill']:hover {
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.22);
}

.call-btn-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
}

.call-btn[data-type='waiter'] .call-btn-icon {
  background: rgba(59, 130, 246, 0.2);
}
.call-btn[data-type='hookah'] .call-btn-icon {
  background: rgba(245, 158, 11, 0.2);
}
.call-btn[data-type='coal'] .call-btn-icon {
  background: rgba(239, 68, 68, 0.2);
}
.call-btn[data-type='bill'] .call-btn-icon {
  background: rgba(16, 185, 129, 0.2);
}

.call-btn-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.call-btn-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.35;
}

/* Form controls & Buttons */
input,
select {
  background: #0f172a;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--amber);
}

.input-full {
  width: 100%;
}

label {
  display: block;
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s ease, opacity 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  background: #273549;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b1120;
  border-color: transparent;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.btn-success {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}
.btn-success:hover {
  background: rgba(16, 185, 129, 0.32);
}

.btn-info {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.45);
  color: #93c5fd;
}
.btn-info:hover {
  background: rgba(59, 130, 246, 0.32);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 8px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

/* Alerts & Toast */
.alert {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.7);
  font-size: 0.9rem;
  line-height: 1.4;
}
.alert-warn {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
}
.alert-success {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
}
.alert-danger {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: var(--text);
  border: 1px solid var(--amber);
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  z-index: 1000;
  font-weight: 600;
  max-width: 92vw;
}

/* Call items in Staff view */
.call-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.call-item.pending {
  border-left: 4px solid var(--amber);
}
.call-item.acknowledged {
  border-left: 4px solid var(--blue);
}
.call-item.completed {
  border-left: 4px solid var(--emerald);
  opacity: 0.75;
}

/* Role pill editor */
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.role-chip button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0 2px;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.85;
}
.role-chip button:hover {
  opacity: 1;
}

.checkbox-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0f172a;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  margin: 0;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
  font-size: 0.86rem;
}

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

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

