/* ==========================================================================
   Social Content Planner & Workspace คุณหมออู๋
   Master Content Operating System / CMS (v12)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #090d16;
  --bg-dark-secondary: #0f172a;
  --card-bg: rgba(15, 23, 42, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(139, 92, 246, 0.45);
  
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --primary-light: rgba(139, 92, 246, 0.15);
  
  --secondary: #06b6d4;
  --secondary-light: rgba(6, 182, 212, 0.15);
  
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.15);
  
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.15);
  
  --danger: #f43f5e;
  --danger-light: rgba(244, 63, 94, 0.15);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --sidebar-width: 240px;
  --header-height: 64px;
  --radius-lg: 12px;
  --radius-md: 10px;
  --radius-sm: 6px;

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-lg: 0 16px 24px -6px rgba(0, 0, 0, 0.5);

  --excel-purple-header: #3b1d4a;
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-dark: #f1f5f9;
  --bg-dark-secondary: #ffffff;
  --card-bg: #ffffff;
  --card-border: #cbd5e1;
  --card-hover-border: #8b5cf6;
  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;
  --primary-light: rgba(139, 92, 246, 0.1);
  --secondary-light: rgba(6, 182, 212, 0.1);
}

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

*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

body {
  font-family: 'Plus Jakarta Sans', 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  background-image: 
    radial-gradient(at 10% 10%, rgba(139, 92, 246, 0.08) 0px, transparent 50%),
    radial-gradient(at 90% 90%, rgba(6, 182, 212, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.glass-panel {
  background: var(--card-bg);
  /* backdrop-filter: blur(16px); */
  /* -webkit-backdrop-filter: blur(16px); */
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}
.glass-panel:hover {
  border-color: var(--card-hover-border);
}

#app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: var(--sidebar-width);
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 1.25rem 0.85rem;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.4rem 1.25rem 0.4rem;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 1.25rem;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}
.brand-subtitle {
  font-size: 0.7rem;
  color: var(--secondary);
  font-weight: 600;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  position: relative;
}

.nav-item button {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.nav-item button:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.nav-item button.active {
  background: linear-gradient(90deg, var(--primary-light), transparent);
  color: var(--primary);
  border-left: 3px solid var(--primary);
  font-weight: 700;
}

.nav-item .icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

/* Drag handle — only visible for Owner when hovering */
.nav-drag-handle {
  display: none;
  padding: 0.4rem 0.4rem;
  color: var(--text-dim);
  font-size: 1rem;
  cursor: grab;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  user-select: none;
  flex-shrink: 0;
}
.nav-item:hover .nav-drag-handle {
  opacity: 0.5;
}
.nav-drag-handle:active { cursor: grabbing; }

/* Show drag handles only when owner mode is active */
body.nav-reorder-enabled .nav-drag-handle {
  display: flex;
}

/* Visual feedback while dragging */
.nav-item.dragging-nav {
  opacity: 0.4;
}
.nav-item.drag-over-nav {
  border-top: 2px solid var(--primary);
}

.sidebar-doctor {
  margin-top: auto;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.doctor-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
}

.doctor-info {
  font-size: 0.8rem;
}
.doctor-name {
  font-weight: 600;
  color: var(--text-main);
}
.doctor-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.top-header {
  height: var(--header-height);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--card-border);
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  padding: 0.45rem 0.85rem;
  border-radius: 20px;
  width: 340px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.header-search:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.header-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.825rem;
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.825rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(139, 92, 246, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--card-border);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.12);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.25);
}
.btn-danger:hover {
  background: #f43f5e;
  color: #fff;
}

.theme-toggle {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
}

/* HORIZONTAL CONTENT PRODUCTION WORKFLOW & FUNNEL */
.content-funnel-grid {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.4rem 0;
}
.funnel-step-card {
  flex: 1;
  min-width: 110px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.6rem;
  text-align: center;
  position: relative;
  transition: all var(--transition-fast);
}
.funnel-step-card:hover {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.08);
}
.funnel-arrow {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0 0.15rem;
}

/* AI COMMAND BAR (CMS OPERATING SYSTEM) */
.ai-command-bar {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.12));
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
.ai-action-chip-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.ai-action-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.ai-action-chip:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* SPLIT VIEW SIDE DRAWER PANEL */
.split-view-drawer {
  position: fixed;
  top: 0;
  right: -460px;
  width: 440px;
  height: 100vh;
  background: var(--bg-dark-secondary);
  border-left: 1px solid var(--card-border);
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  z-index: 180;
  transition: right var(--transition-normal);
  display: flex;
  flex-direction: column;
}
.split-view-drawer.active {
  right: 0;
}
.split-view-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.split-view-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* AI QUALITY SCORE BADGE (0-100) */
.ai-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  font-size: 0.725rem;
  font-weight: 800;
}
.ai-score-badge.high { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.ai-score-badge.mid { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.ai-score-badge.low { background: rgba(244, 63, 94, 0.2); color: var(--danger); }

/* Main Container Area */
.content-container {
  padding: 1.5rem;
  flex: 1;
}

.view-section {
  display: none;
  animation: fadeIn 0.3s ease-in-out forwards;
}
.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-header {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.view-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.view-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.view-switcher-group {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  padding: 0.25rem;
  border-radius: var(--radius-md);
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.view-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.bulk-toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.95), rgba(6, 182, 212, 0.95));
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  animation: slideDown 0.25s ease-out forwards;
}
.bulk-toolbar.active {
  display: flex;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.contents-grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.grid-card {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-radius: var(--radius-md);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  transition: all var(--transition-fast);
}
.grid-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.contents-list-view {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
.list-row:hover {
  border-color: var(--primary);
  background: rgba(255,255,255,0.03);
}

.vbar-chart-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 180px;
  padding: 0.85rem 0.4rem 0.4rem 0.4rem;
  border-bottom: 1px solid var(--card-border);
}

.vbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  height: 100%;
  justify-content: flex-end;
}

.vbar-val {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
}

.vbar-bar-track {
  width: 24px;
  height: 120px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px 4px 0 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.vbar-bar-fill {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease-out;
}

.vbar-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65px;
}

.dashboard-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.chart-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.chart-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chart-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.donut-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0.85rem;
}
.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.stat-icon.purple { background: var(--primary-light); color: var(--primary); }
.stat-icon.cyan { background: var(--secondary-light); color: var(--secondary); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }

.stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}
.stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.filter-group label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.filter-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
}
.filter-select option {
  background: var(--bg-dark-secondary);
  color: var(--text-main);
}

/* Table Styles with Zebra Striping for Readability */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.data-table th {
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-muted);
  font-weight: 700;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.15s ease, transform 0.15s ease;
}

/* Zebra Striping: Soft alternating row background */
.data-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.01);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.035);
}

.data-table tbody tr:hover {
  background: rgba(46, 105, 48, 0.12);
}

.sortable-th {
  cursor: pointer;
  transition: color var(--transition-fast);
}
.sortable-th:hover {
  color: var(--primary);
}

  vertical-align: middle;
}
.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Deadline Warning Styles */
.deadline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 10px;
  vertical-align: middle;
  animation: pulse-deadline 1.8s ease-in-out infinite;
}
.deadline-badge.urgent {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.deadline-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
@keyframes pulse-deadline {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.deadline-alert-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid;
  cursor: pointer;
  transition: background 0.15s;
}
.deadline-alert-card.urgent {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}
.deadline-alert-card.warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}
.deadline-alert-card:hover { filter: brightness(1.15); }
.deadline-alert-card .alert-title {
  font-weight: 700;
}
.deadline-alert-card .alert-meta {
  font-size: 0.7rem;
  opacity: 0.8;
}

/* Compact Deadline Chip (horizontal) */
.dl-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.15s, filter 0.15s;
  animation: pulse-deadline 2s ease-in-out infinite;
}
.dl-chip:hover { transform: translateY(-1px); filter: brightness(1.2); animation: none; }
.dl-chip.urgent {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}
.dl-chip.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
  animation: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 16px;
  font-size: 0.725rem;
  font-weight: 600;
}
.status-pill.done { background: var(--success-light); color: var(--success); }
.status-pill.progress { background: var(--secondary-light); color: var(--secondary); }
.status-pill.pending { background: var(--warning-light); color: var(--warning); }
.status-pill.paused { background: var(--danger-light); color: var(--danger); }

.owner-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
}
.owner-badge.peter { background: rgba(6, 182, 212, 0.18); color: #38bdf8; }
.owner-badge.mei { background: rgba(244, 63, 94, 0.18); color: #fb7185; }

.cat-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}
.cat-badge.branding { background: rgba(139, 92, 246, 0.18); color: #c4b5fd; }
.cat-badge.promotion { background: rgba(244, 63, 94, 0.18); color: #fda4af; }
.cat-badge.knowledge { background: rgba(6, 182, 212, 0.18); color: #7dd3fc; }
.cat-badge.viral { background: rgba(245, 158, 11, 0.18); color: #fde047; }
.cat-badge.bf-at { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }

.channel-icons {
  display: flex;
  gap: 0.25rem;
}
.ch-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  opacity: 0.25;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.ch-icon:hover { opacity: 0.65; transform: scale(1.15); }
.ch-icon.active { opacity: 1; box-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.ch-icon.fb { background: #1877f2; color: #fff; }
.ch-icon.ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.ch-icon.tiktok { background: #000; border: 1px solid #333; color: #fff; }
.ch-icon.yt { background: #ff0000; color: #fff; }
.ch-icon.fb_ads { background: #0284c7; color: #fff; font-weight: 700; font-size: 0.65rem; }
.ch-icon.threads { background: #18181b; border: 1px solid #3f3f46; color: #fff; font-size: 0.65rem; }
.ch-icon.ig_ads { background: linear-gradient(45deg, #9333ea, #e11d48); color: #fff; font-weight: 700; font-size: 0.65rem; }
.ch-icon.line { background: #06c755; color: #fff; font-weight: 700; }

/* Inline editable controls in table */
.inline-select {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--text-main);
  font-size: 0.72rem;
  padding: 0.15rem 0.3rem;
  cursor: pointer;
  max-width: 130px;
  transition: border-color 0.15s, background 0.15s;
}
.inline-select:hover, .inline-select:focus {
  border-color: var(--primary);
  background: var(--card-bg);
  outline: none;
}
.inline-select option { background: var(--sidebar-bg); color: var(--text-main); }

.inline-date {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--text-main);
  font-size: 0.72rem;
  padding: 0.15rem 0.25rem;
  cursor: pointer;
  width: 115px;
  transition: border-color 0.15s, background 0.15s;
}
.inline-date:hover, .inline-date:focus {
  border-color: var(--primary);
  background: var(--card-bg);
  outline: none;
}
.inline-date::-webkit-calendar-picker-indicator { filter: invert(0.6); cursor: pointer; }

.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: start;
}
.kanban-col {
  padding: 1rem;
  min-height: 480px;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.kanban-col.drag-over {
  background: rgba(139, 92, 246, 0.12);
  border-color: var(--primary);
  box-shadow: inset 0 0 12px rgba(139, 92, 246, 0.2);
}

.kanban-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--card-border);
}
.kanban-title {
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.kanban-count {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
}

.btn-kanban-add {
  background: var(--primary);
  color: #fff;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 6px rgba(46, 105, 48, 0.3);
}

.btn-kanban-add:hover {
  background: #235425;
  transform: scale(1.12);
  box-shadow: 0 4px 10px rgba(46, 105, 48, 0.5);
}

.btn-kanban-add:active {
  transform: scale(0.95);
}

.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.kanban-card {
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  cursor: grab;
  transition: all var(--transition-fast);
}
.kanban-card:active {
  cursor: grabbing;
}
.kanban-card.dragging {
  opacity: 0.4;
  transform: scale(0.95);
  border: 2px dashed var(--primary);
}
.kanban-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* MONTHLY CALENDAR WITH SMALL GREEN ONLINE CORNER DOT */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
}
.cal-day-header {
  text-align: center;
  padding: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
}

.cal-day-cell {
  min-height: 130px;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  position: relative;
  transition: all var(--transition-fast);
}
.cal-day-cell:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--primary);
}

.cal-day-cell.other-month {
  opacity: 0.35;
  background: rgba(0, 0, 0, 0.15);
}

/* Calendar Drag & Drop Styles */
.cal-day-cell.drag-over-cal {
  background: rgba(99,102,241,0.05);
  border: 2px dashed var(--primary);
}
.cal-event-item.dragging-cal {
  opacity: 0.5;
  border: 1px dashed var(--primary);
}

/* CORNER GREEN ONLINE DOT BADGE */
.cal-online-indicator {
  position: absolute;
  top: 4px;
  left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--success);
  background: rgba(16, 185, 129, 0.18);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  z-index: 2;
  pointer-events: none;
}
.cal-online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  display: inline-block;
}

.cal-day-cell .btn-add-on-date {
  position: absolute;
  top: 5px;
  left: 5px;
  opacity: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}
.cal-day-cell:hover .btn-add-on-date {
  opacity: 1;
}

.cal-date-num {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-main);
  text-align: right;
  margin-bottom: 0.15rem;
  margin-right: 1.8rem;
}

.cal-event-item {
  font-size: 0.7rem;
  padding: 0.25rem 0.45rem;
  border-radius: 5px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  cursor: pointer;
  transition: transform var(--transition-fast);
}
.cal-event-item:hover {
  transform: scale(1.02);
  background: var(--primary);
}

.cal-cell-footer {
  margin-top: auto;
  padding-top: 0.25rem;
  font-size: 0.65rem;
  color: var(--text-dim);
  border-top: 1px dashed rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
}

/* HASHTAG MANAGER HORIZONTAL SCROLL CONTAINER */
.hashtag-scroll-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.75rem;
  scroll-behavior: smooth;
}
.hashtag-manager-grid {
  display: flex;
  gap: 1rem;
  align-items: start;
  min-width: 1420px;
}
.hashtag-col {
  width: 220px;
  flex-shrink: 0;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.hashtag-col-header {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  text-align: center;
  background: var(--excel-purple-header);
}

.hashtag-copy-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  color: var(--secondary);
  word-break: break-all;
  max-height: 70px;
  overflow-y: auto;
}

.hashtag-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}
.hashtag-table td {
  padding: 0.3rem 0.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal-box {
  width: 90%;
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.75rem;
  transform: translateY(15px);
  transition: transform var(--transition-normal);
}
.modal-overlay.active .modal-box {
  transform: translateY(0);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--card-border);
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.toast {
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--primary);
  color: #fff;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.825rem;
  animation: slideUp 0.25s ease-out forwards;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-group label {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-muted);
}
.form-input, .form-select, .form-textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.825rem;
  outline: none;
  transition: border-color var(--transition-fast);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.channel-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
.channel-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.775rem;
  cursor: pointer;
}

/* Print CSS */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 10pt;
  }
  body * {
    visibility: hidden !important;
  }
  #report-preview-container, #report-preview-container * {
    visibility: visible !important;
  }
  #report-preview-container {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }
  .modal-overlay, .modal-box {
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
    position: static !important;
    display: block !important;
    visibility: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}

/* =============================================
   REAL-TIME SYNC INDICATOR
   ============================================= */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  50% { opacity: 0.85; transform: scale(1.2); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
}

#realtime-status-dot {
  animation: pulse 2s infinite;
}

/* ============================================================
   ENTERPRISE NOTIFICATION CENTER & TOAST SYSTEM
   ============================================================ */

/* Bell Button & Counter Badge */
#btn-notif-bell {
  position: relative;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  transition: all 0.2s ease;
  color: #f8fafc;
}
#btn-notif-bell:hover {
  background: #334155;
  border-color: var(--primary);
  transform: translateY(-1px);
}

#notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 4px;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
  animation: badgePulse 2s infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Notification Panel Popup (Solid Dark, High Contrast, Streamlined 380px Panel) */
#notif-popup {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 380px;
  max-height: 580px;
  background: #0f172a; /* Solid dark background for maximum contrast */
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: notifSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes notifSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Notification Panel Header */
.notif-header {
  padding: 0.85rem 1rem;
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notif-header-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.notif-count-pill {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary);
  padding: 0.1rem 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}
.notif-header-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.notif-tool-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.notif-tool-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* Notification Search Bar */
.notif-search-container {
  padding: 0.55rem 0.85rem;
  background: #111827;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.notif-search-input {
  width: 100%;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 0.75rem;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  outline: none;
}
.notif-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Streamlined 4-Tab Segmented Control Bar */
.notif-filter-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 6px 10px;
  background: #0b1120;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.notif-filter-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.notif-filter-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}
.notif-filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

/* Notification List Body & Sections */
.notif-list-body {
  overflow-y: auto;
  max-height: 420px;
  padding: 0.5rem;
  background: #0f172a;
}
.notif-date-group-header {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  padding: 0.4rem 0.5rem 0.2rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Streamlined Notification Card Styles */
.notif-card {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.45rem;
  transition: all 0.15s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
}
.notif-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: #253349;
  transform: translateY(-1px);
}
.notif-card.is-unread {
  background: #1e293b;
  border-color: rgba(99, 102, 241, 0.45);
}

/* Level Color Accents */
.notif-card.level-success { border-left: 4px solid #10b981; }
.notif-card.level-info { border-left: 4px solid #3b82f6; }
.notif-card.level-warning { border-left: 4px solid #f59e0b; }
.notif-card.level-error { border-left: 4px solid #ef4444; }
.notif-card.level-ai { border-left: 4px solid #8b5cf6; }
.notif-card.level-system { border-left: 4px solid #6b7280; }

.notif-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.notif-card-icon-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #f8fafc;
}
.notif-card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.notif-badge-priority {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
}
.priority-critical { background: #ef4444; color: #ffffff; }
.priority-high { background: #f59e0b; color: #000000; }
.priority-medium { background: #3b82f6; color: #ffffff; }
.priority-low { background: #475569; color: #cbd5e1; }

.notif-card-time {
  font-size: 0.65rem;
  color: #94a3b8;
}
.notif-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.notif-card-detail {
  font-size: 0.75rem;
  color: #cbd5e1;
  line-height: 1.4;
  word-break: break-word;
}
.notif-card-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.3rem;
  flex-wrap: wrap;
}
.btn-notif-action {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 0.25rem 0.65rem !important;
  border-radius: 6px !important;
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #f8fafc !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.3rem !important;
}
.btn-notif-action:hover {
  background: #334155 !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
}
.btn-notif-action.btn-action-primary {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4) !important;
}
.btn-notif-action.btn-action-primary:hover {
  background: #4f46e5 !important;
}

/* Empty State */
.notif-empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: #94a3b8;
}
.notif-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}
.notif-empty-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0.25rem;
}
.notif-empty-desc {
  font-size: 0.75rem;
  color: #64748b;
}

/* Toast Container & Cards (Solid dark, High Contrast) */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 380px;
  pointer-events: none;
}
.toast-card {
  pointer-events: auto;
  background: #1e293b; /* Solid dark background */
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.8rem;
  animation: toastSlideIn 0.25s ease-out forwards;
}
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.toast-card.level-success { border-left: 4px solid #10b981; }
.toast-card.level-info { border-left: 4px solid #3b82f6; }
.toast-card.level-warning { border-left: 4px solid #f59e0b; }
.toast-card.level-error { border-left: 4px solid #ef4444; }
.toast-card.level-ai { border-left: 4px solid #8b5cf6; }
.toast-card.level-system { border-left: 4px solid #6b7280; }

/* Responsive & Mobile Enhancements */
@media (max-width: 768px) {
  .toast-container {
    left: 1rem;
    right: 1rem;
    max-width: calc(100vw - 2rem);
    bottom: 1rem;
  }
  .modal-container, #content-modal > div {
    max-width: 95vw !important;
    width: 95vw !important;
    padding: 1rem !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
  }
  #notif-popup {
    width: calc(100vw - 2rem) !important;
    right: -10px !important;
    max-width: 360px !important;
  }
  .table-responsive, .table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}


