/* ================================================================
   Venue Manager — Design tokens, theme, modern utilities
   Imported globally to layer a premium look over existing styles.
   ================================================================ */

:root {
  --font-sans: 'Karla', system-ui, sans-serif;
  --font-display: 'Newsreader', Georgia, serif;

  /* Brand */
  --brand-900: #0f172a;
  --brand-700: #1e3a8a;
  --brand-500: #475569;
  --accent-300: #f4d58d;
  --accent-500: #ca8a04;
  --accent-600: #a16207;
  --accent-700: #854d0e;
  --accent-soft: #fef3c7;

  /* Surfaces */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Text */
  --text: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --text-invert: #ffffff;

  /* State */
  --success: #15803d;
  --success-bg: #f0fdf4;
  --warning: #b45309;
  --warning-bg: #fffbeb;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --info: #1d4ed8;
  --info-bg: #eff6ff;

  /* Status pills (reservation/tables) */
  --status-available: #1f9d55;
  --status-picked: #2f6bd3;
  --status-pending: #b8860b;
  --status-locked: #6b6b6b;
  --status-cancelled: #c0392b;

  /* Radii & shadow */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 18px 42px rgba(15, 23, 42, 0.08);

  /* Motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 120ms;
  --t-med: 220ms;

  /* Z layers */
  --z-toast: 900;
  --z-palette: 950;
  --z-modal: 1000;
}

/* Global polish (non-invasive — only affects elements we opt-in to). */
html, body { background: var(--bg); color: var(--text); }

body {
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
}

/* Focus rings for accessibility. */
:where(button, a, [role="button"], input, select, textarea):focus-visible {
  outline: 2px solid var(--accent-500);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
  font: inherit;
  font-size: 13px;
  gap: 6px;
}
.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.icon-btn:active { transform: translateY(1px); }
.icon-btn .kbd {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Badges for status */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border);
}
.badge--success  { background: var(--success-bg); color: var(--success); border-color: transparent; }
.badge--warning  { background: var(--warning-bg); color: var(--warning); border-color: transparent; }
.badge--danger   { background: var(--danger-bg);  color: var(--danger);  border-color: transparent; }
.badge--info     { background: var(--info-bg);    color: var(--info);    border-color: transparent; }
.badge--vip      { background: #f7efd9; color: #8a6d1c; border: 1px solid #efdfaa; }
.badge--vip::before { content: "VIP"; font-size: 10px; letter-spacing: 0.08em; }

/* Status action buttons (Seat / Complete / No-show) */
.status-actions {
  display: inline-flex;
  gap: 8px;
  margin-right: 8px;
}
.status-btn {
  font: inherit;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.status-btn:hover { background: var(--surface-2); }
.status-btn:disabled { opacity: .6; cursor: default; }
.status-btn.success { background: var(--success-bg); color: var(--success); border-color: transparent; }
.status-btn.success:hover { filter: brightness(.96); }
.status-btn.danger  { background: var(--danger-bg);  color: var(--danger);  border-color: transparent; }
.status-btn.danger:hover  { filter: brightness(.96); }
.status-btn.primary { background: var(--accent-500); color: #fff; border-color: transparent; }
.status-btn.primary:hover { filter: brightness(1.05); }

/* Generic card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

/* Skeleton shimmer */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  border-radius: var(--r-sm);
  color: transparent;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ================================================================
   PWA Custom Install Banner (Mobile Only)
   ================================================================ */
.pwa-install-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  width: calc(100% - 32px);
  max-width: 500px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--r-xl);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
  z-index: 2000;
  padding: 16px;
  box-sizing: border-box;
  transition: transform var(--t-med) var(--ease);
}

.pwa-install-banner.show {
  transform: translateX(-50%) translateY(0);
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pwa-banner-app-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-banner-logo {
  width: 44px;
  height: 44px;
  background: var(--brand-900);
  color: var(--accent-300);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: bold;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(244, 213, 141, 0.2);
}

.pwa-banner-text {
  display: flex;
  flex-direction: column;
}

.pwa-banner-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  line-height: 1.2;
}

.pwa-banner-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pwa-btn {
  font-family: var(--font-sans);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast) var(--ease);
}

.pwa-btn-primary {
  background: var(--accent-500);
  color: white;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  box-shadow: 0 2px 4px rgba(202, 138, 4, 0.2);
}

.pwa-btn-primary:hover {
  background: var(--accent-600);
  transform: translateY(-1px);
}

.pwa-btn-primary:active {
  transform: translateY(0);
}

.pwa-btn-close {
  background: transparent;
  color: var(--text-subtle);
  font-size: 22px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  line-height: 1;
}

.pwa-btn-close:hover {
  background: var(--surface-3);
  color: var(--text);
}

/* Hide banner on desktop layout, only show on mobile screen viewports */
@media (min-width: 769px) {
  .pwa-install-banner {
    display: none !important;
  }
}

