/* ════════════════════════════════════════════════
   CPX-SOCIAL Component Styles
   ════════════════════════════════════════════════ */

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 20px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 63, 32, 0.3);
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 0.875rem;
}

/* ── INPUTS ── */
.input,
.textarea,
.select {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  outline: none;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-muted);
}

.textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A1A1A6' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group label {
  display: block;
  margin-bottom: 2px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.input-with-icon {
  position: relative;
}

.input-with-icon .input {
  padding-left: 40px;
}

.input-with-icon i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.char-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}

.char-count.warning { color: var(--warning); }
.char-count.error { color: var(--error); }

/* ── CARDS ── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--transition);
}

[data-theme="light"] .card {
  border: 1px solid var(--border);
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.card-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.card-value {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.75rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.card-accent-left {
  border-left: 3px solid var(--accent);
}

/* ── KPI CARD ── */
.kpi-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  cursor: pointer;
  transition: all var(--transition);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.kpi-label {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.kpi-value {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.kpi-delta.positive {
  color: var(--success);
  background: var(--success-light);
}

.kpi-delta.negative {
  color: var(--error);
  background: var(--error-light);
}

.kpi-delta.neutral {
  color: var(--text-muted);
  background: var(--bg-hover);
}

.kpi-sparkline {
  margin-top: var(--space-3);
  height: 40px;
}

/* ── BADGES & PILLS ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.badge-accent { background: var(--accent-light); color: var(--accent); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-error { background: var(--error-light); color: var(--error); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-muted { background: var(--bg-hover); color: var(--text-muted); }

.badge-instagram { background: rgba(228, 64, 95, 0.12); color: var(--instagram); }
.badge-facebook { background: rgba(24, 119, 242, 0.12); color: var(--facebook); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--radius-pill);
  background: var(--bg-hover);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.pill:hover {
  background: var(--border);
  color: var(--text-primary);
}

.pill.active {
  background: var(--accent);
  color: white;
}

/* ── STATUS DOT ── */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.online { background: var(--success); }
.status-dot.warning { background: var(--warning); }
.status-dot.offline { background: var(--error); }

/* ── TABLES ── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

[data-theme="light"] .table-wrapper {
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead th {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: color var(--transition);
}

.data-table thead th:hover {
  color: var(--text-primary);
}

.data-table thead th.sorted {
  color: var(--accent);
}

.data-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 300;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--bg-hover);
}

.data-table tbody tr {
  transition: background var(--transition);
  cursor: pointer;
}

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-6);
  overflow-x: auto;
}

.tab {
  padding: 12px 20px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.tab:hover {
  color: var(--text-primary);
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-slow);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6);
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 1rem;
}

.modal-body {
  padding: var(--space-6);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
}

/* ── TOAST ── */
.toast-container {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border-left: 3px solid var(--border);
  pointer-events: auto;
  transform: translateX(120%);
  transition: transform var(--transition-slow);
  max-width: 400px;
}

.toast.show {
  transform: translateX(0);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

.toast-message {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 300;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

/* ── SIDEBAR ── */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width var(--transition-slow);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar-logo {
  padding: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sidebar-logo h2 {
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  white-space: nowrap;
}

.sidebar.collapsed .sidebar-logo-text {
  display: none;
}

.sidebar-toggle {
  position: absolute;
  top: var(--space-4);
  right: var(--space-3);
}

.sidebar-section {
  padding: var(--space-2) var(--space-4);
}

.sidebar-section-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: var(--space-4) var(--space-3) var(--space-2);
}

.sidebar.collapsed .sidebar-section-title {
  display: none;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  border-left: 3px solid transparent;
  white-space: nowrap;
}

.sidebar-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-item.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-light);
}

.sidebar-item i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar.collapsed .sidebar-item span {
  display: none;
}

.sidebar-footer {
  margin-top: auto;
  padding: var(--space-4);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-footer .user-name {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.sidebar.collapsed .sidebar-footer .user-name {
  display: none;
}

/* ── HEADER ── */
.header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--header-height);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  z-index: 90;
  transition: left var(--transition-slow);
}

.sidebar.collapsed ~ .main-wrapper .header {
  left: var(--sidebar-collapsed);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header-title {
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header-search {
  position: relative;
}

.header-search .input {
  width: 240px;
  padding-left: 36px;
  background: var(--bg-card);
  font-size: 0.8125rem;
}

.header-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.sync-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.period-selector {
  display: flex;
  gap: 2px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 3px;
}

.period-selector .pill {
  padding: 4px 12px;
  font-size: 0.6875rem;
  border-radius: var(--radius-sm);
}

/* ── MAIN CONTENT ── */
.main-wrapper {
  margin-left: var(--sidebar-width);
  transition: margin-left var(--transition-slow);
}

.sidebar.collapsed ~ .main-wrapper {
  margin-left: var(--sidebar-collapsed);
}

.main-content {
  padding: calc(var(--header-height) + var(--space-6)) var(--space-6) var(--space-6);
  min-height: 100vh;
}

/* ── EMPTY STATE ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-10) var(--space-6);
  text-align: center;
}

.empty-state i {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.empty-state h3 {
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.empty-state p {
  max-width: 400px;
}

/* ── LOADING ── */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-10);
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--border) 50%, var(--bg-hover) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── CHECKBOX & TOGGLE ── */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.checkbox-wrapper input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-wrapper input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--bg-hover);
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition);
  border: none;
}

.toggle.active {
  background: var(--accent);
}

.toggle::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
}

.toggle.active::after {
  transform: translateX(20px);
}

/* ── DROPDOWN ── */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: all var(--transition);
  padding: var(--space-1);
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 14px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ── NOTIFICATION BELL ── */
.notification-bell {
  position: relative;
}

.notification-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: var(--accent);
  color: white;
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 600;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ── PLATFORM ICONS ── */
.platform-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 600;
  color: white;
}

.platform-icon.instagram { background: var(--instagram); }
.platform-icon.facebook { background: var(--facebook); }

/* ── POST CARD (Grid View) ── */
.post-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.post-card-image {
  aspect-ratio: 1;
  background: var(--bg-hover);
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-body {
  padding: var(--space-3) var(--space-4);
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.post-card-caption {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 300;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-stats {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

.post-card-stat {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.post-card-stat span {
  color: var(--text-primary);
  margin-right: 4px;
}

/* ── AI STRATEGIST PANEL ── */
.ai-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 420px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
}

.ai-panel.open {
  transform: translateX(0);
}

.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
}

.ai-panel-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.ai-message {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  line-height: 1.6;
  font-weight: 300;
  max-width: 90%;
}

.ai-message.user {
  background: var(--accent);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.ai-message.assistant {
  background: var(--bg-card);
  color: var(--text-primary);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.ai-panel-input {
  padding: var(--space-4);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--space-2);
}

.ai-panel-input .input {
  flex: 1;
}

/* ── AI FAB (Floating Action Button) ── */
.ai-fab {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition);
  z-index: 150;
}

.ai-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(255, 63, 32, 0.4);
}

/* ── CALENDAR ── */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.calendar-header-cell {
  background: var(--bg-card);
  padding: var(--space-3);
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.calendar-cell {
  background: var(--bg-card);
  min-height: 100px;
  padding: var(--space-2);
  cursor: pointer;
  transition: background var(--transition);
}

.calendar-cell:hover {
  background: var(--bg-hover);
}

.calendar-cell.other-month {
  opacity: 0.3;
}

.calendar-cell.today {
  background: var(--accent-light);
}

.calendar-date {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.calendar-entry {
  padding: 3px 8px;
  font-size: 0.6875rem;
  border-radius: 4px;
  margin-bottom: 2px;
  font-family: var(--font-heading);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: grab;
}

.calendar-entry.instagram { background: rgba(228, 64, 95, 0.15); color: var(--instagram); }
.calendar-entry.facebook { background: rgba(24, 119, 242, 0.15); color: var(--facebook); }
.calendar-entry.email { background: rgba(48, 209, 88, 0.15); color: var(--email-color); }

.calendar-entry.draft { opacity: 0.6; }
.calendar-entry.approved { border-left: 2px solid var(--success); }
.calendar-entry.published { opacity: 1; }

/* ── TWO PANEL LAYOUT (Inbox) ── */
.two-panel {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 0;
  height: calc(100vh - var(--header-height) - var(--space-6) * 2);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.panel-list {
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.panel-detail {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.conversation-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}

.conversation-item:hover {
  background: var(--bg-hover);
}

.conversation-item.active {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
}

.conversation-item.unread .conversation-name {
  font-weight: 600;
  color: var(--text-primary);
}

.conversation-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-hover);
  flex-shrink: 0;
}

.conversation-name {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.conversation-preview {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ── HEATMAP ── */
.heatmap {
  display: grid;
  gap: 2px;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  transition: opacity var(--transition);
}

/* ── RESPONSIVE ADJUSTMENTS ── */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0 !important;
  }
  .header {
    left: 0 !important;
  }
  .two-panel {
    grid-template-columns: 1fr;
  }
  .ai-panel {
    width: 100%;
  }
}
