/* deploy-marker 1778246024 */
/* Château Privé EventOS — Shared Theme
   Design language: clean white, gold accent, generous spacing, soft shadows
   Inspired by Linear / Stripe / Notion / EasyTix UI Kit
*/

:root {
  /* PALETTE */
  --bg: #FBFAF7;              /* page background — soft warm white */
  --surface: #FFFFFF;         /* cards, sidebar */
  --surface-2: #F5F3EE;       /* subtle backgrounds, hover */
  --surface-3: #EFEBE2;       /* deeper hover, dividers as bg */

  --ink: #161210;             /* primary text */
  --ink-soft: #4a4337;        /* secondary text */
  --ink-faint: #8a8270;       /* tertiary text, labels */
  --ink-ghost: #b8b1a3;       /* placeholders, disabled */

  --gold: #B8965A;            /* primary accent */
  --gold-deep: #9a7d44;       /* gold hover/active */
  --gold-light: #d4b884;      /* gold-50 backgrounds */
  --gold-bg: #f4ede0;         /* gold-tinted background pills */

  --border: rgba(22, 18, 16, 0.08);
  --border-strong: rgba(22, 18, 16, 0.16);

  --success: #4a7c59;
  --success-bg: #e3eee5;
  --warning: #b8965a;
  --warning-bg: #f4ede0;
  --error: #B0463A;
  --error-bg: #f5dcd8;
  --info: #4a6a7c;
  --info-bg: #e3edee;

  /* SHADOWS */
  --shadow-sm: 0 1px 2px rgba(22, 18, 16, 0.04);
  --shadow: 0 1px 3px rgba(22, 18, 16, 0.06), 0 1px 2px rgba(22, 18, 16, 0.04);
  --shadow-md: 0 4px 12px rgba(22, 18, 16, 0.06), 0 2px 4px rgba(22, 18, 16, 0.04);
  --shadow-lg: 0 12px 32px rgba(22, 18, 16, 0.08), 0 4px 8px rgba(22, 18, 16, 0.04);

  /* RADIUS */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* TYPOGRAPHY */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;

  /* SPACING (for consistency) */
  --sidebar-w: 240px;
  --header-h: 64px;
  --content-pad: 32px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: var(--surface); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ============== APP LAYOUT ============== */
.app {
  display: flex;
  min-height: 100vh;
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0; /* allow children to shrink */
}

.page-header {
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--content-pad);
  position: sticky;
  top: 0;
  z-index: 10;
}

.page-title-block {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.page-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.page-subtitle {
  font-size: 13px;
  color: var(--ink-faint);
}

.page-content {
  flex: 1;
  padding: 24px var(--content-pad) var(--content-pad);
  min-width: 0;
}

/* ============== SIDEBAR ============== */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.sidebar-brand {
  padding: 22px 22px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--surface);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 18px;
  flex-shrink: 0;
}
.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}
.sidebar-brand-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
  font-weight: 500;
}
.sidebar-brand-meta {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.sidebar-section {
  padding: 16px 12px 4px;
}
.sidebar-section-label {
  padding: 0 10px 8px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}
.sidebar-link:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.sidebar-link.active {
  background: var(--gold-bg);
  color: var(--gold-deep);
}
.sidebar-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.sidebar-link .badge {
  margin-left: auto;
  font-size: 10px;
  background: var(--surface-3);
  color: var(--ink-faint);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.sidebar-link.active .badge {
  background: var(--gold);
  color: var(--surface);
}
.sidebar-link.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.sidebar-link.disabled:hover {
  background: transparent;
  color: var(--ink-soft);
}
.sidebar-link.disabled .soon {
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-ghost);
  font-weight: 500;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 13px;
}
.sidebar-user-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  flex-shrink: 0;
}
.sidebar-user-name {
  flex: 1;
  font-weight: 500;
  color: var(--ink);
}
.sidebar-logout {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--ink-faint);
  padding: 4px;
  border-radius: var(--radius-sm);
  display: inline-flex;
}
.sidebar-logout:hover { color: var(--error); background: var(--error-bg); }
.sidebar-logout svg { width: 14px; height: 14px; }

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--surface-2);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn svg { width: 14px; height: 14px; }

.btn-primary {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}
.btn-primary:hover:not(:disabled) {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
  color: var(--surface);
}

.btn-gold {
  background: var(--gold);
  color: var(--surface);
  border-color: var(--gold);
}
.btn-gold:hover:not(:disabled) {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-soft);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--ink);
  border-color: transparent;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}
.btn-sm svg { width: 12px; height: 12px; }

.icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  transition: all 0.15s;
  flex-shrink: 0;
}
.icon-btn:hover:not(:disabled) {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--surface-2);
}
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============== INPUTS ============== */
.input, select.input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--ink);
  transition: all 0.15s;
}
.input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-bg);
}
.input::placeholder { color: var(--ink-ghost); }

.input-search {
  padding-left: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a8270' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.35-4.35'/></svg>");
  background-repeat: no-repeat;
  background-position: 12px center;
}

/* ============== CARD ============== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* ============== TABLE ============== */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table thead {
  background: var(--surface-2);
}
.data-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
}
.data-table th.sortable {
  cursor: pointer;
  transition: color 0.15s;
}
.data-table th.sortable:hover { color: var(--gold-deep); }
.data-table th .sort-arrow {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.4;
  font-size: 9px;
}
.data-table th.sorted .sort-arrow { opacity: 1; color: var(--gold); }

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr.selected { background: var(--gold-bg); }
.data-table tbody tr.selected:hover { background: var(--gold-bg); }
.data-table td {
  padding: 12px 14px;
  vertical-align: middle;
  font-size: 13px;
  color: var(--ink);
}

/* ============== AVATAR ============== */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-3) center/cover no-repeat;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  border: 1px solid var(--border);
}
.avatar-placeholder {
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  font-weight: 500;
}
.avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.avatar-lg { width: 48px; height: 48px; font-size: 18px; }

/* ============== STATUS PILLS ============== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}
.pill-pending  { background: var(--warning-bg); color: var(--gold-deep); }
.pill-waitlist { background: var(--info-bg); color: var(--info); }
.pill-approved { background: var(--success-bg); color: var(--success); }
.pill-sent     { background: linear-gradient(135deg, #f4ede0, #ebe2cc); color: var(--gold-deep); border-color: var(--gold-light); font-weight: 600; }
.pill-rejected { background: var(--error-bg); color: var(--error); }
/* Legacy aliases kept for safety */
.pill-accepted { background: var(--success-bg); color: var(--success); }
.pill-vip      { background: linear-gradient(135deg, #f4ede0, #ebe2cc); color: var(--gold-deep); border-color: var(--gold-light); }
.pill-declined { background: var(--error-bg); color: var(--error); }
.pill-blocked  { background: #2a2723; color: #d8d2c5; }
.pill-default  { background: var(--surface-3); color: var(--ink-soft); }

.pill-clickable { cursor: pointer; transition: filter 0.15s; }
.pill-clickable:hover { filter: brightness(0.96); }

/* ============== TAG CHIPS ============== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.tag-removable button {
  background: none;
  border: none;
  color: var(--ink-faint);
  padding: 0;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.tag-removable button:hover { color: var(--error); }

/* ============== CHECKBOX ============== */
.checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 3px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
  position: relative;
}
.checkbox:hover { border-color: var(--gold); }
.checkbox.checked {
  background: var(--gold);
  border-color: var(--gold);
}
.checkbox.checked::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid var(--surface);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

/* ============== TOAST ============== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: var(--surface);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
.toast.warning { background: var(--gold-deep); }

/* ============== SPINNER ============== */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============== STATS GRID ============== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.stat-value.gold { color: var(--gold-deep); }
.stat-meta {
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 2px;
}

/* ============== FILTER BAR ============== */
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.filter-bar > .grow { flex: 1; min-width: 200px; }
.filter-bar .input { padding: 7px 11px; font-size: 13px; }
.filter-bar .input-search { padding-left: 34px; }
.filter-bar select.input { padding-right: 30px; }

/* ============== BULK BAR ============== */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  box-shadow: var(--shadow-md);
}
.bulk-bar .count {
  font-weight: 600;
  font-size: 13px;
}
.bulk-bar .btn {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: var(--surface);
}
.bulk-bar .btn:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.3);
}
.bulk-bar .btn-gold { background: var(--gold); border-color: var(--gold); }
.bulk-bar .btn-gold:hover { background: var(--gold-deep); border-color: var(--gold-deep); }

/* ============== DROPDOWN MENU ============== */
.menu {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: 4px;
  z-index: 50;
  display: none;
}
.menu.open { display: block; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--ink);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}
.menu-item:hover { background: var(--surface-2); }
.menu-item.danger { color: var(--error); }
.menu-item.danger:hover { background: var(--error-bg); }
.menu-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ============== INLINE EDIT (IG handle, notes) ============== */
.ig-cell { display: inline-flex; align-items: center; gap: 8px; }
.ig-handle { color: var(--gold-deep); font-weight: 500; }
.ig-handle a { color: inherit; }
.ig-handle a:hover { text-decoration: underline; text-decoration-color: var(--gold-light); }

.ig-edit-btn, .row-edit-btn {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  opacity: 0;
  transition: all 0.15s;
  flex-shrink: 0;
}
.ig-edit-btn svg, .row-edit-btn svg { width: 11px; height: 11px; }
tbody tr:hover .ig-edit-btn,
tbody tr:hover .row-edit-btn { opacity: 0.7; }
.ig-edit-btn:hover, .row-edit-btn:hover {
  opacity: 1 !important;
  border-color: var(--gold);
  color: var(--gold-deep);
}

.inline-editor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.inline-editor input,
.inline-editor textarea {
  border: 1px solid var(--gold);
  background: var(--surface);
  padding: 4px 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink);
  border-radius: var(--radius-sm);
  outline: none;
  resize: vertical;
}
.inline-editor input { width: 140px; }
.inline-editor textarea { width: 240px; min-height: 60px; }
.inline-editor input:focus,
.inline-editor textarea:focus { border-color: var(--gold-deep); box-shadow: 0 0 0 2px var(--gold-bg); }

.inline-editor-btn {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  flex-shrink: 0;
  transition: all 0.15s;
}
.inline-editor-btn svg { width: 11px; height: 11px; }
.inline-editor-btn.save:hover { color: var(--success); border-color: var(--success); }
.inline-editor-btn.cancel:hover { color: var(--error); border-color: var(--error); }
.inline-editor-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============== EMPTY STATES ============== */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-faint);
}
.empty .glyph {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 56px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 12px;
}
.empty .title {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}
.empty .subtitle { font-size: 13px; color: var(--ink-faint); }

/* ============== SCROLLBAR (subtle, not in your face) ============== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

/* ============== UTILITY ============== */
.muted { color: var(--ink-faint); }
.text-gold { color: var(--gold-deep); }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.ml-auto { margin-left: auto; }
.hidden { display: none !important; }
.tabular { font-variant-numeric: tabular-nums; }

/* ============== MOBILE ============== */
.mobile-menu-btn { display: none; }

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .page-header { padding: 0 18px; }
  .page-content { padding: 18px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .mobile-menu-btn { display: inline-flex !important; }
}
