/* ==========================================================================
   FB Auto Post PRO - Dark Premium Glassmorphism UI
   Redesigned for Chrome Extension & Desktop Web (1280px - 1920px)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ─── CSS Variables & Design Tokens ───────────────────────────────────────── */
:root {
  color-scheme: dark;
  /* Color Palette */
  --bg-base: #060B1A;
  --bg-radial-1: rgba(30, 167, 255, 0.08);
  --bg-radial-2: rgba(139, 92, 255, 0.08);

  --card-bg: rgba(15, 23, 42, 0.72);
  --card-bg-hover: rgba(19, 29, 54, 0.82);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(47, 123, 255, 0.35);

  --primary: #2F7BFF;
  --primary-light: #5292ff;
  --secondary: #7C4DFF;
  --accent-gradient: linear-gradient(135deg, #1EA7FF 0%, #8B5CFF 100%);
  --accent-gradient-hover: linear-gradient(135deg, #38b4ff 0%, #9c72ff 100%);
  --accent-glow: rgba(30, 167, 255, 0.35);

  --success: #19D38A;
  --success-bg: rgba(25, 211, 138, 0.12);
  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #EF4444;
  --danger-bg: rgba(239, 68, 68, 0.12);

  /* Typography & Text */
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --text-inverse: #FFFFFF;

  /* Surfaces & Controls */
  --surface-input: rgba(10, 18, 36, 0.65);
  --surface-input-focus: rgba(12, 22, 45, 0.9);
  --surface-pill: rgba(255, 255, 255, 0.05);
  --surface-pill-hover: rgba(255, 255, 255, 0.09);

  /* Border Radii */
  --radius-card: 22px;
  --radius-input: 14px;
  --radius-button: 16px;
  --radius-pill: 9999px;
  --radius-sm: 8px;

  /* Shadows */
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 24px rgba(30, 167, 255, 0.18);
  --shadow-btn: 0 8px 24px rgba(30, 167, 255, 0.32);
  --shadow-btn-hover: 0 12px 30px rgba(30, 167, 255, 0.48);

  /* Transitions */
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Global Reset & Body ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(circle at 15% 10%, var(--bg-radial-1) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, var(--bg-radial-2) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.5) 0%, transparent 100%);
  background-attachment: fixed;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

/* ─── Layout Wrapper ──────────────────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  position: relative;
}

/* ─── HEADER ──────────────────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(6, 11, 26, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.fb-brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1877F2 0%, #0c56bd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(24, 119, 242, 0.45);
  position: relative;
  flex-shrink: 0;
}

.fb-brand-icon::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.header-title-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #FFFFFF;
}

.badge {
  background: var(--accent-gradient);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(30, 167, 255, 0.35);
}

.header-subtitle {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Notification Bell */
.header-notif-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-pill);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
}

.header-notif-btn:hover {
  background: var(--surface-pill-hover);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

.notif-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 6px #EF4444;
}

/* Facebook Connection Pill */
.fb-status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all var(--transition);
}

.fb-status-pill:hover {
  border-color: rgba(47, 123, 255, 0.4);
  background: rgba(20, 30, 56, 0.9);
}

.status-indicators-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.status-indicator-badge .indicator-dot {
  font-size: 9px;
  line-height: 1;
}

.indicator-dot.green {
  color: #10b981;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.indicator-dot.red {
  color: #ef4444;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
}

.indicator-dot.amber {
  color: #f59e0b;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.7);
  font-weight: 800;
}

.status-indicator-badge.connected { color: #34d399; }
.status-indicator-badge.error { color: #f87171; }
.status-indicator-badge.warning { color: #fbbf24; }

.status-indicator-divider {
  width: 1px;
  height: 13px;
  background: rgba(255, 255, 255, 0.12);
}

.avatar-circle-wrap {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2F7BFF, #7C4DFF);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.status-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748B;
  border: 1.5px solid #060B1A;
  transition: all var(--transition);
}

.status-dot.connected {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-dot.error {
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
}

.status-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}

.pill-arrow {
  color: var(--text-dim);
  font-size: 12px;
}

.btn-detach {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-pill);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-detach:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(47, 123, 255, 0.1);
}

/* ─── BODY CONTAINER (Sidebar + Main) ─────────────────────────────────────── */
.body-container {
  display: flex;
  flex: 1;
  padding: 24px 32px 36px;
  gap: 24px;
}

/* ─── SIDEBAR ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

.main-nav-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-button);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  width: 100%;
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.06);
}

.nav-tab.active {
  background: var(--accent-gradient);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(30, 167, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-tab svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* ─── Nav Tree Item for Settings ─── */
.nav-tree-item {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.nav-tab-parent {
  display: flex;
  align-items: center;
  justify-content: space-between !important;
}

.nav-tab-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tree-chevron {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  width: 14px !important;
  height: 14px !important;
  color: var(--text-dim, #64748b);
  opacity: 0.8;
}

.nav-tree-item.expanded .tree-chevron {
  transform: rotate(180deg);
  color: #60a5fa;
}

.nav-sub-tree {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
  margin-left: 14px;
  padding-left: 10px;
  border-left: 1.5px solid rgba(47, 123, 255, 0.25);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-sub-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  width: 100%;
  white-space: nowrap;
}

.nav-sub-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-sub-item.active {
  background: rgba(47, 123, 255, 0.18);
  border-color: rgba(47, 123, 255, 0.35);
  color: #60a5fa;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(47, 123, 255, 0.12);
}

.sub-tree-branch {
  font-family: monospace;
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
}

.sub-tree-icon {
  font-size: 12px;
}

/* Sidebar Bottom Promo Card */
.sidebar-promo-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  margin-top: 24px;
}

.sidebar-promo-card::before {
  content: '';
  position: absolute;
  top: -40px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(30, 167, 255, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.promo-plane-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1EA7FF, #8B5CFF);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 10px 20px rgba(30, 167, 255, 0.35);
  color: #fff;
}

.promo-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 12px;
}

.promo-badge-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 18, 36, 0.7);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.promo-badge-tag .mini-pro {
  background: var(--accent-gradient);
  color: #fff;
  font-size: 8px;
  padding: 1px 4px;
  border-radius: 4px;
}

/* ─── CONTENT AREA ────────────────────────────────────────────────────────── */
.content-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ─── MAIN CONTAINER: COMPOSER (TRANG ĐĂNG NGAY) ───────────────────────────── */
.main-container {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.95fr);
  gap: 24px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* ─── TWO-COLUMN PANELS: LEFT (COMPOSER) & RIGHT (GROUPS) ─────────────────── */
.left-panel,
#composerLeftPanel {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.right-panel,
#groupSelectorCard {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

/* ─── GLASS CARDS ─────────────────────────────────────────────────────────── */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--card-border-hover);
}

/* ─── CARD HEADERS ────────────────────────────────────────────────────────── */
.card-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.card-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(47, 123, 255, 0.15);
  border: 1px solid rgba(47, 123, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  flex-shrink: 0;
}

.card-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.2px;
}

.card-desc {
  font-size: 12px;
  color: var(--text-dim);
}

/* ─── TYPE TABS (Text / Ảnh / Video) ──────────────────────────────────────── */
.type-tabs {
  display: flex;
  gap: 8px;
  background: rgba(10, 18, 36, 0.7);
  padding: 6px;
  border-radius: var(--radius-button);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 18px;
}

.type-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.type-tab:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.04);
}

.type-tab.active {
  background: rgba(47, 123, 255, 0.18);
  border-color: rgba(47, 123, 255, 0.35);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(30, 167, 255, 0.15);
}

.type-tab.active svg {
  color: var(--primary-light);
}

/* ─── COMPOSER TEXTAREA & INPUTS ──────────────────────────────────────────── */
.panel-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.textarea-wrap {
  position: relative;
  width: 100%;
}

.compose-textarea {
  width: 100%;
  min-height: 140px;
  padding: 14px 16px 32px 16px;
  background: var(--surface-input);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: all var(--transition);
}

.compose-textarea:focus {
  background: var(--surface-input-focus);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 123, 255, 0.2);
}

.compose-textarea::placeholder {
  color: var(--text-dim);
}

.char-counter {
  position: absolute;
  bottom: 10px;
  right: 14px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  pointer-events: none;
}

/* ─── INSERT TOOLS ROW (Chèn nhanh) ───────────────────────────────────────── */
.insert-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.insert-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-right: 4px;
}

.insert-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.insert-btn:hover {
  color: #FFFFFF;
  border-color: rgba(47, 123, 255, 0.4);
  background: rgba(47, 123, 255, 0.12);
  transform: translateY(-1px);
}

/* Pick values box */
.pick-values-box {
  background: rgba(10, 18, 36, 0.9);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pick-values-input {
  width: 100%;
  min-height: 80px;
  background: var(--surface-input);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 12px;
  resize: vertical;
  outline: none;
}

.btn-sm {
  align-self: flex-end;
  padding: 6px 16px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

/* Link input wrap */
.link-input-wrap {
  position: relative;
  width: 100%;
}

.link-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.link-icon-end {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.link-input {
  width: 100%;
  padding: 11px 40px 11px 40px;
  background: var(--surface-input);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: all var(--transition);
}

.link-input:focus {
  background: var(--surface-input-focus);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 123, 255, 0.2);
}

.link-input::placeholder {
  color: var(--text-dim);
}

/* ─── UPLOAD ZONES (Photo & Video) ────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed rgba(47, 123, 255, 0.3);
  background: rgba(10, 18, 36, 0.5);
  border-radius: var(--radius-input);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary-light);
  background: rgba(47, 123, 255, 0.08);
}

.upload-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(47, 123, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  margin-bottom: 4px;
}

.upload-zone p {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.upload-hint {
  font-size: 11.5px;
  color: var(--text-dim);
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(47, 123, 255, 0.2);
  border: 1px solid rgba(47, 123, 255, 0.4);
  border-radius: var(--radius-pill);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: all var(--transition);
}

.btn-upload:hover {
  background: rgba(47, 123, 255, 0.35);
  box-shadow: 0 0 15px rgba(47, 123, 255, 0.4);
}

.upload-meta-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-dim);
  padding: 6px 2px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin: 10px 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.photo-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
}

.photo-remove-btn, .video-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.photo-remove-btn:hover, .video-remove-btn:hover {
  background: var(--danger);
  transform: scale(1.1);
}

.video-preview,
.video-preview-wrapper {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin: 10px 0;
  border: 1px solid var(--card-border);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.video-thumb {
  width: 100%;
  max-width: 100%;
  max-height: 220px;
  background: #000;
  display: block;
  box-sizing: border-box;
}

.video-info-badge {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(25, 211, 138, 0.12);
  border: 1px solid rgba(25, 211, 138, 0.25);
  border-radius: 8px;
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
}

/* ─── SETTINGS GRID (Threads & Delay) ─────────────────────────────────────── */
.settings-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.setting-card {
  background: rgba(10, 18, 36, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.setting-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.number-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 11, 26, 0.8);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
  padding: 2px;
}

.num-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.num-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.num-input {
  flex: 1;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}

.num-input::-webkit-outer-spin-button,
.num-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.setting-hint {
  font-size: 11px;
  color: var(--text-dim);
}

/* ─── TOKEN STATUS PANEL ──────────────────────────────────────────────────── */
.token-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.token-badges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.token-card-box {
  background: rgba(10, 18, 36, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.token-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.token-refresh-btn {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 15px;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0 4px;
}

.token-refresh-btn:hover {
  color: var(--primary);
  transform: rotate(90deg);
}

.token-refresh-btn.spinning {
  animation: spin 0.6s linear infinite;
}

.token-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(6, 11, 26, 0.7);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-size: 12px;
  transition: all var(--transition);
}

.token-badge.ok {
  border-color: rgba(25, 211, 138, 0.35);
  background: rgba(25, 211, 138, 0.08);
}

.token-badge.err {
  border-color: rgba(255, 255, 255, 0.08);
}

.tbadge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748B;
  flex-shrink: 0;
}

.token-badge.ok .tbadge-dot {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.tbadge-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.tbadge-val {
  font-size: 11.5px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.token-badge.ok .tbadge-val {
  color: var(--success);
  font-weight: 600;
}

/* Warning alert box */
.token-hint-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-input);
  color: var(--warning);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.token-hint:empty {
  display: none;
}

/* ─── SCHEDULE TOGGLE & CONFIG BOX ────────────────────────────────────────── */
.schedule-toggle-row {
  margin-bottom: 16px;
}

.schedule-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(10, 18, 36, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  cursor: pointer;
  transition: all var(--transition);
}

.schedule-toggle-card:hover {
  border-color: rgba(47, 123, 255, 0.3);
  background: rgba(14, 25, 50, 0.7);
}

.schedule-label-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-main);
  cursor: pointer;
}

.schedule-config-box {
  background: rgba(10, 18, 36, 0.85);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  padding: 16px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.2s ease;
}

.sconfig-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sconfig-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sconfig-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface-input);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--text-main);
  color-scheme: dark;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: all var(--transition);
}

.sconfig-input::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(100%);
  opacity: 1;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: opacity var(--transition), transform var(--transition);
}

.sconfig-input::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 0.8;
  transform: scale(1.08);
}

.sconfig-input:focus {
  background: var(--surface-input-focus);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 123, 255, 0.2);
}

.btn-secondary {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ─── ACTION BUTTONS (Start / Stop) ───────────────────────────────────────── */
.btn-start, .btn-stop {
  width: 100%;
  padding: 15px 24px;
  border: none;
  border-radius: var(--radius-button);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-start {
  background: var(--accent-gradient);
  color: #FFFFFF;
  box-shadow: var(--shadow-btn);
}

.btn-start:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn-hover);
}

.btn-start:active {
  transform: translateY(0);
}

.btn-stop {
  background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}

.btn-stop:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.45);
}

/* Progress bar wrap */
.progress-wrap {
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(10, 18, 36, 0.8);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-pill);
  width: 0%;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px rgba(30, 167, 255, 0.5);
}

.progress-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-light);
}

/* Post log section */
.post-log {
  margin-top: 16px;
  background: rgba(10, 18, 36, 0.8);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  overflow: hidden;
}

.post-log-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--card-border);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.log-count {
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.btn-clear-log {
  margin-left: auto;
  padding: 3px 10px;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 11px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-clear-log:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.post-log-list {
  max-height: 180px;
  overflow-y: auto;
  padding: 6px 0;
}

.log-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--transition);
}

.log-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.log-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.log-info {
  flex: 1;
  min-width: 0;
}

.log-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-id {
  font-size: 10.5px;
  color: var(--text-dim);
}

.log-status {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.log-status.success {
  background: rgba(25, 211, 138, 0.15);
  color: var(--success);
}

.log-status.error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.delay-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  color: var(--warning);
  font-size: 12px;
  font-weight: 600;
  margin: 10px 0;
}

/* ─── RIGHT CARD: GROUP SELECTOR ──────────────────────────────────────────── */
.group-selector-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

/* Search and Save row */
.group-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.selected-count {
  min-width: 32px;
  height: 32px;
  background: rgba(47, 123, 255, 0.2);
  border: 1px solid rgba(47, 123, 255, 0.4);
  color: var(--primary-light);
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  flex-shrink: 0;
}

.search-wrap {
  flex: 1;
  position: relative;
}

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

.search-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  background: var(--surface-input);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: all var(--transition);
}

.search-input:focus {
  background: var(--surface-input-focus);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 123, 255, 0.2);
}

.search-input::placeholder {
  color: var(--text-dim);
}

.btn-save {
  padding: 10px 18px;
  background: var(--accent-gradient);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-input);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(30, 167, 255, 0.3);
}

.btn-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(30, 167, 255, 0.45);
}

/* Group Tabs */
.group-tabs {
  display: flex;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 12px;
  gap: 4px;
}

.group-tab {
  flex: 1;
  padding: 10px 8px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
  text-align: center;
}

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

.group-tab.active {
  color: #FFFFFF;
  border-bottom-color: var(--primary);
  font-weight: 700;
}

/* Saved Group Lists Row */
.saved-lists-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.select-wrapper {
  flex: 1;
  position: relative;
}

.saved-lists-select {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface-input);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  color: var(--text-main);
  font-family: inherit;
  font-size: 12.5px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: all var(--transition);
}

.saved-lists-select:focus {
  border-color: var(--primary);
}

.saved-lists-select option {
  background: #0B1426;
  color: var(--text-main);
}

.saved-lists-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-list-action {
  height: 36px;
  padding: 0 12px;
  background: var(--surface-pill);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-list-action:hover {
  background: rgba(47, 123, 255, 0.15);
  color: #fff;
  border-color: rgba(47, 123, 255, 0.4);
}

.btn-list-action.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-color: var(--danger);
}

/* Select All Row */
.select-all-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(10, 18, 36, 0.5);
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
}

.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
  flex-shrink: 0;
}

.custom-checkbox:hover {
  border-color: var(--primary);
}

.custom-checkbox:checked {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(47, 123, 255, 0.4);
}

.custom-checkbox:checked::after {
  content: '';
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

.custom-checkbox:indeterminate {
  background: var(--primary);
  border-color: var(--primary);
}

.custom-checkbox:indeterminate::after {
  content: '';
  width: 8px;
  height: 2px;
  background: #fff;
}

.btn-refresh {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--surface-pill);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-refresh:hover {
  color: var(--primary-light);
  border-color: var(--primary);
  background: rgba(47, 123, 255, 0.1);
}

.btn-refresh.spinning svg {
  animation: spin 0.6s linear infinite;
}

/* ─── GROUP ITEMS LIST CONTAINER ──────────────────────────────────────────── */
.group-list {
  min-height: 340px;
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.group-list::-webkit-scrollbar {
  width: 5px;
}

.group-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.group-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.group-list::-webkit-scrollbar-thumb:hover {
  background: rgba(47, 123, 255, 0.4);
}

/* Empty State */
.groups-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  margin: auto;
  gap: 12px;
}

.empty-illustration-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 123, 255, 0.25) 0%, rgba(124, 77, 255, 0.1) 70%);
  border: 1px solid rgba(47, 123, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  box-shadow: 0 0 25px rgba(47, 123, 255, 0.2);
  margin-bottom: 4px;
}

.groups-empty h4 {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
}

.groups-empty p {
  font-size: 12px;
  color: var(--text-dim);
  max-width: 260px;
}

.groups-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
  color: var(--text-dim);
}

/* Group Item Card */
.group-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(10, 18, 36, 0.65);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.group-item:hover {
  background: rgba(18, 30, 58, 0.8);
  border-color: rgba(47, 123, 255, 0.3);
  transform: translateX(3px);
}

.group-item.selected {
  background: rgba(47, 123, 255, 0.14);
  border-color: rgba(47, 123, 255, 0.45);
}

.group-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1877F2, #0c56bd);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.group-info {
  flex: 1;
  min-width: 0;
}

.group-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-id {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 1px;
}

.group-badges {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.group-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.group-badge.admin {
  background: rgba(25, 211, 138, 0.15);
  color: var(--success);
  border: 1px solid rgba(25, 211, 138, 0.25);
}

.group-badge.private {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.group-badge.public {
  background: rgba(47, 123, 255, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(47, 123, 255, 0.25);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 16px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.page-btn, .page-number {
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--surface-pill);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.page-btn:hover:not(:disabled), .page-number:hover {
  background: rgba(47, 123, 255, 0.15);
  color: #fff;
  border-color: rgba(47, 123, 255, 0.35);
}

.page-number.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 12px rgba(47, 123, 255, 0.45);
}

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

.page-dots {
  font-size: 13px;
  color: var(--text-dim);
  padding: 0 4px;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─── TAB CONTAINERS: SCHEDULER & LOGS ────────────────────────────────────── */
.tab-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  animation: fadeIn 0.25s ease;
}

.tab-header-card {
  margin-bottom: 20px;
}

.scheduler-list, .history-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ─── TAB TOOLBARS (Scheduler & History) ─────────────────────────────────── */
.tab-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toolbar-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.toolbar-search-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.toolbar-search-input {
  width: 100%;
  padding: 9px 12px 9px 38px;
  background: var(--surface-input);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  color: var(--text-main);
  font-family: inherit;
  font-size: 12.5px;
  outline: none;
  transition: all var(--transition);
}

.toolbar-search-input:focus {
  background: var(--surface-input-focus);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 123, 255, 0.2);
}

.toolbar-search-input::placeholder {
  color: var(--text-dim);
}

.toolbar-filter-tabs {
  display: flex;
  align-items: center;
  background: rgba(10, 18, 36, 0.7);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.toolbar-tab-btn {
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.toolbar-tab-btn:hover {
  color: #fff;
}

.toolbar-tab-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(47, 123, 255, 0.35);
}

.toolbar-date-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface-input);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  padding: 0 10px;
  color: var(--text-dim);
}

.toolbar-date-input {
  color-scheme: dark;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 12px;
  padding: 8px 4px 8px 8px;
  outline: none;
  cursor: pointer;
}

.toolbar-date-input::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(100%);
  opacity: 1;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: opacity var(--transition), transform var(--transition);
}

.toolbar-date-input::-webkit-calendar-picker-indicator:hover {
  opacity: 0.8;
  transform: scale(1.08);
}

.btn-primary-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-input);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(47, 123, 255, 0.35);
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary-toolbar:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(47, 123, 255, 0.45);
}

.btn-clear-history {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-input);
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-clear-history:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: var(--danger);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
  transform: translateY(-1px);
}

/* ─── SCHEDULER CARDS LIST ────────────────────────────────────────────────── */
.scheduler-list, .history-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.scheduler-card {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.scheduler-card:hover {
  transform: translateY(-3px);
  border-color: var(--card-border-hover);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 20px rgba(47, 123, 255, 0.15);
}

.scard-top-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.scard-thumb-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(47, 123, 255, 0.2) 0%, rgba(124, 77, 255, 0.15) 100%);
  border: 1px solid rgba(47, 123, 255, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 2px;
}

.scard-thumb-box.photo {
  background: linear-gradient(135deg, rgba(25, 211, 138, 0.2) 0%, rgba(47, 123, 255, 0.15) 100%);
  border-color: rgba(25, 211, 138, 0.3);
}

.scard-thumb-box.video {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(239, 68, 68, 0.15) 100%);
  border-color: rgba(245, 158, 11, 0.3);
}

.scard-thumb-icon {
  font-size: 18px;
  line-height: 1;
}

.scard-thumb-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.scard-title-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

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

.scard-title {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scard-text {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.scard-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  white-space: nowrap;
}

.scard-badge.draft {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.scard-badge.scheduled {
  background: rgba(47, 123, 255, 0.18);
  color: var(--primary-light);
  border: 1px solid rgba(47, 123, 255, 0.35);
  box-shadow: 0 0 10px rgba(47, 123, 255, 0.2);
}

.scard-badge.posting {
  background: rgba(245, 158, 11, 0.18);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.35);
  animation: pulse 1.5s infinite;
}

.scard-badge.completed {
  background: rgba(25, 211, 138, 0.18);
  color: var(--success);
  border: 1px solid rgba(25, 211, 138, 0.35);
}

.scard-badge.failed {
  background: rgba(239, 68, 68, 0.18);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Metadata Grid */
.scard-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.scard-meta-pill {
  background: rgba(10, 18, 36, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.smeta-label {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 600;
}

.smeta-value {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smeta-value.highlight {
  color: var(--primary-light);
}

.scard-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
  gap: 12px;
}

.scard-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.btn-card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  height: 32px;
  border-radius: 10px;
  background: var(--surface-pill);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-card-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-card-action.success {
  background: rgba(25, 211, 138, 0.12);
  border-color: rgba(25, 211, 138, 0.3);
  color: var(--success);
}

.btn-card-action.success:hover {
  background: rgba(25, 211, 138, 0.22);
  border-color: var(--success);
  box-shadow: 0 0 12px rgba(25, 211, 138, 0.3);
}

.btn-card-action.edit:hover {
  background: rgba(47, 123, 255, 0.15);
  border-color: rgba(47, 123, 255, 0.4);
  color: var(--primary-light);
}

.btn-card-action.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--danger);
  color: var(--danger);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

.btn-card-action.detail {
  background: rgba(47, 123, 255, 0.12);
  border-color: rgba(47, 123, 255, 0.3);
  color: var(--primary-light);
}

.btn-card-action.detail:hover {
  background: rgba(47, 123, 255, 0.22);
  border-color: var(--primary-light);
  box-shadow: 0 0 12px rgba(47, 123, 255, 0.3);
}

/* ─── LOGS COMPACT CARDS ─────────────────────────────────────────────────── */
.logs-compact-card {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all var(--transition);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.logs-compact-card:hover {
  transform: translateY(-2px);
  border-color: var(--card-border-hover);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4), 0 0 18px rgba(30, 167, 255, 0.12);
}

.lcard-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lcard-title-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lcard-title {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.lcard-time {
  font-size: 11.5px;
  color: var(--text-dim);
}

.lcard-status-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lcard-status-badge.running {
  background: rgba(47, 123, 255, 0.18);
  color: var(--primary-light);
  border: 1px solid rgba(47, 123, 255, 0.35);
}

.lcard-status-badge.completed {
  background: rgba(25, 211, 138, 0.18);
  color: var(--success);
  border: 1px solid rgba(25, 211, 138, 0.35);
}

.lcard-status-badge.stopped {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lcard-progress-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(10, 18, 36, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 10px 14px;
}

.lcard-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.lcard-percentage.highlight {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-light);
}

.lcard-pbar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  display: flex;
}

.lcard-pbar-success {
  background: var(--success);
  height: 100%;
  transition: width 0.3s ease;
}

.lcard-pbar-fail {
  background: var(--danger);
  height: 100%;
  transition: width 0.3s ease;
}

.lcard-stats-sub {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
}

.stat-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.stat-tag.success { color: var(--success); }
.stat-tag.fail { color: var(--danger); }

.lcard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 10px;
}

.lcard-groups-summary {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

/* Empty Tab State */
.tab-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  gap: 14px;
}

.tab-empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 123, 255, 0.2) 0%, transparent 70%);
  border: 1px solid rgba(47, 123, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--primary-light);
  box-shadow: 0 0 30px rgba(47, 123, 255, 0.15);
  margin-bottom: 4px;
}

.tab-empty-state h4 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.tab-empty-state p {
  font-size: 13px;
  color: var(--text-dim);
  max-width: 380px;
}

/* ─── MODAL OVERLAYS (Log Details, License, User Guide & Media) ───────────── */
.log-overlay, .license-overlay, .modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 9, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.25s ease;
}

.log-modal {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(28px);
  border: 1px solid var(--card-border-hover);
  border-radius: var(--radius-card);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.log-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.log-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
}

.btn-close-log {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  transition: all var(--transition);
}

.btn-close-log:hover {
  color: #FFFFFF;
}

.log-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.log-sum-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.log-sum-item {
  background: rgba(10, 18, 36, 0.7);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lsum-num {
  font-size: 20px;
  font-weight: 800;
}

.lsum-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}

.text-primary { color: var(--primary-light); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.log-detail-table-wrap {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  max-height: 250px;
  overflow-y: auto;
}

.log-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.log-detail-table th {
  background: rgba(10, 18, 36, 0.9);
  padding: 10px 14px;
  color: var(--text-dim);
  font-weight: 600;
  border-bottom: 1px solid var(--card-border);
}

.log-detail-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

/* ─── LICENSE MODAL (Dark Premium Glassmorphic) ───────────────────────────── */
.license-modal {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(47, 123, 255, 0.35);
  border-radius: 28px;
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(30, 167, 255, 0.2);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.license-modal::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(30, 167, 255, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.license-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  position: relative;
}

.license-fb-icon-orb {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: linear-gradient(135deg, #1877F2 0%, #0c56bd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 30px rgba(24, 119, 242, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.3);
  position: relative;
  margin-bottom: 16px;
}

/* Orbital planet ring around Facebook logo */
.license-fb-icon-orb::after {
  content: '';
  position: absolute;
  width: 110px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(139, 92, 255, 0.6);
  transform: rotate(-25deg);
  box-shadow: 0 0 15px rgba(139, 92, 255, 0.5);
  pointer-events: none;
}

.license-logo-wrap h2 {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.3px;
}

.license-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

.license-input-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}

.license-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.license-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  background: rgba(10, 18, 36, 0.85);
  border: 1.5px solid rgba(47, 123, 255, 0.3);
  border-radius: var(--radius-input);
  color: #FFFFFF;
  font-family: 'Inter', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  outline: none;
  transition: all var(--transition);
  text-transform: uppercase;
}

.license-input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(47, 123, 255, 0.25);
  background: rgba(12, 22, 45, 0.95);
}

.license-input::placeholder {
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: none;
}

.license-input.format-valid {
  border-color: #10B981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
}

.license-format-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(47, 123, 255, 0.08);
  border: 1px dashed rgba(47, 123, 255, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: -8px;
  margin-bottom: 14px;
  font-size: 11.5px;
}

.lfb-lbl {
  color: var(--text-muted);
}

.lfb-pattern {
  color: #60A5FA;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.lfb-status {
  color: #10B981;
  font-size: 11px;
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.license-error {
  margin-bottom: 12px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  color: #F87171;
  font-size: 12.5px;
  font-weight: 600;
}

.license-btn {
  width: 100%;
  padding: 14px 20px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-button);
  color: #FFFFFF;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-btn);
  transition: all var(--transition);
}

.license-btn:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn-hover);
}

.license-footer {
  margin-top: 20px;
  font-size: 12.5px;
}

.license-footer a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

.license-footer a:hover {
  text-decoration: underline;
  color: #fff;
}

/* ─── SPINNERS & ANIMATIONS ───────────────────────────────────────────────── */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.25);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.spinner.large {
  width: 32px;
  height: 32px;
  border-color: rgba(47, 123, 255, 0.2);
  border-top-color: var(--primary);
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ─── RESPONSIVE BREAKPOINTS ──────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .body-container {
    padding: 16px 20px;
    gap: 16px;
  }
  .sidebar {
    width: 200px;
  }
  .main-container {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.95fr);
    gap: 16px;
  }
}

@media (max-width: 1024px) {
  .body-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .main-nav-tabs {
    flex-direction: row;
    width: auto;
  }
  .sidebar-promo-card {
    display: none;
  }
  .main-container {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ─── MIXED MEDIA TAB & COMPOSER (ẢNH + VIDEO) ────────────────────────────── */
.type-tab[data-type="mixed"].active {
  background: linear-gradient(135deg, rgba(30, 167, 255, 0.28) 0%, rgba(139, 92, 255, 0.32) 100%) !important;
  border-color: rgba(139, 92, 255, 0.45) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 18px rgba(139, 92, 255, 0.25), 0 0 12px rgba(30, 167, 255, 0.2) !important;
}

.type-tab[data-type="mixed"].active svg {
  color: #c4b5fd !important;
}

.mixed-dropzone {
  border: 2px dashed rgba(47, 123, 255, 0.35) !important;
  background: rgba(10, 18, 36, 0.5) !important;
  border-radius: 18px !important;
  transition: all var(--transition);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.mixed-dropzone:hover,
.mixed-dropzone.drag-over {
  border-color: #1EA7FF !important;
  background: rgba(30, 167, 255, 0.09) !important;
  box-shadow: 0 0 24px rgba(30, 167, 255, 0.25), inset 0 0 12px rgba(139, 92, 255, 0.15) !important;
}

.mixed-preview-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.mixed-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.mixed-stats-badge {
  font-size: 12px;
  font-weight: 700;
  color: #c4b5fd;
  background: linear-gradient(135deg, rgba(30, 167, 255, 0.12) 0%, rgba(139, 92, 255, 0.15) 100%);
  border: 1px solid rgba(139, 92, 255, 0.3);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-add-more-media {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-add-more-media:hover {
  background: linear-gradient(135deg, rgba(30, 167, 255, 0.25), rgba(139, 92, 255, 0.25));
  border-color: rgba(139, 92, 255, 0.5);
  box-shadow: 0 0 14px rgba(139, 92, 255, 0.3);
  transform: translateY(-1px);
}

.mixed-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 680px) {
  .mixed-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
  }
}

.mixed-preview-card {
  position: relative;
  background: #08111F;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.mixed-preview-card:hover {
  border-color: rgba(139, 92, 255, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(139, 92, 255, 0.22);
  transform: translateY(-2px);
}

.mcard-thumb-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 110px;
  border-radius: 12px;
  overflow: hidden;
  background: #040814;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.mcard-thumb-img,
.mcard-thumb-video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
}

.mcard-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  backdrop-filter: blur(8px);
  z-index: 2;
}

.mcard-badge.image {
  background: rgba(31, 123, 255, 0.85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.mcard-badge.video {
  background: rgba(124, 77, 255, 0.88);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.mcard-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 2;
  letter-spacing: 0.3px;
}

.mcard-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  z-index: 3;
  transition: all var(--transition);
}

.mcard-remove-btn:hover {
  background: var(--danger);
  border-color: var(--danger);
  transform: scale(1.12);
}

.mcard-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 4px 4px 4px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.mcard-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: block;
  box-sizing: border-box;
}

.mcard-size {
  font-size: 10.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* ─── Media Card Play Overlay & Fallback Video ────────────────────────────── */
.mcard-thumb-wrap {
  cursor: pointer;
}

.mcard-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 14px;
  z-index: 2;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.mixed-preview-card:hover .mcard-play-overlay {
  transform: translate(-50%, -50%) scale(1.15);
  background: rgba(124, 77, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 18px rgba(124, 77, 255, 0.5);
}

.mcard-fallback-video {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(124, 77, 255, 0.15), rgba(4, 8, 20, 0.95));
  gap: 6px;
  padding: 8px;
  text-align: center;
}

.mcard-fallback-video svg {
  color: #a78bfa;
  filter: drop-shadow(0 2px 8px rgba(139, 92, 246, 0.4));
}

.mcard-fallback-tag {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* ─── Media Preview Modal ─────────────────────────────────────────────────── */
.media-modal-container {
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--card-border-hover);
  border-radius: var(--radius-card);
  width: 100%;
  max-width: 640px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.media-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.media-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 8px;
}

.media-modal-body {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
  max-height: 70vh;
  overflow: hidden;
}

.media-modal-body video,
.media-modal-body img {
  max-width: 100%;
  max-height: 65vh;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

/* ─── USER GUIDE MODAL STYLING ───────────────────────────────────────────── */
.guide-modal-container {
  background: rgba(11, 19, 41, 0.98);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 16px;
  width: 100%;
  max-width: 820px;
  max-height: 88vh;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(59, 130, 246, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.guide-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.8);
}

.guide-modal-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.guide-modal-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.guide-modal-subtitle {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 1px;
}

.guide-nav-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(2, 6, 23, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  scrollbar-width: thin;
}

.guide-nav-pill {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.guide-nav-pill:hover,
.guide-nav-pill.active {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.45);
}

.guide-modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scrollbar-width: thin;
}

.guide-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 16px 18px;
  scroll-margin-top: 14px;
}

.guide-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 10px;
}

.guide-step-badge {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(59, 130, 246, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.guide-card-head h3 {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
}

.guide-card-content p {
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 10px;
}

.guide-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0;
}

.guide-feature-box {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
}

.guide-f-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.guide-f-info h4 {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 2px;
}

.guide-f-info p {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

.guide-modes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}

.guide-mode-item {
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 14px;
}

.guide-mode-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 4px;
}

.guide-mode-item p {
  font-size: 11.5px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
}

.guide-code-box {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0;
}

.guide-code-header {
  font-size: 10.5px;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 600;
}

.guide-code-box code {
  color: #a5f3fc;
  font-family: monospace;
  font-size: 12px;
  word-break: break-all;
}

.guide-tip-box {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 11.5px;
  line-height: 1.5;
  margin-top: 12px;
}

.guide-tip-box.info {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.guide-tip-box.success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.guide-tip-box.warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.guide-tip-box.danger {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.guide-checklist {
  margin: 10px 0;
  padding-left: 18px;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.7;
}

.guide-steps-flow {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 12px;
}

.flow-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.flow-desc {
  font-size: 12px;
  color: #cbd5e1;
}

.guide-support-contact-card {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.25), rgba(15, 23, 42, 0.7));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 14px;
}

.guide-support-contact-card h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.guide-support-contact-card p {
  font-size: 11.5px;
  color: #94a3b8;
  margin-bottom: 10px;
}

.guide-contact-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.guide-btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.guide-btn-contact.zalo {
  background: #0068ff;
  color: #fff;
}

.guide-btn-contact.tele {
  background: #229ed9;
  color: #fff;
}

.guide-btn-contact:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.guide-search-wrapper {
  position: relative;
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-search-input {
  flex: 1;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 7px 12px 7px 34px;
  color: #f1f5f9;
  font-size: 12px;
  outline: none;
  transition: all 0.2s ease;
}

.guide-search-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
  background: rgba(2, 6, 23, 0.95);
}

.guide-search-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.guide-copy-btn {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  float: right;
  margin-top: -2px;
}

.guide-copy-btn:hover {
  background: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.guide-tag-hot {
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 1px 6px;
  border-radius: 12px;
  margin-right: 4px;
  letter-spacing: 0.02em;
}

.support-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.support-nav-item.active-guide-btn {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
}

.support-nav-item.active-guide-btn:hover {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.45);
}

.guide-highlight {
  background: rgba(234, 179, 8, 0.3);
  color: #fef08a;
  padding: 1px 3px;
  border-radius: 3px;
}


/* ─── 4 STATISTICS GLASS CARDS (LỊCH SỬ CHẠY) ────────────────────────────── */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

@media (max-width: 960px) {
  .stats-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-metric-card {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--card-border-hover);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 20px rgba(47, 123, 255, 0.16);
}

.stat-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrap.total {
  background: linear-gradient(135deg, rgba(47, 123, 255, 0.22) 0%, rgba(139, 92, 255, 0.22) 100%);
  border: 1px solid rgba(47, 123, 255, 0.4);
  color: var(--primary-light);
}

.stat-icon-wrap.success {
  background: rgba(25, 211, 138, 0.15);
  border: 1px solid rgba(25, 211, 138, 0.35);
  color: var(--success);
}

.stat-icon-wrap.running {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--warning);
}

.stat-icon-wrap.failed {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--danger);
}

.stat-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
}

/* ─── SUPPORT SECTION ─── */
.sidebar-nav-group {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.support-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.support-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
  margin-bottom: 4px;
}

.support-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-muted);
}

.support-header-text {
  display: flex;
  flex-direction: column;
}

.support-header-text h3 {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
  line-height: 1.2;
}

.support-header-text p {
  font-size: 11px;
  color: var(--text-muted);
  margin: 2px 0 0 0;
  line-height: 1.2;
}

.support-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.support-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-button);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  width: 100%;
}

.support-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.06);
}

.support-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.support-item-icon {
  color: inherit;
}

.support-item-label {
  font-size: 13px;
  font-weight: 500;
}

.support-item-chevron {
  opacity: 0.4;
  transition: opacity var(--transition);
}

.support-nav-item:hover .support-item-chevron {
  opacity: 1;
}





@media (max-width: 1024px) {
  .sidebar-nav-group {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .support-section {
    flex-direction: row;
    gap: 8px;
  }
  .support-nav-list {
    flex-direction: row;
  }
  .support-header {
    display: none;
  }
  .support-item-label, .support-item-chevron {
    display: none;
  }
  .support-nav-item {
    padding: 10px;
    width: auto;
  }
  .support-item-left {
    gap: 0;
  }
}

.toolbar-date-wrap svg {
  color: #FFFFFF;
}

/* ─── SAFE POSTING ENGINE (Dark Glassmorphism) ────────────────────────────── */
.safe-mode-card {
  background: rgba(13, 22, 45, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: var(--radius-card, 14px);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
  transition: all var(--transition);
}

.safe-mode-card:hover {
  border-color: rgba(56, 189, 248, 0.38);
}

.safe-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.safe-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.safe-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(16, 185, 129, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  flex-shrink: 0;
}

.safe-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.1px;
}

.safe-card-subtitle {
  font-size: 11px;
  color: var(--text-dim, #94a3b8);
  margin-top: 1px;
}

/* Switches */
.safe-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.safe-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.safe-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: 0.3s;
  border-radius: 24px;
}

.safe-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 50%;
}

.safe-switch input:checked + .safe-slider {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.safe-switch input:checked + .safe-slider:before {
  transform: translateX(20px);
  background-color: #ffffff;
}

/* Small switch */
.safe-switch-sm {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
}

.safe-switch-sm input {
  opacity: 0;
  width: 0;
  height: 0;
}

.safe-switch-sm .safe-slider {
  border-radius: 20px;
}

.safe-switch-sm .safe-slider:before {
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
}

.safe-switch-sm input:checked + .safe-slider {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: rgba(16, 185, 129, 0.5);
}

.safe-switch-sm input:checked + .safe-slider:before {
  transform: translateX(18px);
  background-color: #ffffff;
}

.safe-card-body {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: opacity var(--transition);
}

.safe-card-body.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.safe-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.safe-field-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.safe-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}

.safe-select {
  width: 100%;
  padding: 8px 10px;
  background: rgba(6, 11, 26, 0.85);
  border: 1px solid var(--card-border, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: all var(--transition);
}

.safe-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.safe-number-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 11, 26, 0.85);
  border: 1px solid var(--card-border, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  overflow: hidden;
  padding: 2px;
}

.safe-sub-card {
  background: rgba(6, 11, 26, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.safe-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.safe-text-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.safe-row-name {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}

.safe-row-hint {
  font-size: 10.5px;
  color: var(--text-dim, #64748b);
}

.safe-retry-config {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.safe-warning-card {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.04);
}

.safe-warning-card .safe-row-name {
  color: #fca5a5;
}

/* Facebook Warning Alert Banner */
.fb-warning-banner {
  display: none;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(185, 28, 28, 0.15));
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  color: #fecaca;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
  animation: pulseWarning 2s ease-in-out infinite;
}

@keyframes pulseWarning {
  0%, 100% { border-color: rgba(239, 68, 68, 0.45); }
  50% { border-color: rgba(239, 68, 68, 0.85); box-shadow: 0 0 16px rgba(239, 68, 68, 0.35); }
}

/* ═══════════════════════════════════════════════════════════════
   HEADER POPOVERS: NOTIFICATION CENTER & CONNECTION STATUS
═══════════════════════════════════════════════════════════════ */
.header-actions {
  position: relative;
}

.header-notif-btn {
  position: relative;
}

.notif-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  background: var(--danger, #ef4444);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0b1426;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
  animation: notifPulse 2.5s infinite;
}

@keyframes notifPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.header-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: rgba(11, 20, 38, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 1000;
  overflow: hidden;
  animation: popoverFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.notif-popover {
  width: 380px;
}

.popover-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.popover-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notif-title-badge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.popover-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.popover-subtitle {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  margin-top: 4px;
}

.notif-unread-chip {
  padding: 2px 7px;
  background: rgba(47, 123, 255, 0.2);
  border: 1px solid rgba(47, 123, 255, 0.4);
  color: #60a5fa;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
}

.notif-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-notif-text {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}

.btn-notif-text:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-notif-text.danger:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
}

.btn-popover-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted, #94a3b8);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.15s;
}

.btn-popover-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Notif Filter Tabs */
.notif-filter-tabs {
  display: flex;
  gap: 4px;
  margin-top: 10px;
}

.notif-ftab {
  flex: 1;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  color: var(--text-muted, #94a3b8);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.notif-ftab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.notif-ftab.active {
  background: rgba(47, 123, 255, 0.2);
  border-color: rgba(47, 123, 255, 0.4);
  color: #fff;
}

.notif-body {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px 10px;
}

.notif-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notif-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.15s;
  cursor: pointer;
  position: relative;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.notif-item.unread {
  background: rgba(47, 123, 255, 0.08);
  border-color: rgba(47, 123, 255, 0.2);
}

.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-item-icon.success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.notif-item-icon.error { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.notif-item-icon.warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.notif-item-icon.info { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

.notif-item-content {
  flex: 1;
  min-width: 0;
}

.notif-top,
.notif-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.notif-title,
.notif-item-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.notif-top-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.notif-time,
.notif-item-time {
  font-size: 10px;
  color: var(--text-dim, #64748b);
  white-space: nowrap;
}

.notif-item-del-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim, #64748b);
  cursor: pointer;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
}

.notif-item-del-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.notif-item-desc {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  margin-top: 2px;
  line-height: 1.4;
  word-break: break-word;
}

.notif-empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted, #94a3b8);
}

.notif-empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim, #64748b);
}

.notif-empty h4 {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 4px;
}

.notif-empty p {
  font-size: 11px;
  color: var(--text-dim, #64748b);
  line-height: 1.45;
}

/* Connection Status Popover */
.conn-status-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
}

.conn-status-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  transition: all 0.15s;
}

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

.conn-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.conn-item-icon.fb { background: rgba(24, 119, 242, 0.12); }
.conn-item-icon.ext { background: rgba(16, 185, 129, 0.12); color: #34d399; }
.conn-item-icon.token { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }

.conn-item-info {
  flex: 1;
  min-width: 0;
}

.conn-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.conn-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}

.conn-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
}

.conn-pill.success {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.conn-pill.warning {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.conn-pill.error {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.conn-desc {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  margin-top: 2px;
  display: block;
}

.popover-actions {
  display: flex;
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-popover-action {
  flex: 1;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-popover-action:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-popover-action.primary {
  background: #1877F2;
  border-color: #1877F2;
}

.btn-popover-action.primary:hover {
  background: #166fe5;
}

/* ═══════════════════════════════════════════════════════════════
   SETTINGS TAB STYLING
═══════════════════════════════════════════════════════════════ */
.settings-subnav {
  display: flex;
  gap: 6px;
  padding: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.settings-nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-muted, #94a3b8);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.settings-nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.settings-nav-btn.active {
  color: #fff;
  background: rgba(47, 123, 255, 0.18);
  border-color: rgba(47, 123, 255, 0.35);
  box-shadow: 0 4px 12px rgba(47, 123, 255, 0.2);
}

.settings-subcontent {
  padding: 20px;
  margin-bottom: 20px;
}

.set-card-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.set-card-title-group h3 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.set-card-title-group p {
  font-size: 11.5px;
  color: var(--text-muted, #94a3b8);
}

.set-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.set-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.set-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #cbd5e1;
}

.set-input {
  width: 100%;
  padding: 9px 12px;
  background: rgba(6, 11, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #f1f5f9;
  font-size: 12px;
  outline: none;
  transition: all 0.2s;
}

.set-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.set-input.textarea-small {
  height: 64px;
  resize: vertical;
  font-family: monospace;
  font-size: 11px;
}

.set-hint {
  font-size: 10.5px;
  color: var(--text-dim, #64748b);
  line-height: 1.35;
}

.set-toggles-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.set-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.set-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.set-toggle-title {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}

.set-toggle-desc {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
}

.safe-switch-sm {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
}

.safe-switch-sm input {
  opacity: 0;
  width: 0;
  height: 0;
}

.safe-switch-sm .safe-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 20px;
}

.safe-switch-sm .safe-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.safe-switch-sm input:checked + .safe-slider {
  background-color: #38bdf8;
}

.safe-switch-sm input:checked + .safe-slider:before {
  transform: translateX(18px);
}

.set-actions-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Account Profile Card */
.acc-profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 16px;
}

.acc-avatar-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.acc-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(47, 123, 255, 0.15);
  border: 2px solid rgba(47, 123, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  overflow: hidden;
}

.acc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.acc-status-badge {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.acc-status-badge.online {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.acc-info-details {
  flex: 1;
}

.acc-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.acc-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  margin-bottom: 4px;
}

.acc-meta-label {
  color: var(--text-muted, #94a3b8);
}

.acc-meta-val {
  color: #e2e8f0;
  font-family: monospace;
  font-size: 11px;
}

.acc-meta-status {
  color: #f87171;
  font-weight: 600;
}

.acc-meta-status.online {
  color: #34d399;
}

.btn-copy-small {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 12px;
  opacity: 0.7;
  padding: 0 4px;
  transition: opacity 0.15s;
}

.btn-copy-small:hover {
  opacity: 1;
}

.acc-actions-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Token Overview Boxes */
.token-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.token-status-box {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.token-box-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.tbox-name {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}

.tbox-badge {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.tbox-badge.valid {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.token-val-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  margin-bottom: 6px;
}

.token-val-row code {
  font-size: 10.5px;
  color: #38bdf8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.token-box-hint {
  font-size: 10px;
  color: var(--text-dim, #64748b);
  display: block;
}

.set-manual-token-card {
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.set-sub-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

/* Proxy Form */
.proxy-toggle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 16px;
}

.proxy-text-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proxy-title-text {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}

.proxy-desc-text {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
}

.proxy-test-status {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  margin: 12px 0;
  background: rgba(47, 123, 255, 0.15);
  border: 1px solid rgba(47, 123, 255, 0.3);
  color: #93c5fd;
}

.proxy-test-status.success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.proxy-test-status.error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* Data & Storage Management */
.data-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.data-stat-card {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
}

.data-stat-num {
  font-size: 18px;
  font-weight: 700;
  color: #38bdf8;
}

.data-stat-lbl {
  font-size: 10.5px;
  color: var(--text-muted, #94a3b8);
}

.data-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.data-box-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: all 0.2s;
}

.data-box-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.data-box-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.data-box-icon.export { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.data-box-icon.import { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.data-box-icon.backup { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.data-box-icon.restore { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.data-box-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.data-box-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.data-box-info p {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.4;
  margin-bottom: 10px;
  flex: 1;
}

.btn-data-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  width: fit-content;
}

.btn-data-act:hover {
  background: rgba(47, 123, 255, 0.2);
  border-color: rgba(47, 123, 255, 0.4);
}

.btn-data-act:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Danger Zone */
.data-danger-zone {
  padding: 16px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 12px;
}

.danger-zone-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #f87171;
  margin-bottom: 4px;
}

.danger-zone-desc {
  font-size: 11px;
  color: #fca5a5;
  margin-bottom: 12px;
  opacity: 0.85;
}

.danger-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-danger-outline {
  padding: 7px 12px;
  border-radius: 7px;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fff;
  border-color: #ef4444;
}

.btn-danger-fill {
  padding: 7px 14px;
  border-radius: 7px;
  background: #dc2626;
  border: 1px solid #ef4444;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

.btn-danger-fill:hover {
  background: #b91c1c;
}

/* ─── Global App Toast ─── */
.app-global-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-24px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(47, 123, 255, 0.25);
  backdrop-filter: blur(20px);
  color: #fff;
  padding: 10px 22px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-global-toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.app-global-toast.success {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(16, 185, 129, 0.35);
}

.app-global-toast.error {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(239, 68, 68, 0.35);
}

.app-global-toast.warning {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(245, 158, 11, 0.35);
}

/* Popover Demo Toggle Button */
.btn-popover-action.demo-active {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

/* ═══════════════════════════════════════════════════════════════
   ANTIDETECT CHỐNG DÍNH SPAM (GẬY) STYLING
═══════════════════════════════════════════════════════════════ */

/* Sidebar Navigation Tab */
.nav-tab-antispam {
  position: relative;
  justify-content: space-between;
}

.nav-tab-antispam .nav-tab-left {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.nav-tab-antispam span {
  white-space: normal;
  line-height: 1.25;
  font-size: 13px;
}

.nav-antispam-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.nav-antispam-badge-dot.inactive {
  background: #64748b;
  box-shadow: none;
}

/* Composer Compact Antidetect Banner */
.composer-antidetect-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 12px;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}

.composer-antidetect-banner:hover {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.12);
}

.composer-antidetect-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.composer-antidetect-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.composer-antidetect-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.composer-antidetect-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}

.composer-antidetect-status {
  font-size: 11.5px;
  font-weight: 500;
  color: #34d399;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer-antidetect-status.inactive {
  color: #f87171;
}

.btn-config-antidetect {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.32);
  color: #34d399;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-config-antidetect:hover {
  background: rgba(16, 185, 129, 0.26);
  border-color: rgba(16, 185, 129, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Dedicated Antidetect Tab Header */
.antispam-header-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.65));
  border-color: rgba(16, 185, 129, 0.3);
}

.antispam-icon-glow {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  color: #34d399 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.22);
}

.antispam-header-title-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.antispam-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: inline-flex;
  align-items: center;
}

.antispam-status-badge.inactive {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}

.antispam-master-toggle-wrap {
  display: flex;
  align-items: center;
  padding-left: 12px;
}

/* Presets Card */
.antispam-presets-card {
  padding: 16px 20px;
  margin-bottom: 20px;
}

.presets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.presets-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
}

.presets-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.preset-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.preset-btn:hover {
  background: rgba(56, 189, 248, 0.06);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.preset-btn.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.15);
}

.preset-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.preset-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.preset-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
}

.preset-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Antispam Grid & Cards */
.antispam-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.antispam-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.antispam-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-header-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.antispam-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
}

.antispam-card-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 2px 0 0 0;
  line-height: 1.35;
}

/* Delay Visualizer Bar */
.delay-visualizer-bar {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 4px;
}

.visualizer-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.visualizer-label strong {
  color: #34d399;
  font-weight: 700;
}

.visualizer-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.visualizer-fill {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  border-radius: 4px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.visualizer-note {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
}

/* Tips Box */
.antispam-tips-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  font-size: 11.5px;
  line-height: 1.45;
}

.antispam-tips-box svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #60a5fa;
}

/* Actions Footer */
.antispam-actions-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}

.btn-save-antispam {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 9px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}

.btn-save-antispam:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-reset-antispam {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset-antispam:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 950px) {
  .antispam-cards-grid {
    grid-template-columns: 1fr;
  }

  .presets-grid {
    grid-template-columns: 1fr;
  }

  .composer-antidetect-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-config-antidetect {
    align-self: flex-end;
  }
}

/* ─── PRODUCTION LICENSE SYSTEM V3 STYLES ───────────────────────────────── */
.license-device-badge-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 6px 12px;
  margin-bottom: 14px;
  font-size: 11.5px;
  color: var(--text-dim);
}

.dev-badge-val {
  color: var(--primary-light);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Expired & Revoked Modal Styling */
.license-expired-modal {
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 50px rgba(239, 68, 68, 0.2);
}

.license-expired-icon-orb {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: rgba(239, 68, 68, 0.12);
  border: 1.5px solid rgba(239, 68, 68, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.25);
}

.license-revoked-modal {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.2);
}

.license-revoked-icon-orb {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: rgba(245, 158, 11, 0.12);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.25);
}

.license-expired-card {
  width: 100%;
  background: rgba(10, 18, 36, 0.85);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lexp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.lexp-lbl {
  color: var(--text-dim);
}

.lexp-val {
  font-weight: 600;
  color: #fff;
}

.license-expired-notice-box, .license-revoked-notice-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 12px;
  line-height: 1.5;
  color: #fca5a5;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.license-revoked-notice-box {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fde68a;
}

.license-modal-actions-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.btn-renew-large {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-button);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.4);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-renew-large:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.55);
}

.btn-enter-new-key {
  width: 100%;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-button);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-enter-new-key:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-link-support {
  color: var(--primary-light);
  font-size: 13px;
  text-decoration: none;
  text-align: center;
  transition: color 0.2s;
}

.btn-link-support:hover {
  text-decoration: underline;
  color: #fff;
}

/* ─── LICENSE STATUS DASHBOARD (Requirement 8) ────────────────────────── */
.license-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.dash-stat-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s;
}

.dash-stat-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.dash-stat-lbl {
  font-size: 11.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.dash-stat-val {
  font-size: 14px;
  color: #FFFFFF;
  font-weight: 500;
  word-break: break-all;
}

.dash-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.dash-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Status Badge Pills */
.status-badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.status-badge-pill.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.status-badge-pill.badge-expiring {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.status-badge-pill.badge-expired {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}

.status-badge-pill.badge-revoked, .status-badge-pill.badge-disabled {
  background: rgba(148, 163, 184, 0.15);
  color: #94A3B8;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* Device Usage Bar */
.dash-device-usage-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-device-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.dash-device-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6, #10B981);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Device Fingerprint Card */
.license-device-info-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dev-info-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dev-info-icon {
  font-size: 24px;
}

.dev-info-title {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
}

.dev-info-code {
  font-size: 13px;
  color: var(--primary-light);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.dev-info-hint {
  font-size: 11px;
  color: #64748B;
  display: block;
  margin-top: 2px;
}

/* License Actions Toolbar */
.license-actions-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.btn-deactivate-device {
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #F87171 !important;
}

.btn-deactivate-device:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: #EF4444 !important;
}

/* License Server Config */
.license-server-config-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px 18px;
}

.lserver-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.lserver-header h4 {
  font-size: 13.5px;
  color: #FFFFFF;
  font-weight: 600;
}

.lserver-status {
  font-size: 11.5px;
  color: #10B981;
  font-weight: 600;
}

.lserver-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 12px;
}

.lserver-input-row {
  display: flex;
  gap: 8px;
}

.lserver-input-row input {
  flex: 1;
}

@media (max-width: 950px) {
  .license-dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .license-dashboard-grid {
    grid-template-columns: 1fr;
  }
}




/* ═══ EXTENSION PACKAGE & INSTALL GUIDE ═══ */
.btn-extension-pkg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-extension-pkg:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.45);
}
.btn-extension-app {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-extension-app:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.7);
  color: #A7F3D0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.btn-extension-guide {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(30, 41, 59, 0.85);
  color: #93C5FD;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-extension-guide:hover {
  background: rgba(30, 41, 59, 1);
  border-color: rgba(59, 130, 246, 0.6);
  color: #BFDBFE;
}

/* Extension Install Guide Modal */
.guide-install-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 18px 0;
}
.guide-install-step {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
}
.guide-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563EB;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.guide-step-body h4 {
  font-size: 13.5px;
  font-weight: 600;
  color: #F8FAFC;
  margin-bottom: 4px;
}
.guide-step-body p {
  font-size: 12.5px;
  color: #94A3B8;
  line-height: 1.5;
  margin: 0;
}
.guide-step-body code {
  background: rgba(15, 23, 42, 0.8);
  color: #38BDF8;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
}

/* ─── Chrome Extension Popup Mode Optimization ─── */
@media screen and (max-width: 850px) {
  html, body {
    width: 780px !important;
    min-width: 780px !important;
    max-width: 800px !important;
    height: 590px !important;
    max-height: 600px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  .app-wrapper {
    max-width: 100% !important;
    padding: 0 !important;
  }
  .header {
    padding: 10px 16px !important;
  }
  .header-subtitle {
    display: none !important;
  }
  .composer-layout, .settings-layout, .lists-layout, .scheduler-layout {
    grid-template-columns: 1fr !important;
  }
}


/* The settings arrow controls only the navigation tree. */
.nav-settings-header{display:flex;align-items:center;gap:2px;width:100%}
.nav-settings-header>.nav-tab-parent{flex:1;min-width:0;width:auto}
.nav-settings-toggle{display:grid;place-items:center;flex:0 0 34px;width:34px;height:38px;padding:0;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--text-muted);cursor:pointer}
.nav-settings-toggle:hover{background:var(--card-bg);border-color:var(--card-border)}
.nav-settings-toggle:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}
.nav-tree-item:not(.expanded)>.nav-sub-tree{display:none}
