/* ================================================================
   GalSol — dashboard-patch.css
   Drop this <link> AFTER dashboard.css to fix text contrast
   and apply combined-tool improvements everywhere.
================================================================ */

/* ── Global text contrast fixes ────────────────────────────────── */
:root {
  --text: #f0f6ff !important;
  /* was #e8f0fd — slightly brighter */
  --text-2: #a8bdd4 !important;
  /* was #7a90b0 — much more readable */
  --text-3: #5a7490 !important;
  /* was #3d5270 — bumped up */
}

/* Ensure body text is never invisible */
body {
  color: var(--text);
}

/* ── Card titles — always high contrast ────────────────────────── */
.card-title {
  color: var(--text) !important;
}

.page-title {
  color: var(--text) !important;
}

.page-subtitle {
  color: var(--text-2) !important;
}

/* ── Form labels ─────────────────────────────────────────────────  */
.form-label {
  color: var(--text-2) !important;
}

/* ── Nav items ──────────────────────────────────────────────────── */
.nav-item {
  color: var(--text-2) !important;
}

.nav-item.active {
  color: var(--cyan) !important;
}

/* ── Sidebar user name ──────────────────────────────────────────── */
.user-info .user-name {
  color: var(--text) !important;
}

.user-info .user-plan {
  color: var(--text-3) !important;
}

/* ── Stat cards ─────────────────────────────────────────────────── */
.stat-num {
  color: var(--text) !important;
}

.stat-label {
  color: var(--text-2) !important;
}

/* ── Table cells ────────────────────────────────────────────────── */
table tbody td {
  color: var(--text-2) !important;
}

table tbody td:first-child {
  color: var(--text) !important;
}

table thead th {
  color: var(--text-3) !important;
}

/* ── Badges — readable on dark surfaces ────────────────────────── */
.badge-cyan {
  color: #67e8f9 !important;
}

.badge-green {
  color: #6ee7b7 !important;
}

.badge-gold {
  color: #fcd34d !important;
}

.badge-red {
  color: #fca5a5 !important;
}

.badge-purple {
  color: #c4b5fd !important;
}

.badge-gray {
  color: var(--text-2) !important;
}

/* ── Notice / alert text ────────────────────────────────────────── */
.notice-cyan {
  color: #a5f3fc !important;
}

.notice-gold {
  color: #fde68a !important;
}

.notice-green {
  color: #bbf7d0 !important;
}

.notice-red {
  color: #fecaca !important;
}

/* ── Summary items ──────────────────────────────────────────────── */
.summary-key {
  color: var(--text-2) !important;
}

.summary-val {
  color: var(--text) !important;
}

/* ── Log window ─────────────────────────────────────────────────── */
.log-ok {
  color: #34d399 !important;
}

.log-err {
  color: #fb7185 !important;
}

.log-info {
  color: #67e8f9 !important;
}

.log-warn {
  color: #fcd34d !important;
}

/* ── Toggle info ────────────────────────────────────────────────── */
.toggle-info strong {
  color: var(--text) !important;
}

.toggle-info span {
  color: var(--text-2) !important;
}

/* ── Progress track ─────────────────────────────────────────────── */
.progress-track {
  background: rgba(255, 255, 255, 0.06) !important;
}

/* ── Button ghost ───────────────────────────────────────────────── */
.btn-ghost {
  color: var(--text-2) !important;
}

.btn-ghost:hover {
  color: var(--text) !important;
}

.btn-secondary {
  color: var(--text-2) !important;
}

.btn-secondary:hover {
  color: var(--text) !important;
}

.btn-outline {
  color: var(--text-2) !important;
}

/* ── Form hints ──────────────────────────────────────────────────── */
.form-hint {
  color: var(--text-3) !important;
}

/* ── Data table ─────────────────────────────────────────────────── */
.data-table-wrap tbody td {
  color: var(--text-2) !important;
  font-size: 14px !important;
}

.data-table-wrap thead th {
  color: var(--text-3) !important;
}

/* ── Page breadcrumb ─────────────────────────────────────────────── */
.page-breadcrumb {
  color: var(--text-2) !important;
}

.page-breadcrumb span {
  color: var(--text) !important;
}

/* ── Stepper text ───────────────────────────────────────────────── */
.step-title {
  color: var(--text-2) !important;
  font-size: 13.5px !important;
}

.step-num-label {
  color: var(--text-3) !important;
}

.step-node.active .step-title {
  color: var(--text) !important;
}

.step-node.done .step-title {
  color: var(--text-2) !important;
}

/* ── Empty state ────────────────────────────────────────────────── */
.empty-state h3 {
  color: var(--text-2) !important;
  font-size: 16px !important;
}

.empty-state p {
  color: var(--text-3) !important;
  font-size: 14px !important;
}

/* ── Combined pipeline specifics ────────────────────────────────── */
.pipe-label {
  color: var(--text-2) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
}

.pipe-sub {
  color: var(--text-3) !important;
}

.pipe-stage.active-stage .pipe-label {
  color: var(--text) !important;
}

.review-key {
  color: var(--text-2) !important;
  font-size: 14px !important;
}

.review-val {
  color: var(--text) !important;
  font-size: 14px !important;
}

.src-opt .opt-desc {
  color: var(--text-2) !important;
}

.src-opt .opt-title {
  color: var(--text) !important;
}

.ep-tab {
  color: var(--text-3) !important;
  font-size: 13.5px !important;
}

.ep-tab.active {
  color: var(--cyan) !important;
}

.ep-tab:hover {
  color: var(--text-2) !important;
}

.fc-label {
  color: var(--text) !important;
  font-size: 13.5px !important;
}

.fc-tag {
  color: var(--text-3) !important;
}

.rmc-label {
  color: var(--text-2) !important;
  font-size: 13.5px !important;
}

/* ── Settings page ──────────────────────────────────────────────── */
.quota-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--text-2);
  margin-bottom: 6px;
}

.quota-label {
  color: var(--text-2);
}

.quota-count {
  color: var(--text);
  font-weight: 600;
}

/* ================================================================
   Light Theme — !important overrides
   These must live here because dashboard-patch.css sets text vars
   with !important; only a higher-specificity or equal block here
   can override them in light mode.
================================================================ */
[data-theme="light"] {
  --text:   #0f172a !important;
  --text-2: #334155 !important;
  --text-3: #64748b !important;
}

[data-theme="light"] .badge-cyan   { color: #0369a1 !important; }
[data-theme="light"] .badge-green  { color: #166534 !important; }
[data-theme="light"] .badge-gold   { color: #92400e !important; }
[data-theme="light"] .badge-red    { color: #991b1b !important; }
[data-theme="light"] .badge-purple { color: #5b21b6 !important; }
[data-theme="light"] .notice-cyan  { color: #0369a1 !important; }
[data-theme="light"] .notice-gold  { color: #92400e !important; }
[data-theme="light"] .notice-green { color: #166534 !important; }
[data-theme="light"] .notice-red   { color: #991b1b !important; }
[data-theme="light"] .log-ok       { color: #15803d !important; }
[data-theme="light"] .log-err      { color: #be123c !important; }
[data-theme="light"] .log-info     { color: #0369a1 !important; }
[data-theme="light"] .log-warn     { color: #b45309 !important; }
[data-theme="light"] .progress-track { background: rgba(0, 0, 0, 0.07) !important; }
[data-theme="light"] .s-bar-track    { background: rgba(0, 0, 0, 0.07) !important; }

/* ── Campaigns page ─────────────────────────────────────────────── */
#campaignList>div {
  color: var(--text-2) !important;
}

/* ── Global font size lift ──────────────────────────────────────── */
body {
  font-size: 14.5px;
}

.card-desc {
  font-size: 13.5px !important;
  color: var(--text-2) !important;
}

/* ── Input text always visible ──────────────────────────────────── */
.form-input,
.form-select,
.form-textarea {
  color: var(--text) !important;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-3) !important;
}

/* ── Header btn icon ────────────────────────────────────────────── */
.header-btn {
  color: var(--text-2) !important;
}

.header-btn:hover {
  color: var(--text) !important;
}

/* ================================================================
   GalSol — Dashboard Visual Patch  (v2.1)
   dashboard-patch.css  |  Overrides & enhancements for all pages
   ================================================================ */

/* ── Brighter Text ──────────────────────────────────────────────── */
:root {
  --text: #eef4ff;
  /* was #e8f0fd — slightly brighter */
  --text-2: #98b0cc;
  /* was #7a90b0 — noticeably brighter */
  --text-3: #5a7394;
  /* was #3d5270 — brighter */
}

/* ── Rich Background with Pattern ──────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 10% 5%, rgba(0, 212, 255, 0.13) 0%, transparent 55%),
    radial-gradient(ellipse 55% 65% at 90% 85%, rgba(124, 58, 237, 0.15) 0%, transparent 55%),
    radial-gradient(ellipse 40% 45% at 50% 50%, rgba(16, 185, 129, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 35% 40% at 80% 15%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle dot-grid pattern overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ── True Glassmorphism Cards ───────────────────────────────────── */
.card,
.stat-card,
.tool-launch-card,
.stepper,
.toggle-row,
.summary-item,
.field-map-row,
.upload-zone,
.data-table-wrap {
  background: rgba(10, 14, 25, 0.92) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 8px 32px rgba(0, 0, 0, 0.25) !important;
}

.card:hover,
.stat-card:hover,
.tool-launch-card:hover {
  border-color: rgba(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.055) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 16px 48px rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Glossy sheen on cards */
.card::before,
.stat-card::before,
.tool-launch-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
  opacity: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}

/* ── Sidebar Glass ──────────────────────────────────────────────── */
.sidebar {
  background: rgba(4, 8, 18, 0.82) !important;
  backdrop-filter: blur(32px) saturate(1.5) !important;
  -webkit-backdrop-filter: blur(32px) saturate(1.5) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ── Sidebar Collapse Button ────────────────────────────────────── */
.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.22s ease;
  position: absolute;
  right: -14px;
  top: 46px;
  z-index: 60;
  flex-shrink: 0;
  font-family: inherit;
}

.sidebar-collapse-btn:hover {
  background: rgba(0, 212, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.3);
  color: var(--cyan);
}

.sidebar-collapse-btn svg {
  width: 13px;
  height: 13px;
  transition: transform 0.22s ease;
}

/* ── Collapsed Sidebar ──────────────────────────────────────────── */
:root {
  --sidebar-collapsed-w: 70px;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-w) !important;
  /* Allow tooltips to pop out from the collapsed sidebar */
  overflow: visible !important;
}

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

.sidebar.collapsed .nav-section-label {
  opacity: 0;
  height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

.sidebar.collapsed .nav-label {
  display: none;
}

.sidebar.collapsed .user-info {
  display: none;
}

.sidebar.collapsed .sidebar-logout-btn {
  display: none;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  flex: 0 0 40px !important;
  align-self: center;
  padding: 0 !important;
  overflow: visible;
  border-radius: 12px;
  background-clip: padding-box;
  box-sizing: border-box;
  /* Create a new stacking context to prevent rendering glitches with tooltips over complex backgrounds */
  isolation: isolate;
  background: transparent !important;
  box-shadow: none !important;
  border: 1px solid transparent !important;
}

.sidebar.collapsed .nav-item:hover {
  /* Restore the small hover box without the bright glass glitch */
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text) !important;
  box-shadow: none !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.sidebar.collapsed .nav-item:focus-visible {
  background: rgba(255, 255, 255, 0.05) !important;
  box-shadow: none !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.sidebar.collapsed .nav-item.active {
  background: rgba(0, 212, 255, 0.12) !important;
  border-color: rgba(0, 212, 255, 0.3) !important;
}

.sidebar.collapsed .nav-item::after {
  content: attr(data-nav-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  min-width: max-content;
  max-width: 220px;
  padding: 7px 10px;
  border-radius: 7px;
  background: rgba(6, 12, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 200;
  backdrop-filter: none;
  /* Prevents rendering glitches with filtered backgrounds */
}

.sidebar.collapsed .nav-item:hover::after,
.sidebar.collapsed .nav-item:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.sidebar.collapsed .nav-item i,
.sidebar.collapsed .nav-item svg {
  margin: 0;
}

.sidebar.collapsed .user-row {
  justify-content: center;
  padding: 10px;
}

.sidebar.collapsed .sidebar-logo {
  justify-content: center;
  padding: 0 12px;
}


/* ── Main area adjusts with collapsed sidebar ───────────────────── */
.main-area.sidebar-collapsed {
  margin-left: var(--sidebar-collapsed-w) !important;
  transition: margin-left 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-area {
  transition: margin-left 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Mobile open override ───────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  .sidebar.collapsed {
    width: 248px !important;
  }

  .sidebar.collapsed .logo-name,
  .sidebar.collapsed .nav-label,
  .sidebar.collapsed .nav-section-label,
  .sidebar.collapsed .user-info {
    display: block !important;
  }

  .sidebar.collapsed .nav-item {
    justify-content: flex-start !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    flex: 0 1 auto !important;
    align-self: stretch !important;
    padding: 8px 12px !important;
  }

  .sidebar.collapsed .nav-item::after {
    display: none !important;
  }
}

/* ── Sidebar Footer & User Row Fix ──────────────────────────────── */
.user-row {
  text-decoration: none;
  color: inherit;
  display: flex !important;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.22s ease;
}

/* ── Red Logout Button ──────────────────────────────────────────── */
.sidebar-logout-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(244, 63, 94, 0.25);
  background: rgba(244, 63, 94, 0.08);
  color: #f43f5e;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-family: inherit;
}

.sidebar-logout-btn:hover {
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(244, 63, 94, 0.5);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.3);

}

.sidebar-logout-btn svg {
  width: 14px;
  height: 14px;
}

/* Sidebar notifications */
.sidebar-notifications {
  position: relative;
  width: 100%;
}

.sidebar-notification-btn {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  transition: var(--transition);
  position: relative;
}

.sidebar-notification-btn:hover,
.sidebar-notification-btn.active {
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.18);
  color: var(--cyan);
}

.sidebar-notification-btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.sidebar-notification-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-notification-dot {
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.35);
}

.sidebar-notification-dot[hidden] {
  display: none;
}

.sidebar-notification-panel {
  position: fixed;
  left: auto;
  bottom: auto;
  width: 320px;
  max-height: min(420px, calc(100vh - 44px));
  background: rgba(6, 12, 24, 0.98);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 212, 255, 0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px) scale(0.98);
  transform-origin: left bottom;
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
  z-index: 1200;
  overflow: hidden;
}

.sidebar-notification-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

.notification-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.notification-panel-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.notification-panel-subtitle {
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-3);
}

.notification-panel-close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  transition: var(--transition);
}

.notification-panel-close:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.notification-panel-close svg {
  width: 15px;
  height: 15px;
}

.notification-list {
  max-height: 332px;
  overflow-y: auto;
  padding: 6px;
}

.notification-list::-webkit-scrollbar {
  width: 4px;
}

.notification-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 99px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 10px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
  background: rgba(0, 212, 255, 0.045);
}

.notification-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  background: var(--text-3);
}

.notification-status.success {
  background: var(--green);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.45);
}

.notification-status.info {
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.45);
}

.notification-status.warn {
  background: var(--gold);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.notification-status.error {
  background: var(--red);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.4);
}

.notification-copy {
  min-width: 0;
  flex: 1;
}

.notification-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.notification-title {
  color: var(--text);
  font-size: 12.8px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.notification-time {
  flex-shrink: 0;
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 600;
}

.notification-message {
  margin-top: 3px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.notification-empty {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 12.5px;
}

.notification-empty svg {
  width: 20px;
  height: 20px;
}

/* ── Header Glass ───────────────────────────────────────────────── */
.top-header {
  background: rgba(3, 7, 15, 0.75) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

/* ── Stat Change Badge ──────────────────────────────────────────── */
.stat-change {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
}

.stat-change.up {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ── Account dropdown (keep clean) ─────────────────────────────── */
.account-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 12px;
  right: 12px;
  background: rgba(6, 12, 24, 0.97);
  backdrop-filter: blur(32px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 6px;
  display: none;
  flex-direction: column;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.account-dropdown.open {
  display: flex;
}

.acct-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--text-2);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  font-family: inherit;
  width: 100%;
  text-align: left;
}

.acct-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.acct-item i,
.acct-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.acct-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 4px 0;
}

.acct-logout {
  color: #f43f5e !important;
}

.acct-logout:hover {
  background: rgba(244, 63, 94, 0.1) !important;
}

/* ── Page Breadcrumb ────────────────────────────────────────────── */
.page-breadcrumb {
  color: var(--text-2);
}

.page-breadcrumb span {
  color: var(--text) !important;
  font-weight: 600;
}

/* ── Campaign table text ────────────────────────────────────────── */
.campaign-table td {
  color: var(--text-2) !important;
}

.campaign-table td:first-child {
  color: var(--text) !important;
}

/* ── Form labels and hints brighter ────────────────────────────── */
.form-label {
  color: var(--text-2);
}

.form-hint {
  color: var(--text-3);
}

.form-input::placeholder {
  color: var(--text-3);
}

/* ── Nav section labels brighter ───────────────────────────────── */
.nav-section-label {
  color: var(--text-3);
}

.nav-item {
  color: var(--text-2) !important;
}

.nav-item:hover {
  color: var(--text) !important;
}

.nav-item.active {
  color: var(--cyan) !important;
}

/* ── Stat label ─────────────────────────────────────────────────── */
.stat-label {
  color: var(--text-2) !important;
}

.card-desc {
  color: var(--text-2) !important;
}

.limit-label {
  color: var(--text-2) !important;
}

/* ── Responsive sidebar for patch ──────────────────────────────── */
@media (max-width: 900px) {
  .sidebar-collapse-btn {
    display: none;
  }
}

/* ── Sidebar footer: split user info + logout ── */
.user-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  width: 100%;
  /* Ensure row takes full width for correct internal alignment */
}

.user-row-info {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.user-row-info:hover {
  background: rgba(255, 255, 255, 0.05);
}

.user-row-info:hover .user-name {
  color: var(--cyan);
}

.logout-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  cursor: pointer;
  transition: var(--transition);
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.logout-btn svg {
  width: 15px;
  height: 15px;
}

/* ── Sidebar section label with toggle ── */
.nav-section-with-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 4px;
}

/* Normal state — always show hamburger button */
.sidebar-toggle-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: var(--text) !important;
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-toggle-btn svg {
  width: 15px !important;
  height: 15px !important;
  stroke: #c8d8f0 !important;
  stroke-width: 2.2 !important;
}

.sidebar-toggle-btn:hover {
  background: rgba(0, 212, 255, 0.12) !important;
  border-color: rgba(0, 212, 255, 0.3) !important;
}

.sidebar-toggle-btn:hover svg {
  stroke: var(--cyan) !important;
}


/* ── Workspace row with hamburger ────────────────────────── */
.nav-section-with-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 6px;
  margin-bottom: 2px;
}

.nav-section-with-toggle .section-text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-3);
}

.sidebar-toggle-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  display: flex !important;
  /* always visible */
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-2);
  color: var(--text);
}

/* ── Collapsed state ─────────────────────────────────────── */
.sidebar.collapsed .section-text {
  display: none;
}

.sidebar.collapsed .nav-section-with-toggle {
  justify-content: center;
  /* centre the ☰ when text hidden */
  padding: 8px 0 6px;
}

/* Hide collapse arrow if it still exists anywhere */
.sidebar-collapse-btn {
  display: none !important;
}

/* ── Keep hamburger visible when sidebar is collapsed ── */
.sidebar.collapsed .nav-section-with-toggle {
  justify-content: center !important;
  padding: 10px 0 8px !important;
  overflow: visible !important;
}

.sidebar.collapsed .section-text {
  display: none !important;
}

.sidebar.collapsed .sidebar-toggle-btn {
  display: flex !important;
  width: 28px !important;
  height: 28px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  margin: 0 auto !important;
}

.sidebar.collapsed .sidebar-toggle-btn svg {
  stroke: #c8d8f0 !important;
  width: 15px !important;
  height: 15px !important;
}

/* Collapsed nav SCROLLS vertically (icons must never hide behind the fixed
   footer). Tooltips are handled via native title= now, so overflow:visible is
   no longer needed here. Keep in sync with dashboard.css. */
.sidebar.collapsed .sidebar-nav {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  min-height: 0 !important;
  padding-top: 8px !important;
  /* Hidden-but-scrollable: no thick bar, still scrolls (bug #2). */
  scrollbar-width: none !important;
}
.sidebar.collapsed .sidebar-nav::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none !important; }
.sidebar.collapsed .nav-item::after { display: none !important; }

/* ── Rescue hamburger from nav-section-label collapse ── */
.sidebar.collapsed .nav-section-with-toggle {
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
  padding: 10px 0 8px !important;
  display: flex !important;
  justify-content: center !important;
}

.sidebar.collapsed .nav-section-with-toggle .section-text {
  display: none !important;
}

.sidebar.collapsed .nav-section-with-toggle .sidebar-toggle-btn {
  display: flex !important;
  opacity: 1 !important;
  width: 28px !important;
  height: 28px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
}

.sidebar.collapsed .nav-section-with-toggle .sidebar-toggle-btn svg {
  stroke: #c8d8f0 !important;
}

/* ── cert-tool: Fix native select dropdown backgrounds ─────────── */

/* Props panel font selector */
.pr-select {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text) !important;
  width: 100%;
  cursor: pointer;
}

.pr-select option,
.pr-select optgroup {
  background: #0d1728 !important;
  color: #e8f0fd !important;
  font-size: 13px;
}

/* Canvas size / dimension selector in toolbar */
.canvas-size-select {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--text) !important;
  cursor: pointer;
}

.canvas-size-select option {
  background: #0d1728 !important;
  color: #e8f0fd !important;
}

/* Nuclear fallback — cover ALL selects on the page */
select option,
select optgroup {
  background-color: #0d1728 !important;
  color: #e8f0fd !important;
}

/* ── Fix: Center Avatar & Hide Logout in Collapsed Sidebar ── */
.sidebar.collapsed .logout-btn {
  display: none !important;
}

.sidebar.collapsed .user-row {
  justify-content: center !important;
  padding: 0 !important;
}

.sidebar.collapsed .user-row-info {
  flex: none !important;
  justify-content: center !important;
  padding: 4px !important;
  width: 100% !important;
}

.sidebar.collapsed .user-avatar {
  margin: 0 auto !important;
}

.sidebar.collapsed .sidebar-notifications {
  display: flex;
  justify-content: center;
}

.sidebar.collapsed .sidebar-notification-btn {
  width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  justify-content: center;
  padding: 0 !important;
  border-radius: 12px;
}

.sidebar.collapsed .sidebar-notification-label {
  display: none;
}

.sidebar.collapsed .sidebar-notification-dot {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 9px;
}

.sidebar.collapsed .sidebar-notification-panel {
  left: calc(var(--sidebar-collapsed-w) - 10px);
  bottom: -4px;
}

/* ── Page Transition Effect ─────────────────────────────────────── */
/* This creates a smooth fade-in/fade-out between page loads,
   hiding the abrupt content reload and making navigation feel seamless. */
.main-area {
  /* Apply animation ONLY to the main content, not the whole page */
  animation: pageFadeIn 0.4s ease-out;
}

.main-area.page-fade-out {
  /* Apply animation ONLY to the main content, not the whole page */
  animation: pageFadeOut 0.3s ease-in forwards;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pageFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* ── AI Animated Toggle Button ── */
.me-ai-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 22px;
  /* Wider padding forces the perfect capsule shape */
  border-radius: 99px;
  /* Capsule rounding */
  font-family: var(--font, 'Plus Jakarta Sans', sans-serif);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.5px;

  /* The Magic Gradient Border Setup */
  border: 2px solid transparent;
  /* Reserves space for the border */
  background:
    linear-gradient(#070d1a, #070d1a) padding-box,
    /* Inner dark background */
    linear-gradient(90deg, #7c3aed, #00d4ff, #ec4899, #7c3aed, #00d4ff) border-box;
  /* Gradient border */
  background-size: 100% 100%, 300% 100%;
  /* Stretches the gradient so we can pan it */

  /* Trigger the infinite animation */
  animation: aiBorderPan 3s linear infinite;

  /* Smooth transitions for hovering */
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  /* Subtle resting shadow */
}

/* Icon alignment and sizing */
.me-ai-toggle svg {
  width: 16px;
  height: 16px;
  margin-bottom: 1px;
  /* Optically centers the icon with the text */
}

/* Keyframes to pan the gradient border */
@keyframes aiBorderPan {
  0% {
    background-position: 0% 0%, 0% 50%;
  }

  100% {
    background-position: 0% 0%, 300% 50%;
  }
}

/* ── Hover & Glow State ── */
.me-ai-toggle:hover {
  /* Creates a vibrant cyan and purple combined glow */
  box-shadow:
    0 0 15px rgba(0, 212, 255, 0.4),
    0 0 30px rgba(124, 58, 237, 0.3);
  transform: translateY(-1px);
  /* Slight lift effect */
}

/* Press state */
.me-ai-toggle:active {
  transform: translateY(1px);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* ── AI Input Glow & Scrollbar ── */
#meAiInput {
  transition: all 0.3s ease !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 212, 255, 0.2) transparent;
}

#meAiInput::-webkit-scrollbar {
  width: 6px;
}

#meAiInput::-webkit-scrollbar-track {
  background: transparent;
}

#meAiInput::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

#meAiInput::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.4);
}

#meAiInput:hover,
#meAiInput:focus {
  border-color: rgba(0, 212, 255, 0.5) !important;
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.12) !important;
  background: rgba(0, 212, 255, 0.04) !important;
  outline: none !important;
}

/* ── AI Send Button Fix ── */
#meAiSendBtn {
  background: linear-gradient(135deg, #00d4ff, #7c3aed) !important;
  color: #fff !important;
  border-radius: 10px !important;
}

#meAiSendBtn:hover {
  background: linear-gradient(135deg, #00bced, #6b21db) !important;
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.45) !important;
  transform: translateY(-2px) !important;
  color: #fff !important;
}

/* ================================================================
   Gal AI FAB -> Chat Window Morph 
================================================================ */
/* COLLAPSED: pill button */
.gal-ai-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 501;
  width: auto;
  height: 44px;
  border-radius: 99px;
  border: 2px solid transparent;
  background: linear-gradient(rgba(10,14,25,0.95), rgba(10,14,25,0.95)) padding-box,
              linear-gradient(90deg, #00d4ff, #7c3aed, #00d4ff, #7c3aed) border-box;
  background-size: 100% 100%, 300% 100%;
  animation: galAiBorderPan 8s linear infinite;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 22px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-radius 0.4s ease,
              box-shadow 0.3s ease;
  transform-origin: bottom right;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.gal-ai-fab.visible { 
  display: flex; 
  flex-direction: row; 
  align-items: center; 
}
/* EXPANDED: floating chat window */
.gal-ai-fab.expanded {
  width: 380px;
  height: 520px;
  border-radius: 20px;
  padding: 0;
  flex-direction: column;
  align-items: stretch;
  box-shadow: 0 8px 60px rgba(0, 212, 255, 0.25), 0 0 0 1px rgba(124, 58, 237, 0.15);
  background: linear-gradient(rgba(4, 8, 15, 0.97), rgba(4, 8, 15, 0.97)) padding-box,
              linear-gradient(90deg, #00d4ff, #7c3aed, #00d4ff, #7c3aed) border-box;
  backdrop-filter: blur(40px);
  cursor: default;
}
/* Collapsed pill label fades out on expand */
.gal-ai-fab-label {
  display: flex; align-items: center; gap: 8px;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}
.gal-ai-fab.expanded .gal-ai-fab-label {
  opacity: 0; pointer-events: none; position: absolute;
}
/* Chat content fades in after expand */
.gal-ai-fab-chat {
  display: flex; flex-direction: column; flex: 1;
  opacity: 0; pointer-events: none; visibility: hidden;
  transition: opacity 0.2s ease 0.25s, visibility 0s linear 0.45s;
  min-height: 0;
  width: 100%;
}
.gal-ai-fab.expanded .gal-ai-fab-chat {
  opacity: 1; pointer-events: all; visibility: visible;
  transition: opacity 0.25s ease 0.2s, visibility 0s linear 0.2s;
}

/* Ensure chat area scrolling */
.gal-ai-chat {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.gal-ai-chat::-webkit-scrollbar {
  width: 4px;
}
.gal-ai-chat::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
  border-radius: 4px;
}

.gal-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.gal-ai-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gal-ai-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  line-height: 1.2;
}

.gal-ai-subtitle {
  font-size: 11px;
  color: var(--text-3);
}

.gal-ai-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gal-ai-close-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}
.gal-ai-close-btn svg {
  width: 14px;
  height: 14px;
}

/* ── Small laptop (1024–1366 px): auto 90% scale ── */
@media screen and (max-width: 1366px) and (min-width: 1024px) {
  html { zoom: 0.9; }
}
