/* =============================================
   EBONYLIFE PLACE — GUEST REVIEW SYSTEM
   Main Stylesheet
   ============================================= */

:root {
  --gold: #C9A84C;
  --gold-light: #F5E9C9;
  --gold-dark: #8B6914;
  --black: #0D0D0D;
  --off-white: #FAF9F6;
  --surface: #FFFFFF;
  --surface-2: #F4F2EE;
  --border: rgba(0,0,0,0.1);
  --border-strong: rgba(0,0,0,0.2);
  --text-primary: #0D0D0D;
  --text-secondary: #6B6560;
  --text-muted: #A09A93;
  --green: #2D6A4F;
  --green-bg: #D8F3DC;
  --amber: #92400E;
  --amber-bg: #FEF3C7;
  --red: #991B1B;
  --red-bg: #FEE2E2;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

#app { min-height: 100vh; }

/* ---- UTILITIES ---- */
.hidden { display: none !important; }
.text-muted { color: var(--text-secondary); }
.text-gold { color: var(--gold); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ---- LAYOUT ---- */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.container { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; width: 100%; }
.container-sm { max-width: 560px; margin: 0 auto; padding: 0 1.25rem; width: 100%; }
.container-lg { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; width: 100%; }

/* ---- HEADER ---- */
.site-header {
  background: var(--black);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-mark {
  width: 36px; height: 36px;
  background: var(--gold);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--black);
  font-weight: 600;
}
.logo-text { font-family: var(--font-display); font-size: 17px; color: #fff; font-weight: 500; letter-spacing: 0.02em; }
.logo-sub { font-size: 10px; color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase; display: block; margin-top: -2px; }

.header-nav { display: flex; align-items: center; gap: 8px; }
.header-nav a, .header-nav button {
  font-size: 13px; color: rgba(255,255,255,0.65);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  transition: color 0.15s, background 0.15s;
}
.header-nav a:hover, .header-nav button:hover { color: #fff; background: rgba(255,255,255,0.08); }
.header-nav a.active, .header-nav button.active { color: var(--gold); }
.header-nav .btn-dashboard {
  background: var(--gold);
  color: var(--black) !important;
  font-weight: 600;
  padding: 6px 14px;
}
.header-nav .btn-dashboard:hover { background: #d4a84f; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--black); color: #fff; }
.btn-primary:hover { background: #2a2a2a; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-gold { background: var(--gold); color: var(--black); }
.btn-gold:hover { background: #d4a84f; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--text-primary); border: 1.5px solid var(--border-strong); }
.btn-outline:hover { background: var(--surface-2); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 15px 32px; font-size: 15px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ---- CARDS ---- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card-hover { transition: box-shadow 0.2s, transform 0.2s; cursor: pointer; }
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ---- FORM ELEMENTS ---- */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}
.form-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

/* ---- STAR RATING ---- */
.stars-input { display: flex; gap: 4px; }
.stars-input .star {
  font-size: 28px;
  color: #DDD;
  cursor: pointer;
  transition: color 0.1s, transform 0.1s;
  line-height: 1;
  user-select: none;
}
.stars-input .star:hover, .stars-input .star.lit { color: var(--gold); }
.stars-input .star:hover { transform: scale(1.15); }
.stars-display { display: flex; gap: 3px; }
.stars-display .star { font-size: 14px; color: #DDD; }
.stars-display .star.lit { color: var(--gold); }

/* ---- BADGES ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-gold { background: var(--gold-light); color: var(--gold-dark); }
.badge-gray { background: var(--surface-2); color: var(--text-secondary); }

/* ---- AVATAR ---- */
.avatar {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
  font-size: 14px;
}
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-md { width: 44px; height: 44px; font-size: 15px; }
.avatar-lg { width: 60px; height: 60px; font-size: 20px; }
.avatar-xl { width: 80px; height: 80px; font-size: 26px; }

/* ---- METRIC CARDS ---- */
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.metric-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px; }
.metric-value { font-size: 28px; font-weight: 600; font-family: var(--font-display); line-height: 1; }
.metric-sub { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.metric-gold .metric-value { color: var(--gold-dark); }

/* ---- TABLE ---- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { background: var(--surface-2); padding: 11px 16px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-secondary); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--off-white); }

/* ---- TABS ---- */
.tabs { display: flex; gap: 4px; background: var(--surface-2); border-radius: var(--radius-md); padding: 4px; flex-wrap: wrap; }
.tab-btn {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { background: var(--surface); color: var(--text-primary); font-weight: 600; box-shadow: var(--shadow-sm); }

/* ---- BAR CHART ---- */
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bar-label { width: 130px; font-size: 13px; color: var(--text-secondary); flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gold-dark), var(--gold)); transition: width 0.6s ease; }
.bar-num { font-size: 13px; font-weight: 600; width: 30px; text-align: right; }

/* ---- TOAST ---- */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--black);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  animation: slideIn 0.25s ease;
  max-width: 320px;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { to { transform: translateX(120%); opacity: 0; } }

/* ---- HOME PAGE ---- */
.hero {
  background: var(--black);
  color: #fff;
  padding: 4rem 0 3rem;
  text-align: center;
}
.hero-eyebrow { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 1rem; }
.hero h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 500; line-height: 1.2; margin-bottom: 1rem; }
.hero h1 span { color: var(--gold); }
.hero p { font-size: 16px; color: rgba(255,255,255,0.65); max-width: 480px; margin: 0 auto 2rem; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.units-section { padding: 3rem 0; }
.section-heading { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; margin-bottom: 0.5rem; }
.section-sub { color: var(--text-secondary); font-size: 14px; margin-bottom: 2rem; }

.units-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.unit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.unit-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}
.unit-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--gold-light); }
.unit-card:hover::after { transform: scaleX(1); }
.unit-icon { font-size: 2rem; margin-bottom: 12px; display: block; }
.unit-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.unit-desc { font-size: 12px; color: var(--text-secondary); }
.unit-staff-count { font-size: 11px; color: var(--text-muted); margin-top: 8px; }

/* ---- REVIEW PAGE ---- */
.review-page { min-height: 100vh; background: var(--off-white); }
.review-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.review-topbar .inner { display: flex; align-items: center; gap: 12px; }
.review-unit-badge {
  display: flex; align-items: center; gap: 8px;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
}
.review-body { padding: 2rem 0 3rem; }
.review-section { margin-bottom: 2rem; }
.review-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.review-section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.overall-stars { display: flex; gap: 6px; }
.overall-stars .star { font-size: 40px; color: #DDD; cursor: pointer; transition: color 0.1s, transform 0.12s; user-select: none; }
.overall-stars .star:hover { transform: scale(1.15); }
.overall-stars .star.lit { color: var(--gold); }

.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.staff-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.staff-card.rated { border-color: var(--gold-light); box-shadow: 0 0 0 2px rgba(201,168,76,0.15); }
.staff-card-avatar { margin: 0 auto 10px; }
.staff-card-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.staff-card-role { font-size: 11px; color: var(--text-secondary); margin-bottom: 10px; }
.staff-stars { display: flex; justify-content: center; gap: 3px; }
.staff-stars .star { font-size: 20px; color: #DDD; cursor: pointer; transition: color 0.1s; user-select: none; }
.staff-stars .star.lit { color: var(--gold); }

.review-submit-bar { background: var(--surface); border-top: 1px solid var(--border); padding: 1rem 0; position: sticky; bottom: 0; }

/* ---- THANK YOU ---- */
.thankyou-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--off-white); padding: 2rem; }
.thankyou-card { text-align: center; max-width: 460px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 3rem 2.5rem; box-shadow: var(--shadow-lg); }
.thankyou-icon { width: 72px; height: 72px; background: linear-gradient(135deg, var(--gold-light), #F5E9C9); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; font-size: 32px; }
.thankyou-card h2 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 500; margin-bottom: 0.75rem; }
.thankyou-card p { color: var(--text-secondary); line-height: 1.7; margin-bottom: 2rem; font-size: 15px; }
.thankyou-divider { height: 1px; background: var(--border); margin: 1.5rem 0; }
.thankyou-summary { background: var(--off-white); border-radius: var(--radius-md); padding: 1rem 1.25rem; text-align: left; margin-bottom: 1.5rem; }
.thankyou-summary-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 4px 0; }
.thankyou-summary-row span:first-child { color: var(--text-secondary); }
.thankyou-summary-row span:last-child { font-weight: 600; }

/* ---- DASHBOARD ---- */
.dash-page { background: var(--off-white); min-height: 100vh; }
.dash-topbar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 1.25rem 0; }
.dash-topbar h1 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 500; }
.dash-topbar p { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.dash-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash-body { padding: 2rem 0 3rem; }
.dash-section { margin-bottom: 2rem; }
.dash-section-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-secondary); margin-bottom: 1rem; }

.feed-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 10px;
  transition: box-shadow 0.15s;
}
.feed-card:hover { box-shadow: var(--shadow-sm); }
.feed-meta { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; flex-wrap: wrap; gap: 6px; }
.feed-unit-tag { font-size: 12px; font-weight: 700; color: var(--gold-dark); background: var(--gold-light); padding: 2px 8px; border-radius: 20px; }
.feed-time { font-size: 11px; color: var(--text-muted); }
.feed-stars { margin-bottom: 6px; }
.feed-comment { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.feed-staff-ratings { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.feed-staff-pill { display: flex; align-items: center; gap: 5px; background: var(--off-white); border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px; font-size: 11px; }
.feed-staff-pill .star { color: var(--gold); font-size: 11px; }

/* ---- QR CODES PAGE ---- */
.qr-page { background: var(--off-white); min-height: 100vh; }
.qr-topbar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 1.25rem 0; margin-bottom: 2rem; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.qr-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.qr-box { width: 140px; height: 140px; margin: 0 auto 1rem; border-radius: var(--radius-md); overflow: hidden; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: #fff; }
.qr-box canvas, .qr-box img { max-width: 100%; }
.qr-unit-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.qr-url { font-size: 11px; color: var(--text-muted); word-break: break-all; margin-bottom: 1rem; }
.qr-actions { display: flex; gap: 8px; justify-content: center; }

/* ---- ADMIN LOGIN ---- */
.admin-login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--black); padding: 2rem; }
.admin-login-card { background: var(--surface); border-radius: var(--radius-xl); padding: 3rem 2.5rem; width: 100%; max-width: 400px; box-shadow: var(--shadow-lg); }
.admin-login-logo { text-align: center; margin-bottom: 2rem; }
.admin-login-logo .logo-mark { width: 52px; height: 52px; margin: 0 auto 10px; font-size: 22px; }
.admin-login-logo h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; }
.admin-login-logo p { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* ---- EMPTY STATE ---- */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.empty-state p { font-size: 14px; color: var(--text-secondary); }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.2s;
}
@keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; }
.modal-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; }
.modal-close { background: var(--surface-2); border: none; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); flex-shrink: 0; }
.modal-close:hover { background: var(--border); }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .header-nav span { display: none; }
  .hero { padding: 2.5rem 0 2rem; }
  .units-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .staff-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-topbar .inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .qr-grid { grid-template-columns: repeat(2, 1fr); }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 10px 10px; }
}

@media print {
  .site-header, .review-submit-bar, .btn, .header-nav { display: none !important; }
  .qr-card { break-inside: avoid; border: 1px solid #ccc; }
  body { background: #fff; }
}

/* =============================================
   UPDATES — Staff photos, date filters, sortable
   ============================================= */

/* Staff photo in review card */
.staff-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--border);
  display: block;
}
.avatar-photo-fallback {
  width: 80px !important;
  height: 80px !important;
  font-size: 26px !important;
}

/* Larger staff cards */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 14px;
}
.staff-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem 1.25rem;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.staff-card.rated {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 2px rgba(201,168,76,0.15);
}
.staff-card-avatar {
  margin: 0 auto 12px;
  display: flex;
  justify-content: center;
}
.staff-card-name { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.staff-card-role { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }
.staff-stars { display: flex; justify-content: center; gap: 4px; }
.staff-stars .star { font-size: 22px; color: #DDD; cursor: pointer; transition: color 0.1s; user-select: none; }
.staff-stars .star.lit { color: var(--gold); }

/* Date filter bar */
.date-filter-bar {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 4px;
  flex-wrap: wrap;
}
.df-btn {
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.df-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.df-btn.active { background: var(--gold); color: var(--black); font-weight: 700; }

/* Sortable column headers */
.sortable-th { transition: color 0.15s; }
.sortable-th:hover { color: var(--gold-dark) !important; }

/* Dashboard two-column responsive */
.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 700px) {
  .dash-two-col { grid-template-columns: 1fr; }
  .date-filter-bar { gap: 3px; }
  .df-btn { padding: 5px 9px; font-size: 11px; }
  .staff-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================
   UNIT ICONS — PNG from folder with emoji fallback
   ============================================= */
.unit-icon-wrap {
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.unit-icon-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
}
.unit-icon-emoji {
  font-size: 36px;
  line-height: 1;
}

/* =============================================
   ACCOUNTS MANAGEMENT PAGE
   ============================================= */
.accounts-page { background: var(--off-white); min-height: 100vh; }

/* Manager card in list */
.mgr-row-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--black);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}

/* Outlet pill in manager table */
.outlet-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
}

/* Modal form */
.mgr-modal-info {
  background: var(--off-white);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

/* Admin identity strip */
.admin-identity-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 14px;
}
.admin-identity-strip .admin-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--black);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  flex-shrink: 0;
}

/* Inline unit icon in manager table (small) */
.unit-icon-sm {
  width: 22px; height: 22px;
  object-fit: contain;
  vertical-align: middle;
}

/* Role label in header nav */
.role-label {
  font-size: 11px;
  background: rgba(201,168,76,0.18);
  color: var(--gold);
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Scoped outlet banner for manager view */
.outlet-scope-banner {
  background: linear-gradient(90deg, #0D0D0D 0%, #1a1a1a 100%);
  color: #fff;
  padding: 10px 0;
  border-bottom: 2px solid var(--gold);
}
.outlet-scope-banner .inner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.outlet-scope-banner strong { color: var(--gold); }

@media (max-width: 640px) {
  .admin-identity-strip { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* =============================================
   V4 ADDITIONS — All new feature styles
   ============================================= */

/* ---- STEP INDICATOR (review form) ---- */
.step-indicator {
  display: flex; align-items: center; justify-content: center; gap: 0;
}
.step { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface-2); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  transition: all 0.25s;
}
.step.active .step-dot  { background: var(--black); border-color: var(--black); color: #fff; }
.step.done .step-dot    { background: var(--gold);  border-color: var(--gold);  color: var(--black); }
.step-label { font-size: 10px; color: var(--text-muted); white-space: nowrap; font-weight: 500; }
.step.active .step-label { color: var(--text-primary); }
.step.done .step-label   { color: var(--gold-dark); }
.step-line { flex: 1; height: 2px; background: var(--border); min-width: 30px; margin: 0 4px; margin-top: -14px; transition: background 0.25s; }

/* ---- HIGHLIGHT PILLS (above & beyond) ---- */
.highlight-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
  font-family: var(--font-body);
}
.highlight-pill:hover { border-color: var(--gold); color: var(--gold-dark); }
.highlight-pill.active {
  background: var(--gold-light);
  border-color: var(--gold);
  color: var(--gold-dark);
  font-weight: 600;
}

/* ---- ANONYMOUS TOGGLE ---- */
.anon-toggle-row { margin-bottom: 1.25rem; }
.anon-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-secondary);
  cursor: pointer; user-select: none;
}
.anon-label input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--black); cursor: pointer;
}

/* ---- CONSENT PAGE ---- */
.consent-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; }

/* ---- ALERTS PANEL ---- */
.alerts-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 500;
  display: flex; justify-content: flex-end;
}
.alerts-overlay.hidden { display: none; }
.alerts-panel {
  width: 380px; max-width: 100vw;
  background: var(--surface);
  height: 100%;
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0,0,0,0.2);
  display: flex; flex-direction: column;
}
.alerts-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; background: var(--surface); z-index: 10;
}
.alert-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  background: #FFF5F5;
}
.alert-item:hover { background: #FEE2E2; }
.alert-item.alert-read { background: var(--surface); opacity: 0.65; }
.alert-item.alert-read:hover { background: var(--surface-2); opacity: 1; }

/* ---- NOTIFICATION BADGE ---- */
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: #EF4444; color: #fff;
  font-size: 10px; font-weight: 700;
  width: 17px; height: 17px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.header-nav button { position: relative; }

/* ---- FEED CARD ALERT STATE ---- */
.feed-card-alert {
  border-color: #FECACA !important;
  background: #FFF5F5;
}

/* ---- TOGGLE SWITCH (compare mode) ---- */
.toggle-switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border); border-radius: 22px;
  transition: .2s;
}
.toggle-slider:before {
  content: ''; position: absolute;
  height: 16px; width: 16px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%;
  transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--gold); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(16px); }

/* ---- HEATMAP ---- */
#heatmap-wrap table td { transition: opacity 0.15s; }
#heatmap-wrap table td:hover { opacity: 0.75; border-color: var(--gold) !important; }

/* ---- AUDIT LOG ---- */
#audit-log-wrap code { font-size: 11px; }

/* ---- LANGUAGE SELECTOR ---- */
.review-topbar select {
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
}

/* ---- COOLDOWN PAGE ---- */
.cooldown-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; }

/* ---- REVIEW STATUS DROPDOWN ---- */
.feed-meta select { cursor: pointer; transition: border-color 0.15s; }
.feed-meta select:hover { border-color: var(--gold); }

@media (max-width: 480px) {
  .alerts-panel { width: 100vw; }
  .step-label   { display: none; }
  .highlight-pill { font-size: 12px; padding: 5px 10px; }
}

/* =============================================
   MULTI-OUTLET ACCOUNT MODAL — v5
   ============================================= */

/* Role toggle buttons */
.role-btn {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
  text-align: left;
}
.role-btn:hover { border-color: var(--border-strong); color: var(--text-primary); }
.role-btn.active {
  border-color: var(--black);
  background: var(--black);
  color: #fff;
}
.role-btn.active span { color: rgba(255,255,255,0.65); }

/* Outlet checklist */
.outlet-checklist {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}
.outlet-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 0.5px solid var(--border);
}
.outlet-check-row:last-child { border-bottom: none; }
.outlet-check-row:hover { background: var(--off-white); }
.outlet-check-row input[type="checkbox"] {
  width: 17px; height: 17px;
  accent-color: var(--black);
  cursor: pointer;
  flex-shrink: 0;
}
.outlet-check-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500;
  color: var(--text-primary);
  user-select: none;
}

/* Outlet pills (small, in table) */
.outlet-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

/* =============================================
   STAFF MANAGEMENT PAGE — v5.1
   ============================================= */

/* Staff card grid */
.staff-mgmt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.staff-mgmt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  transition: box-shadow 0.15s;
}
.staff-mgmt-card:hover { box-shadow: var(--shadow-md); }

/* Avatar colour swatches */
.color-swatch-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.color-swatch-label { cursor: pointer; }
.color-swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
  font-size: 14px;
}
.color-swatch:hover { transform: scale(1.15); }
.swatch-check { font-size: 14px; color: #333; font-weight: 700; }

@media (max-width: 480px) {
  .staff-mgmt-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================
   PHOTO PICKER — v5.2
   ============================================= */

/* File input label styled as button */
label.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

/* Photo preview circle in staff modal */
#photo-preview {
  transition: box-shadow 0.15s;
}
#photo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
