/* ════════════════════════════════════════════
   VARIANT F — Command Center / Professional Dashboard
   Palette: #111827 sidebar | #7c3aed purple | #fff surface | #f8fafc bg | #6b7280 muted
   Font: Inter (professional, RTL compatible)
════════════════════════════════════════════ */

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sidebar-bg: #111827;
  --sidebar-hover: #1f2937;
  --sidebar-active: #1e1b4b;
  --sidebar-border: #1f2937;
  --sidebar-text: #d1d5db;
  --sidebar-muted: #6b7280;
  --sidebar-width: 220px;
  --sidebar-collapsed: 52px;
  --detail-width: 320px;
  --header-h: 52px;
  --purple: #7c3aed;
  --purple-light: #8b5cf6;
  --purple-bg: #ede9fe;
  --surface: #ffffff;
  --bg: #f8fafc;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --green: #10b981;
  --green-bg: #d1fae5;
  --amber: #f59e0b;
  --amber-bg: #fef3c7;
  --red: #ef4444;
  --red-bg: #fee2e2;
  --blue: #3b82f6;
  --blue-bg: #dbeafe;
  --font: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 2px 8px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --transition: 200ms cubic-bezier(0.4,0,0.2,1);
}

html { font-size: 14px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  overflow: hidden;
  height: 100vh;
}

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

/* ── UTILITIES ── */
.hidden { display: none !important; }
.screen { display: flex; flex-direction: column; height: 100vh; }

/* ════════════════════════════════════════════
   LANDING PAGE
════════════════════════════════════════════ */
.screen-landing {
  display: block;
  height: auto;
  overflow-y: auto;
  background: var(--bg);
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.landing-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.landing-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--purple);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.logo-mark.small { width: 24px; height: 24px; font-size: 12px; border-radius: 6px; }
.logo-text { font-weight: 700; font-size: 18px; color: var(--text); }
.logo-badge {
  font-size: 11px;
  background: var(--purple-bg);
  color: var(--purple);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}
.landing-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.landing-nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}
.landing-nav a:hover { color: var(--text); }

/* HERO */
.landing-hero { padding: 80px 24px; }
.landing-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
  align-items: stretch;
}
.hero-panel {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow);
}
.hero-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}
.hero-divider-line {
  flex: 1;
  width: 1px;
  background: var(--border);
}
.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 16px;
}
.accent { color: var(--green); }
.accent-purple { color: var(--purple); }
.hero-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 24px;
}
.hero-bullets {
  list-style: none;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero-bullets li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}
.hero-bullets li .fa-check-circle { color: var(--green); }
.hero-sub {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* FEATURES */
.landing-features { padding: 60px 24px; background: var(--surface); border-top: 1px solid var(--border); }
.container { max-width: 1100px; margin: 0 auto; }
.section-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  color: var(--text);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
}
.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--purple-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  font-size: 18px;
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* PRICING */
.landing-pricing { padding: 60px 24px; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
.pricing-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  background: var(--surface);
  position: relative;
}
.pricing-featured {
  border-color: var(--purple);
  box-shadow: 0 0 0 2px rgba(124,58,237,0.15), var(--shadow-lg);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  right: 50%;
  transform: translateX(50%);
  background: var(--purple);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
}
.pricing-tier { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.pricing-price { font-size: 32px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.pricing-price span { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.pricing-who { font-size: 12px; color: var(--text-muted); margin-bottom: 24px; }
.pricing-features { list-style: none; margin-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}
.pricing-features li .fa-check { color: var(--green); }
.pricing-features li .fa-times { color: var(--text-muted); }
.pricing-features li.disabled { color: var(--text-muted); }

/* FOOTER */
.landing-footer {
  padding: 40px 24px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  text-align: center;
}
.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.landing-footer p { font-size: 13px; color: var(--sidebar-muted); margin-bottom: 16px; }
.footer-links { display: flex; justify-content: center; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--sidebar-muted); }
.footer-links a:hover { color: var(--sidebar-text); }

/* ════════════════════════════════════════════
   APP SHELL
════════════════════════════════════════════ */
#screen-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ── APP HEADER ── */
.app-header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 50;
  gap: 16px;
}
.header-right, .header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.header-center { flex: 1; display: flex; justify-content: center; }

.sidebar-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}
.sidebar-toggle-btn:hover { background: var(--bg); color: var(--text); }

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.header-neighborhood {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--bg);
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* MODE TOGGLE */
.mode-toggle {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.mode-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.mode-btn:hover:not(.active) { color: var(--text-secondary); }

.header-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  position: relative;
  transition: background var(--transition);
}
.header-btn:hover { background: var(--bg); }
.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--surface);
}
.header-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── APP BODY ── */
.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--transition);
  border-left: 1px solid var(--sidebar-border);
  scrollbar-width: thin;
  scrollbar-color: #374151 transparent;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-shortcut,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sidebar-section-title,
.sidebar.collapsed .sidebar-section { display: none; }
.sidebar.collapsed .sidebar-nav-item { justify-content: center; padding: 10px; }

.sidebar-nav {
  padding: 8px 0;
  flex-shrink: 0;
}
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  border-radius: 0;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.sidebar-nav-item:hover { background: var(--sidebar-hover); }
.sidebar-nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
  border-right: 3px solid var(--purple-light);
}
.nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.nav-label { flex: 1; }
.nav-shortcut {
  font-size: 10px;
  color: var(--sidebar-muted);
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  padding: 1px 5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.nav-badge {
  background: var(--purple);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  flex-shrink: 0;
}
.sidebar-nav-bottom { margin-top: auto; }

.sidebar-section {
  padding: 16px 14px 12px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-section-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--sidebar-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

/* Filters */
.filter-group { margin-bottom: 12px; }
.filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--sidebar-muted);
  margin-bottom: 6px;
}
.filter-check, .filter-radio {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--sidebar-text);
  padding: 3px 0;
  cursor: pointer;
}
.filter-check input, .filter-radio input { cursor: pointer; accent-color: var(--purple-light); }
.src-check { gap: 5px; }

/* Source dots */
.src-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.src-dot.green { background: var(--green); }
.src-dot.wa { background: #25D366; }
.src-dot.fb { background: #1877F2; }
.src-dot.auto { background: var(--amber); }
.src-dot.spon { background: var(--purple-light); }

/* Source status */
.source-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
  color: var(--sidebar-text);
}
.source-status i { width: 16px; color: var(--sidebar-muted); font-size: 13px; }
.source-badge {
  margin-right: auto;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 20px;
  font-weight: 600;
}
.source-badge.connected { background: rgba(16,185,129,0.2); color: #6ee7b7; }
.source-badge.disconnected { background: rgba(239,68,68,0.2); color: #fca5a5; }

/* Mini analytics in sidebar */
.sidebar-analytics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sidebar-analytics .sidebar-section-title { grid-column: 1 / -1; margin-bottom: 4px; }
.mini-stat {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mini-stat-val { font-size: 16px; font-weight: 700; color: #fff; }
.mini-stat-label { font-size: 10px; color: var(--sidebar-muted); }

/* Manager-only elements hidden in user mode */
body.user-mode .manager-only { display: none !important; }
body.user-mode .sidebar { width: var(--sidebar-collapsed); }
body.user-mode .sidebar .sidebar-nav-item { justify-content: center; padding: 10px; }
body.user-mode .sidebar .nav-label,
body.user-mode .sidebar .nav-shortcut,
body.user-mode .sidebar .nav-badge { display: none; }
body.user-mode .detail-panel { display: none !important; }

/* ════════════════════════════════════════════
   MAIN PANEL
════════════════════════════════════════════ */
.main-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  min-width: 0;
}

/* STATUS BAR */
.status-bar {
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.status-bar-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.status-pill {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 20px;
}
.status-pill.approved { background: var(--green-bg); color: #065f46; }
.status-pill.pending { background: var(--amber-bg); color: #92400e; }
.status-pill.sponsored { background: var(--purple-bg); color: #5b21b6; }
.status-sep { color: var(--text-muted); }
.status-bar-actions { display: flex; align-items: center; gap: 8px; }

/* VIEW TABS */
.view-tabs {
  display: flex;
  gap: 0;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.view-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.view-tab:hover { color: var(--text); }
.view-tab.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

/* VIEW PANELS */
.view-panel {
  flex: 1;
  overflow: auto;
  position: relative;
}

/* ── TABLE ── */
.table-container {
  overflow: auto;
  height: 100%;
}
.items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.items-table thead {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 5;
}
.items-table th {
  padding: 10px 12px;
  text-align: right;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
}
.items-table th.sortable { cursor: pointer; }
.items-table th.sortable:hover { color: var(--text); }
.items-table th.sorted-asc .fa-sort::before { content: "\f0de"; }
.items-table th.sorted-desc .fa-sort::before { content: "\f0dd"; }

.items-table tbody tr {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background var(--transition);
  cursor: pointer;
}
.items-table tbody tr:hover { background: var(--bg); }
.items-table tbody tr.selected { background: var(--purple-bg); }
.items-table td {
  padding: 10px 12px;
  vertical-align: middle;
}
.col-check { width: 36px; }
.col-cat { width: 110px; }
.col-title { min-width: 200px; }
.col-author { width: 120px; }
.col-time { width: 110px; }
.col-dist { width: 80px; }
.col-status { width: 90px; }
.col-views { width: 70px; }
.col-note { width: 60px; text-align: center; }
.col-actions { width: 80px; }

.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.cat-badge.events { background: #dbeafe; color: #1e40af; }
.cat-badge.help { background: #fce7f3; color: #9d174d; }
.cat-badge.service-offer { background: #d1fae5; color: #065f46; }
.cat-badge.service-req { background: #fff7ed; color: #92400e; }
.cat-badge.giveaway { background: #ede9fe; color: #5b21b6; }
.cat-badge.sale { background: #fef3c7; color: #92400e; }

.item-title-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.item-title-text {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.item-title-text:focus {
  outline: 2px solid var(--purple);
  border-radius: 3px;
  padding: 2px 4px;
}
.urgency-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.urgency-dot.urgent { background: var(--red); }
.urgency-dot.high { background: var(--amber); }
.urgency-dot.normal { background: var(--green); }
.urgency-dot.low { background: var(--text-muted); }

.status-dot-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
}
.status-dot-badge.approved { background: var(--green-bg); color: #065f46; }
.status-dot-badge.pending { background: var(--amber-bg); color: #92400e; }
.status-dot-badge.rejected { background: var(--red-bg); color: #991b1b; }
.status-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.status-dot.approved { background: var(--green); }
.status-dot.pending { background: var(--amber); }
.status-dot.rejected { background: var(--red); }

.author-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}
.verified-icon { color: var(--blue); font-size: 11px; }
.sponsored-star { color: var(--purple); font-size: 11px; }

.views-cell {
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition);
}
tr:hover .row-actions { opacity: 1; }
.row-action-btn {
  width: 26px;
  height: 26px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.row-action-btn:hover { background: var(--border); color: var(--text); }
.row-action-btn.approve:hover { background: var(--green-bg); color: var(--green); }
.row-action-btn.reject:hover { background: var(--red-bg); color: var(--red); }

/* ── MAP VIEW ── */
#view-map { padding: 0; }
#leaflet-map {
  width: 100%;
  height: 100%;
  min-height: 400px;
}
.leaflet-popup-content-wrapper {
  font-family: var(--font);
  direction: rtl;
  text-align: right;
}

/* ── CALENDAR VIEW ── */
#view-calendar { padding: 0; }
.calendar-strip {
  display: flex;
  gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
}
.calendar-day {
  flex: 1;
  min-width: 80px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  border-left: 1px solid var(--border);
  transition: background var(--transition);
}
.calendar-day:last-child { border-left: none; }
.calendar-day:hover { background: var(--bg); }
.calendar-day.today { background: var(--purple-bg); }
.calendar-day.selected { background: var(--purple); color: #fff; }
.cal-day-name { font-size: 11px; font-weight: 500; color: var(--text-muted); margin-bottom: 4px; }
.cal-day-num { font-size: 20px; font-weight: 700; }
.cal-day-count {
  margin-top: 4px;
  font-size: 10px;
  background: var(--purple-bg);
  color: var(--purple);
  border-radius: 20px;
  padding: 1px 6px;
  display: inline-block;
}
.calendar-day.selected .cal-day-count { background: rgba(255,255,255,0.25); color: #fff; }
.calendar-day.selected .cal-day-name { color: rgba(255,255,255,0.8); }

.calendar-day-events { padding: 16px; overflow-y: auto; flex: 1; }
.cal-event-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cal-event-row:last-child { border-bottom: none; }
.cal-time { font-size: 12px; color: var(--text-muted); width: 60px; flex-shrink: 0; font-weight: 500; }
.cal-event-content { flex: 1; }
.cal-event-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.cal-event-author { font-size: 12px; color: var(--text-muted); }
.cal-attendees { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; margin-top: 4px; }

/* ── ROUTE PANELS ── */
.route-panel {
  flex: 1;
  overflow: auto;
  padding: 24px;
}
.route-header {
  margin-bottom: 24px;
}
.route-header h2 {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.route-header h2 i { color: var(--purple); }
.badge-count {
  background: var(--purple);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 20px;
}
.route-subtitle { font-size: 13px; color: var(--text-muted); }

/* MODERATION */
.moderation-list { display: flex; flex-direction: column; gap: 12px; }
.moderation-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: box-shadow var(--transition);
}
.moderation-card:hover { box-shadow: var(--shadow); }
.mod-left { flex: 1; }
.mod-cat { margin-bottom: 6px; }
.mod-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.mod-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.mod-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.mod-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.btn-approve, .btn-reject {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: background var(--transition), opacity var(--transition);
}
.btn-approve { background: var(--green-bg); color: #065f46; }
.btn-approve:hover { background: #a7f3d0; }
.btn-reject { background: var(--red-bg); color: #991b1b; }
.btn-reject:hover { background: #fecaca; }
.mod-source {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

/* PROVIDERS */
.providers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.provider-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: box-shadow var(--transition);
}
.provider-card:hover { box-shadow: var(--shadow); }
.provider-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.provider-cat { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.provider-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}
.provider-stat-val { font-weight: 700; font-size: 18px; color: var(--text); display: block; }

/* SPONSORED */
.sponsored-list { display: flex; flex-direction: column; gap: 12px; }
.sponsored-card {
  background: var(--surface);
  border: 1px solid var(--purple);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.sponsored-card-left { flex: 1; }
.sponsored-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.sponsored-author { font-size: 12px; color: var(--text-muted); }
.sponsored-stats { display: flex; gap: 20px; }
.sponsored-stat { text-align: center; }
.sponsored-stat-val { font-size: 18px; font-weight: 700; color: var(--purple); display: block; }
.sponsored-stat-label { font-size: 11px; color: var(--text-muted); }

/* SETTINGS */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.settings-section h3 { font-size: 14px; font-weight: 600; margin-bottom: 16px; color: var(--text); }
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.setting-row:last-child { border-bottom: none; }
.setting-row label { font-size: 13px; color: var(--text-secondary); }
.setting-input {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  text-align: right;
  width: 120px;
}
.toggle-switch {
  width: 36px;
  height: 20px;
  background: var(--border-strong);
  border-radius: 20px;
  cursor: pointer;
  position: relative;
  transition: background var(--transition);
  flex-shrink: 0;
}
.toggle-switch.on { background: var(--purple); }
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch.on::after { transform: translateX(-16px); }

/* USER MODE HOME */
.route-panel#route-user-home {
  padding: 0;
  background: var(--bg);
}
.user-feed-header {
  padding: 24px 20px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.user-feed-header h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.user-location { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.user-location i { color: var(--purple); }

.user-cat-tabs {
  display: flex;
  gap: 0;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.cat-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}
.cat-tab:hover { color: var(--text); }
.cat-tab.active { color: var(--purple); border-bottom-color: var(--purple); }

.user-feed { padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.user-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.user-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.user-card.sponsored-card-user { border-color: var(--purple); }
.user-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.user-card-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.user-card-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 10px; }
.user-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}
.user-card-meta { display: flex; align-items: center; gap: 10px; }
.urgency-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
}
.urgency-tag.urgent { background: var(--red-bg); color: var(--red); }
.urgency-tag.high { background: var(--amber-bg); color: #92400e; }

/* ════════════════════════════════════════════
   DETAIL PANEL (RIGHT)
════════════════════════════════════════════ */
.detail-panel {
  width: var(--detail-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  transition: width var(--transition);
}
.detail-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  padding: 24px;
  text-align: center;
}
.detail-empty i { font-size: 36px; opacity: 0.3; }
.detail-empty p { font-size: 14px; font-weight: 500; }
.detail-empty span { font-size: 12px; }

.detail-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.detail-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
}
.detail-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  transition: background var(--transition);
}
.detail-close:hover { background: var(--bg); color: var(--text); }
.detail-cat-badge { margin-bottom: 8px; }
.detail-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  cursor: text;
  border-radius: 4px;
  padding: 2px;
}
.detail-title:hover { background: var(--bg); }
.detail-title:focus { outline: 2px solid var(--purple); background: var(--bg); }
.detail-meta { font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; }
.detail-meta-row { display: flex; align-items: center; gap: 6px; }
.detail-meta-row i { width: 14px; color: var(--purple); }

.detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.detail-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Analytics mini */
.detail-analytics h4,
.detail-note h4,
.detail-moderation-actions h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.analytics-row { display: flex; gap: 12px; margin-bottom: 12px; }
.analytics-stat { flex: 1; text-align: center; }
.analytics-val { display: block; font-size: 20px; font-weight: 700; color: var(--text); }
.analytics-label { font-size: 11px; color: var(--text-muted); }

.mini-bar-chart {
  height: 48px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  background: var(--bg);
  padding: 6px 8px 4px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.bar-item {
  flex: 1;
  background: var(--purple-bg);
  border-radius: 2px;
  min-height: 4px;
  transition: background var(--transition);
}
.bar-item:hover { background: var(--purple-light); }

.mod-actions-row { display: flex; gap: 8px; }
.btn-approve, .btn-reject { flex: 1; justify-content: center; }

.private-badge {
  font-size: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.operator-note {
  width: 100%;
  min-height: 80px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  line-height: 1.5;
  direction: rtl;
  margin-bottom: 8px;
}
.operator-note:focus { outline: 2px solid var(--purple); border-color: transparent; }

/* ════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition), box-shadow var(--transition);
  border: none;
  font-family: var(--font);
  white-space: nowrap;
}
.btn-primary {
  background: var(--purple);
  color: #fff;
}
.btn-primary:hover { background: var(--purple-light); }
.btn-purple {
  background: var(--purple);
  color: #fff;
}
.btn-purple:hover { background: var(--purple-light); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover { background: var(--bg); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }

/* ════════════════════════════════════════════
   MOBILE BOTTOM NAV
════════════════════════════════════════════ */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  height: 60px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 100;
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
  flex: 1;
}
.mobile-nav-item i { font-size: 18px; }
.mobile-nav-item.active { color: var(--purple); }

/* ════════════════════════════════════════════
   MODAL
════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
}
.modal-close:hover { background: var(--bg); }
.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.form-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  direction: rtl;
  transition: border-color var(--transition);
}
.form-input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 2px rgba(124,58,237,0.1); }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* ════════════════════════════════════════════
   TOAST
════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 500;
  white-space: nowrap;
  animation: toastIn 200ms ease-out;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ════════════════════════════════════════════
   RESPONSIVE — MOBILE
════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .detail-panel {
    display: none !important;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .app-body {
    padding-bottom: 60px;
  }
  .landing-hero-inner {
    flex-direction: column;
  }
  .hero-divider { flex-direction: row; }
  .hero-divider-line { width: auto; height: 1px; flex: 1; }
  .features-grid, .pricing-grid { grid-template-columns: 1fr; }
  .mode-toggle .mode-btn span { display: none; }
  .items-table .col-author,
  .items-table .col-dist,
  .items-table .col-views { display: none; }
  .status-bar { flex-wrap: wrap; }
  .status-bar-actions { width: 100%; }
}

@media (min-width: 1400px) {
  :root {
    --sidebar-width: 240px;
    --detail-width: 360px;
  }
}

/* Scrollbar styling (Webkit) */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.sidebar::-webkit-scrollbar-thumb { background: #374151; }

/* ── EMPTY QUEUE ── */
.empty-queue {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  font-size: 20px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-bg);
  border-radius: var(--radius-lg);
  margin: 24px;
  border: 2px solid var(--green);
  gap: 10px;
}

/* ════════════════════════════════════════════
   SPARKLINE (sidebar analytics)
════════════════════════════════════════════ */
.sparkline-wrap {
  margin-top: 8px;
}
.sparkline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.sparkline-title {
  font-size: 10px;
  color: var(--sidebar-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sparkline-trend {
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 3px;
}
.sparkline-trend.trend-up { color: #6ee7b7; }
.sparkline-trend.trend-down { color: #fca5a5; }

.sparkline-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 40px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius);
  padding: 4px 6px 4px;
}
.spark-bar {
  flex: 1;
  background: rgba(139,92,246,0.4);
  border-radius: 2px 2px 0 0;
  min-height: 4px;
  transition: background var(--transition);
}
.spark-bar.today {
  background: var(--purple-light);
}
.spark-bar:hover {
  background: var(--purple);
}
.sparkline-labels {
  display: flex;
  justify-content: space-around;
  margin-top: 3px;
}
.sparkline-labels span {
  font-size: 9px;
  color: var(--sidebar-muted);
  text-align: center;
}

/* ════════════════════════════════════════════
   TABLE ROW COUNT
════════════════════════════════════════════ */
.table-row-count {
  padding: 6px 16px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.table-row-count.filtered {
  color: var(--purple);
  font-weight: 600;
}

/* ════════════════════════════════════════════
   MODERATION EXPANDABLE
════════════════════════════════════════════ */
.mod-summary {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.mod-right-compact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  flex-shrink: 0;
}
.mod-expand-btn {
  font-size: 11px;
  white-space: nowrap;
}
.mod-expanded {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.mod-expanded-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}
.mod-expanded-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 8px 12px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-family: monospace;
}
.mod-expanded-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mod-reject-reason {
  margin-top: 10px;
}

/* ════════════════════════════════════════════
   USER CREATE PANEL
════════════════════════════════════════════ */
.user-create-panel {
  padding: 0 !important;
  overflow-y: auto;
}
.user-create-header {
  padding: 20px 24px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.user-create-header h2 {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.user-create-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 600px;
}
.user-create-cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.create-cat-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  background: var(--surface);
  transition: all var(--transition);
  cursor: pointer;
  font-family: var(--font);
}
.create-cat-btn:hover {
  border-color: var(--cc, var(--purple));
  color: var(--cc, var(--purple));
}
.create-cat-btn.active {
  background: color-mix(in srgb, var(--cc, var(--purple)) 12%, white);
  border-color: var(--cc, var(--purple));
  color: var(--cc, var(--purple));
  font-weight: 600;
}
.user-create-char-counter {
  position: absolute;
  bottom: 8px;
  left: 10px;
  font-size: 11px;
  color: var(--text-muted);
  pointer-events: none;
}
.user-create-actions {
  margin-top: 8px;
}

/* ════════════════════════════════════════════
   USER PROFILE PANEL
════════════════════════════════════════════ */
.user-profile-panel {
  padding: 0 !important;
  overflow-y: auto;
}
.user-profile-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  padding: 40px 24px 32px;
  text-align: center;
  color: #fff;
}
.user-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 12px;
  border: 3px solid rgba(255,255,255,0.3);
}
.user-profile-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}
.user-profile-location {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.user-profile-location i { color: var(--purple-light); }

.user-profile-stats {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.user-pstat {
  flex: 1;
  padding: 16px 8px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.user-pstat:first-child { border-right: none; }
.user-pstat-num {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}
.user-pstat-label {
  font-size: 11px;
  color: var(--text-muted);
}

.user-profile-section {
  padding: 20px 24px;
}
.user-profile-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ════ TABLE SEARCH BAR ════ */
.table-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: relative;
}
.table-search-icon {
  color: var(--text-muted);
  font-size: 13px;
  flex-shrink: 0;
}
.table-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  direction: rtl;
}
.table-search-input::placeholder { color: var(--text-muted); }
.table-search-count {
  font-size: 11px;
  color: var(--purple);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ════ INLINE NOTE ════ */
.note-cell {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 4px;
}
.note-pencil {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.note-pencil:hover { background: var(--bg); color: var(--purple); border-color: var(--purple); }
.note-pencil.has-note { background: var(--purple-bg); color: var(--purple); border-color: var(--purple); }
.note-inline {
  width: 160px;
  position: absolute;
  z-index: 10;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  margin-top: 4px;
}
.note-textarea {
  width: 100%;
  min-height: 60px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  font-size: 12px;
  font-family: inherit;
  color: var(--text);
  padding: 6px 8px;
  direction: rtl;
  resize: none;
  outline: none;
}
.note-textarea:focus { border-color: var(--purple); }

/* ════ CALENDAR HEADER ROW + ALL BUTTON ════ */
.calendar-header-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
}
.calendar-header-row .calendar-strip {
  flex: 1;
  border-bottom: none;
}
.cal-all-btn {
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--purple);
  background: var(--purple-bg);
  border: none;
  border-right: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.cal-all-btn:hover { background: var(--purple); color: #fff; }
.cal-day-filter-banner {
  padding: 8px 16px;
  background: var(--purple-bg);
  color: var(--purple);
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--purple);
  text-align: center;
}
