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

:root {
  /* Backgrounds */
  --bg:      #f2f4fb;
  --bg2:     #ffffff;
  --bg3:     #eaecf7;
  /* Surfaces */
  --surface:  #ffffff;
  --surface2: #f2f4fb;
  /* Borders */
  --border:  #dde1f5;
  --border2: #c8cfe8;
  /* Text */
  --text:    #1a1c2e;
  --muted:   #52607a;
  --dim:     #98a2bc;
  /* Accent */
  --accent:      #6c5ce7;
  --accent2:     #5a4dd6;
  --accent-light: #f0eeff;
  --accent-glow: rgba(108,92,231,0.13);
  /* Shadows */
  --shadow:     0 2px 16px rgba(26,28,60,0.09);
  --shadow-lg:  0 6px 32px rgba(26,28,60,0.13);
  /* Platform colours */
  --instagram: #e1306c; --twitter: #1da1f2; --facebook: #1877f2;
  --linkedin:  #0a66c2; --tiktok:  #ff0050; --youtube:  #ff0000;
  /* Status colours */
  --idea:      #d97706; --draft: #6c5ce7; --scheduled: #0891b2; --published: #059669;
  --radius:    12px; --radius-sm: 8px; --radius-lg: 18px;
  --topbar-h:  56px;
  --transition: 0.18s ease;
  --transition-fast: 0.12s ease;
}

html { font-size: 15px; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

/* ===== SCROLLBARS ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--dim); }
* { scrollbar-width: thin; scrollbar-color: var(--border2) transparent; }

/* ===== FOCUS RINGS ===== */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== APP SHELL ===== */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ===== TOP BAR ===== */
.topbar {
  height: var(--topbar-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--border);
}
.topbar-left  { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo-icon { font-size: 20px; }
.logo-text { font-family: 'Space Grotesk', sans-serif; font-size: 1rem; color: var(--muted); white-space: nowrap; }
.logo-text strong { color: var(--text); font-weight: 700; }

/* ===== HAMBURGER ===== */
.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: none; padding: 6px; cursor: pointer;
  border-radius: var(--radius-sm); flex-shrink: 0; transition: background var(--transition-fast);
}
.hamburger:hover { background: var(--bg3); }
.hamburger span { display: block; width: 20px; height: 2px; background: var(--muted); border-radius: 2px; transition: var(--transition); }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--dim); overflow: hidden; }
.breadcrumb .sep { color: var(--border2); flex-shrink: 0; }
.breadcrumb .crumb-link { cursor: pointer; color: var(--muted); transition: color var(--transition-fast); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb .crumb-link:hover { color: var(--accent); }
.breadcrumb .crumb-current { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.user-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  padding: 5px 12px 5px 5px; border-radius: 24px; font-size: 0.82rem;
  transition: var(--transition);
}
.user-initial {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; flex-shrink: 0;
}
.user-role {
  font-size: 0.68rem; background: var(--accent-glow);
  color: var(--accent); padding: 2px 7px; border-radius: 10px; font-weight: 600;
}
.btn-ghost {
  background: none; border: 1px solid var(--border); color: var(--muted); padding: 6px 14px;
  border-radius: var(--radius-sm); font-size: 0.8rem;
  cursor: pointer; font-family: inherit; transition: all var(--transition-fast); white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.btn-ghost:active { transform: scale(0.97); }

/* ===== LAYOUT ===== */
.app-layout { display: flex; flex: 1; overflow: hidden; position: relative; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: 220px; min-width: 220px;
  background: var(--bg2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 16px 12px; gap: 4px;
  overflow-y: auto; box-shadow: 1px 0 0 var(--border);
  transition: transform var(--transition); z-index: 100;
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0; top: var(--topbar-h);
  background: rgba(0,0,0,0.35); z-index: 99;
}
.sidebar-overlay.visible { display: block; }
.sidebar-section-title { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); font-weight: 600; padding: 10px 8px 4px; }

.nav-btn {
  display: flex; align-items: center; gap: 10px; background: none; border: none; color: var(--muted);
  font-size: 0.85rem; font-weight: 500; padding: 9px 10px; border-radius: var(--radius-sm);
  cursor: pointer; width: 100%; text-align: left; font-family: inherit; transition: all var(--transition-fast);
}
.nav-btn:hover { background: var(--bg3); color: var(--text); }
.nav-btn.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.nav-btn:active { transform: scale(0.97); }
.nav-btn svg { flex-shrink: 0; }

.sidebar-divider { height: 1px; background: var(--border); margin: 8px 0; }

.platform-legend { padding: 4px 0; }
.legend-title { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); font-weight: 600; padding: 0 6px 6px; }
.platform-filters { display: flex; flex-direction: column; gap: 4px; }
.platform-filter { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 6px; transition: color var(--transition-fast); }
.platform-filter:hover { color: var(--text); background: var(--bg3); }
.platform-filter input { display: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.platform-filter input:not(:checked) ~ .dot { opacity: 0.25; }
.dot.instagram { background: var(--instagram); } .dot.twitter { background: var(--twitter); }
.dot.facebook  { background: var(--facebook); }  .dot.linkedin { background: var(--linkedin); }
.dot.tiktok    { background: var(--tiktok); }     .dot.youtube  { background: var(--youtube); }

.add-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; border: none; padding: 11px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all var(--transition); font-family: inherit;
  box-shadow: 0 2px 10px var(--accent-glow); margin-top: auto;
}
.add-btn:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 4px 18px var(--accent-glow); }
.add-btn:active { transform: scale(0.97); }

/* ===== MAIN ===== */
.main { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.view { display: none; flex-direction: column; height: 100%; overflow: hidden; }
.view.active { display: flex; }

/* ===== VIEW HEADER ===== */
.view-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; background: var(--bg2); flex-wrap: wrap; gap: 10px;
}
.view-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.view-subtitle { font-size: 0.78rem; color: var(--dim); margin-top: 2px; }

/* ===== CALENDAR OVERVIEW STRIP ===== */
.cal-overview {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px; padding: 10px 20px;
  background: var(--bg2); border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.ov-label { font-size: 0.75rem; font-weight: 600; color: var(--dim); margin-right: 2px; white-space: nowrap; }
.ov-sep { width: 1px; height: 18px; background: var(--border2); margin: 0 4px; }
.ov-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 20px;
  font-size: 0.76rem; font-weight: 600; border: 1px solid transparent; cursor: default;
  transition: transform var(--transition-fast); white-space: nowrap;
}
.ov-chip:hover { transform: translateY(-1px); }
.ov-chip-all       { background: var(--bg3);  color: var(--muted); border-color: var(--border2); }
.ov-chip-published { background: #dcfce7; color: #15803d; border-color: #86efac; }
.ov-chip-scheduled { background: #e0f9ff; color: #0e7490; border-color: #a5f3fc; }
.ov-chip-draft     { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.ov-chip-idea      { background: #fef9c3; color: #92400e; border-color: #fde68a; }
.ov-chip .ov-num   { font-size: 0.9rem; font-weight: 700; }
.ov-platform {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 500; border: 1px solid transparent; white-space: nowrap;
}
.ov-platform-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ===== DASHBOARD ===== */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding: 20px 24px 0; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px 14px;
  position: relative; overflow: hidden; box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover { box-shadow: 0 6px 22px rgba(26,28,60,0.11); transform: translateY(-2px); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 12px 12px 0 0; }
.stat-card.accent::before  { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.stat-card.green::before   { background: linear-gradient(90deg, #10b981, #059669); }
.stat-card.blue::before    { background: linear-gradient(90deg, #0891b2, #0e7490); }
.stat-card.yellow::before  { background: linear-gradient(90deg, #f59e0b, #d97706); }
.stat-card.draft::before   { background: linear-gradient(90deg, #818cf8, #6366f1); }
.stat-card.red::before     { background: linear-gradient(90deg, #f43f5e, #e11d48); }
.stat-emoji { font-size: 1.2rem; position: absolute; top: 14px; right: 14px; opacity: 0.35; line-height: 1; }
.stat-value { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin-bottom: 5px; color: var(--text); }
.stat-label { font-size: 0.72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

.clients-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  align-items: start; gap: 16px; padding: 20px 24px; overflow-y: auto; flex: 1; align-content: start;
}
.client-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; cursor: pointer; transition: all var(--transition); display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.client-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 28px rgba(26,28,60,0.13); }
.client-card:active { transform: translateY(-1px); }
.client-card-top {
  height: 88px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.client-card-top::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(255,255,255,0.5) 100%); pointer-events: none; }
.client-logo {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; font-weight: 700; color: #fff;
  overflow: hidden; position: relative; z-index: 1; box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.client-logo img { width: 100%; height: 100%; object-fit: cover; }
.client-card-body { padding: 14px 16px 12px; }
.client-name { font-family: 'Space Grotesk', sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: 3px; color: var(--text); }
.client-industry { font-size: 0.75rem; color: var(--dim); margin-bottom: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.client-post-count { font-size: 0.73rem; color: var(--muted); background: var(--bg3); padding: 2px 9px; border-radius: 10px; font-weight: 500; border: 1px solid var(--border); }
.client-card-actions { display: flex; gap: 6px; padding: 10px 14px 12px; border-top: 1px solid var(--border); margin-top: 2px; }
.card-action-btn {
  flex: 1; background: none; border: 1px solid var(--border); color: var(--muted); padding: 8px 4px;
  border-radius: var(--radius-sm); font-size: 0.75rem; cursor: pointer; transition: all var(--transition-fast); font-family: inherit; font-weight: 600;
}
.card-action-btn:hover { background: var(--bg3); color: var(--text); border-color: var(--border2); }
.card-action-btn:active { transform: scale(0.96); }
.card-action-btn.primary-action { background: var(--accent-light); color: var(--accent); border-color: rgba(108,92,231,0.2); }
.card-action-btn.primary-action:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== CALENDAR ===== */
.month-nav { display: flex; align-items: center; gap: 14px; }
.month-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; font-weight: 700; min-width: 160px; text-align: center; letter-spacing: -0.02em; color: var(--text); }
.month-btn {
  background: var(--bg3); border: 1px solid var(--border); color: var(--muted);
  width: 34px; height: 34px; border-radius: var(--radius-sm); cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center; transition: all var(--transition-fast); flex-shrink: 0;
}
.month-btn:hover { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }
.month-btn:active { transform: scale(0.97); }
.view-actions { display: flex; align-items: center; gap: 8px; }
.today-btn {
  background: none; border: 1px solid var(--border); color: var(--muted); padding: 7px 14px;
  border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 500; cursor: pointer;
  transition: all var(--transition-fast); font-family: inherit;
}
.today-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.today-btn:active { transform: scale(0.97); }

.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  flex: 1; overflow-y: auto; gap: 1px; background: var(--border);
  border: 1px solid var(--border); margin: 14px; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.day-header { background: var(--bg3); text-align: center; padding: 9px 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); }
.day-cell {
  background: var(--bg2); padding: 6px 5px 5px; min-height: 100px;
  display: flex; flex-direction: column; gap: 3px; cursor: default;
  transition: background var(--transition-fast); overflow: hidden; position: relative;
}
.day-cell:hover { background: var(--accent-light); }
.day-cell.has-bg { background-size: cover; background-position: center; background-repeat: no-repeat; }
.day-cell.has-bg::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.12) 45%, rgba(0,0,0,0.45) 100%); pointer-events: none; z-index: 0; }
.day-cell.has-bg > * { position: relative; z-index: 1; }
.day-cell.has-bg .day-num { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.8); }
.day-cell.has-bg.today .day-num { background: var(--accent); box-shadow: 0 0 0 2px rgba(255,255,255,0.4); }
.day-cell.other-month { background: var(--bg3); opacity: 0.55; }
.day-num { font-size: 0.78rem; font-weight: 600; color: var(--dim); width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.day-cell.today .day-num { background: var(--accent); color: #fff; border-radius: 50%; }
.day-add {
  position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; background: var(--bg3);
  border: 1px solid var(--border2); border-radius: 4px; color: var(--dim); font-size: 1rem;
  display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0;
  transition: opacity var(--transition-fast); line-height: 1;
}
.day-cell:hover .day-add { opacity: 1; }
.day-add:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.post-pill {
  display: flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 5px;
  font-size: 0.68rem; font-weight: 600; cursor: pointer; transition: filter var(--transition-fast), transform var(--transition-fast);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.post-pill:hover { filter: brightness(1.1); transform: translateX(1px); }
.pill-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.7); flex-shrink: 0; }
.pill-text { overflow: hidden; text-overflow: ellipsis; }
.pill-media-icon { font-size: 0.6rem; opacity: 0.9; flex-shrink: 0; }
.more-pill { font-size: 0.67rem; color: var(--muted); padding: 1px 4px; cursor: pointer; font-weight: 500; }
.more-pill:hover { color: var(--accent); }
.pill-instagram { background: linear-gradient(135deg, #833ab4, #e1306c); }
.pill-twitter   { background: #1da1f2; }
.pill-facebook  { background: #1877f2; }
.pill-linkedin  { background: #0a66c2; }
.pill-tiktok    { background: #1a1a2e; border: 1px solid #ff0050; }
.pill-youtube   { background: #ff0000; }

/* ===== LIST VIEW ===== */
.list-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-select, .search-input {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 7px 11px;
  border-radius: var(--radius-sm); font-size: 0.8rem; font-family: inherit; outline: none; transition: border-color var(--transition-fast);
}
.filter-select:focus, .search-input:focus { border-color: var(--accent); background: var(--bg2); }
.search-input { min-width: 160px; }
.filter-select option { background: var(--bg2); color: var(--text); }
.post-list { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 8px; }
.list-post-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px 14px 18px; display: flex; align-items: flex-start; gap: 14px;
  cursor: pointer; transition: all var(--transition-fast); box-shadow: 0 1px 4px rgba(26,28,60,0.05); position: relative; overflow: hidden;
}
.list-post-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 2px 0 0 2px; background: var(--border2); transition: background var(--transition-fast); }
.list-post-card:hover { border-color: var(--border2); background: var(--bg3); transform: translateX(3px); box-shadow: var(--shadow); }
.list-post-card:hover::before { background: var(--accent); }
.card-platform { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.65rem; font-weight: 700; color: #fff; }
.card-body { flex: 1; min-width: 0; }
.card-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; flex-wrap: wrap; }
.card-date { font-size: 0.72rem; color: var(--muted); font-weight: 500; }
.card-type { font-size: 0.66rem; padding: 2px 7px; border-radius: 12px; background: var(--bg3); color: var(--dim); font-weight: 600; border: 1px solid var(--border); }
.card-content { font-size: 0.83rem; color: var(--text); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-tags { font-size: 0.72rem; color: var(--accent); margin-top: 3px; opacity: 0.85; font-weight: 500; }
.card-status { padding: 3px 10px; border-radius: 12px; font-size: 0.7rem; font-weight: 700; flex-shrink: 0; align-self: flex-start; }
.status-idea      { background: #fef9c3; color: #92400e; border: 1px solid #fde68a; }
.status-draft     { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }
.status-scheduled { background: #e0f9ff; color: #0e7490; border: 1px solid #a5f3fc; }
.status-published { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }

/* ===== ANALYTICS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding: 20px 24px 0; }
.upcoming-section { padding: 20px 24px; flex: 1; overflow-y: auto; }
.section-heading { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--dim); margin-bottom: 12px; }
.upcoming-list { display: flex; flex-direction: column; gap: 8px; }

/* ===== USERS VIEW ===== */
.users-table-wrap { flex: 1; overflow-y: auto; padding: 16px 24px; }
.users-table { width: 100%; border-collapse: collapse; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.users-table th { background: var(--bg3); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--dim); font-weight: 700; padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.users-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 0.85rem; background: var(--bg2); transition: background var(--transition-fast); }
.users-table tr:last-child td { border-bottom: none; }
.users-table tr:hover td { background: var(--accent-light); }
.role-badge { padding: 2px 9px; border-radius: 10px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; }
.role-admin { background: var(--accent-light); color: var(--accent); border: 1px solid rgba(108,92,231,0.2); }
.role-user  { background: var(--bg3); color: var(--muted); border: 1px solid var(--border); }
.btn-xs { padding: 4px 10px; border-radius: 6px; font-size: 0.72rem; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: var(--bg3); color: var(--muted); font-family: inherit; transition: all var(--transition-fast); }
.btn-xs:hover { background: var(--bg2); color: var(--text); border-color: var(--border2); }
.btn-xs:active { transform: scale(0.97); }
.btn-xs.danger { border-color: #fca5a5; color: #dc2626; background: #fff5f5; }
.btn-xs.danger:hover { background: #fee2e2; }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(26,28,60,0.45); backdrop-filter: blur(5px);
  display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  width: 100%; max-width: 560px; box-shadow: var(--shadow-lg); animation: slideUp 0.2s ease;
  max-height: 90vh; display: flex; flex-direction: column;
}
@keyframes slideUp { from { opacity:0; transform:translateY(16px) scale(0.97); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes slideUpSheet { from { opacity:0; transform:translateY(40px); } to { opacity:1; transform:translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; flex-shrink: 0; }
.modal-header h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--text); }
.modal-close { background: var(--bg3); border: 1px solid var(--border); color: var(--muted); width: 30px; height: 30px; border-radius: 7px; font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--transition-fast); line-height: 1; }
.modal-close:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.modal-close:active { transform: scale(0.95); }
.modal-body { padding: 18px 22px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }

.form-row { display: flex; flex-direction: column; gap: 0; }
.form-row.two-col { flex-direction: row; gap: 10px; }
.form-row.two-col .form-group { flex: 1; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.form-group input, .form-group textarea, .form-group select {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 9px 11px;
  border-radius: var(--radius-sm); font-size: 0.85rem; font-family: inherit; outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast); resize: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); background: var(--bg2); }
.form-group select option { background: var(--bg2); }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--dim); }
.char-count { font-size: 0.7rem; color: var(--dim); text-align: right; margin-top: 2px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; padding-top: 6px; border-top: 1px solid var(--border); }
.error-banner { font-size: 0.8rem; color: #dc2626; background: #fff5f5; border-radius: 6px; border: 1px solid #fca5a5; min-height: 0; }
.error-banner.visible { padding: 8px 12px; }

/* ===== COLOUR PICKER ===== */
.color-row { display: flex; align-items: center; gap: 8px; }
.color-input { width: 36px; height: 36px; padding: 2px; border: 1px solid var(--border); border-radius: 7px; cursor: pointer; background: var(--bg3); }
.color-swatches { display: flex; gap: 5px; flex-wrap: wrap; }
.swatch { width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform var(--transition-fast), border-color var(--transition-fast); box-shadow: 0 1px 4px rgba(0,0,0,0.15); }
.swatch:hover { transform: scale(1.18); }
.swatch.selected { border-color: var(--text); }

/* ===== LOGO UPLOAD ===== */
.logo-upload-row { display: flex; align-items: center; gap: 10px; }
.logo-preview { width: 48px; height: 48px; border-radius: 10px; background: var(--bg3); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--dim); flex-shrink: 0; }
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ===== PLATFORM PICKER ===== */
.platform-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.platform-option {
  display: flex; align-items: center; gap: 6px; background: var(--bg3); border: 2px solid var(--border);
  color: var(--muted); padding: 6px 10px; border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 500;
  cursor: pointer; transition: all var(--transition-fast); font-family: inherit;
}
.platform-option:hover { color: var(--text); border-color: var(--border2); background: var(--bg2); }
.platform-option:active { transform: scale(0.97); }
.platform-option.selected.instagram { border-color: var(--instagram); color: var(--instagram); background: rgba(225,48,108,0.07); }
.platform-option.selected.twitter   { border-color: var(--twitter);   color: var(--twitter);   background: rgba(29,161,242,0.07); }
.platform-option.selected.facebook  { border-color: var(--facebook);  color: var(--facebook);  background: rgba(24,119,242,0.07); }
.platform-option.selected.linkedin  { border-color: var(--linkedin);  color: var(--linkedin);  background: rgba(10,102,194,0.07); }
.platform-option.selected.tiktok    { border-color: var(--tiktok);    color: var(--tiktok);    background: rgba(255,0,80,0.07); }
.platform-option.selected.youtube   { border-color: var(--youtube);   color: var(--youtube);   background: rgba(255,0,0,0.07); }

/* ===== UPLOAD ZONE ===== */
.upload-zone {
  position: relative; border: 2px dashed var(--border2); border-radius: var(--radius-sm);
  padding: 16px; text-align: center; cursor: pointer; transition: all var(--transition); background: var(--bg3);
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--accent); background: var(--accent-light); }
.upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: none; padding: 0; background: none; }
.upload-prompt { display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; color: var(--dim); }
.upload-prompt span { font-size: 0.78rem; color: var(--muted); }
.upload-prompt strong { color: var(--accent); }
.media-preview-grid { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.media-thumb { position: relative; width: 76px; height: 76px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: var(--bg3); flex-shrink: 0; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-thumb .thumb-remove { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; background: rgba(0,0,0,0.55); border: none; border-radius: 50%; color: #fff; font-size: 0.75rem; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--transition-fast); }
.media-thumb:hover .thumb-remove { opacity: 1; }
.media-thumb .thumb-type { position: absolute; bottom: 2px; left: 2px; background: rgba(0,0,0,0.6); color: #fff; font-size: 0.55rem; font-weight: 700; padding: 1px 4px; border-radius: 2px; text-transform: uppercase; }

/* ===== DETAIL MODAL ===== */
.detail-modal { max-width: 460px; }
.detail-platform-badge { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; font-weight: 600; }
.detail-body { padding: 16px 22px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.detail-field { display: flex; flex-direction: column; gap: 4px; }
.detail-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--dim); }
.detail-value { font-size: 0.88rem; color: var(--text); line-height: 1.6; }
.detail-media-section { padding: 0 22px 10px; display: flex; flex-direction: column; gap: 7px; }
.detail-media-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--dim); }
.detail-media-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.detail-media-item { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: var(--bg3); cursor: pointer; box-shadow: 0 1px 4px rgba(26,28,60,0.07); }
.detail-media-item img { width: 110px; height: 90px; object-fit: cover; display: block; transition: transform var(--transition); }
.detail-media-item:hover img { transform: scale(1.04); }
.detail-media-item video { max-width: 240px; max-height: 180px; display: block; }
.detail-actions { display: flex; gap: 8px; padding: 0 22px 18px; justify-content: flex-end; }

/* ===== BUTTONS ===== */
.btn-primary { background: var(--accent); color: #fff; border: none; padding: 9px 20px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all var(--transition-fast); font-family: inherit; box-shadow: 0 1px 6px var(--accent-glow); }
.btn-primary:hover { background: var(--accent2); box-shadow: 0 2px 12px var(--accent-glow); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: var(--bg3); color: var(--muted); border: 1px solid var(--border); padding: 9px 16px; border-radius: var(--radius-sm); font-size: 0.83rem; font-weight: 500; cursor: pointer; transition: all var(--transition-fast); font-family: inherit; }
.btn-secondary:hover { background: var(--bg2); color: var(--text); border-color: var(--border2); }
.btn-secondary:active { transform: scale(0.97); }
.btn-danger { background: #fff5f5; color: #dc2626; border: 1px solid #fca5a5; padding: 9px 16px; border-radius: var(--radius-sm); font-size: 0.83rem; font-weight: 500; cursor: pointer; transition: all var(--transition-fast); font-family: inherit; }
.btn-danger:hover { background: #fee2e2; }
.btn-danger:active { transform: scale(0.97); }

/* ===== LIGHTBOX ===== */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.88); display: none; align-items: center; justify-content: center; z-index: 2000; padding: 20px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: var(--radius); box-shadow: 0 8px 40px rgba(0,0,0,0.5); }
.lightbox-close { position: absolute; top: 18px; right: 18px; background: rgba(255,255,255,0.15); border: none; color: #fff; width: 38px; height: 38px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--transition-fast); }
.lightbox-close:hover { background: rgba(255,255,255,0.28); }

/* ===== COMMENTS ===== */
.comments-section { border-top: 1px solid var(--border); padding: 12px 22px 14px; display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
.comments-header { display: flex; align-items: center; gap: 7px; }
.comments-header svg { color: var(--dim); }
.comments-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--dim); flex: 1; }
.comments-count { background: var(--bg3); color: var(--muted); font-size: 0.68rem; font-weight: 700; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--border); }
.comments-list { display: flex; flex-direction: column; gap: 8px; max-height: 180px; overflow-y: auto; }
.comment-empty { font-size: 0.78rem; color: var(--dim); text-align: center; padding: 10px 0; }
.comment-item  { display: flex; gap: 8px; align-items: flex-start; }
.comment-avatar-sm { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.68rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.comment-bubble { background: var(--bg3); border: 1px solid var(--border); border-radius: 4px 12px 12px 12px; padding: 7px 10px; flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.comment-username { font-size: 0.75rem; font-weight: 700; color: var(--text); }
.comment-time     { font-size: 0.68rem; color: var(--dim); flex: 1; }
.comment-delete { background: none; border: none; color: var(--dim); cursor: pointer; font-size: 0.75rem; padding: 1px 4px; border-radius: 4px; opacity: 0; transition: all var(--transition-fast); line-height: 1; }
.comment-item:hover .comment-delete { opacity: 1; }
.comment-delete:hover { color: #dc2626; background: #fee2e2; }
.comment-text { font-size: 0.83rem; color: var(--text); line-height: 1.45; word-break: break-word; }
.comment-input-row { display: flex; gap: 8px; align-items: center; }
.comment-avatar-mine { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; flex-shrink: 0; }
.comment-input-wrap { flex: 1; display: flex; gap: 6px; align-items: center; background: var(--bg3); border: 1.5px solid var(--border); border-radius: 20px; padding: 6px 6px 6px 13px; transition: border-color var(--transition-fast); }
.comment-input-wrap:focus-within { border-color: var(--accent); background: var(--bg2); }
.comment-input-wrap input { flex: 1; border: none; background: none; color: var(--text); font-size: 0.85rem; font-family: inherit; outline: none; }
.comment-input-wrap input::placeholder { color: var(--dim); }
.comment-submit { background: var(--accent); color: #fff; border: none; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: all var(--transition-fast); }
.comment-submit:hover { background: var(--accent2); transform: scale(1.08); }

/* ===== CLIENT ACCESS LIST (add-user modal) ===== */
.access-hint { font-size: 0.76rem; color: var(--dim); margin-bottom: 8px; line-height: 1.4; }
.access-loading { font-size: 0.8rem; color: var(--dim); padding: 10px 0; text-align: center; }
.client-access-list { display: flex; flex-direction: column; gap: 6px; }
.client-access-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--bg3); transition: all var(--transition-fast); cursor: pointer; }
.client-access-item:has(.ca-check:checked) { background: var(--accent-light); border-color: rgba(108,92,231,0.3); }
.ca-check { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.ca-logo { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-family: 'Space Grotesk', sans-serif; font-size: 0.68rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.ca-name { flex: 1; font-size: 0.85rem; font-weight: 600; color: var(--text); }
.ca-industry { font-size: 0.72rem; color: var(--dim); font-weight: 400; display: block; }
.ca-permission { background: var(--bg2); border: 1px solid var(--border); color: var(--text); padding: 5px 8px; border-radius: 7px; font-size: 0.78rem; font-family: inherit; outline: none; cursor: pointer; transition: border-color var(--transition-fast); opacity: 0.4; pointer-events: none; }
.ca-permission.enabled { opacity: 1; pointer-events: auto; }
.ca-permission:focus { border-color: var(--accent); }
.ca-permission option { background: var(--bg2); }

.view-only-notice { display: flex; align-items: center; gap: 7px; padding: 6px 14px; background: #fef9c3; border-bottom: 1px solid #fde68a; font-size: 0.78rem; color: #92400e; font-weight: 500; flex-shrink: 0; }
.view-only-notice svg { flex-shrink: 0; }

/* ===== EMPTY STATE ===== */
.empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--dim); padding: 40px; }
.empty-state-icon { font-size: 2.6rem; opacity: 0.5; }
.empty-state h3 { font-size: 1rem; color: var(--muted); font-weight: 600; }
.empty-state p { font-size: 0.82rem; text-align: center; max-width: 260px; line-height: 1.6; }

/* ===== TOAST SYSTEM ===== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; max-width: 320px; width: calc(100% - 48px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--border); box-shadow: 0 4px 20px rgba(26,28,60,0.13); font-size: 0.85rem; font-weight: 500; color: var(--text); transform: translateX(110%); transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1); pointer-events: all; }
.toast.visible { transform: translateX(0); }
.toast-icon { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; flex-shrink: 0; }
.toast-success { border-left: 3px solid #10b981; }
.toast-error   { border-left: 3px solid #ef4444; }
.toast-info    { border-left: 3px solid var(--accent); }
.toast-success .toast-icon { background: #dcfce7; color: #15803d; }
.toast-error   .toast-icon { background: #fee2e2; color: #dc2626; }
.toast-info    .toast-icon { background: var(--accent-light); color: var(--accent); }
.toast-msg { flex: 1; line-height: 1.4; }
.toast-close { background: none; border: none; color: var(--dim); cursor: pointer; font-size: 1.1rem; padding: 0 2px; line-height: 1; flex-shrink: 0; }

/* ===== CONFIRM MODAL ===== */
.confirm-modal { max-width: 360px; }
.confirm-icon { font-size: 2rem; margin-bottom: 10px; }
.confirm-msg { font-size: 0.95rem; color: var(--text); line-height: 1.5; margin-bottom: 20px; font-weight: 500; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }

/* ===== MOBILE BOTTOM NAV ===== */
.mobile-bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg2); border-top: 1px solid var(--border); padding: 8px 0 env(safe-area-inset-bottom, 8px); z-index: 50; box-shadow: 0 -2px 16px rgba(26,28,60,0.07); }
.mobile-bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: none; color: var(--dim); font-size: 0.68rem; font-weight: 500; padding: 4px 0; cursor: pointer; font-family: inherit; transition: color var(--transition-fast); }
.mobile-bottom-nav button svg { width: 20px; height: 20px; }
.mobile-bottom-nav button.active { color: var(--accent); }
.mobile-bottom-nav button:active { transform: scale(0.93); }

/* ===== SHARE TOOLBAR BUTTON ===== */
.share-toolbar-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 0.82rem; font-weight: 500; cursor: pointer; transition: background var(--transition-fast), border-color var(--transition-fast); white-space: nowrap; }
.share-toolbar-btn:hover { background: var(--bg2); border-color: var(--border2); }
.share-toolbar-btn.active { background: var(--accent-light); border-color: rgba(108,92,231,0.3); color: var(--accent); }

/* ===== SHARE DROPDOWN ===== */
.sd-dropdown { position: fixed; z-index: 3000; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); width: 230px; padding: 6px; display: none; animation: sdIn 0.13s ease; }
.sd-dropdown.open { display: block; }
@keyframes sdIn { from { opacity: 0; transform: translateY(-6px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.sd-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; background: none; border: none; border-radius: 7px; color: var(--text); font-size: 0.84rem; font-weight: 450; cursor: pointer; text-align: left; transition: background var(--transition-fast); font-family: inherit; }
.sd-item:hover { background: var(--bg3); }
.sd-item-icon { width: 28px; height: 28px; border-radius: 6px; background: var(--bg3); display: flex; align-items: center; justify-content: center; color: var(--muted); flex-shrink: 0; }
.sd-back { display: flex; align-items: center; gap: 6px; background: none; border: none; color: var(--dim); font-size: 0.78rem; cursor: pointer; padding: 4px 4px 8px; margin-bottom: 2px; font-family: inherit; }
.sd-back:hover { color: var(--text); }
.sd-link-label { font-size: 0.78rem; font-weight: 600; color: var(--muted); margin: 0 0 8px; padding: 0 4px; }
.sd-link-row { display: flex; gap: 6px; align-items: center; }
.sd-link-input { flex: 1; min-width: 0; background: var(--bg3); border: 1px solid var(--border); border-radius: 7px; padding: 7px 9px; font-size: 0.72rem; color: var(--text); font-family: monospace; }
.sd-copy-btn { background: var(--accent); color: #fff; border: none; border-radius: 7px; padding: 7px 10px; font-size: 0.76rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: opacity var(--transition-fast); font-family: inherit; }
.sd-copy-btn:hover { opacity: 0.88; }
.sd-revoke-btn { background: none; border: none; color: #dc2626; font-size: 0.73rem; cursor: pointer; padding: 8px 4px 2px; opacity: 0.85; transition: opacity var(--transition-fast); font-family: inherit; }
.sd-revoke-btn:hover { opacity: 1; }

/* ===== SHARE MODAL ===== */
.share-subtitle { font-size: 0.82rem; color: var(--dim); margin: 0; }
.share-option-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.share-option-info { display: flex; align-items: center; gap: 12px; }
.share-option-icon { width: 36px; height: 36px; border-radius: 8px; background: #818cf820; color: #818cf8; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.share-option-icon.edit-icon { background: #10b98120; color: #10b981; }
.share-option-title { font-weight: 600; font-size: 0.88rem; color: var(--text); }
.share-option-desc { font-size: 0.76rem; color: var(--dim); margin-top: 2px; }
.share-link-row { display: flex; gap: 8px; align-items: center; }
.share-link-input { flex: 1; min-width: 0; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 0.75rem; color: var(--text); font-family: monospace; cursor: text; }
.revoke-link-btn { display: flex; align-items: center; gap: 5px; font-size: 0.74rem; color: #dc2626; background: none; border: none; padding: 2px 0; cursor: pointer; opacity: 0.85; transition: opacity var(--transition-fast); font-family: inherit; }
.revoke-link-btn:hover { opacity: 1; }

/* ===== RESPONSIVE: TABLET ===== */
@media (max-width: 1024px) {
  .clients-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== RESPONSIVE: MOBILE ===== */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .sidebar { position: fixed; top: var(--topbar-h); left: 0; bottom: 0; width: 260px; min-width: 260px; transform: translateX(-260px); z-index: 100; box-shadow: var(--shadow-lg); padding-bottom: 80px; }
  .sidebar.open { transform: translateX(0); }
  .logo-text { display: none; }
  .user-chip #userName { display: none; }
  .user-chip #userRole { display: none; }
  .user-chip { padding: 4px 8px 4px 4px; }
  .mobile-bottom-nav { display: flex; }
  .main { padding-bottom: 64px; }
  .topbar { padding: 0 12px; gap: 0; }
  .topbar-left { gap: 8px; flex: 1; min-width: 0; }
  .topbar-right { gap: 6px; flex-shrink: 0; }
  .view-header { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .view-title { font-size: 1.1rem; }
  .view-subtitle { font-size: 0.72rem; }
  .dash-stats { padding: 12px 14px 0; gap: 8px; grid-template-columns: repeat(3, 1fr); }
  .stat-card { padding: 12px 10px; }
  .stat-value { font-size: 1.6rem; }
  .stat-label { font-size: 0.68rem; }
  .clients-grid { padding: 12px 14px; gap: 10px; }
  .post-list { padding: 10px 14px; }
  .stats-grid { padding: 12px 14px 0; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .upcoming-section { padding: 12px 14px; }
  .users-table-wrap { padding: 10px 14px; }
  .calendar-grid { margin: 8px; }
  .cal-overview { padding: 8px 12px; overflow-x: auto; flex-wrap: nowrap; }
  .ov-chip, .ov-platform { flex-shrink: 0; }
  .list-controls { flex-wrap: wrap; }
  .month-title { font-size: 1.1rem; min-width: 140px; }
}

/* ===== RESPONSIVE: SMALL MOBILE ===== */
@media (max-width: 640px) {
  .clients-grid { grid-template-columns: 1fr; }
  .day-cell { min-height: 72px; padding: 4px 3px; }
  .post-pill { width: 10px; height: 10px; border-radius: 50%; padding: 0; overflow: hidden; flex-shrink: 0; min-width: 10px; }
  .pill-text { display: none; }
  .pill-media-icon { display: none; }
  .pill-dot { display: none; }
  .day-cell .post-pill:nth-child(n+6) { display: none; }
  .form-row.two-col { flex-direction: column; }
  .form-row.two-col .form-group { flex: unset; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; width: 100%; animation: slideUpSheet 0.25s ease; }
  .month-title { min-width: 120px; font-size: 1rem; }
  .list-controls { gap: 6px; }
  .search-input { min-width: 120px; }
  .toast-container { bottom: 80px; }
}
