
/* ==========================================================================
   ComsfyMail ESP Enterprise Universal Theme
   ========================================================================== */

/* 1. Global Page Reset & Typography */
html, body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased !important;
}

#app {
  background-color: #f8fafc !important;
  min-height: 100vh;
}

.main {
  background-color: #f8fafc !important;
  padding: 1.75rem 2rem !important;
  min-height: calc(100vh - 3.5rem);
}

/* 2. Top Navigation Bar */
.navbar, nav.navbar.is-fixed-top {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  min-height: 3.5rem !important;
}

.brand-app-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  text-decoration: none !important;
}

.brand-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.35);
}

.brand-name-primary {
  color: #0f172a !important;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-name-accent {
  color: #0ea5e9 !important;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-tag {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  margin-left: 0.25rem;
  border: 1px solid #bae6fd;
}

/* 3. Universal Sleek Dark Slate Sidebar */
html body #app .wrapper .sidebar,
html body #app .wrapper section.sidebar,
html body #app .wrapper .sidebar .b-sidebar,
html body #app .wrapper section.sidebar .b-sidebar,
html body #app .wrapper .sidebar .b-sidebar .sidebar-content,
html body #app .wrapper section.sidebar .b-sidebar .sidebar-content,
html body .sidebar,
html body .sidebar .b-sidebar,
html body .sidebar .b-sidebar .sidebar-content,
div.b-sidebar .sidebar-content {
  background-color: #0f172a !important;
  background: #0f172a !important;
  border-right: 1px solid #1e293b !important;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.22) !important;
  width: 230px !important;
}

aside.menu {
  padding: 1.25rem 0.75rem !important;
}

aside.menu .menu-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.35rem !important;
}

html body #app .sidebar .b-sidebar .menu-list a,
html body aside.menu .menu-list a {
  border-radius: 8px !important;
  color: #94a3b8 !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  padding: 0.65rem 0.85rem !important;
  margin: 0.15rem 0.25rem !important;
  transition: all 0.15s ease-in-out !important;
  display: flex !important;
  align-items: center !important;
  background: transparent !important;
  border: none !important;
}

html body #app .sidebar .b-sidebar .menu-list a:hover,
html body aside.menu .menu-list a:hover {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

html body #app .sidebar .b-sidebar .menu-list a.is-active,
html body #app .sidebar .b-sidebar .menu-list a.router-link-active,
html body #app .sidebar .b-sidebar .menu-list a.router-link-exact-active,
html body aside.menu .menu-list a.is-active,
html body aside.menu .menu-list a.router-link-active,
html body aside.menu .menu-list a.router-link-exact-active {
  background-color: #1e293b !important;
  color: #38bdf8 !important;
  font-weight: 600 !important;
  box-shadow: inset 3px 0 0 0 #38bdf8 !important;
}

html body #app .sidebar .b-sidebar .menu-list a .icon,
html body aside.menu .menu-list a .icon {
  margin-right: 0.65rem !important;
  color: #64748b !important;
}

html body #app .sidebar .b-sidebar .menu-list a.is-active .icon,
html body #app .sidebar .b-sidebar .menu-list a.router-link-active .icon,
html body aside.menu .menu-list a.is-active .icon {
  color: #38bdf8 !important;
}

html body #app .sidebar .b-sidebar .menu-list li ul,
aside.menu .menu-list li ul {
  border-left: 1px solid #1e293b !important;
  margin: 0.25rem 0 0.5rem 1rem !important;
  padding-left: 0.5rem !important;
}

html body #app .sidebar .b-sidebar .menu-list li ul li a,
aside.menu .menu-list li ul li a {
  font-size: 0.8rem !important;
  padding: 0.45rem 0.75rem !important;
  color: #64748b !important;
}

html body #app .sidebar .b-sidebar .menu-list li ul li a:hover,
aside.menu .menu-list li ul li a:hover {
  color: #f8fafc !important;
  background-color: #1e293b !important;
}

/* On Main Hub: Filter sidebar strictly to Dashboard, Users, Settings */
body.on-global-hub aside.menu ul.menu-list > li {
  display: none !important;
}
body.on-global-hub aside.menu ul.menu-list > li.keep-nav {
  display: block !important;
}

/* 4. Global Hub Cards & Styling */
.global-stats-strip {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 1.25rem !important;
  margin-bottom: 2rem !important;
}

.global-stat-box {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 1.25rem 1.5rem !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.global-stat-box:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06) !important;
}

.brand-card {
  border-radius: 14px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  background: #ffffff !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  overflow: hidden !important;
}

.brand-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.12) !important;
}

.brand-card.brand-live-long-daily { border-top: 4px solid #10b981 !important; }
.brand-card.brand-365-live-long { border-top: 4px solid #f59e0b !important; }
.brand-card.brand-political-lines { border-top: 4px solid #0ea5e9 !important; }
.brand-card.brand-american-briefs { border-top: 4px solid #f43f5e !important; }

/* 5. Brand Workspace Cockpit Cards (The Metric Cards) */
.box,
section.dashboard .tile.notification,
.brand-workspace-dashboard .tile.is-child.notification,
.dashboard .counts .tile.is-child.notification,
article.tile.is-child.notification {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03) !important;
  padding: 1.5rem !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  color: #0f172a !important;
  position: relative !important;
  overflow: hidden !important;
}

.box:hover,
section.dashboard .tile.notification:hover,
.brand-workspace-dashboard .tile.is-child.notification:hover,
.dashboard .counts .tile.is-child.notification:hover,
article.tile.is-child.notification:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.09) !important;
  border-color: #cbd5e1 !important;
}

/* Distinctive Top Colored Accents for Cockpit Metric Cards */
article.tile.is-child.notification[data-cy="lists"] {
  border-top: 4px solid #6366f1 !important;
}
article.tile.is-child.notification[data-cy="campaigns"] {
  border-top: 4px solid #0ea5e9 !important;
}
article.tile.is-child.notification[data-cy="subscribers"] {
  border-top: 4px solid #10b981 !important;
}

/* Stat Typography */
.tile.is-child.notification .title,
section.dashboard .tile.notification .title {
  color: #0f172a !important;
  font-size: 2rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.tile.is-child.notification .is-size-6.has-text-grey {
  color: #64748b !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  margin-top: 0.25rem !important;
}

/* Status breakdown pills in metric cards */
.tile.is-child.notification ul.no {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.35rem !important;
  margin-top: 0.25rem !important;
}
.tile.is-child.notification ul.no li {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: #f8fafc !important;
  padding: 0.35rem 0.65rem !important;
  border-radius: 6px !important;
  border: 1px solid #f1f5f9 !important;
  font-size: 0.8rem !important;
  color: #475569 !important;
  font-weight: 500 !important;
}
.tile.is-child.notification ul.no li label {
  font-weight: 700 !important;
  color: #0f172a !important;
}

/* 6. Cockpit Charts Card */
.tile.is-child.notification.charts {
  border-top: 4px solid #3b82f6 !important;
  background: #ffffff !important;
  padding: 1.75rem !important;
}
.tile.is-child.notification.charts .title {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
}

/* 7. Brand Hero Bar in Cockpit */
.brand-hero-bar {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-left: 5px solid #0ea5e9 !important;
  border-radius: 14px !important;
  padding: 1.25rem 1.75rem !important;
  margin-bottom: 1.75rem !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}
.brand-hero-bar .title {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em !important;
}
.hero-avatar {
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  width: 44px !important;
  height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.hero-mta-tag {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  padding: 0.2rem 0.6rem !important;
  border-radius: 6px !important;
}

/* 8. Universal Enterprise Data Tables (Campaigns, Lists, Subscribers, Users, etc.) */
.b-table {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
.b-table .table {
  background-color: transparent !important;
  margin-bottom: 0 !important;
  width: 100% !important;
}
.b-table .table thead th {
  background-color: #f8fafc !important;
  color: #475569 !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  border-bottom: 2px solid #e2e8f0 !important;
  border-top: none !important;
  padding: 0.85rem 1rem !important;
}
.b-table .table tbody tr:hover td {
  background-color: #f1f5f9 !important;
}
.b-table .table td {
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 0.85rem 1rem !important;
  vertical-align: middle !important;
  color: #1e293b !important;
  font-size: 0.875rem !important;
}

/* Status Badges */
.tag:not(body) {
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 0.75rem !important;
  padding: 0.25rem 0.6rem !important;
  height: auto !important;
}
.tag.is-success { background-color: #dcfce7 !important; color: #15803d !important; border: 1px solid #bbf7d0 !important; }
.tag.is-info { background-color: #e0f2fe !important; color: #0369a1 !important; border: 1px solid #bae6fd !important; }
.tag.is-warning { background-color: #fef3c7 !important; color: #b45309 !important; border: 1px solid #fde68a !important; }
.tag.is-danger { background-color: #ffe4e6 !important; color: #be123c !important; border: 1px solid #fecdd3 !important; }

/* 9. Buttons & Form Controls */
.button {
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  transition: all 0.15s ease !important;
  border-color: #cbd5e1 !important;
}
.button:hover {
  border-color: #94a3b8 !important;
}
.button.is-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(14, 165, 233, 0.3) !important;
}
.button.is-primary:hover {
  box-shadow: 0 3px 8px rgba(14, 165, 233, 0.45) !important;
  transform: translateY(-1px) !important;
}

.input, .textarea, .select select {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}
.input:focus, .textarea:focus, .select select:focus {
  border-color: #0ea5e9 !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15) !important;
  outline: none !important;
}



/* ==========================================================================
   ComsfyMail ESP - Complete All-Screens Enterprise Hybrid Theme
   ========================================================================== */

/* --- 1. Global Reset, Background & Typography --- */
html, body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased !important;
  text-rendering: optimizeLegibility !important;
}

#app {
  background-color: #f8fafc !important;
  min-height: 100vh;
}

.main {
  background-color: #f8fafc !important;
  padding: 1.5rem 2rem !important;
  min-height: calc(100vh - 3.5rem);
}

/* --- 2. Top Navigation Bar (Executive Hybrid Dark Slate) --- */
.navbar, nav.navbar.is-fixed-top {
  background: #0c1322 !important;
  border-bottom: 1px solid #1e293b !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
  min-height: 3.5rem !important;
}

.navbar-brand, .navbar-menu {
  background: transparent !important;
}

.brand-app-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  text-decoration: none !important;
}

.brand-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.4);
}

.brand-name-primary {
  color: #f8fafc !important;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-name-accent {
  color: #38bdf8 !important;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-tag {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  margin-left: 0.25rem;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.navbar-item, .navbar-link {
  color: #94a3b8 !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
}

.navbar-item:hover, .navbar-link:hover {
  color: #ffffff !important;
  background-color: transparent !important;
}

/* --- 3. Sleek Dark Sidebar --- */
html body #app .wrapper .sidebar,
html body #app .wrapper section.sidebar,
html body #app .wrapper .sidebar .b-sidebar,
html body #app .wrapper section.sidebar .b-sidebar,
html body #app .wrapper .sidebar .b-sidebar .sidebar-content,
html body #app .wrapper section.sidebar .b-sidebar .sidebar-content,
html body .sidebar,
html body .sidebar .b-sidebar,
html body .sidebar .b-sidebar .sidebar-content,
div.b-sidebar .sidebar-content {
  background-color: #0c1322 !important;
  background: #0c1322 !important;
  border-right: 1px solid #1e293b !important;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.3) !important;
  width: 230px !important;
}

aside.menu {
  padding: 1.25rem 0.75rem !important;
}

aside.menu .menu-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.35rem !important;
}

html body #app .sidebar .b-sidebar .menu-list a,
html body aside.menu .menu-list a {
  border-radius: 8px !important;
  color: #94a3b8 !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  padding: 0.65rem 0.85rem !important;
  margin: 0.15rem 0.25rem !important;
  transition: all 0.15s ease-in-out !important;
  display: flex !important;
  align-items: center !important;
  background: transparent !important;
  border: none !important;
}

html body #app .sidebar .b-sidebar .menu-list a:hover,
html body aside.menu .menu-list a:hover {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

html body #app .sidebar .b-sidebar .menu-list a.is-active,
html body #app .sidebar .b-sidebar .menu-list a.router-link-active,
html body aside.menu .menu-list a.is-active,
html body aside.menu .menu-list a.router-link-active {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.15) 0%, rgba(37, 99, 235, 0.1) 100%) !important;
  color: #38bdf8 !important;
  font-weight: 600 !important;
  box-shadow: inset 3px 0 0 0 #38bdf8 !important;
}

/* --- 4. Modern Enterprise Tables (Universal Across All Screens) --- */
.table, table.table {
  background-color: #ffffff !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100% !important;
  margin-top: 1rem !important;
}

.table thead th {
  background-color: #f8fafc !important;
  color: #475569 !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  border-bottom: 2px solid #e2e8f0 !important;
  padding: 0.9rem 1.15rem !important;
}

.table tbody tr {
  transition: background-color 0.15s ease-in-out !important;
}

.table tbody tr:hover {
  background-color: #f8fafc !important;
}

.table tbody td {
  padding: 1rem 1.15rem !important;
  border-bottom: 1px solid #f1f5f9 !important;
  vertical-align: middle !important;
  color: #1e293b !important;
  font-size: 0.875rem !important;
}

/* --- 5. Dashboard Cards & Analytics Screens --- */
.box, .card {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  padding: 1.5rem !important;
}

.dashboard-stats, .overview-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Metric KPI Card Styling */
.metric-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.metric-kpi-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.metric-kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.metric-kpi-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: #059669;
}

/* --- 6. Campaigns Screen Enhancements --- */
.campaign-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-completed {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.status-running {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  animation: pulse-border 2s infinite ease-in-out;
}

.status-scheduled {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.status-draft {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.campaign-rates-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rate-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.rate-badge-open {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.rate-badge-click {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

/* --- 7. Lists & Subscribers Screens --- */
.optin-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.optin-single {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.optin-double {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.subscriber-email {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: #0f172a !important;
}

.sub-status-enabled {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid #a7f3d0;
}

.sub-status-blocklisted {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #dc2626;
  background: #fef2f2;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid #fecaca;
}

/* --- 8. Segments Screen Enhancements (Retained & Polished) --- */
.segment-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.segment-name-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
}

.health-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
  width: fit-content;
}

.health-pill-safe {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.health-pill-warn {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.health-pill-info {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.health-pill-purple {
  background: #faf5ff;
  color: #7c3aed;
  border: 1px solid #e9d5ff;
}

.source-container {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-width: 380px;
}

.source-master-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  width: fit-content;
}

.source-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #e2e8f0;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  width: fit-content;
}

.source-toggle-btn:hover {
  background: #cbd5e1;
  color: #0f172a;
}

.source-sublists-collapse {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  max-height: 180px;
  overflow-y: auto;
  padding: 0.5rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-top: 0.25rem;
}

.source-sub-chip {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.rule-chip-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.rule-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.rule-chip-open {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.rule-chip-click {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.rule-chip-domain {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.rule-operator {
  font-size: 0.7rem;
  font-weight: 800;
  color: #94a3b8;
  padding: 0 0.15rem;
}

.subscriber-count-badge {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
}

.subscriber-count-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.subscriber-count-trend {
  font-size: 0.7rem;
  font-weight: 700;
  color: #059669;
}

/* --- 9. Universal Form Controls & Buttons --- */
.input, .textarea, .select select {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  padding: 0.6rem 0.85rem !important;
  transition: all 0.15s ease-in-out !important;
}

.input:focus, .textarea:focus, .select select:focus {
  border-color: #0ea5e9 !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2) !important;
  outline: none !important;
}

.button {
  border-radius: 8px !important;
  font-weight: 600 !important;
  transition: all 0.15s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
}

.button.is-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.3) !important;
}

.button.is-primary:hover {
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.45) !important;
  transform: translateY(-1px) !important;
}

.button.is-danger {
  background: #ef4444 !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

.pagination-previous, .pagination-next, .pagination-link {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  color: #475569 !important;
  font-weight: 600 !important;
}

.pagination-link.is-current {
  background: #0ea5e9 !important;
  border-color: #0ea5e9 !important;
  color: #ffffff !important;
}

/* Modals */
.modal-card {
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1) !important;
}

.modal-card-head {
  background: #0c1322 !important;
  border-bottom: 1px solid #1e293b !important;
}

.modal-card-title {
  color: #f8fafc !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
}

.modal-card-body {
  background: #ffffff !important;
  color: #0f172a !important;
  padding: 1.5rem !important;
}

.modal-card-foot {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
}
