/* ==============================================================================
   Facebook Page Publisher - Modern Stylesheet
   ============================================================================== */

:root {
  /* ==============================================================================
     Theme: VibePage 1/4 Xám xanh nhẹ (Light Grey-Green & Deep Forest)
     Thanh bên (giữ nguyên): #112B2B
     Nền bên phải: #E9EEEF, Khối nội dung: #F5F7F7
     Nền tiêu đề: #DFE7E8, Đường kẻ: #C9D5D8
     Nền dòng dữ liệu: #EDF2F1, Khi rê chuột: #E1EBE7
     Chữ chính: #2A3C40, Chữ phụ: #596C72, Nền đang chọn: #DDEDE7
     ============================================================================== */
  --primary: #068567;
  --primary-hover: #056e55;
  --primary-light: #ddede7;
  --primary-dark: #034e46;
  --primary-mint: #068567;
  --primary-border: #c9d5d8;
  --primary-glow: rgba(6, 133, 103, 0.16);
  --accent-amber: #d97706;
  --accent-coral: #dc2626;
  --bg-main: #e9eeef;
  --bg-card: #f5f7f7;
  --bg-card-inner: #f5f7f7;
  --table-header-bg: #dfe7e8;
  --table-row-bg: #edf2f1;
  --table-row-hover: #e1ebe7;
  --text-main: #2a3c40;
  --text-body: #2a3c40;
  --text-muted: #596c72;
  --text-dim: #7a8e94;
  --border-color: #c9d5d8;
  --border-light: #dfe7e8;
  --success: #068567;
  --success-light: #ddede7;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --purple: #7353ae;
  --purple-light: rgba(115, 83, 174, 0.12);
  --sidebar-bg: #112b2b;
  --sidebar-border: #1a3a3a;
  --active-selection-bg: #ddede7;
  --accent-point: #7353ae;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(42, 60, 64, 0.04);
  --shadow-md: 0 3px 12px rgba(17, 43, 43, 0.04);
  --shadow-lg: 0 10px 28px rgba(17, 43, 43, 0.06);
  --font-family: 'Inter', 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

input, button, select, textarea {
  font-family: inherit;
}

/* Đảm bảo FontAwesome Solid icons luôn giữ chuẩn font-weight 900 đồng nhất qua tất cả giao diện Sáng / Tối */
.fa-solid, .fas {
  font-weight: 900 !important;
}

/* Utilities */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

.text-blue { color: var(--primary) !important; }
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; color: #ffffff !important; }
.border-primary { border-color: var(--primary) !important; }
.text-green { color: var(--success, #068567); }
.text-red { color: var(--danger, #dc2626); }
.text-yellow, .text-amber, .text-warning { color: var(--warning, #d97706); }
.text-purple { color: var(--purple); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

/* Top Navigation Bar */
.top-nav {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  font-size: 2.25rem;
  color: var(--primary);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-status-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  background-color: #eee;
  color: var(--text-muted);
}

.status-badge.loading {
  background-color: var(--warning-light);
  color: #b7791f;
}

.status-badge.valid {
  background-color: var(--success-light);
  color: var(--success);
}

.status-badge.invalid {
  background-color: var(--danger-light);
  color: var(--danger);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
}

/* Page Selector */
.page-selector-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-select-wrapper {
  display: flex;
  align-items: center;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.2rem 0.5rem;
  gap: 0.4rem;
}

.page-avatar-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.page-dropdown {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  outline: none;
  max-width: 200px;
}

/* Alert Banner */
.alert-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.alert-banner.warning {
  background-color: var(--warning-light, #fffbeb);
  border: 1px solid #fde68a;
  color: #92400e;
}
.alert-banner.warning .alert-icon {
  color: var(--warning, #d97706);
}

.alert-banner.info {
  background-color: var(--primary-light, #ddede7);
  border: 1px solid #bbf0e7;
  color: var(--primary, #068567);
}
.alert-banner.info .alert-icon {
  color: var(--primary, #068567);
}

.alert-banner.danger, .alert-banner.error {
  background-color: var(--danger-light, #fef2f2);
  border: 1px solid #fecdd3;
  color: #991b1b;
}
.alert-banner.danger .alert-icon, .alert-banner.error .alert-icon {
  color: var(--danger, #dc2626);
}

.alert-banner.success {
  background-color: var(--primary-light, #ddede7);
  border: 1px solid #bbf0e7;
  color: var(--primary, #068567);
}
.alert-banner.success .alert-icon {
  color: var(--primary, #068567);
}

.alert-icon {
  font-size: 1.25rem;
}

.alert-content {
  flex: 1;
  font-size: 0.9rem;
}

/* Token Connect Card */
.token-connect-card {
  margin-bottom: 1.5rem;
  border: 1px solid #c7d2fe;
  background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
  transition: var(--transition);
}

.token-connect-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.token-connect-title-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.token-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.token-connect-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.token-connect-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.token-connect-body {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.token-input-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.token-input-wrapper {
  flex: 1;
  min-width: 280px;
  position: relative;
  display: flex;
  align-items: center;
}

.token-input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.token-input {
  width: 100%;
  padding: 0.75rem 4.5rem 0.75rem 2.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #ffffff;
  outline: none;
  transition: var(--transition);
}

.token-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.15);
}

.token-input-action-btn {
  position: absolute;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.token-input-action-btn:hover {
  color: var(--primary);
}

#toggleTokenVisibilityBtn {
  right: 2.5rem;
}

#toggleEditTokenVisibilityBtn {
  right: 0.75rem;
}

#pasteClipboardBtn {
  right: 0.5rem;
}

.btn-connect-token {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

.token-result-banner {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  animation: slideIn 0.3s ease;
}

.token-result-banner.success {
  background-color: var(--success-light);
  border: 1px solid #b7eb8f;
  color: #135200;
}

.token-result-banner.error {
  background-color: var(--danger-light);
  border: 1px solid #ffa39e;
  color: #a8071a;
}

.discovered-pages-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.discovered-page-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.discovered-page-chip img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.discovered-page-chip .page-chip-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.discovered-page-chip .chip-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discovered-page-chip .chip-id {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.stat-icon {
  font-size: 1.75rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background-color: var(--bg-main);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Publisher Grid */
.publisher-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .publisher-grid {
    grid-template-columns: 1fr;
  }
}

/* Card */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border: 1px solid transparent;
  box-sizing: border-box;
}

.badge-pill {
  border: 1px solid transparent;
  box-sizing: border-box;
}

/* Tabs */
.tab-nav {
  display: flex;
  gap: 0.5rem;
  background-color: var(--bg-main);
  padding: 0.35rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}

.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.required {
  color: var(--danger);
}

.char-count {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.form-textarea {
  width: 100%;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  resize: vertical;
  min-height: 110px;
  transition: var(--transition);
}

.form-textarea:focus,
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.form-input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-muted);
}

.input-with-icon .form-input {
  padding-left: 2.25rem;
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  background-color: var(--bg-card-inner);
  transition: var(--transition);
  position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.drop-icon {
  font-size: 2rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.drop-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
}

.browse-link {
  color: var(--primary);
  text-decoration: underline;
}

.drop-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* File Selected Card */
.file-selected-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background-color: var(--bg-main);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-top: 0.75rem;
}

.file-thumb {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
}

.file-thumb-icon {
  font-size: 2rem;
  color: var(--primary);
  width: 48px;
  text-align: center;
}

.file-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.divider-text {
  text-align: center;
  position: relative;
  margin: 1rem 0;
}

.divider-text::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background-color: var(--border-color);
  z-index: 1;
}

.divider-text span {
  position: relative;
  background: var(--bg-card);
  padding: 0 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  z-index: 2;
}

/* Composer Actions */
.composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
}

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

.btn-secondary {
  background-color: #e4e6eb;
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: #d8dadf;
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: var(--bg-main);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn-xs {
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  line-height: 1.2;
}

.btn-outline-danger {
  background-color: transparent;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline-danger:hover {
  background-color: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

.btn-icon {
  background: transparent;
  border: none;
  font-size: 1rem;
  padding: 0.4rem;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

/* Live Facebook Feed Mockup */
.preview-card {
  display: flex;
  flex-direction: column;
}

.preview-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.preview-container {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background-color: var(--bg-main);
  padding: 1rem;
  border-radius: var(--radius-sm);
}

.fb-post-mockup {
  width: 100%;
  max-width: 500px;
  background: #1a221b;
  border: 1px solid #232d24;
  color: #f3f4f6;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  font-family: inherit;
}

.fb-post-header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  gap: 0.75rem;
}

.fb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.fb-header-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.fb-page-title-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.fb-page-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

.fb-verified-badge {
  font-size: 0.75rem;
  color: var(--primary);
}

.fb-post-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.fb-post-more {
  color: var(--text-muted);
  cursor: pointer;
}

.fb-post-body {
  padding: 0.25rem 1rem 0.75rem;
}

.fb-post-text {
  font-size: 0.95rem;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
}

.fb-link-card {
  border: 1px solid var(--border-color);
  background-color: #f7f8fa;
  cursor: pointer;
}

.fb-link-thumbnail {
  height: 140px;
  background-color: #e4e6eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-muted);
}

.fb-link-info {
  padding: 0.75rem;
}

.fb-link-domain {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fb-link-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0.2rem 0;
}

.fb-link-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.fb-media-box {
  width: 100%;
  background-color: #000;
  max-height: 400px;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.fb-media-img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
}

.fb-media-video {
  width: 100%;
  max-height: 400px;
}

.fb-post-footer {
  padding: 0.5rem 1rem;
}

.fb-reaction-counts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.fb-reactions-icons {
  display: flex;
  align-items: center;
}

.fb-like-icon,
.fb-heart-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: #fff;
  border: 1px solid #fff;
}

.fb-like-icon { background: var(--primary); }
.fb-heart-icon { background: #f02849; margin-left: -4px; }
.fb-count-text { margin-left: 0.4rem; }

.fb-action-buttons {
  display: flex;
  justify-content: space-around;
  padding-top: 0.35rem;
}

.fb-action-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.fb-action-btn:hover {
  background-color: #f2f2f2;
}

/* Bottom Tabs & History */
.dashboard-tabs-section {
  margin-top: 1rem;
}

.section-tabs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section-tabs {
  display: flex;
  gap: 0.5rem;
}

.section-tab-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.section-tab-btn.active {
  background-color: var(--primary-light);
  color: var(--primary);
}

.section-tab-content {
  display: none;
}

.section-tab-content.active {
  display: block;
}

/* Tables */
.table-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.form-select-sm {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-family: inherit;
  font-size: 0.8rem;
  background-color: var(--bg-card);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.data-table th,
.data-table td {
  padding: 0.75rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background-color: var(--bg-main);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-status.success {
  background-color: var(--success-light);
  color: var(--success);
}

.badge-status.failed {
  background-color: var(--danger-light);
  color: var(--danger);
}

.badge-type {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  background-color: #eee;
  color: var(--text-muted);
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.link-btn:hover {
  text-decoration: underline;
}

/* Pagination Bar (Matching user uploaded screenshot) */
.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 0.5rem 0.5rem 0.5rem;
  font-size: 0.85rem;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
  margin-top: 0.75rem;
  user-select: none;
}

.pagination-info {
  font-size: 0.84rem;
  font-weight: 400;
  color: #64748b;
  letter-spacing: 0.01em;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-pagination-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #475569;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  padding: 0;
  outline: none;
}

.btn-pagination-circle:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-pagination-circle:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: #f9fafb;
  border-color: #e5e7eb;
  color: #9ca3af;
}

.pagination-numbers {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-pagination-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 0.5rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  outline: none;
  user-select: none;
}

.btn-pagination-num:hover:not(.active) {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-pagination-num.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
  cursor: default;
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 32px;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  user-select: none;
}

.pagination-goto-inline {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
}

.pagination-goto-inline-input {
  width: 65px;
  height: 32px;
  padding: 0 0.5rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 500;
  color: #1e293b;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  outline: none;
  transition: all 0.15s ease-in-out;
}

.pagination-goto-inline-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
  font-size: 0.8rem;
  opacity: 0.85;
}

.pagination-goto-inline-input::-webkit-input-placeholder {
  color: #94a3b8;
  font-weight: 400;
  font-size: 0.8rem;
  opacity: 0.85;
}

.pagination-goto-inline-input::-moz-placeholder {
  color: #94a3b8;
  font-weight: 400;
  font-size: 0.8rem;
  opacity: 0.85;
}

.pagination-goto-inline-input:-ms-input-placeholder {
  color: #94a3b8;
  font-weight: 400;
  font-size: 0.8rem;
  opacity: 0.85;
}

.pagination-goto-inline-input:hover:not(:disabled) {
  border-color: #94a3b8;
}

.pagination-goto-inline-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
  background: #ffffff;
}

.pagination-goto-inline-input:disabled {
  background: #f9fafb;
  border-color: #e5e7eb;
  color: #cbd5e1;
  cursor: not-allowed;
}

.pagination-goto-inline-input::-webkit-outer-spin-button,
.pagination-goto-inline-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.pagination-goto-inline-input[type=number] {
  -moz-appearance: textfield;
}

/* Diagnostics View */
.diagnostics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .diagnostics-grid {
    grid-template-columns: 1fr;
  }
}

.diag-card {
  background-color: var(--bg-main);
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.diag-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.diag-list {
  list-style: none;
  font-size: 0.85rem;
}

.diag-list li {
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--border-color);
  display: flex;
  justify-content: space-between;
}

.diag-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.permission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.perm-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: monospace;
}

.perm-badge.granted {
  background-color: var(--success-light);
  color: var(--success);
}

.perm-badge.missing {
  background-color: var(--danger-light);
  color: var(--danger);
}

.perm-badge.loading {
  background-color: #eee;
  color: var(--text-muted);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}
.modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.modal-body::-webkit-scrollbar-thumb {
  background: #c9d5d8;
  border-radius: 4px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
  background: #068567;
}

.modal-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

.json-code-block {
  background-color: #1e1e1e;
  color: #d4d4d4;
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  overflow-x: auto;
  font-family: Consolas, monospace;
}

/* Toast Notifications - Harmonized with VibePage Pearl & Forest Theme */
.toast-container {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
  contain: layout style paint;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  border: 1px solid #c9d5d8;
  color: #2a3c40;
  border-radius: 10px;
  box-shadow: 0 10px 25px -4px rgba(17, 43, 43, 0.12), 0 4px 10px -2px rgba(17, 43, 43, 0.06);
  font-size: 0.88rem;
  font-weight: 550;
  line-height: 1.45;
  border-left: 4px solid #068567;
  min-width: 280px;
  max-width: 460px;
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0);
  animation: toastSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast i {
  font-size: 1.15rem;
  flex-shrink: 0;
  color: #068567;
}

.toast span {
  flex: 1;
  word-break: break-word;
  color: #2a3c40;
}

.toast.success {
  background: #ffffff;
  border-color: #c9d5d8;
  border-left-color: #068567;
  color: #2a3c40;
}
.toast.success i {
  color: #068567 !important;
}

.toast.error {
  background: #ffffff;
  border-color: #fca5a5;
  border-left-color: #dc2626;
  color: #2a3c40;
}
.toast.error i {
  color: #dc2626 !important;
}

.toast.warning {
  background: #ffffff;
  border-color: #fde68a;
  border-left-color: #d97706;
  color: #2a3c40;
}
.toast.warning i {
  color: #d97706 !important;
}

.toast.info {
  background: #ffffff;
  border-color: #c9d5d8;
  border-left-color: #068567;
  color: #2a3c40;
}
.toast.info i {
  color: #068567 !important;
}

/* Dark mode overrides for toast */
html[data-theme="dark"] .toast {
  background: #112b2b;
  border-color: #1a3a3a;
  color: #f1f5f9;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
html[data-theme="dark"] .toast span {
  color: #f1f5f9;
}
html[data-theme="dark"] .toast.success {
  background: #132b2b;
  border-color: #1d4d4d;
  border-left-color: #068567;
}
html[data-theme="dark"] .toast.error {
  background: #271418;
  border-color: #5c1d24;
  border-left-color: #ef4444;
}
html[data-theme="dark"] .toast.error i {
  color: #f87171 !important;
}
html[data-theme="dark"] .toast.warning {
  background: #2b1f0e;
  border-color: #593e15;
  border-left-color: #f59e0b;
}
html[data-theme="dark"] .toast.warning i {
  color: #fbbf24 !important;
}
html[data-theme="dark"] .toast.info {
  background: #132b2b;
  border-color: #1d4d4d;
  border-left-color: #068567;
}

@keyframes toastSlideIn {
  from {
    transform: translate3d(35px, 0, 0);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

/* Spinner */
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

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

/* Post Scheduling Section */
.schedule-section {
  margin-top: 1.25rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  transition: var(--transition);
}

.schedule-section.active {
  background: #faf5ff;
  border-color: #d8b4fe;
}

.schedule-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* iOS-style toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.toggle-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-switch .slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .slider {
  background-color: var(--purple);
}

.toggle-switch input:checked + .slider:before {
  transform: translateX(20px);
}

.schedule-toggle-label {
  cursor: pointer;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  user-select: none;
}

.badge-schedule-mode {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--purple-light);
  color: var(--purple);
  font-weight: 600;
  margin-left: auto;
}

.badge-schedule-mode.meta {
  background: var(--primary-light);
  color: var(--primary);
}

.schedule-config-box {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: fadeIn 0.2s ease-in-out;
}

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

.schedule-options-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .schedule-options-group {
    grid-template-columns: 1fr;
  }
}

.schedule-radio-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #ffffff;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.schedule-radio-card:hover {
  border-color: #94a3b8;
}

.schedule-radio-card input[type="radio"] {
  margin-top: 0.2rem;
  accent-color: var(--purple);
  cursor: pointer;
}

.schedule-radio-card.active {
  border-color: var(--purple);
  background: #faf5ff;
  box-shadow: 0 0 0 1px var(--purple);
}

#cardScheduleMeta.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}

#cardScheduleMeta.active input[type="radio"] {
  accent-color: var(--primary);
}

.radio-card-content {
  flex: 1;
}

.radio-card-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.radio-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.schedule-time-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: #ffffff;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.schedule-time-picker-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 220px;
}

.form-label-sm {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-input-datetime {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.form-input-datetime:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 2px rgba(142, 68, 173, 0.15);
}

.quick-preset-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.preset-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.preset-chip {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  color: #334155;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.preset-chip:hover {
  background: var(--purple-light);
  border-color: var(--purple);
  color: var(--purple);
}

/* Kho Bài Viết (Queue Table) Styles */
.badge-countdown {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-countdown.upcoming {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-countdown.due {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  animation: pulse-due 1.5s infinite;
}

@keyframes pulse-due {
  0% { opacity: 1; }
  50% { opacity: 0.65; }
  100% { opacity: 1; }
}

.badge-countdown.expired {
  background: #f1f5f9;
  color: #64748b;
}

.badge-countdown.published {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-countdown.failed {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.queue-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-publish-now {
  background: var(--purple-light);
  color: var(--purple);
  border: 1px solid #d8b4fe;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition);
}

.btn-publish-now:hover {
  background: var(--purple);
  color: #ffffff;
}

.btn-delete-queue {
  background: #fee2e2;
  color: var(--danger);
  border: 1px solid #fecaca;
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
}

.btn-delete-queue:hover {
  background: var(--danger);
  color: #ffffff;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-card);
}

/* ==========================================================================
   Text Background Color Presets (Facebook Color Background)
   ========================================================================== */
.text-bg-section {
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-bg-section:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}

.text-bg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.text-bg-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.text-bg-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 1px 2px rgba(24, 119, 242, 0.12);
  flex-shrink: 0;
}

.text-bg-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.text-bg-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: -0.01em;
}

.text-bg-subtitle {
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
}

.text-bg-selected-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.7rem;
  border-radius: 9999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  transition: all 0.2s ease;
}

.text-bg-selected-pill.has-color {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.text-bg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
  display: inline-block;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.text-bg-selected-pill.has-color .text-bg-dot {
  transform: scale(1.15);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.9);
}

.color-palette-scroll {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  overflow-x: auto;
  padding: 0.45rem 0.3rem 0.65rem 0.3rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.color-palette-scroll::-webkit-scrollbar {
  height: 5px;
}
.color-palette-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.color-swatch {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, outline 0.18s ease;
  position: relative;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.color-swatch:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
}

.color-swatch.active {
  transform: translateY(-2px) scale(1.06);
  outline: 2.5px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.35);
}

.color-swatch .swatch-check {
  color: #ffffff;
  font-size: 0.85rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.color-swatch.active .swatch-check {
  opacity: 1;
  transform: scale(1);
}

/* Default / No background swatch */
.color-swatch-none {
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  color: #64748b;
  font-size: 0.85rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.color-swatch-none:hover {
  border-color: #94a3b8;
  color: #1e293b;
  background: #f8fafc;
}

.color-swatch-none.active {
  background: #eff6ff;
  border-color: var(--primary);
  border-style: solid;
  color: var(--primary);
  outline: 2.5px solid var(--primary);
}

.color-swatch-none .swatch-none-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-bg-warning {
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.4;
}

/* Facebook Colored Post Preview */
.fb-post-body.colored-background {
  min-height: 250px;
  padding: 2.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.fb-post-body.colored-background .fb-post-text {
  color: #ffffff !important;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  line-height: 1.38;
  word-break: break-word;
  white-space: pre-wrap;
  margin: 0;
  max-width: 92%;
  letter-spacing: -0.01em;
}

.badge-colored-bg {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.35rem;
}

/* Auto-Comment Section in Composer */
.auto-comment-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-top: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auto-comment-section.active {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.comment-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.comment-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text-main);
  user-select: none;
}

.badge-comment-status {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  background: #e0f2fe;
  color: #0284c7;
}

.comment-config-box {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border-color);
  animation: fadeIn 0.2s ease;
}

.comment-input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comment-textarea {
  min-height: 72px;
  resize: vertical;
  font-size: 0.9rem;
}

.comment-note {
  font-size: 0.78rem;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

/* Facebook Feed Mockup Comment Preview */
.fb-comment-preview {
  padding: 0.75rem 1rem 1rem 1rem;
  border-top: 1px solid #e4e6eb;
  background: #ffffff;
  animation: fadeIn 0.2s ease;
}

.fb-comment-item {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

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

.fb-comment-bubble {
  background: #f0f2f5;
  border-radius: 16px;
  padding: 0.5rem 0.85rem;
  max-width: 88%;
}

.fb-comment-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
}

.fb-comment-author {
  font-size: 0.82rem;
  font-weight: 700;
  color: #050505;
}

.fb-author-badge {
  font-size: 0.68rem;
  color: #1877f2;
  font-weight: 600;
  background: #e7f3ff;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
}

.fb-comment-content {
  margin: 0;
  font-size: 0.85rem;
  color: #050505;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.badge-has-comment {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #e0e7ff;
  color: #4338ca;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.35rem;
}

/* Comment Delay Settings */
.comment-delay-container {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color, #e5e7eb);
}

.comment-delay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.badge-delay-active {
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid #bfdbfe;
  display: inline-flex;
  align-items: center;
}

.comment-delay-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.delay-chip {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  padding: 0.22rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.delay-chip:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.delay-chip.active {
  background: #1877f2;
  color: #ffffff;
  border-color: #1877f2;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(24, 119, 242, 0.3);
}

.custom-delay-wrapper {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.78rem;
}

.custom-delay-wrapper:focus-within {
  border-color: #1877f2;
  box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.15);
}

.custom-delay-input {
  width: 50px;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.78rem;
  text-align: center;
  font-weight: 600;
  color: #1e293b;
}

.custom-delay-unit {
  font-size: 0.75rem;
  color: #64748b;
  margin-left: 2px;
}

.fb-comment-time {
  font-size: 0.68rem;
  color: #65676b;
  margin-left: auto;
  font-weight: 400;
}

/* Comment Photo Attachment */
.comment-photo-container {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color, #e5e7eb);
}

.comment-photo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.comment-file-preview-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.comment-file-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
}

.comment-file-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.comment-file-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-file-size {
  font-size: 0.72rem;
  color: #64748b;
}

.comment-photo-url-wrapper {
  margin-top: 0.35rem;
}

.divider-text-sm {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 0.4rem 0;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.divider-text-sm::before,
.divider-text-sm::after {
  content: '';
  flex: 1;
  border-bottom: 1px dashed #e2e8f0;
}

.divider-text-sm span {
  padding: 0 0.5rem;
}

/* Facebook Preview Comment with Photo */
.fb-comment-body {
  flex: 1;
  min-width: 0;
}

.fb-comment-photo-container {
  margin-top: 0.4rem;
  max-width: 280px;
}

.fb-comment-photo {
  max-width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ==============================================================================
   Token Pool & Multi-Page Publishing Styles
   ============================================================================== */

.text-cyan { color: #0891b2; }
.text-orange { color: #f97316; }

/* Composer Header Badges */
.header-badges-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge-rotation {
  background-color: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Composer Single Page Selector Bar */
.composer-single-page-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  margin-bottom: 0.85rem;
  transition: var(--transition);
}

.composer-page-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0;
  white-space: nowrap;
}

.composer-single-page-bar .page-select-wrapper {
  flex: 1;
  background: #ffffff;
  min-width: 0;
}

.composer-single-page-bar .page-dropdown {
  width: 100%;
  max-width: 100%;
}

/* Multi-Page Publishing Drawer */
.multi-page-publish-bar {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  transition: var(--transition);
}

.multi-page-header-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.multi-page-toggle-label {
  font-size: 0.875rem;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}

.toggle-switch-sm {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}

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

.toggle-switch-sm .slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 20px;
}

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

.toggle-switch-sm input:checked + .slider {
  background-color: var(--primary);
}

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

.badge-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background-color: var(--primary-light);
  color: var(--primary);
  margin-left: auto;
}

.multi-page-selector-box {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

.multi-page-actions-subbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.multi-page-hint {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.multi-page-quick-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-link-action {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.btn-link-action:hover {
  text-decoration: underline;
}

.multi-page-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.multi-page-tools .form-input-sm {
  flex: 1;
  min-width: 180px;
}

.multi-page-actions-btns {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.multi-page-list-grid,
.multi-page-checkboxes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.55rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.multi-page-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.multi-page-item:hover {
  border-color: #93c5fd;
  background-color: #f0f7ff;
}

.multi-page-item.selected {
  border-color: var(--primary);
  background-color: #eff6ff;
}

.multi-page-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.multi-page-item-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.multi-page-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.multi-page-item-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-page-item-tokens {
  font-size: 0.7rem;
  color: #0891b2;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

/* ==============================================================================
   Token Pool Dashboard Styles
   ============================================================================== */

.token-pool-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.token-pool-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.pool-stat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
}

.pool-stat-icon {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background-color: #f8fafc;
  flex-shrink: 0;
}

.pool-stat-meta {
  display: flex;
  flex-direction: column;
}

.pool-stat-num {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.pool-stat-lbl {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

/* Pool Toolbar */
.token-pool-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
}

.token-pool-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.token-pool-algorithm-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #334155;
  background-color: #ecfeff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
}

/* Token Status Badges in Pool Table */
.pool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.pool-badge.active {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.pool-badge.rate_limited {
  background-color: #ffedd5;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.pool-badge.expired {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.pool-badge.disabled {
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.token-mask-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  background-color: #f1f5f9;
  color: #334155;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  display: inline-block;
}

.page-tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  max-width: 340px;
}

.badge-page-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(6, 182, 212, 0.08);
}

.badge-page-count i {
  color: #06b6d4;
}

.page-tag-pill {
  font-size: 0.7rem;
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-tag-pill.more-tag {
  background-color: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.token-usage-stats {
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.token-usage-success {
  color: #16a34a;
  font-weight: 600;
}

.token-usage-fail {
  color: #dc2626;
  font-size: 0.7rem;
}

.token-action-btns {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-icon-xs {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.75rem;
}

.btn-icon-xs:hover {
  background-color: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.btn-icon-xs.btn-test:hover {
  color: #0284c7;
  border-color: #7dd3fc;
  background-color: #f0f9ff;
}

.btn-icon-xs.btn-delete:hover {
  color: #dc2626;
  border-color: #fca5a5;
  background-color: #fef2f2;
}

.modal-lg {
  max-width: 650px;
}

.modal-notice {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.78rem;
  color: #475569;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.modal-notice i {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.spinner-sm {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 0.35rem;
}

/* ==============================================================================
   Token Pool Batch Actions & Card Rows Layout (Matches Reference UI)
   ============================================================================== */

.token-batch-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  margin-top: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.batch-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.batch-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
  user-select: none;
}

.batch-checkbox {
  width: 17px;
  height: 17px;
  accent-color: #0284c7;
  cursor: pointer;
}

.batch-count-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0284c7;
}

.btn-batch-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0284c7;
  background-color: #ffffff;
  border: 1.5px solid #0284c7;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-batch-refresh:hover:not(:disabled) {
  background-color: #f0f9ff;
  border-color: #0369a1;
  color: #0369a1;
}

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

.btn-batch-delete {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #dc2626;
  background-color: #ffffff;
  border: 1.5px solid #ef4444;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-batch-delete:hover:not(:disabled) {
  background-color: #fef2f2;
  border-color: #b91c1c;
  color: #b91c1c;
}

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

.btn-link-action {
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.btn-link-action:hover {
  color: #0f172a;
  text-decoration: underline;
}

.batch-tip-text {
  font-size: 0.76rem;
  color: #64748b;
  font-style: normal;
}

/* Pagination / Filter Control Bar */
.token-list-control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.65rem;
  margin-bottom: 0.5rem;
  padding: 0 0.25rem;
}

.control-bar-left, .control-bar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-label {
  font-size: 0.78rem;
  color: #475569;
  font-weight: 500;
}

.control-select {
  font-size: 0.78rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  background-color: #ffffff;
  color: #1e293b;
  outline: none;
  cursor: pointer;
}

.control-pagination-info {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}

.pool-pagination-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-pagination-xs {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #ffffff;
  font-size: 0.7rem;
  cursor: pointer;
  color: #475569;
  transition: all 0.15s;
}

.btn-pagination-xs:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-pagination-xs:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-num-indicator {
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f172a;
  padding: 0 0.35rem;
}

/* Token Card List */
.token-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  user-select: none;
}

.token-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  padding: 0.65rem 0.95rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  transition: all 0.12s ease-in-out;
  cursor: pointer;
}

.token-card-row:hover {
  border-color: #93c5fd;
  background-color: #f8fafc;
}

.token-card-row.selected {
  border-color: #38bdf8 !important;
  background-color: #f0f9ff !important;
  box-shadow: 0 0 0 1px #38bdf8;
}

.token-row-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.token-row-checkbox {
  width: 17px;
  height: 17px;
  accent-color: #0284c7;
  cursor: pointer;
  flex-shrink: 0;
}

.token-row-index {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  min-width: 24px;
  flex-shrink: 0;
}

.token-status-icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  font-size: 1.05rem;
}

.token-status-icon-circle.status-active {
  color: #16a34a;
}

.token-status-icon-circle.status-rate_limited {
  color: #f59e0b;
}

.token-status-icon-circle.status-spam_blocked {
  color: #e11d48;
}

.token-status-icon-circle.status-checkpoint,
.token-status-icon-circle.status-expired,
.token-status-icon-circle.status-error {
  color: #dc2626;
}

.token-row-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.token-row-title-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.token-type-pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.12rem 0.42rem;
  border-radius: 4px;
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  letter-spacing: 0.02em;
}

.token-row-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.token-row-shortid {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 500;
}

.token-status-text {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: lowercase;
}

.token-status-text.status-active {
  color: #16a34a;
}

.token-status-text.status-rate_limited {
  color: #d97706;
}

.token-status-text.status-spam_blocked {
  color: #e11d48;
}

.token-status-text.status-checkpoint,
.token-status-text.status-expired,
.token-status-text.status-error {
  color: #dc2626;
}

.token-bm-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  background-color: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  white-space: nowrap;
}

.token-row-sub-line {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.75rem;
  color: #64748b;
}

.token-sub-pages strong {
  color: #0f172a;
  font-weight: 700;
}

.token-sub-used {
  color: #475569;
}

.token-sub-used strong {
  color: #0f172a;
  font-weight: 600;
}

.token-sub-last {
  color: #64748b;
}

.token-row-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: 0.75rem;
}

.btn-row-action {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.85rem;
}

.btn-row-action:hover {
  background-color: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.btn-row-action.btn-refresh-token:hover {
  background-color: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
}

.btn-row-action.btn-delete-token:hover {
  background-color: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

/* ==============================================================================
   Modal Tabs & Token Groups Manager
   ============================================================================== */

.modal-tabs-header {
  display: flex;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.35rem 0.85rem 0;
  gap: 0.5rem;
}

.modal-tab-button {
  padding: 0.6rem 1.1rem;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
}

.modal-tab-button:hover {
  color: #0f172a;
}

.modal-tab-button.active {
  color: #0284c7;
  border-bottom-color: #0284c7;
  background-color: #ffffff;
  border-radius: 6px 6px 0 0;
  font-weight: 700;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.04);
}

.modal-tab-panel {
  display: block;
}

.modal-tab-panel.hidden {
  display: none !important;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.token-groups-manager-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  margin-top: 0.75rem;
}

.token-groups-manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #e2e8f0;
}

.token-groups-manager-header h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.token-groups-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 200px;
  overflow-y: auto;
}

.token-group-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  transition: all 0.12s ease;
}

.token-group-item-row:hover {
  border-color: #cbd5e1;
  background-color: #f1f5f9;
}

.token-group-item-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.token-group-item-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.token-group-item-desc {
  font-size: 0.74rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.token-group-item-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  background-color: #eff6ff;
  color: #0284c7;
  border: 1px solid #bfdbfe;
  white-space: nowrap;
}

.token-group-item-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-delete-group {
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-delete-group:hover {
  color: #dc2626;
  background-color: #fee2e2;
}

/* ==========================================================================
   Spin Content & Biến Thể Icon Styling (@icon{SetName})
   ========================================================================== */

.caption-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

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

.btn-spin-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: #4f46e5;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  padding: 0.22rem 0.65rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-spin-trigger:hover {
  background-color: #e0e7ff;
  border-color: #a5b4fc;
  color: #4338ca;
  transform: translateY(-1px);
}

.btn-reroll-spin {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #4338ca;
  background: #e0e7ff;
  border: 1px solid #c7d2fe;
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reroll-spin:hover {
  background-color: #c7d2fe;
  color: #312e81;
}

#iconSpinModal,
#textSpinModal {
  z-index: 99998 !important;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(2px);
}

.icon-spin-modal-box,
.text-spin-modal-box {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.btn-inserted-flash {
  background-color: #16a34a !important;
  color: #ffffff !important;
  border-color: #15803d !important;
  transform: scale(1.04);
  transition: all 0.15s ease;
}

.icon-spin-modal-box {
  max-width: 660px;
  width: 95%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.icon-spin-modal-box .modal-body {
  overflow-y: auto;
  max-height: calc(92vh - 130px);
  padding-right: 0.5rem;
}

.spin-target-selector-row {
  display: none !important;
}

.spin-target-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.spin-target-options {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.spin-target-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
}

.spin-target-radio-label input[type="radio"] {
  accent-color: #2563eb;
  cursor: pointer;
}

/* Info box matching screenshot */
.icon-spin-infobox {
  background-color: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #2563eb;
  font-size: 0.84rem;
  line-height: 1.45;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.icon-spin-infobox .info-icon {
  margin-top: 0.15rem;
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* Icon Cards List */
.icon-sets-cards-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  contain: content;
}

.icon-set-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  contain: layout style;
}

.icon-set-card.unselected {
  background-color: #ffffff;
  border-color: #e2e8f0;
  cursor: pointer;
}

.icon-set-card.unselected:hover {
  border-color: #94a3b8;
  background-color: #f8fafc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.icon-set-card.selected.featured {
  background-color: #eff6ff;
  border: 2px solid #2563eb;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.12);
}

/* Instant CSS-driven expansion: unselected only displays first 8 emojis */
.icon-set-card.unselected .icon-single-emoji:nth-child(n+9) {
  display: none !important;
}

.icon-set-card.selected .icon-more-preview {
  display: none !important;
}

/* Badges */
.icon-badge-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 38px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #ffffff;
  flex-shrink: 0;
  user-select: none;
}

.icon-badge-box.badge-blue {
  background-color: #2563eb;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}

.icon-badge-box.badge-gray,
.icon-badge-box.badge-dark-gray {
  background-color: #334155;
  color: #f8fafc;
}

/* Emojis flow */
.icon-set-emojis-flow {
  flex: 1;
  min-width: 0;
  font-size: 1.18rem;
  line-height: 1.6;
  word-break: break-word;
  user-select: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.35rem;
  align-items: center;
  contain: layout;
}

.icon-more-preview {
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.12rem 0.45rem;
  margin-left: 0.25rem;
  user-select: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.icon-set-card.unselected:hover .icon-more-preview {
  color: #1d4ed8;
  background-color: #dbeafe;
  border-color: #bfdbfe;
}

.icon-single-emoji {
  cursor: pointer;
  border-radius: 4px;
  padding: 1px 2px;
  display: inline-block;
  user-select: none;
  transform: translateZ(0);
}

.icon-single-emoji:hover {
  transform: scale(1.35);
  background-color: rgba(37, 99, 235, 0.15);
}

/* Action group */
.icon-set-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.icon-tag-pill {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.32rem 0.65rem;
  user-select: all;
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-tag-pill.pill-blue {
  color: #2563eb;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
}

.icon-tag-pill.pill-blue:hover {
  background-color: #dbeafe;
  border-color: #93c5fd;
}

.icon-tag-pill.pill-dark {
  color: #475569;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
}

.icon-tag-pill.pill-dark:hover {
  color: #1e293b;
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-use-icon-set {
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 0.38rem 1.15rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-use-icon-set.btn-blue {
  color: #ffffff;
  background-color: #2563eb;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.btn-use-icon-set.btn-blue:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.btn-use-icon-set.btn-dark {
  color: #ffffff;
  background-color: #475569;
}

.btn-use-icon-set.btn-dark:hover {
  background-color: #334155;
  transform: translateY(-1px);
}

/* Spin Tester Section */
.spin-preview-tester-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
}

.spin-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.spin-guide-tip {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.4;
  flex: 1;
}

.spin-guide-tip code {
  background: #e2e8f0;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  color: #0f172a;
  font-weight: 600;
}

.spin-preview-results-box {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #cbd5e1;
}

.spin-preview-results-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.5rem;
}

.spin-preview-samples-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.spin-sample-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  color: #1e293b;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.spin-sample-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* ==========================================================================
   Biến Thể Text (#text{...}) Styles
   ========================================================================== */
.btn-spin-text-trigger {
  background-color: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
}

.btn-spin-text-trigger:hover {
  background-color: #dbeafe !important;
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
}

.text-spin-modal-box {
  max-width: 660px;
  width: 95%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.text-spin-modal-box .modal-body {
  overflow-y: auto;
  max-height: calc(92vh - 130px);
  padding-right: 0.5rem;
}

.text-spin-builder-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.85rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.text-spin-builder-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.text-spin-inputs-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.text-spin-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.text-spin-item-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e0e7ff;
  color: #4338ca;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.btn-remove-text-spin-item {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 0.35rem;
  transition: color 0.15s ease;
}

.btn-remove-text-spin-item:hover {
  color: #ef4444;
}

.text-spin-builder-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.text-spin-preview-tag-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
}

.text-spin-preview-label-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
}

.text-spin-preview-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}

.text-spin-generated-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  border: 1px solid #bfdbfe;
  word-break: break-all;
}

.text-spin-presets-section {
  margin-bottom: 1rem;
}

.text-spin-presets-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.text-spin-presets-grid {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.text-spin-preset-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.text-spin-preset-card:hover {
  border-color: #93c5fd;
  background-color: #f8fafc;
}

.text-spin-preset-header {
  display: flex;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-spin-preset-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==============================================================================
   Modern App Shell & Dashboard Layout
   ============================================================================== */

.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-color: #f8fafc;
}

/* Left Navigation Sidebar (BankCo Light Theme matching user reference) */
.app-sidebar {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1rem 0.75rem;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  border-right: 1px solid #edf2f7;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.03);
  user-select: none;
  overflow-y: auto;
  overflow-x: hidden;
}

.app-sidebar::-webkit-scrollbar {
  width: 4px;
}
.app-sidebar::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 4px;
}
.app-sidebar::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1;
}

/* Sidebar Brand Header */
.app-sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.5rem 1.15rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid #f1f5f9;
}

.app-sidebar-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
  border: none;
  margin-bottom: 0;
}

.app-sidebar-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.45);
}

.app-sidebar-brand-text {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.app-sidebar-brand-text .brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.app-sidebar-brand-text .brand-badge {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

.app-sidebar-scroll-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Nav Sections */
.nav-section-group {
  margin-bottom: 0.85rem;
}

.nav-section-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #8e95a5;
  text-transform: capitalize;
  padding: 0 0.5rem 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
  letter-spacing: 0.01em;
  line-height: 1.4;
  box-sizing: border-box;
}

.app-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
  align-items: stretch;
}

.app-nav-item {
  width: 100%;
  height: 42px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #1e293b;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  padding: 0 0.75rem;
  gap: 0.75rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  position: relative;
  font-size: 0.885rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  text-align: left;
}

.app-nav-item:hover {
  background-color: rgba(34, 197, 94, 0.06);
  color: #16a34a;
}

.app-nav-item.active {
  background-color: #f0fdf4;
  color: #15803d;
  font-weight: 600;
}

.bankco-icon-wrap {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bankco-icon-wrap svg {
  width: 20px;
  height: 20px;
  display: block;
}

.app-nav-item .nav-item-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.885rem;
  letter-spacing: -0.01em;
  color: inherit;
  font-weight: 600;
}

.app-nav-item .nav-item-arrow {
  color: #94a3b8;
  font-size: 0.75rem;
  margin-left: auto;
  transition: color 0.15s ease;
}

.app-nav-item:hover .nav-item-arrow {
  color: #16a34a;
}

.app-nav-item.active .nav-item-arrow {
  color: #16a34a;
}

.app-nav-item .nav-item-badge {
  position: static;
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #22c55e;
  color: #ffffff;
  font-size: 0.725rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.35);
}

.app-nav-item .nav-item-badge.hidden {
  display: none !important;
}

.nav-status-dot-green {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

/* App Main Viewport */
.app-main-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: #f8fafc;
  position: relative;
}

/* Center View Loading Overlay (SO9-Style Clean Spinner) */
.view-loading-overlay {
  position: absolute;
  top: 60px; /* Below topbar */
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 85;
  pointer-events: none;
}

.view-loading-overlay.hidden {
  display: none !important;
}

.view-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: #1877f2;
  border-radius: 50%;
  animation: viewSpin 0.6s linear infinite;
}

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

.app-topbar {
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.topbar-view-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ==============================================================================
   Grand System Refresh Button (Làm mới toàn bộ hệ thống)
   ============================================================================== */

.btn-system-refresh {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.38rem 0.95rem 0.38rem 0.45rem;
  background: linear-gradient(135deg, #047857 0%, #059669 40%, #10b981 75%, #059669 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(16, 185, 129, 0.35), 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  user-select: none;
  font-family: inherit;
}

/* Moving shimmer light beam across button */
.btn-system-refresh-shimmer {
  position: absolute;
  top: 0;
  left: -130%;
  width: 70%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.32) 50%,
    transparent 100%
  );
  transform: skewX(-22deg);
  transition: left 0.75s ease-in-out;
  pointer-events: none;
}

.btn-system-refresh:hover .btn-system-refresh-shimmer {
  left: 140%;
}

.btn-system-refresh:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.45), 0 0 14px rgba(5, 150, 105, 0.4);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-system-refresh:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
}

/* Grand Glowing Icon Badge */
.system-refresh-icon-badge {
  position: relative;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.btn-system-refresh:hover .system-refresh-icon-badge {
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.6), inset 0 1px 3px rgba(255, 255, 255, 0.7);
}

/* Icon rotation and styling */
.system-refresh-icon {
  font-size: 0.95rem;
  color: #ffffff;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-system-refresh:hover .system-refresh-icon {
  transform: rotate(180deg);
}

/* Subtle breathing pulse ring behind icon badge */
.system-refresh-pulse-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.btn-system-refresh:hover .system-refresh-pulse-ring {
  opacity: 0.85;
  animation: systemRefreshRingPulse 1.8s infinite ease-out;
}

@keyframes systemRefreshRingPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.85;
  }
  70% {
    transform: scale(1.4);
    opacity: 0;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

/* Text group */
.system-refresh-text-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.system-refresh-title {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  color: #ffffff;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.system-refresh-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.12rem 0.45rem;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 9999px;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

/* Refreshing (Loading) active animation state */
.btn-system-refresh.is-refreshing {
  pointer-events: none;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #9333ea 100%);
  box-shadow: 0 0 18px rgba(79, 70, 229, 0.6), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-system-refresh.is-refreshing .system-refresh-icon {
  animation: systemRefreshSpin 0.75s linear infinite !important;
}

.btn-system-refresh.is-refreshing .system-refresh-pulse-ring {
  opacity: 1;
  animation: systemRefreshRingPulse 0.9s infinite ease-out;
}

@keyframes systemRefreshSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .system-refresh-tag {
    display: none;
  }
  .system-refresh-title {
    font-size: 0.78rem;
  }
  .btn-system-refresh {
    padding: 0.3rem 0.75rem 0.3rem 0.35rem;
  }
  .system-refresh-icon-badge {
    width: 28px;
    height: 28px;
  }
}

.app-views-wrapper {
  flex: 1;
  padding: 1.25rem 1.5rem 2.5rem;
  box-sizing: border-box;
}

.app-view {
  display: none;
}

.app-view.active {
  display: block;
  animation: smoothViewEnter 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes smoothViewEnter {
  0% {
    opacity: 0.35;
    transform: translateY(3px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-view.active {
    animation: none !important;
  }
}

/* ==============================================================================
   Schedule View (Lịch Đăng Bài) - Matching user screenshot
   ============================================================================== */

/* View Heading */
.schedule-view-heading-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 1.25rem !important;
}

.schedule-view-heading-row i {
  color: #068567 !important;
  font-size: 1.3rem !important;
}

.schedule-view-heading {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #193333 !important;
  margin: 0 !important;
}

.schedule-dashboard-layout {
  display: grid !important;
  grid-template-columns: 260px 1fr !important;
  gap: 1.25rem !important;
  align-items: start !important;
}

@media (max-width: 1024px) {
  .schedule-dashboard-layout {
    grid-template-columns: 1fr !important;
  }
}

.schedule-filter-sidebar {
  width: 260px !important;
  max-width: 260px !important;
  background: #ffffff !important;
  border: 1px solid #dbe7e5 !important;
  border-radius: 12px !important;
  padding: 0.9rem 0.8rem !important;
  box-shadow: 0 1px 3px rgba(17, 43, 43, 0.04) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.75rem !important;
  user-select: none !important;
  box-sizing: border-box !important;
}

@media (max-width: 1024px) {
  .schedule-filter-sidebar {
    width: 100% !important;
    max-width: 100% !important;
  }
}

.schedule-filter-header {
  padding: 0.2rem 0.25rem 0.45rem 0.25rem !important;
  border-bottom: 1px solid #e8f1ef !important;
  box-sizing: border-box !important;
}

.schedule-filter-title {
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  color: #193333 !important;
  margin: 0 !important;
}

/* Accordion Component for Schedule Filter */
.schedule-accordion-item {
  position: relative;
  border-radius: 6px;
  transition: all 0.2s ease;
}

/* Left active stripe disabled */
.schedule-accordion-item::before,
.schedule-accordion-item.active::before {
  display: none !important;
  content: none !important;
}

.schedule-accordion-btn {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0.55rem 0.65rem !important;
  background: #f1f7f7 !important;
  border: 1px solid transparent !important;
  box-sizing: border-box !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  text-align: left !important;
  transition: background 0.15s ease !important;
  outline: none !important;
}

.schedule-accordion-btn:hover {
  background: #e4efed !important;
}

.schedule-accordion-btn .accordion-title {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #526969 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

.schedule-accordion-btn .accordion-chevron {
  font-size: 0.75rem !important;
  color: #526969 !important;
  transition: transform 0.2s ease !important;
}

.schedule-accordion-content {
  padding-top: 0.5rem;
}

.schedule-accordion-content.hidden {
  display: none;
}

/* Mode row: Kênh vs Nhóm Kênh */
.schedule-channel-mode-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.25rem 0.25rem 0.55rem 0.25rem;
  border-bottom: 1px solid #e8f1ef;
  box-sizing: border-box;
}

.schedule-mode-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #193333;
  cursor: pointer;
}

.schedule-mode-radio {
  accent-color: #068567;
  cursor: pointer;
  margin: 0;
}

/* Search Box inside KÊNH ĐĂNG */
.schedule-channel-search-wrap {
  margin-top: 0.5rem;
  margin-bottom: 0.6rem;
  padding: 0 0.15rem;
}

.schedule-channel-search-input {
  width: 100%;
  height: 34px;
  padding: 0 0.65rem;
  font-size: 0.82rem;
  color: #193333;
  border: 1px solid #dbe7e5;
  border-radius: 6px;
  background: #ffffff;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.schedule-channel-search-input::placeholder {
  color: #8fa5a5;
}

.schedule-channel-search-input:focus {
  border-color: #068567;
  box-shadow: 0 0 0 2px rgba(6, 133, 103, 0.12);
}

/* Category header: Facebook */
.schedule-channel-cat-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #526969;
  padding: 0 0.25rem;
  margin-bottom: 0.4rem;
}

/* Scrollable items list */
.schedule-channel-items-container {
  max-height: 380px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-right: 2px;
}

.schedule-channel-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.schedule-channel-item-row:hover {
  background: #f1f7f7;
}

.schedule-channel-item-row.selected {
  background: #E2F3F0;
}

.schedule-channel-avatar-box {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.schedule-channel-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8f1ef;
  border: 1px solid #dbe7e5;
  display: block;
}

.schedule-group-avatar-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.75rem;
  background: #068567;
}

.schedule-channel-fb-badge {
  display: none !important;
}

.schedule-channel-name {
  flex: 1;
  min-width: 0;
  margin-left: 0.6rem;
  margin-right: 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #193333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-group-name-wrap {
  flex: 1;
  min-width: 0;
  margin-left: 0.6rem;
  margin-right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.schedule-group-count {
  font-size: 0.72rem;
  color: #526969;
}

.schedule-channel-item-checkbox,
.schedule-group-item-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #068567;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.schedule-channel-empty {
  padding: 1.25rem 0.5rem;
  font-size: 0.8rem;
  color: #8fa5a5;
  text-align: center;
  line-height: 1.4;
}

/* Toolbar search box in schedule table */
.schedule-toolbar-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.schedule-toolbar-search-box .search-icon {
  position: absolute;
  left: 0.65rem;
  color: #94a3b8;
  font-size: 0.8rem;
  pointer-events: none;
}

.schedule-toolbar-search-input {
  height: 34px;
  padding-left: 2rem !important;
  padding-right: 1.8rem;
  font-size: 0.82rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  width: 220px;
  transition: all 0.15s ease;
  outline: none;
}

.schedule-toolbar-search-box .search-clear-btn {
  position: absolute;
  right: 0.45rem;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  font-size: 0.85rem;
  line-height: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.schedule-toolbar-search-box .search-clear-btn:hover {
  color: #ef4444;
}

.schedule-toolbar-search-box .search-clear-btn.hidden {
  display: none !important;
}

.schedule-toolbar-search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  width: 250px;
}

.filter-section-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.filter-section-header {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.filter-status-options {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.25rem !important;
}

.filter-status-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0.45rem 0.6rem !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  color: #193333 !important;
  background: transparent !important;
  user-select: none !important;
}

.filter-status-item:hover {
  background-color: #f1f7f7 !important;
}

.filter-status-item.active {
  background-color: #E2F3F0 !important;
  border: 1px solid #bbf0e7 !important;
  color: #068567 !important;
  font-weight: 600 !important;
}

.filter-item-left {
  display: flex !important;
  align-items: center !important;
  gap: 0.55rem !important;
}

.filter-item-right {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.status-circle {
  width: 9px !important;
  height: 9px !important;
  border-radius: 50% !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

.status-circle.purple { background-color: #7C3AED !important; }
.status-circle.blue { background-color: #068567 !important; }
.status-circle.green { background-color: #068567 !important; }
.status-circle.red { background-color: #ef4444 !important; }
.status-circle.yellow { background-color: #f59e0b !important; }
.status-circle.gray { background-color: #94a3b8 !important; }

.filter-count-badge {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  padding: 0.1rem 0.45rem !important;
  border-radius: 9999px !important;
  background-color: #e8f1ef !important;
  border: 1px solid transparent !important;
  box-sizing: border-box !important;
  color: #526969 !important;
  margin-left: 0 !important;
}

.filter-status-item.active .filter-count-badge {
  background-color: #d0eee8 !important;
  color: #068567 !important;
  border-color: #bbf0e7 !important;
}

.filter-radio-check,
.filter-status-item input[type="radio"],
.filter-status-item .filter-radio-check {
  accent-color: #068567 !important;
  cursor: pointer !important;
  display: inline-block !important;
}

/* Clickable Post Content in Schedule Queue Table */
.queue-post-content-link {
  font-size: 0.83rem;
  font-weight: 500;
  line-height: 1.45;
  color: #1e293b;
  cursor: pointer;
  transition: color 0.15s ease, text-decoration 0.15s ease;
  user-select: text;
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-post-content-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* Post Details Modal */
.post-details-modal-box {
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.post-details-info-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.post-details-page-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.post-details-page-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  background: #e2e8f0;
  flex-shrink: 0;
}

.post-details-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.post-details-message-content {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #1e293b;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 260px;
  overflow-y: auto;
}

.post-details-message-content.colored-preset-box {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.post-details-colored-text {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  word-break: break-word;
  white-space: pre-wrap;
  width: 100%;
}

.post-details-preset-badge {
  display: inline-block;
  vertical-align: middle;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  margin-left: 0.4rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.post-details-error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.post-details-published-link-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.badge-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
}

.badge-status-pill.purple {
  background: #f3e8ff;
  color: #7c3aed;
  border: 1px solid #e9d5ff;
}

.badge-status-pill.yellow,
.badge-status-pill.processing {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-status-pill.blue {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-status-pill.green {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-status-pill.red {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.schedule-table-pane {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.15rem 1.35rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  min-width: 0;
}

.schedule-table-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 0.85rem !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
}

.schedule-table-heading {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #193333 !important;
  letter-spacing: 0.02em !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.schedule-badge-dot,
#scheduleActiveStatusBadge {
  display: none !important;
}

.btn-schedule-create-post {
  background: #068567 !important;
  border: 1px solid #068567 !important;
  color: #ffffff !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  padding: 0.55rem 1.25rem !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(6, 133, 103, 0.25) !important;
  transition: all 0.15s ease !important;
}

.btn-schedule-create-post:hover {
  background: #056e55 !important;
  border-color: #056e55 !important;
}

.schedule-filter-search-row {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  margin-bottom: 1.15rem !important;
}

.schedule-filter-search-row .schedule-toolbar-search-box {
  flex: 1 !important;
  max-width: none !important;
  width: auto !important;
  position: relative !important;
}

.schedule-filter-search-row .schedule-toolbar-search-input {
  width: 100% !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 0.55rem 1rem 0.55rem 2.2rem !important;
  font-size: 0.88rem !important;
  color: #193333 !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.schedule-filter-search-row .schedule-toolbar-search-input:focus {
  border-color: #068567 !important;
  box-shadow: 0 0 0 3px rgba(6, 133, 103, 0.12) !important;
  outline: none !important;
}

.schedule-filter-search-row .schedule-toolbar-actions {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-shrink: 0 !important;
}

.btn-refresh-schedule-custom {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 0.55rem 1.25rem !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  color: #193333 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}

.btn-refresh-schedule-custom:hover {
  background: #f1f7f7 !important;
  border-color: #068567 !important;
  color: #068567 !important;
}

/* Redesigned Schedule Type Filter (Top Right Toolbar) */
.schedule-type-filter-container {
  display: inline-flex !important;
  align-items: center !important;
  background-color: #ffffff !important;
  border: 1px solid #c9d5d8 !important;
  border-radius: 8px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 0.65rem 0 0.85rem !important;
  gap: 0.5rem !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

.schedule-type-filter-container:hover {
  border-color: #068567 !important;
  background-color: #fbfdfc !important;
  box-shadow: 0 2px 6px rgba(6, 133, 103, 0.1) !important;
}

.schedule-type-filter-container:focus-within {
  border-color: #068567 !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(6, 133, 103, 0.15) !important;
}

.schedule-type-filter-container.has-filter {
  background-color: #f0fdf9 !important;
  border-color: #068567 !important;
  box-shadow: 0 1px 4px rgba(6, 133, 103, 0.12) !important;
}

.schedule-type-filter-prefix {
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  pointer-events: none !important;
  user-select: none !important;
}

.schedule-type-filter-icon {
  font-size: 0.85rem !important;
  color: #068567 !important;
  transition: color 0.2s ease !important;
}

.schedule-type-filter-text {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: #596c72 !important;
  text-transform: none !important;
  letter-spacing: 0.01em !important;
  white-space: nowrap !important;
}

.schedule-type-filter-container.has-filter .schedule-type-filter-text {
  color: #068567 !important;
}

.schedule-type-select-wrap {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
}

html:not([data-theme="dark"]) select.schedule-type-filter-select,
html select.schedule-type-filter-select,
.schedule-type-filter-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
  font-family: inherit !important;
  font-size: 0.84rem !important;
  font-weight: 500 !important;
  color: #1e293b !important;
  cursor: pointer !important;
  padding: 0 1.35rem 0 0.25rem !important;
  height: 36px !important;
  line-height: 36px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

html:not([data-theme="dark"]) select.schedule-type-filter-select:focus,
html select.schedule-type-filter-select:focus,
.schedule-type-filter-select:focus {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
}

.schedule-type-filter-container.has-filter select.schedule-type-filter-select {
  color: #068567 !important;
  font-weight: 600 !important;
}

.schedule-type-filter-select option {
  background-color: #ffffff !important;
  color: #1e293b !important;
  font-size: 0.84rem !important;
  padding: 0.5rem 0.6rem !important;
}

.schedule-type-chevron {
  position: absolute !important;
  right: 0.15rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 0.68rem !important;
  color: #8fa5a5 !important;
  pointer-events: none !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
}

.schedule-type-filter-container:hover .schedule-type-chevron,
.schedule-type-filter-container:focus-within .schedule-type-chevron,
.schedule-type-filter-container.has-filter .schedule-type-chevron {
  color: #068567 !important;
}

/* Dark mode overrides */
html[data-theme="dark"] .schedule-type-filter-container {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .schedule-type-filter-text {
  color: #94a3b8 !important;
}
html[data-theme="dark"] select.schedule-type-filter-select {
  color: #f1f5f9 !important;
}
html[data-theme="dark"] .schedule-type-filter-select option {
  background-color: #1e293b !important;
  color: #f1f5f9 !important;
}
html[data-theme="dark"] .schedule-type-chevron {
  color: #64748b !important;
}

/* Schedule Queue Table Container & Smooth Loading Transitions */
.schedule-table-responsive {
  position: relative;
  min-height: 480px; /* Lock height to prevent table collapse & pagination jumping */
}

.schedule-table-loading {
  position: absolute;
  top: 42px; /* Positioned below table thead */
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(1.5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.15s ease;
}

.schedule-table-loading.hidden {
  display: none !important;
  opacity: 0;
}

.schedule-table-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: #1877f2;
  border-radius: 50%;
  animation: viewSpin 0.6s linear infinite;
}

#queueTableBody {
  transition: opacity 0.15s ease;
}

.schedule-data-table {
  width: 100%;
  min-width: 960px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.83rem;
}

.schedule-data-table th {
  background-color: #dfe7e8 !important;
  color: #2a3c40 !important;
  font-weight: 700 !important;
  font-size: 0.76rem !important;
  padding: 0.75rem 0.75rem !important;
  border-bottom: 1px solid #c9d5d8 !important;
  text-align: left;
  white-space: nowrap;
  user-select: none;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.schedule-data-table thead th:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.schedule-data-table thead th:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

#selectAllQueueCheck,
.queue-item-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  border-radius: 4px;
}

.schedule-data-table th i {
  display: none !important;
}

.schedule-data-table td {
  background-color: #edf2f1 !important;
  padding: 0.85rem 0.75rem !important;
  border-bottom: 1px solid #c9d5d8 !important;
  color: #2a3c40 !important;
  vertical-align: middle;
}

.schedule-data-table tr:hover td {
  background-color: #e1ebe7 !important;
}

/* Balanced Column Widths for Schedule Queue Table */
.schedule-data-table .col-check {
  width: 44px;
  text-align: center;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.schedule-data-table .col-content {
  width: 23%;
  min-width: 160px;
  overflow: hidden;
}

.schedule-data-table .col-media {
  width: 7%;
  min-width: 65px;
  text-align: center;
}

.schedule-data-table .col-channel {
  width: 15%;
  min-width: 130px;
  text-align: left;
}

.schedule-data-table .col-time {
  width: 19%;
  min-width: 160px;
  text-align: left;
}

.schedule-data-table .col-token {
  width: 13%;
  min-width: 115px;
  text-align: left;
}

/* Schedule Data Table: Ẩn cột Token đăng bài ở mục Chờ đăng (PENDING) */
.schedule-data-table.hide-token-col .col-token {
  display: none !important;
}

.schedule-data-table.hide-token-col .col-content {
  width: 28%;
}

.schedule-data-table.hide-token-col .col-channel {
  width: 18%;
}

.schedule-data-table.hide-token-col .col-time {
  width: 20%;
  min-width: 175px;
}

.schedule-data-table .col-status {
  width: 11%;
  min-width: 105px;
  text-align: left;
}

.schedule-data-table th.col-actions,
.schedule-data-table td.col-actions,
.schedule-data-table .col-actions {
  width: 170px !important;
  min-width: 170px !important;
  text-align: center !important;
  padding-left: 0.35rem !important;
  padding-right: 0.35rem !important;
}

.schedule-data-table .table-actions-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  vertical-align: middle;
}

/* Comment Action in Settings column (Normal button with small status badge on top) */
.table-comment-action-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
  vertical-align: middle;
}

.btn-sm-action.comment,
.btn-sm-action.btn-queue-comment {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #068567;
  border: 1px solid rgba(6, 133, 103, 0.22);
  background-color: rgba(6, 133, 103, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.82rem;
}

.btn-sm-action.comment:hover,
.btn-sm-action.btn-queue-comment:hover {
  background-color: #068567;
  color: #ffffff;
  border-color: #068567;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(6, 133, 103, 0.28);
}

.btn-sm-action.comment:active,
.btn-sm-action.btn-queue-comment:active {
  transform: translateY(0);
}

.btn-sm-action.comment.has-error,
.btn-sm-action.btn-queue-comment.has-error {
  border-color: #fca5a5;
  background-color: #fff5f5;
  color: #dc2626;
}

.btn-sm-action.comment.has-error:hover,
.btn-sm-action.btn-queue-comment.has-error:hover {
  background-color: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.28);
}

/* Small comment status badge perched on top of the comment icon */
.btn-sm-action .comment-status-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 15px;
  height: 14px;
  padding: 0 3.5px;
  border-radius: 9999px;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
  border: 1.5px solid #ffffff;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.2px;
}

/* Variant: Error */
.btn-sm-action .comment-status-badge.error {
  background-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.45);
  animation: pulseCmtBadgeError 2.5s infinite;
}

/* Variant: Success */
.btn-sm-action .comment-status-badge.success {
  background-color: #10b981;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.35);
}

/* Variant: In-progress */
.btn-sm-action .comment-status-badge.in-progress {
  background-color: #f59e0b;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.35);
}

/* Variant: Pending (Harmonized to BankCo Emerald Teal #068567) */
.btn-sm-action .comment-status-badge.pending {
  background-color: #068567;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(6, 133, 103, 0.35);
}

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

.table-comment-action-wrapper .queue-cmt-error-text {
  font-size: 0.68rem;
  color: #dc2626;
  font-weight: 600;
  max-width: 105px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 3px;
  border-radius: 3px;
}

.table-comment-action-wrapper .queue-cmt-error-text:hover {
  text-decoration: underline;
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.08);
}

.comment-badge-count.error {
  background: #dc2626 !important;
  color: #fff !important;
  font-weight: 700;
}

/* Empty dash for Media & Topic matching media_1790088669429.png */
.table-empty-dash {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.95rem;
  user-select: none;
}

/* Channels Cell & Hover Tooltip */
.queue-channels-cell {
  display: flex;
  align-items: center;
  position: relative;
  max-width: 100%;
}

.queue-channels-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(6, 133, 103, 0.22);
  background: #E2F3F0;
  color: #068567;
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.4;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  user-select: none;
  max-width: 100%;
  box-sizing: border-box;
}

.queue-channels-badge .channel-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  display: inline-block;
  line-height: 1.4;
}

.queue-channels-badge:hover,
.queue-channels-badge:focus-visible {
  background: #d1eee8;
  border-color: #068567;
  color: #056e55;
  text-decoration: none;
}

.queue-channels-badge.channel-badge-page {
  color: #068567;
}

.queue-channels-badge.channel-badge-page:hover {
  color: #056e55;
}

.queue-channels-badge .fa-regular.fa-flag {
  font-size: 0.76rem;
  color: #3b82f6;
  flex-shrink: 0;
}

.queue-channels-badge.channel-badge-group {
  background: #f0fdfa;
  border-color: #ccfbf1;
  color: #0f766e;
}

.queue-channels-badge.channel-badge-group:hover {
  background: #ccfbf1;
  border-color: #99f6e4;
  color: #115e59;
}

.queue-channels-badge .group-icon {
  font-size: 0.8rem;
  color: #0d9488;
  flex-shrink: 0;
}

/* Global Floating Tooltip for Fanpage Channels (never clipped by table overflow) */
.queue-channels-floating-tooltip {
  position: fixed;
  background-color: #1e293b;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  max-width: 440px;
  min-width: 180px;
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  z-index: 99999;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.queue-channels-floating-tooltip.arrow-top::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: var(--arrow-left, 50%);
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #1e293b transparent;
}

.queue-channels-floating-tooltip.arrow-bottom::before {
  content: "";
  position: absolute;
  top: 100%;
  left: var(--arrow-left, 50%);
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #1e293b transparent transparent transparent;
}

/* Global Floating Tooltip for Multi-Token Display (never clipped by table overflow) */
.queue-tokens-floating-tooltip {
  position: fixed;
  background-color: #1e293b;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 0.75rem;
  line-height: 1.45;
  min-width: 280px;
  max-width: 440px;
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  z-index: 99999;
  pointer-events: none;
  transition: opacity 0.12s ease;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.queue-tokens-floating-tooltip.arrow-top::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: var(--arrow-left, 50%);
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #1e293b transparent;
}

.queue-tokens-floating-tooltip.arrow-bottom::before {
  content: "";
  position: absolute;
  top: 100%;
  left: var(--arrow-left, 50%);
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #1e293b transparent transparent transparent;
}

/* Floating Tooltip for Text Preset Hover */
.queue-text-preset-floating-tooltip {
  position: fixed;
  background-color: #1e293b;
  color: #f8fafc;
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 0.75rem;
  line-height: 1.4;
  width: max-content;
  min-width: 240px;
  max-width: 320px;
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.45), 0 4px 8px -2px rgba(0, 0, 0, 0.25);
  z-index: 99999;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.queue-text-preset-floating-tooltip.arrow-top::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: var(--arrow-left, 50%);
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #1e293b transparent;
}

.queue-text-preset-floating-tooltip.arrow-bottom::before {
  content: "";
  position: absolute;
  top: 100%;
  left: var(--arrow-left, 50%);
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #1e293b transparent transparent transparent;
}

.text-preset-tooltip-body {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}

.text-preset-tooltip-preview {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.68rem;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.text-preset-tooltip-info {
  flex: 1;
  min-width: 0;
}

.text-preset-tooltip-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 0.76rem;
}

.text-preset-label {
  color: #94a3b8;
  white-space: nowrap;
}

.text-preset-value {
  color: #f1f5f9;
  font-weight: 700;
  word-break: break-word;
}

.text-preset-tooltip-footer {
  font-size: 0.68rem;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Time Column Elements */
.queue-time-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
  height: 50px;
  min-height: 50px;
  box-sizing: border-box;
}

.queue-time-line {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 2px 6px;
  font-size: 0.83rem;
  line-height: 18px;
  height: 18px;
}

.queue-time-cross-range {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.35;
  width: 100%;
}

.queue-time-cross-range .queue-time-point {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.queue-time-cross-range .queue-time-point-to {
  color: #64748b;
  font-size: 0.8rem;
}

.queue-time-cross-range .queue-time-range-arrow {
  font-size: 0.68rem;
  color: #94a3b8;
  margin-right: 2px;
}

.queue-time-bold {
  font-weight: 700;
  color: #1e293b;
}

.queue-date-sub {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 500;
}

.queue-countdown-sub {
  margin-top: 2px;
  font-size: 0.72rem;
}

.queue-early-badge {
  margin-top: 3px;
  font-size: 0.72rem;
  color: #b45309;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  width: fit-content;
  transition: all 0.15s ease-in-out;
}

.queue-early-badge:hover {
  background: #fde68a;
  color: #92400e;
  border-color: #f59e0b;
}

.queue-early-badge i {
  font-size: 0.65rem;
  color: #d97706;
}

/* Clean Status Style matching user reference image */
.queue-status-clean {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #193333;
  white-space: nowrap;
}

.queue-status-clean i {
  font-size: 0.95rem;
}

.queue-status-clean.pending {
  color: #7C3AED !important;
  font-weight: 600 !important;
}

.queue-status-clean.pending i {
  color: #7C3AED !important;
}

.queue-status-clean.published {
  color: #068567 !important;
  font-weight: 600 !important;
}

.queue-status-clean.published i {
  color: #068567 !important;
}

.queue-status-clean.failed {
  color: #dc2626 !important;
  font-weight: 600 !important;
}

.queue-status-clean.failed i {
  color: #dc2626 !important;
}

/* Row elements */
.table-media-thumb-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.table-media-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  background-color: #f8fafc;
  display: block;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease;
  cursor: zoom-in;
}

.table-media-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  position: relative;
  z-index: 5;
}

/* Badges for TEXT, VIDEO, ẢNH in Media Column */
.table-media-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  white-space: nowrap;
  user-select: none;
  cursor: default;
}

.table-media-badge.text {
  color: #475569;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  cursor: default;
}

.table-media-badge.video {
  color: #7c3aed;
  background-color: #f5f3ff;
  border: 1px solid #ddd6fe;
  cursor: default;
}

.table-media-badge.photo {
  color: #0284c7;
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  cursor: default;
}

.table-media-badge.text-preset-badge {
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  font-weight: 700;
  cursor: default !important;
  position: relative;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: none !important;
}

.table-media-badge.text-preset-badge:hover {
  filter: none !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18) !important;
  transform: none !important;
  cursor: default !important;
}

/* Image Lightbox Modal Styles */
.image-lightbox-wrapper {
  animation: lightboxZoomIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxZoomIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.image-lightbox-close:hover {
  transform: scale(1.1) rotate(90deg) !important;
  background-color: #f1f5f9 !important;
  color: #ef4444 !important;
}

.table-media-badge.btn-open-post-details {
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.table-media-badge.btn-open-post-details:hover {
  filter: brightness(0.95);
}

.table-media-icon {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.table-media-icon.video {
  background-color: #f3e8ff;
  color: #7c3aed;
  border: 1px solid #e9d5ff;
}

.badge-channel {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #2563eb;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  white-space: nowrap;
}

.badge-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-status-pill.pending {
  background-color: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.badge-status-pill.published {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-status-pill.failed {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.badge-status-pill.processing {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-status-pill.cancelled {
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.table-author-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
}

.table-actions-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  vertical-align: middle;
}

.btn-sm-action {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.82rem;
  padding: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  position: relative;
}

.btn-sm-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

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

/* 1. Quick Publish / Publish Now Button (⚡) */
.btn-sm-action.btn-queue-publish,
.btn-sm-action.primary:not(.btn-queue-edit) {
  color: #068567;
  border-color: rgba(6, 133, 103, 0.25);
  background-color: rgba(6, 133, 103, 0.08);
}

.btn-sm-action.btn-queue-publish:hover,
.btn-sm-action.primary:not(.btn-queue-edit):hover {
  background-color: #068567;
  color: #ffffff;
  border-color: #068567;
  box-shadow: 0 3px 8px rgba(6, 133, 103, 0.28);
}

/* 2. Edit Post Button (📝) */
.btn-sm-action.btn-queue-edit {
  color: #334155;
  border-color: #cbd5e1;
  background-color: #ffffff;
}

.btn-sm-action.btn-queue-edit:hover {
  background-color: rgba(6, 133, 103, 0.08);
  color: #068567;
  border-color: #068567;
  box-shadow: 0 3px 8px rgba(6, 133, 103, 0.18);
}

/* 3. Delete Post Button (🗑️) */
.btn-sm-action.danger.btn-queue-delete,
.btn-sm-action.btn-queue-delete {
  color: #ef4444;
  border-color: #fee2e2;
  background-color: #ffffff;
}

.btn-sm-action.danger.btn-queue-delete:hover,
.btn-sm-action.btn-queue-delete:hover {
  background-color: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.28);
}

/* 4. Retry Failed Post / Retry Comments (🔄) */
.btn-sm-action.btn-queue-retry-failed-post,
.btn-sm-action.btn-queue-retry-comments {
  color: #ea580c;
  border-color: #fed7aa;
  background-color: #fff7ed;
}

.btn-sm-action.btn-queue-retry-failed-post:hover,
.btn-sm-action.btn-queue-retry-comments:hover {
  background-color: #ea580c;
  color: #ffffff;
  border-color: #ea580c;
  box-shadow: 0 3px 8px rgba(234, 88, 12, 0.28);
}

/* 5. Comment Action Button (💬) */
.btn-sm-action.comment,
.btn-sm-action.btn-queue-comment {
  position: relative;
  color: #068567;
  border-color: rgba(6, 133, 103, 0.25);
  background-color: rgba(6, 133, 103, 0.08);
}

.btn-sm-action.comment:hover,
.btn-sm-action.btn-queue-comment:hover {
  background-color: #068567;
  color: #ffffff;
  border-color: #068567;
  box-shadow: 0 3px 8px rgba(6, 133, 103, 0.28);
}

/* Small comment count badge */
.btn-sm-action .comment-badge-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 15px;
  height: 14px;
  padding: 0 3.5px;
  border-radius: 9999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.45);
  border: 1.5px solid #ffffff;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* Dark theme support for schedule action buttons */
html[data-theme="dark"] .btn-sm-action {
  background-color: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}
html[data-theme="dark"] .btn-sm-action.btn-queue-publish,
html[data-theme="dark"] .btn-sm-action.primary:not(.btn-queue-edit) {
  background-color: rgba(6, 133, 103, 0.2);
  border-color: rgba(6, 133, 103, 0.45);
  color: #34d399;
}
html[data-theme="dark"] .btn-sm-action.btn-queue-publish:hover,
html[data-theme="dark"] .btn-sm-action.primary:not(.btn-queue-edit):hover {
  background-color: #068567;
  color: #ffffff;
  border-color: #068567;
}
html[data-theme="dark"] .btn-sm-action.btn-queue-edit {
  background-color: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
html[data-theme="dark"] .btn-sm-action.btn-queue-edit:hover {
  background-color: #334155;
  border-color: #34d399;
  color: #34d399;
}
html[data-theme="dark"] .btn-sm-action.comment,
html[data-theme="dark"] .btn-sm-action.btn-queue-comment {
  background-color: rgba(6, 133, 103, 0.2);
  border-color: rgba(6, 133, 103, 0.45);
  color: #34d399;
}
html[data-theme="dark"] .btn-sm-action.comment:hover,
html[data-theme="dark"] .btn-sm-action.btn-queue-comment:hover {
  background-color: #068567;
  color: #ffffff;
  border-color: #068567;
}
html[data-theme="dark"] .btn-sm-action.danger.btn-queue-delete,
html[data-theme="dark"] .btn-sm-action.btn-queue-delete {
  background-color: #1e293b;
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}
html[data-theme="dark"] .btn-sm-action.danger.btn-queue-delete:hover,
html[data-theme="dark"] .btn-sm-action.btn-queue-delete:hover {
  background-color: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}
html[data-theme="dark"] .btn-sm-action .comment-status-badge {
  border-color: #1e293b;
}

/* ==============================================================================
   CHỌN CHẾ ĐỘ VIẾT: Sidebar Flyout & Composer Mode Selector
   ============================================================================== */

/* Sidebar Nav Item Wrapper & Flyout Menu matching media_1789907014173.png */
.nav-item-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
}

.composer-sidebar-flyout {
  position: absolute;
  left: calc(100% + 8px);
  top: 0;
  width: 205px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 3px 8px rgba(0, 0, 0, 0.06);
  z-index: 150;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item-wrapper:hover .composer-sidebar-flyout,
.composer-sidebar-flyout.show {
  display: flex;
}

.flyout-header {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.6rem 0.25rem;
  text-transform: uppercase;
}

.flyout-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.flyout-item i {
  font-size: 1rem;
  color: #64748b;
  width: 18px;
  text-align: center;
}

.flyout-item:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}

.flyout-item.active {
  background-color: #eff6ff;
  color: #2563eb;
  font-weight: 600;
}

.flyout-item.active i {
  color: #2563eb;
}

/* Composer Mode Bar & Tabs */
.composer-mode-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem;
  margin-bottom: 1.25rem;
}

.mode-bar-header {
  margin-bottom: 0.55rem;
  padding: 0 0.25rem;
}

.mode-bar-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.composer-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .composer-mode-tabs {
    grid-template-columns: 1fr;
  }
}

.composer-mode-tab {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 9px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  font-family: inherit;
}

.composer-mode-tab:hover {
  border-color: #93c5fd;
  background-color: #f8fafc;
}

.composer-mode-tab.active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.mode-tab-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.composer-mode-tab.active .mode-tab-icon {
  background: #2563eb;
  color: #ffffff;
}

.mode-tab-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.mode-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
}

.composer-mode-tab.active .mode-title {
  color: #1d4ed8;
}

.mode-desc {
  font-size: 0.73rem;
  color: #64748b;
}

/* Unified Media Upload */
.composer-media-section {
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.composer-media-section:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}

.media-upload-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.media-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.media-header-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 1px 2px rgba(24, 119, 242, 0.12);
  flex-shrink: 0;
}

.media-header-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.media-header-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: -0.01em;
}

.media-header-subtitle {
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
}

.media-auto-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #7c3aed;
  background-color: #f3e8ff;
  border: 1px solid #e9d5ff;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-media-type {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.12rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-media-type.image {
  background-color: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-media-type.video {
  background-color: #f3e8ff;
  color: #7c3aed;
  border: 1px solid #e9d5ff;
}

.file-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.video-title-group {
  background: #faf5ff;
  border: 1px solid #f3e8ff;
  border-radius: 8px;
  padding: 0.75rem;
}

/* ============================================================================
   CHỌN KÊNH SIDEBAR & COMPOSER WORKSPACE LAYOUT (media_1789910436787.png)
   ============================================================================ */
.composer-workspace-container {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  width: 100%;
}

.composer-workspace-main {
  flex: 1;
  min-width: 0;
}

/* 1. Channel Sidebar Container */
.composer-channel-sidebar {
  width: 310px;
  min-width: 310px;
  max-width: 310px;
  background: #ffffff;
  border: 1px solid #e4e6eb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 90px);
  position: sticky;
  top: 1rem;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.22s ease;
  overflow: hidden;
  z-index: 10;
  flex-shrink: 0;
}

/* Collapsed State */
.composer-channel-sidebar.collapsed {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
}

.composer-channel-sidebar.collapsed .channel-header-title,
.composer-channel-sidebar.collapsed .channel-group-dropdown-wrap,
.composer-channel-sidebar.collapsed .channel-search-row,
.composer-channel-sidebar.collapsed .channel-group-accordion-header,
.composer-channel-sidebar.collapsed .channel-items-list {
  display: none !important;
}

.composer-channel-sidebar.collapsed .channel-sidebar-header {
  justify-content: center;
  padding: 12px 0;
}

/* 2. Header */
.channel-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px 11px;
  border-bottom: 1px solid #f0f2f5;
  background: #ffffff;
  flex-shrink: 0;
}

.channel-header-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.channel-title-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1c1e21;
  letter-spacing: -0.01em;
}

.channel-count-badge {
  font-size: 0.88rem;
  font-weight: 600;
  color: #65676b;
}

.channel-collapse-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #e4e6eb;
  background: #ffffff;
  color: #65676b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.78rem;
}

.channel-collapse-btn:hover {
  background: #f0f2f5;
  color: #1877f2;
  border-color: #ccd0d5;
}

/* 3. Nhóm Kênh Dropdown */
.channel-group-dropdown-wrap {
  padding: 10px 14px 6px;
}

.channel-select-box {
  position: relative;
  width: 100%;
}

.channel-group-select {
  width: 100%;
  height: 38px;
  background: #ffffff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 0 32px 0 12px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #344054;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.channel-group-select:focus {
  outline: none;
  border-color: #1877f2;
  box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.15);
}

.channel-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: #65676b;
  pointer-events: none;
}

/* 4. Search Row & Master Select */
.channel-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
}

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

.channel-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  color: #8c93a0;
  pointer-events: none;
}

.channel-search-input {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 30px;
  font-size: 0.84rem;
  border: 1px solid #e4e6eb;
  border-radius: 7px;
  background: #f8f9fa;
  color: #1c1e21;
  transition: all 0.15s ease;
}

.channel-search-input:focus {
  background: #ffffff;
  outline: none;
  border-color: #1877f2;
  box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.12);
}

.channel-search-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.channel-btn-icon {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #8c93a0;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.15s ease;
}

.channel-btn-icon:hover {
  background: #f0f2f5;
  color: #1c1e21;
}

/* 5. Group Section Header (Facebook) */
.channel-group-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: #f8f9fa;
  border-top: 1px solid #f0f2f5;
  border-bottom: 1px solid #f0f2f5;
}

.channel-group-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-group-fb-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1877f2;
  color: #ffffff;
  font-size: 0.75rem;
}

.channel-group-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1c1e21;
}

.channel-group-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #65676b;
  background: #e4e6eb;
  padding: 1px 6px;
  border-radius: 10px;
}

.channel-group-ctrls {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 6. Custom Checkbox (Matching media_1789910436787.png) */
.channel-custom-checkbox-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  padding: 2px;
}

.channel-custom-checkbox-wrap input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.channel-custom-checkbox {
  width: 19px;
  height: 19px;
  border: 1.5px solid #d0d5dd;
  border-radius: 5px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.channel-custom-checkbox-wrap:hover .channel-custom-checkbox {
  border-color: #1877f2;
}

.channel-custom-checkbox-wrap input[type="checkbox"]:checked + .channel-custom-checkbox {
  background: #0866ff;
  border-color: #0866ff;
}

.channel-custom-checkbox-wrap input[type="checkbox"]:checked + .channel-custom-checkbox::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.channel-custom-checkbox-wrap input[type="checkbox"]:indeterminate + .channel-custom-checkbox {
  background: #0866ff;
  border-color: #0866ff;
}

.channel-custom-checkbox-wrap input[type="checkbox"]:indeterminate + .channel-custom-checkbox::after {
  content: '';
  display: block;
  width: 8px;
  height: 2px;
  background: white;
  border-radius: 1px;
}

/* Mode Sections in Channel Sidebar (Các kênh / Nhóm kênh) */
.single-channel-mode-section {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.single-channel-mode-section.hidden {
  display: none !important;
}

#singleChannelChannelsSection {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#singleChannelChannelsSection.hidden {
  display: none !important;
}

#singleChannelGroupSection.hidden {
  display: none !important;
}

#singleChannelChannelsSection .channel-search-row {
  flex-shrink: 0;
}

#singleChannelChannelsSection .channel-group-accordion-header {
  flex-shrink: 0;
}

/* 7. Channel Items List */
.channel-items-list {
  flex: 1 1 auto;
  overflow-y: auto !important;
  overflow-x: hidden;
  min-height: 0;
  padding: 6px 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}

.channel-items-list::-webkit-scrollbar {
  width: 6px;
  display: block;
}

.channel-items-list::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 4px;
}

.channel-items-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.channel-items-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.channel-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
  user-select: none;
  flex-shrink: 0;
}

.channel-item-row:hover {
  background: #f2f4f7;
}

.channel-item-row.selected {
  background: #f0f7ff;
}

.channel-avatar-wrapper {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.channel-avatar-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #e4e6eb;
  border: 1px solid #e4e6eb;
  display: block;
}

.channel-platform-badge {
  display: none !important;
}

.channel-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.channel-item-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: #1c1e21;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-item-sub {
  font-size: 0.74rem;
  color: #8c93a0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-empty-hint {
  padding: 2.5rem 1rem;
  text-align: center;
  font-size: 0.84rem;
  color: #8c93a0;
}

/* Responsive */
@media (max-width: 1200px) {
  .composer-workspace-container {
    flex-direction: column;
  }
  .composer-channel-sidebar {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 460px;
    max-height: 460px;
    position: static;
  }
}

/* ============================================================================
   CHANNEL GROUPS (NHÓM KÊNH FANPAGE)
   ============================================================================ */
.channel-groups-container {
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.channel-groups-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 1.25rem 1.75rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.channel-groups-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.channel-groups-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0.35rem 0 0;
}

.channel-groups-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.channel-groups-search-box {
  position: relative;
  width: 100%;
  max-width: 380px;
}

.channel-groups-search-box i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.85rem;
}

.channel-groups-search-box input {
  padding-left: 2.35rem;
  font-size: 0.85rem;
  border-radius: 8px;
  background: #ffffff;
}

.channel-groups-count-info {
  font-size: 0.85rem;
  color: #64748b;
}

.channel-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.25rem;
}

.channel-group-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.channel-group-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.cg-card-color-bar {
  height: 4px;
  width: 100%;
}

.cg-card-header {
  padding: 1rem 1.25rem 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.cg-card-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.cg-card-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cg-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cg-card-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease !important;
}

html:not([data-theme="dark"]) .cg-card-badge {
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  color: #15803d !important;
  font-weight: 600 !important;
  border-radius: 9999px !important;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease !important;
}

html:not([data-theme="dark"]) .channel-groups-count-info strong,
html:not([data-theme="dark"]) #channelGroupsTotalBadge {
  color: #15803d !important;
  transition: color 0.25s ease !important;
}

.cg-card-desc {
  padding: 0 1.25rem 0.75rem;
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
  min-height: 2.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cg-card-pages-preview {
  padding: 0.75rem 1.25rem;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  flex: 1;
  min-height: 85px;
}

.cg-card-pages-title {
  font-size: 0.73rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-bottom: 0.45rem;
}

.cg-page-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 90px;
  overflow-y: auto;
}

.cg-page-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  color: #334155;
}

.cg-page-chip i {
  color: #1877f2;
  font-size: 0.75rem;
}

.cg-page-chip-more {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}

.cg-card-empty-pages {
  font-size: 0.8rem;
  color: #94a3b8;
  font-style: italic;
  padding: 0.5rem 0;
}

.cg-card-actions {
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  gap: 0.5rem;
  border-top: 1px solid #f1f5f9;
}

.cg-card-actions-left {
  flex: 1;
}

.cg-card-actions-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.cg-btn-use {
  width: 100%;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
}

.cg-btn-icon-action {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.8rem;
}

.cg-btn-icon-action:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.cg-btn-icon-action.delete:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fca5a5;
}

.channel-groups-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  margin-top: 1rem;
}

.cg-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.channel-groups-empty h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem;
}

.channel-groups-empty p {
  font-size: 0.85rem;
  color: #64748b;
  max-width: 420px;
  margin: 0 auto 1.5rem;
}

/* Modal Channel Group Styling - Perfect Rounded Corners & Contained Scroll */
#channelGroupModal .modal-box,
#channelGroupModal .channel-group-modal-box,
.channel-group-modal-box {
  max-width: 620px !important;
  width: 95% !important;
  max-height: 88vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2) !important;
  border: 1px solid #c9d5d8 !important;
  background: #ffffff !important;
  position: relative !important;
}

#channelGroupModal .modal-header {
  flex-shrink: 0 !important;
  background: #dfe7e8 !important;
  border-bottom: 1px solid #c9d5d8 !important;
  border-top-left-radius: 13px !important;
  border-top-right-radius: 13px !important;
  padding: 1rem 1.4rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  overflow: hidden !important;
}

#channelGroupModal .modal-header h3 {
  margin: 0 !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #112b2b !important;
}

#channelGroupModal #btnCloseChannelGroupModalBtn {
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.4rem !important;
  line-height: 1 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 6px !important;
  color: #596c72 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  padding: 0 !important;
}

#channelGroupModal #btnCloseChannelGroupModalBtn:hover {
  background: #cfe0de !important;
  color: #112b2b !important;
}

#channelGroupModal .modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: calc(88vh - 125px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 1.25rem 1.4rem !important;
  background: #ffffff !important;
  scrollbar-width: thin !important;
  scrollbar-color: #c9d5d8 transparent !important;
}

#channelGroupModal .modal-body::-webkit-scrollbar {
  width: 6px !important;
}
#channelGroupModal .modal-body::-webkit-scrollbar-track {
  background: transparent !important;
}
#channelGroupModal .modal-body::-webkit-scrollbar-thumb {
  background: #c9d5d8 !important;
  border-radius: 4px !important;
}
#channelGroupModal .modal-body::-webkit-scrollbar-thumb:hover {
  background: #068567 !important;
}

#channelGroupModal .modal-footer {
  flex-shrink: 0 !important;
  background: #f5f7f7 !important;
  border-top: 1px solid #dfe7e8 !important;
  border-bottom-left-radius: 13px !important;
  border-bottom-right-radius: 13px !important;
  padding: 0.85rem 1.4rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.75rem !important;
}

#channelGroupModal #btnCloseChannelGroupModalFooterBtn {
  background: #ffffff !important;
  border: 1px solid #c9d5d8 !important;
  color: #596c72 !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  padding: 0.55rem 1.25rem !important;
  transition: all 0.15s ease !important;
}
#channelGroupModal #btnCloseChannelGroupModalFooterBtn:hover {
  background: #edf2f1 !important;
  color: #112b2b !important;
  border-color: #b5c4c8 !important;
}

#channelGroupModal #btnSaveChannelGroup {
  background: #068567 !important;
  border: 1px solid #056e55 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  padding: 0.55rem 1.45rem !important;
  box-shadow: 0 4px 14px rgba(6, 133, 103, 0.28) !important;
  transition: all 0.15s ease !important;
}
#channelGroupModal #btnSaveChannelGroup:hover {
  background: #056e55 !important;
  box-shadow: 0 6px 18px rgba(6, 133, 103, 0.38) !important;
  transform: translateY(-1px) !important;
}

.cg-color-picker-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.cg-color-dot {
  position: relative;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cg-color-dot input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cg-color-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: transform 0.15s, border-color 0.15s;
}

.cg-color-dot.active .cg-color-circle {
  border-color: #0f172a;
  transform: scale(1.15);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.15);
}

.cg-modal-pages-section {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.85rem;
  background: #ffffff;
}

.cg-modal-pages-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.cg-modal-pages-actions {
  display: flex;
  gap: 0.35rem;
}

.cg-modal-pages-list {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.4rem;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.cg-modal-page-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.12s;
  user-select: none;
}

.cg-modal-page-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.cg-modal-page-item.selected {
  background: #eff6ff;
  border-color: #93c5fd;
}

.cg-modal-page-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.cg-modal-page-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #1877f2;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.cg-modal-page-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cg-modal-page-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cg-modal-page-id {
  font-size: 0.72rem;
  color: #64748b;
}

.cg-modal-page-check {
  margin-left: 0.5rem;
  pointer-events: none;
}

/* ============================================================================
   MANAGE PAGES (QUẢN LÝ FANPAGE TRONG APP)
   ============================================================================ */
.manage-pages-container {
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.manage-pages-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 1.25rem 1.75rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.manage-pages-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.manage-pages-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0.35rem 0 0;
}

/* Manage Pages Header Total Badge (Đồng bộ sắc thái pastel mint/emerald) */
.manage-pages-total-badge,
#managePagesAppTotalBadge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 133, 103, 0.08) !important;
  color: #068567 !important;
  border: 1px solid rgba(6, 133, 103, 0.22) !important;
  border-radius: 9999px !important;
  padding: 0.42rem 1rem !important;
  font-size: 0.84rem !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 2px rgba(6, 133, 103, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.manage-pages-total-badge:hover,
#managePagesAppTotalBadge:hover {
  background: rgba(6, 133, 103, 0.14) !important;
  border-color: rgba(6, 133, 103, 0.38) !important;
  box-shadow: 0 2px 6px rgba(6, 133, 103, 0.08);
}

.manage-pages-total-badge i,
#managePagesAppTotalBadge i {
  color: #068567;
  font-size: 0.82rem;
}

.manage-pages-total-badge strong,
#managePagesAppTotalBadge strong {
  color: #034e46;
  font-weight: 700;
}

.discover-token-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.discover-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.discover-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.98rem;
  color: #0f172a;
}

.discover-token-input-row {
  display: flex;
  gap: 0.85rem;
  align-items: stretch;
}

.discover-input-wrap {
  flex: 1;
  display: flex;
  position: relative;
}

.discover-token-textarea {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 60px;
  box-sizing: border-box;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  border-radius: 10px;
  resize: vertical;
  padding-right: 95px;
}

.btn-discover-paste {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.28rem 0.55rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.btn-discover-paste:hover {
  background: #e2e8f0;
  color: #1e293b;
  border-color: #94a3b8;
}

#btnDiscoverPagesFromToken.btn-discover-action,
.btn-discover-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.55rem !important;
  padding: 0 1.6rem !important;
  min-width: 175px !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  height: 100% !important;
  min-height: 60px !important;
  margin: 0 !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #079674 0%, #046c53 100%) !important;
  border: 1px solid #03523f !important;
  box-shadow: 0 3px 10px rgba(6, 133, 103, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
  cursor: pointer !important;
  user-select: none !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: -0.01em !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#btnDiscoverPagesFromToken.btn-discover-action i,
.btn-discover-action i {
  font-size: 0.95rem !important;
  color: #ffffff !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#btnDiscoverPagesFromToken.btn-discover-action span,
.btn-discover-action span {
  color: #ffffff !important;
  font-weight: 700 !important;
}

#btnDiscoverPagesFromToken.btn-discover-action:hover,
.btn-discover-action:hover {
  background: linear-gradient(135deg, #08a580 0%, #057a5e 100%) !important;
  border-color: #04634c !important;
  box-shadow: 0 5px 16px rgba(6, 133, 103, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-1px) !important;
}

#btnDiscoverPagesFromToken:hover i,
.btn-discover-action:hover i {
  transform: scale(1.15) rotate(6deg) !important;
}

#btnDiscoverPagesFromToken.btn-discover-action:active,
.btn-discover-action:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 4px rgba(6, 133, 103, 0.2), inset 0 1px 0 rgba(0, 0, 0, 0.1) !important;
}

#btnDiscoverPagesFromToken.btn-discover-action:disabled,
.btn-discover-action:disabled {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

.discover-loading-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 0 0.5rem;
  font-size: 0.88rem;
  color: #3b82f6;
  font-weight: 500;
}

.discovered-pages-section {
  margin-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 1.25rem;
}

.discovered-section-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.discovered-meta-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.84rem;
  flex-wrap: wrap;
}

.discovered-tag-account {
  font-weight: 600;
  color: #0f172a;
}

.discovered-tag-type {
  background: #e0e7ff;
  color: #4338ca;
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  font-weight: 600;
}

.discovered-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.active-pages-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.active-pages-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.active-panel-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.active-panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.active-pages-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.btn-bulk-preset-pages {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 36px;
  padding: 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(6, 133, 103, 0.09) !important;
  color: #068567 !important;
  border: 1px solid rgba(6, 133, 103, 0.28) !important;
  box-shadow: 0 1px 2px rgba(6, 133, 103, 0.05);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-bulk-preset-pages i {
  color: #068567;
  font-size: 0.82rem;
  transition: transform 0.2s ease;
}

.btn-bulk-preset-pages:hover {
  background: rgba(6, 133, 103, 0.16) !important;
  border-color: rgba(6, 133, 103, 0.45) !important;
  color: #034e46 !important;
  box-shadow: 0 2px 6px rgba(6, 133, 103, 0.12);
  transform: translateY(-1px);
}

.btn-bulk-preset-pages:hover i {
  transform: rotate(15deg) scale(1.1);
}

.btn-bulk-delete-pages {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 36px;
  padding: 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(220, 38, 38, 0.08) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(220, 38, 38, 0.28) !important;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.05);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-bulk-delete-pages i {
  color: #dc2626;
  font-size: 0.82rem;
  transition: transform 0.2s ease;
}

.btn-bulk-delete-pages:hover {
  background: rgba(220, 38, 38, 0.15) !important;
  border-color: rgba(220, 38, 38, 0.45) !important;
  color: #b91c1c !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.12);
  transform: translateY(-1px);
}

.btn-bulk-delete-pages:hover i {
  transform: scale(1.1);
}

.active-pages-search-box {
  position: relative;
  width: 100%;
  max-width: 280px;
  min-width: 180px;
}

.active-pages-search-box i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.85rem;
}

.active-pages-search-box input {
  padding-left: 2.2rem;
  font-size: 0.85rem;
  border-radius: 8px;
  height: 36px;
}

.btn-refresh-pages {
  height: 36px;
  width: 36px;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
  border-color: #cbd5e1;
  color: #64748b;
  transition: all 0.2s ease;
}

.btn-refresh-pages:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.discovered-table-wrap, .managed-pages-table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow-x: auto;
  background: #ffffff;
}

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

.table-custom th {
  background: #dfe7e8;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid #c9d5d8;
  font-weight: 700;
  color: #2a3c40;
  white-space: nowrap;
}

.table-custom td {
  background: #edf2f1;
  padding: 0.65rem 0.95rem;
  border-bottom: 1px solid #c9d5d8;
  vertical-align: middle;
  color: #2a3c40;
}

.table-custom tbody tr:hover,
.table-custom tbody tr:hover td {
  background: #e1ebe7;
}

.table-custom tbody tr.selected-row {
  background: #f0f7ff;
}

.page-avatar-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 180px;
}

.page-thumb-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  flex-shrink: 0;
}

.page-thumb-placeholder {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1877f2;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.page-cell-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 2px;
}

.page-cell-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.page-cell-name {
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}

.page-cell-category {
  font-size: 0.74rem;
  color: #64748b;
  line-height: 1.25;
}

/* Page Preset Source Badges (Kế thừa nhóm / Mẫu riêng) */
.page-preset-badge {
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
  font-size: 0.71rem;
  font-weight: 600;
  padding: 1.5px 7.5px;
  border-radius: 9999px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(6, 133, 103, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.page-preset-badge.preset-group {
  background: rgba(6, 133, 103, 0.08);
  color: #068567;
  border: 1px solid rgba(6, 133, 103, 0.24);
}

.page-preset-badge.preset-group:hover {
  background: rgba(6, 133, 103, 0.14);
  border-color: rgba(6, 133, 103, 0.38);
}

.page-preset-badge.preset-group i {
  color: #068567;
  font-size: 0.65rem;
}

.page-preset-badge.preset-page {
  background: rgba(115, 83, 174, 0.08);
  color: #7353ae;
  border: 1px solid rgba(115, 83, 174, 0.24);
}

.page-preset-badge.preset-page:hover {
  background: rgba(115, 83, 174, 0.14);
  border-color: rgba(115, 83, 174, 0.38);
}

.page-preset-badge.preset-page i {
  color: #7353ae;
  font-size: 0.65rem;
}

.checkbox-center {
  text-align: center;
}

.page-app-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #1877f2;
  cursor: pointer;
}

/* Switch Toggle for active pages */
.page-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
}

.page-switch-input {
  display: none;
}

.page-switch-slider {
  position: relative;
  width: 36px;
  height: 20px;
  background-color: #cbd5e1;
  border-radius: 20px;
  transition: background-color 0.2s;
  display: inline-block;
}

.page-switch-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.page-switch-input:checked + .page-switch-slider {
  background-color: #10b981;
}

.page-switch-input:checked + .page-switch-slider::before {
  transform: translateX(16px);
}

.page-switch-label {
  font-size: 0.78rem;
  font-weight: 600;
}

.page-switch-label.enabled {
  color: #059669;
}

.page-switch-label.disabled {
  color: #94a3b8;
}

.managed-pages-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Page ID Cell with Copy Button */
.page-id-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  max-width: 100%;
  transition: border-color 0.15s ease;
}

.page-id-cell:hover {
  border-color: #cbd5e1;
}

.page-id-cell code {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.8rem;
  color: #334155;
  user-select: all;
  letter-spacing: -0.01em;
}

.btn-copy-id {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  font-size: 0.8rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-copy-id:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-copy-id.copied {
  color: #10b981 !important;
}

.page-follow-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  color: #1e293b;
  background: #f8fafc;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  letter-spacing: -0.01em;
}

/* Page Spam 368 Warning Badge (Base / Light Mode) */
.page-spam-warning-badge {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.73rem;
  font-weight: 600;
}

.page-spam-warning-badge i {
  color: #dc2626;
}

.btn-clear-page-spam {
  background: none;
  border: none;
  color: #b91c1c;
  cursor: pointer;
  padding: 0 2px;
  font-size: 0.75rem;
  text-decoration: underline;
}

.btn-clear-page-spam:hover {
  color: #991b1b;
}

/* ==============================================================================
   Bulk Comments Modal & Composer Section Styles (Bình luận hàng loạt)
   ============================================================================== */

.bulk-comments-modal-box {
  width: 860px;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.bulk-comments-header-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #0f172a;
}

.bulk-comments-modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.bulk-comments-subtitle {
  font-size: 0.86rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 1.1rem;
}

.bulk-comments-table-wrapper {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.bulk-comments-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.bulk-comments-table thead th {
  background: #f8fafc;
  padding: 0.75rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  text-transform: none;
}

.bulk-comments-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.12s ease;
}

.bulk-comments-table tbody tr:last-child {
  border-bottom: none;
}

.bulk-comments-table tbody tr:hover {
  background-color: #fafbfc;
}

.bulk-comments-table tbody td {
  padding: 0.85rem 0.75rem;
  vertical-align: top;
}

/* Comment text column */
.bulk-comment-textarea {
  width: 100%;
  min-height: 56px;
  max-height: 160px;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  line-height: 1.45;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  resize: vertical;
  background: #ffffff;
  color: #1e293b;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  pointer-events: auto !important;
  cursor: text !important;
  user-select: text !important;
}

.bulk-comment-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.bulk-comment-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.4rem;
  gap: 0.5rem;
}

.bulk-comment-char-count {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Media Column */
.bulk-comment-media-cell {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.btn-bulk-media-upload {
  width: 44px;
  height: 44px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.15s ease;
}

.btn-bulk-media-upload:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  background: #eff6ff;
}

.bulk-media-thumb-preview {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.bulk-media-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.btn-remove-bulk-media {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 18px;
  height: 18px;
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  line-height: 1;
  transition: transform 0.15s ease;
}

.btn-remove-bulk-media:hover {
  transform: scale(1.15);
  background: #dc2626;
}

/* Delay Column */
.bulk-comment-delay-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bulk-comment-delay-select {
  width: 100%;
  height: 38px;
  padding: 0.45rem 0.65rem;
  font-size: 0.83rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background-color: #ffffff;
  color: #1e293b;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.bulk-comment-delay-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.bulk-comment-custom-delay-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.bulk-comment-custom-delay-row input {
  width: 75px;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.bulk-comment-custom-delay-row span {
  font-size: 0.78rem;
  color: #64748b;
}

/* Action Column */
.bulk-comment-action-cell {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.btn-delete-bulk-comment-row {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 1.05rem;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-delete-bulk-comment-row:hover {
  background-color: #fef2f2;
  color: #dc2626;
}

/* Add Row Button */
.bulk-comments-add-row-wrapper {
  margin-top: 0.75rem;
}

.btn-add-bulk-comment-row {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #2563eb;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-add-bulk-comment-row:hover {
  border-color: #3b82f6;
  background: #f8fafc;
  color: #1d4ed8;
}

/* Modal Footer */
.bulk-comments-modal-footer {
  padding: 0.9rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}

.bulk-comments-footer-buttons {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Summary container */
.bulk-comments-summary-container {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.65rem 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.bulk-comments-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.bulk-comments-summary-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bulk-comments-count-pill {
  font-size: 0.75rem;
  font-weight: 700;
  color: #2563eb;
  background: #dbeafe;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  border: 1px solid #bfdbfe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  transition: all 0.2s ease;
}

.bulk-comments-count-pill.count-red {
  color: #ffffff !important;
  background: #ef4444 !important;
  border-color: #dc2626 !important;
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.4) !important;
}

.bulk-comments-header-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-summary-action {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.38rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  line-height: 1.3;
}

/* 1. Thêm bình luận: Nút xanh nổi bật */
.btn-summary-add {
  background: #2563eb;
  color: #ffffff;
  border: 1px solid #1d4ed8;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.btn-summary-add:hover {
  background: #1d4ed8;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

/* 2. Mở bảng cấu hình: Nút thẻ trắng viền xám chuyên nghiệp */
.btn-summary-edit {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-summary-edit:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
  transform: translateY(-1px);
}

/* 3. Lưu bình luận: Nút xanh lá cây chốt cấu hình nổi bật */
.btn-summary-save {
  background: #059669;
  color: #ffffff;
  border: 1px solid #047857;
  box-shadow: 0 1px 2px rgba(5, 150, 105, 0.25);
}

.btn-summary-save:hover {
  background: #047857;
  box-shadow: 0 2px 5px rgba(5, 150, 105, 0.35);
  transform: translateY(-1px);
}

/* 4. Xóa tất cả: Nút đỏ nhẹ nhàng */
.btn-summary-clear {
  background: #fff5f5;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.btn-summary-clear:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
  transform: translateY(-1px);
}

/* Badge trạng thái lưu bình luận */
.badge-comment-save-status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.18rem 0.6rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.badge-comment-save-status.unsaved {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.badge-comment-save-status.saved {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.bulk-comments-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 520px;
  overflow-y: auto;
  padding: 0.1rem;
}

/* Inline Comment Cards */
.bulk-comment-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bulk-comment-card:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.bulk-comment-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bulk-comment-card-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.bulk-comment-card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
}

.bulk-comment-card-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.bulk-comment-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bulk-comment-inline-delay {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.18rem 0.45rem;
  font-size: 0.8rem;
  color: #475569;
}

.bulk-comment-inline-delay select {
  border: none;
  background: transparent;
  font-size: 0.8rem;
  color: #334155;
  outline: none;
  cursor: pointer;
  font-family: inherit;
}

.bulk-comment-inline-custom-delay {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: #64748b;
  margin-left: 0.25rem;
}

.bulk-comment-inline-custom-delay input {
  width: 55px;
  padding: 0.15rem 0.3rem;
  font-size: 0.8rem;
}

.btn-delete-inline-comment {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85rem;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-delete-inline-comment:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.bulk-comment-card-body {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.bulk-comment-card-text-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.bulk-comment-inline-textarea {
  width: 100%;
  min-height: 52px;
  max-height: 140px;
  padding: 0.4rem 0.6rem;
  font-size: 0.84rem;
  line-height: 1.4;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  resize: vertical;
  background: #ffffff;
  color: #1e293b;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
  pointer-events: auto !important;
  cursor: text !important;
}

.bulk-comment-inline-textarea:focus {
  outline: none;
  border-color: #3b82f6;
}

.bulk-comment-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.35rem;
  gap: 0.4rem;
}

.bulk-comment-spin-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.bulk-comment-spin-tools button {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0.2rem 0.45rem;
  font-size: 0.73rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.12s ease;
}

.bulk-comment-spin-tools button:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.bulk-comment-char-count {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
}

.bulk-comment-card-media-col {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-inline-media-upload {
  width: 58px;
  height: 58px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  font-size: 0.95rem;
  transition: all 0.15s ease;
  padding: 0;
}

.btn-inline-media-upload span {
  font-size: 0.68rem;
  font-weight: 500;
}

.btn-inline-media-upload:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  background: #eff6ff;
}

.inline-media-thumb-preview {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

.inline-media-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.btn-remove-inline-media {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  border: none;
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-remove-inline-media:hover {
  background: #ef4444;
}

.bulk-comment-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  font-size: 0.82rem;
  transition: border-color 0.15s ease;
}

.bulk-comment-summary-item:hover {
  border-color: #cbd5e1;
}

.bulk-comment-summary-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.bulk-comment-num-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #3b82f6;
  background: #dbeafe;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.bulk-comment-text-preview {
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}

.bulk-comment-summary-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.bulk-comment-delay-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #0369a1;
  background: #e0f2fe;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.bulk-comment-media-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #7c3aed;
  background: #ede9fe;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Modals z-index hierarchy: Spin modals should appear above Bulk Comments modal */
#textSpinModal, #iconSpinModal {
  z-index: 99998 !important;
}

/* Bulk comment row toolbar: Text & Icon variation triggers */
.bulk-comment-spin-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.btn-spin-text-row-trigger,
.btn-spin-icon-row-trigger {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.73rem;
  font-weight: 500;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  transition: all 0.15s ease;
}

.btn-spin-text-row-trigger:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.btn-spin-icon-row-trigger:hover {
  background: #faf5ff;
  border-color: #d8b4fe;
  color: #7e22ce;
}

.bulk-comment-empty-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  color: #64748b;
  font-size: 0.82rem;
}

.bulk-comment-empty-card strong {
  color: #1e3a8a;
}

/* ==============================================================================
   Queue Table Comment Links & Badges
   ============================================================================== */
.queue-comment-summary-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.queue-comment-tag {
  font-size: 0.72rem;
  color: #4f46e5;
  background: #eef2ff;
  border: 1px solid #e0e7ff;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-queue-inline-add-comment {
  font-size: 0.72rem;
  font-weight: 600;
  color: #4f46e5;
  background: #ffffff;
  border: 1px dashed #c7d2fe;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-queue-inline-add-comment:hover {
  background: #e0e7ff;
  border-color: #6366f1;
  color: #3730a3;
}

.btn-queue-inline-add-comment.empty {
  color: #64748b;
  border-color: #cbd5e1;
  font-weight: 500;
}

.btn-queue-inline-add-comment.empty:hover {
  color: #2563eb;
  border-color: #93c5fd;
  background: #eff6ff;
}

/* ==============================================================================
   Modal: Cài Đặt Bình Luận (modalPostAddComment) - Matching media_1789951606847.png
   ============================================================================== */
.post-add-comment-modal-box {
  max-width: 980px;
  width: 95%;
  height: 88vh;
  max-height: 88vh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 1;
}

@keyframes postAddCommentSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal Header */
.post-add-comment-modal-header {
  padding: 1rem 1.5rem;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
}

.post-add-comment-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-back-header {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  font-size: 1.15rem;
  color: #334155;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  outline: none;
}

.btn-back-header:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.post-add-comment-modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.post-add-comment-close-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
}

.post-add-comment-close-btn:hover {
  background: #f1f5f9;
  color: #334155;
}

/* Modal Body */
.post-add-comment-modal-body {
  padding: 1.25rem 1.5rem 2.5rem 1.5rem;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1 1 auto;
  min-height: 0;
  height: calc(100% - 120px);
  max-height: calc(100% - 120px);
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #f1f5f9;
}

.post-add-comment-modal-body::-webkit-scrollbar {
  width: 10px;
  display: block;
}

.post-add-comment-modal-body::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 8px;
  margin: 4px 0;
}

.post-add-comment-modal-body::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 8px;
  border: 2px solid #f1f5f9;
}

.post-add-comment-modal-body::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

.post-add-comment-modal-subtitle {
  font-size: 0.825rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

/* Multi-Channel Comments Pills Bar */
.post-comments-channel-pills-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.4rem 0 0.85rem 0;
}

.btn-channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-channel-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.btn-channel-pill.active {
  background: #eff6ff;
  color: #2563eb;
  border-color: #93c5fd;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.15);
}

.channel-pill-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  flex-shrink: 0;
}

.channel-pill-count {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: #e2e8f0;
  color: #475569;
}

.btn-channel-pill.active .channel-pill-count {
  background: #bfdbfe;
  color: #1d4ed8;
}

/* Multi-Channel Groups Container */
.post-comments-multi-channels-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.channel-comments-group-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  flex-shrink: 0;
}

.channel-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.channel-group-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.channel-group-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  flex-shrink: 0;
}

.channel-group-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.channel-group-name-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.channel-group-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.channel-group-post-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
}

.channel-group-post-status.published {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.channel-group-post-status.pending {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.channel-group-post-status.failed {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.channel-group-sub-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.76rem;
  color: #64748b;
}

.channel-group-fb-link {
  color: #1877f2;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.channel-group-fb-link:hover {
  text-decoration: underline;
}

.channel-group-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.channel-group-comment-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.channel-group-comment-badge.published {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.channel-group-comment-badge.pending {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.channel-group-comment-badge.failed {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* Post Meta Banner */
.post-comments-meta-banner {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.825rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.banner-page-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
}

.banner-page-name {
  color: #0f172a;
}

.banner-divider {
  color: #cbd5e1;
}

.banner-post-snippet {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #475569;
}

/* Post Comments Single Container & Top Toolbar (Vị trí 1) */
.post-comments-single-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.post-comments-top-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  gap: 12px;
}

.comments-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comments-toolbar-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.comments-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-top-spin-trigger {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
  line-height: 1.3;
}

.btn-top-spin-trigger:active {
  transform: translateY(1px);
}

.btn-top-spin-icon {
  background: #faf5ff;
  border: 1px solid #d8b4fe;
  color: #7e22ce;
  box-shadow: 0 1px 2px rgba(126, 34, 206, 0.05);
}

.btn-top-spin-icon:hover {
  background: #f3e8ff;
  border-color: #a855f7;
  color: #6b21a8;
  box-shadow: 0 2px 4px rgba(126, 34, 206, 0.12);
}

.btn-top-spin-text {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1d4ed8;
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.05);
}

.btn-top-spin-text:hover {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #1e40af;
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.12);
}

/* Comments Table */
.post-comments-table-wrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  max-height: 480px;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}

.post-comments-table-wrapper::-webkit-scrollbar {
  width: 6px;
}

.post-comments-table-wrapper::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 4px;
}

.post-comments-table-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.post-comments-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.post-comments-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  table-layout: fixed;
}

.post-comments-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fafc;
  padding: 0.75rem 1rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.post-comments-table thead th:first-child {
  border-top-left-radius: 7px;
}

.post-comments-table thead th:last-child {
  border-top-right-radius: 7px;
}

.post-comments-table thead th i {
  color: #64748b;
  margin-right: 0.35rem;
}

.post-comments-table tbody tr {
  transition: background 0.15s ease;
}

.post-comments-table tbody tr:hover td {
  background: #fbfcfe;
}

.post-comments-table tbody td {
  padding: 0.75rem 0.75rem !important;
  vertical-align: top !important;
  border-bottom: 1px solid #f1f5f9;
}

.post-comments-table tbody td[data-col="order"],
.post-comments-table tbody td[data-col="content"],
.post-comments-table tbody td[data-col="media"],
.post-comments-table tbody td[data-col="timing"],
.post-comments-table tbody td[data-col="status"],
.post-comments-table tbody td[data-col="action"] {
  vertical-align: top !important;
  padding: 0.75rem 0.65rem !important;
}

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

/* Textarea in Table */
.post-comment-row-textarea {
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  font-family: inherit;
  font-size: 0.85rem;
  color: #0f172a;
  line-height: 1.45;
  resize: vertical;
  min-height: 38px;
  outline: none;
  transition: all 0.15s ease;
}

.post-comment-row-textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.post-comment-row-textarea:not([readonly]) {
  cursor: text !important;
  pointer-events: auto !important;
  user-select: text !important;
  -webkit-user-select: text !important;
}

.post-comment-row-textarea.is-posted-locked {
  background-color: #f8fafc !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
  cursor: pointer !important;
  resize: none !important;
}

.post-comment-row-textarea.is-posted-locked:focus {
  border-color: #94a3b8 !important;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2) !important;
}

/* Media Upload Box matching media_1789953494153.png */
.post-comment-media-wrap {
  height: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-comment-media-upload {
  appearance: none;
  -webkit-appearance: none;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  font-size: 1.15rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 6px;
  transition: all 0.15s ease;
  margin: 0 auto;
  outline: none;
  box-sizing: border-box;
}

.btn-comment-media-upload:hover {
  color: #2563eb;
  background-color: #eff6ff;
  border-color: #93c5fd;
}

/* Small demo thumbnail */
.comment-row-media-preview {
  width: 38px;
  height: 38px;
  max-width: 38px;
  max-height: 38px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-sizing: border-box;
}

.comment-row-media-preview img {
  width: 38px !important;
  height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  object-fit: cover !important;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  display: block;
}

.btn-remove-row-media {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: -5px;
  right: -5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  border: 1px solid #ffffff;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Delay / Timing Column */
.bulk-comment-delay-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.post-comment-row-select,
.bulk-comment-delay-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  max-width: 120px;
  height: 38px !important;
  min-height: 38px !important;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") no-repeat right 0.65rem center / 13px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 0 1.65rem 0 0.65rem !important;
  font-size: 0.83rem !important;
  font-family: inherit !important;
  color: #334155 !important;
  cursor: pointer !important;
  outline: none !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  transition: border-color 0.15s ease !important;
}

.post-comment-row-select:focus,
.bulk-comment-delay-select:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1) !important;
}

.post-comment-row-select:disabled,
.bulk-comment-delay-select:disabled {
  background-color: #f1f5f9 !important;
  color: #64748b !important;
  border-color: #e2e8f0 !important;
  cursor: not-allowed !important;
  opacity: 0.85 !important;
}

.post-comment-timing-wrap {
  height: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.post-comment-timing-readonly {
  height: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.825rem;
  font-weight: 600;
  color: #334155;
  box-sizing: border-box;
}

/* Status Column */
.post-comment-status-cell {
  height: 38px;
  min-height: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-sizing: border-box;
}

.post-comment-status-tag {
  height: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  box-sizing: border-box;
  line-height: 1;
}

.post-comment-status-tag.posted {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.post-comment-status-tag.pending {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.post-comment-status-tag.pending.is-retrying {
  background-color: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.post-comment-status-tag.unsaved {
  background-color: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.post-comment-status-tag.failed {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Order Pill Column (#) */
.post-comment-order-wrap {
  height: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-comment-order-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 6px;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  user-select: none;
  box-sizing: border-box;
}

.post-comment-order-pill.posted {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.08);
}

.post-comment-order-pill.pending {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  box-shadow: 0 1px 2px rgba(59, 130, 246, 0.08);
}

.post-comment-order-pill.new {
  background-color: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.post-comment-order-pill.failed {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.post-comment-posted-time {
  font-size: 0.72rem;
  color: #047857;
  font-weight: 600;
  background-color: #ecfdf5;
  border: 1px solid #d1fae5;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
  line-height: 1.3;
}

.post-comment-posted-time i {
  font-size: 0.65rem;
  color: #10b981;
}

.post-comment-pending-time {
  font-size: 0.7rem;
  color: #b45309;
  font-weight: 500;
  background-color: #fffbeb;
  border: 1px solid #fef3c7;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
  line-height: 1.3;
}

/* Row Action */
.post-comments-table tbody td[data-col="action"] {
  padding: 0.75rem 0.5rem !important;
  text-align: center;
  white-space: nowrap;
}

.post-comment-action-buttons-wrap {
  height: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
}

.btn-retry-post-comment-row,
.btn-delete-post-comment-row {
  appearance: none;
  -webkit-appearance: none;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  font-size: 0.95rem !important;
  cursor: pointer !important;
  margin: 0 !important;
  outline: none;
  transition: all 0.15s ease !important;
}

.btn-retry-post-comment-row {
  color: #2563eb !important;
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
}

.btn-retry-post-comment-row:hover:not(:disabled) {
  background: #dbeafe !important;
  border-color: #93c5fd !important;
}

.btn-retry-post-comment-row.is-disabled,
.btn-retry-post-comment-row:disabled {
  color: #94a3b8 !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

.btn-delete-post-comment-row {
  color: #dc2626 !important;
  background: #fff5f5 !important;
  border: 1px solid #fecaca !important;
}

.btn-delete-post-comment-row:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #b91c1c !important;
}

.btn-delete-post-comment-row.row-is-posted {
  display: inline-flex !important;
  color: #dc2626 !important;
}

/* Add Row Bar */
.post-comments-add-row-bar {
  padding: 0.35rem 0;
}

.btn-create-comment-row {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  transition: all 0.15s ease;
  outline: none;
}

.btn-create-comment-row:hover {
  color: #2563eb;
  background: #eff6ff;
}

/* Modal Footer */
.post-add-comment-modal-footer {
  padding: 1rem 1.5rem;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.post-comments-footer-left {
  font-size: 0.825rem;
  color: #64748b;
}

.link-spin-btn {
  background: none;
  border: none;
  color: #2563eb;
  font-weight: 600;
  font-size: 0.825rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-family: inherit;
  outline: none;
}

.link-spin-btn:hover {
  color: #1d4ed8;
}

.post-comments-footer-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.post-comments-footer-right .btn-modal-cancel {
  appearance: none;
  -webkit-appearance: none;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  padding: 0.5rem 1.35rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
}

.post-comments-footer-right .btn-modal-cancel:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.post-comments-footer-right .btn-modal-submit {
  appearance: none;
  -webkit-appearance: none;
  background: #2563eb;
  border: 1px solid #2563eb;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  padding: 0.5rem 1.75rem;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25);
  transition: all 0.15s ease;
  outline: none;
}

.post-comments-footer-right .btn-modal-submit:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.post-comments-footer-right .btn-modal-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

/* ==============================================================================
   Bulk Comments in Schedule View
   ============================================================================== */
.queue-bulk-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  margin-top: 0.75rem;
  animation: fadeIn 0.2s ease;
}

.bulk-bar-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: #1e3a8a;
}

.bulk-bar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.bulk-selected-summary-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.badge-status-chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-status-chip.published {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.badge-status-chip.pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-status-chip.failed {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Modal Pop In Animation */
@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Post Badge Status in Modals */
.post-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.post-badge-status.published {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.post-badge-status.pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.post-badge-status.failed {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Comment Row Toolbar for Spin Variant Insertion */
.post-comment-row-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
  gap: 6px;
}

.btn-spin-icon-post-comment-trigger,
.btn-spin-icon-bulk-queue-comment-trigger {
  font-size: 0.74rem;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #c084fc;
  background: #faf5ff;
  color: #7e22ce;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.btn-spin-icon-post-comment-trigger:hover,
.btn-spin-icon-bulk-queue-comment-trigger:hover {
  background: #f3e8ff;
  border-color: #a855f7;
  color: #6b21a8;
}

.btn-spin-text-post-comment-trigger,
.btn-spin-text-bulk-queue-comment-trigger {
  font-size: 0.74rem;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.btn-spin-text-post-comment-trigger:hover,
.btn-spin-text-bulk-queue-comment-trigger:hover {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #1e40af;
}

/* App Confirm Dialog Details */
.modal-app-confirm-box {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==============================================================================
   Post Creation Success Modal (Khớp chính xác hình ảnh người dùng media_1790019555270.png)
   ============================================================================== */

.post-success-modal-box {
  max-width: 480px;
  width: 92%;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 30px -8px rgba(0, 0, 0, 0.2), 0 8px 12px -4px rgba(0, 0, 0, 0.08);
  animation: modalPopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid #e2e8f0;
}

.post-success-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}

.post-success-modal-header-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: #111827;
}

.post-success-header-icon {
  font-size: 1.2rem;
  color: #068567;
}

.post-success-modal-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: #596c72;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.post-success-modal-close:hover {
  background: #edf2f1;
  color: #112b2b;
}

.post-success-modal-body {
  padding: 2.5rem 2rem 2.25rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
}

/* Central glowing green badge with micro sparkles */
.post-success-icon-badge-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.4rem;
}

.post-success-badge-halo {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #ddede7;
  border: 2px solid #a7f3d0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(6, 133, 103, 0.2);
}

.post-success-badge-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #068567;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(6, 133, 103, 0.35);
}

.post-success-sparkle {
  position: absolute;
  color: #068567;
  font-size: 0.75rem;
  line-height: 1;
  pointer-events: none;
  animation: postSuccessSparklePulse 2s infinite ease-in-out;
}

.sparkle-tl {
  top: 10px;
  left: 10px;
  animation-delay: 0s;
}

.sparkle-tr {
  top: 10px;
  right: 10px;
  animation-delay: 0.4s;
}

.sparkle-bl {
  bottom: 10px;
  left: 10px;
  animation-delay: 0.8s;
}

.sparkle-br {
  bottom: 10px;
  right: 10px;
  animation-delay: 1.2s;
}

@keyframes postSuccessSparklePulse {
  0%, 100% {
    transform: scale(0.85);
    opacity: 0.65;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
}

.post-success-title {
  margin: 0 0 0.6rem 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: #112b2b;
  letter-spacing: -0.015em;
}

.post-success-subtitle {
  margin: 0 0 2.2rem 0;
  font-size: 0.96rem;
  color: #596c72;
  font-weight: 500;
  line-height: 1.45;
}

/* Actions Row: [Tạo mới] & [Danh sách bài đăng] */
.post-success-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  width: 100%;
}

.btn-post-success-blue {
  background: #ffffff;
  color: #2a3c40;
  border: 1px solid #c9d5d8;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.7rem 2.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-post-success-blue:hover {
  background: #edf2f1;
  color: #068567;
  border-color: #068567;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(6, 133, 103, 0.12);
}

.btn-post-success-blue:active {
  transform: translateY(0);
}

.btn-post-success-green {
  background: #068567;
  color: #ffffff;
  border: 1px solid #056e55;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.7rem 1.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(6, 133, 103, 0.28);
}

.btn-post-success-green:hover {
  background: #056e55;
  border-color: #034e46;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(6, 133, 103, 0.38);
}

.btn-post-success-green:active {
  transform: translateY(0);
}

@media (max-width: 480px) {
  .post-success-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  .btn-post-success-blue,
  .btn-post-success-green {
    width: 100%;
  }
}

/* Schedule Table Token Column (#1, #2, #3...) */
.table-token-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 145px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.82rem;
  color: #334155;
}

.token-order-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.74rem;
  color: #1d4ed8;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  padding: 1.5px 6px;
  border-radius: 5px;
  line-height: 1.2;
  flex-shrink: 0;
  letter-spacing: -0.2px;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
}

.table-token-cell .token-cell-name {
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-token-cell.empty-token {
  color: #94a3b8;
  font-style: italic;
}

.table-token-cell.multi-token {
  cursor: pointer;
}

.table-token-cell.multi-token:hover .token-order-badge.multi-token-badge {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #93c5fd;
  color: #1e40af;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.18);
  transform: translateY(-1px);
}

.token-order-badge.multi-token-badge {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
  transition: all 0.15s ease;
  user-select: none;
}

/* ==============================================================================
   TAB TỔNG QUAN - ROYAL EXECUTIVE DASHBOARD (QUÝ TỘC & HOÀNG GIA)
   ============================================================================== */
.text-gold {
  color: #f59e0b !important;
}

.text-emerald {
  color: #10b981 !important;
}

.text-ruby {
  color: #ef4444 !important;
}

.royal-pill {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #0f172a !important;
  font-weight: 800 !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

.royal-dashboard-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Overview Header Bar (Clean, Professional & Space-efficient) */
.overview-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.25rem 0.25rem 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.overview-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.overview-page-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  letter-spacing: -0.3px;
  margin: 0;
}

.overview-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 500;
}

.overview-actions-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* 1. Royal Hero Banner */
.royal-hero-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #070d1e 0%, #0f172a 45%, #1e1b4b 100%);
  border-radius: 16px;
  padding: 2.25rem 2.5rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: 0 15px 35px -5px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(245, 158, 11, 0.25);
}

.royal-hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0) 70%);
  pointer-events: none;
}

.royal-hero-banner::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: 20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0) 70%);
  pointer-events: none;
}

.royal-hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.royal-badge-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.royal-crown-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}

.royal-live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.royal-live-status-pill .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: royalPulse 2s infinite ease-in-out;
}

@keyframes royalPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.25); }
}

.royal-hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  color: #f8fafc;
  margin-bottom: 0.6rem;
  letter-spacing: -0.4px;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 60%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.royal-hero-subtitle {
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.royal-hero-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.royal-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.royal-hero-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 210px;
}

.btn-royal-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-royal-action.gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  color: #0f172a;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.btn-royal-action.gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
  filter: brightness(1.05);
}

.btn-royal-action.sapphire {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-royal-action.sapphire:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.btn-royal-action.dark {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.btn-royal-action.dark:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

/* 2. Section Headers */
.royal-section-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.royal-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 0.25rem;
}

.royal-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.royal-section-title {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.royal-section-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.royal-section-action-hint {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}

/* 3. 4 Core Royal Stat Cards Grid */
.royal-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

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

@media (max-width: 640px) {
  .royal-stats-grid {
    grid-template-columns: 1fr;
  }
}

.royal-stat-card {
  position: relative;
  background: #ffffff;
  border-radius: 14px;
  padding: 1.4rem 1.35rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.royal-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.royal-stat-card.sapphire-card,
.royal-stat-card.emerald-card,
.royal-stat-card.ruby-card,
.royal-stat-card.gold-card {
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.royal-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.royal-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.royal-icon-box.sapphire {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.royal-icon-box.emerald {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.royal-icon-box.ruby {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.royal-icon-box.gold {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}

.royal-metric-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  box-sizing: border-box;
}

.royal-metric-badge.sapphire {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.royal-metric-badge.emerald {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.royal-metric-badge.ruby {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.royal-metric-badge.gold {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.royal-stat-body {
  margin-bottom: 0.9rem;
}

.royal-stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
  letter-spacing: -0.5px;
  font-feature-settings: "tnum";
}

.royal-stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #64748b;
  margin-top: 0.3rem;
}

.royal-stat-footer {
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

.royal-subtext {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.royal-gold-progress-track {
  width: 100%;
  height: 7px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
}

.royal-gold-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b 0%, #10b981 100%);
  border-radius: 9999px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 4. Royal Extended System Assets Grid */
.royal-assets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1024px) {
  .royal-assets-grid {
    grid-template-columns: 1fr;
  }
}

.royal-feature-card {
  background: #161c16;
  border-radius: 14px;
  border: 1px solid #232d24;
  padding: 1.35rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.royal-feature-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.royal-feature-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
}

.btn-royal-link {
  background: #1e261f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #61e855;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.btn-royal-link:hover {
  background: #253127;
  color: #72f268;
  border-color: rgba(97, 232, 85, 0.3);
}

.royal-mini-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background: #121712;
  padding: 0.85rem;
  border-radius: 10px;
  border: 1px solid #263326;
}

.royal-mini-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mini-stat-num {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.mini-stat-desc {
  font-size: 0.7rem;
  color: #8a968a;
  font-weight: 500;
  margin-top: 0.15rem;
}

.royal-feature-note {
  font-size: 0.76rem;
  color: #8a968a;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  line-height: 1.4;
}

/* 5. Format Breakdown & Recent Activity Dual Grid */
.royal-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .royal-dual-grid {
    grid-template-columns: 1fr;
  }
}

.royal-content-box {
  background: #161c16;
  border-radius: 14px;
  border: 1px solid #232d24;
  padding: 1.4rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.royal-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #1f271f;
}

.royal-box-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.royal-box-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: #8a968a;
  background: #1e261f;
  border: 1px solid #283329;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.royal-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.royal-breakdown-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.royal-breakdown-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}

.breakdown-name {
  color: #1e293b;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breakdown-count {
  font-weight: 700;
  color: #0f172a;
}

.royal-breakdown-track {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.royal-breakdown-bar {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.royal-breakdown-bar.purple {
  background: linear-gradient(90deg, #a855f7 0%, #7c3aed 100%);
}

.royal-breakdown-bar.blue {
  background: linear-gradient(90deg, #38bdf8 0%, #0284c7 100%);
}

.royal-breakdown-bar.rose {
  background: linear-gradient(90deg, #f43f5e 0%, #e11d48 100%);
}

.royal-breakdown-bar.amber {
  background: linear-gradient(90deg, #fbbf24 0%, #d97706 100%);
}

/* Recent Activity List */
.royal-recent-activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 290px;
  overflow-y: auto;
}

.royal-activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  background: #1a221b;
  border: 1px solid #283329;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.royal-activity-item:hover {
  background: #1f2820;
  border-color: rgba(97, 232, 85, 0.3);
}

.royal-activity-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.royal-activity-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #283329;
  flex-shrink: 0;
}

.royal-activity-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.royal-activity-page {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.royal-activity-msg {
  font-size: 0.74rem;
  color: #8a968a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.royal-activity-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  flex-shrink: 0;
}

.royal-activity-time {
  font-size: 0.7rem;
  color: #738075;
}

.royal-activity-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #738075;
  font-size: 0.85rem;
  font-weight: 500;
  font-style: italic;
}

/* ==========================================================================
   BATCH COMPOSER (ĐĂNG HÀNG LOẠT - THEO ẢNH MEDIA_1790038670097.PNG)
   ========================================================================== */
.batch-composer-container {
  padding: 1.25rem 1.5rem 2.5rem;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Header Bar */
.batch-composer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: #ffffff;
  padding: 1.1rem 1.4rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.batch-header-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.batch-page-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.batch-subtitle {
  font-size: 0.82rem;
  color: #64748b;
}

.batch-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.batch-stats-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  color: #334155;
  font-weight: 500;
}

.batch-stats-pill strong {
  color: #0f172a;
}

.batch-divider {
  color: #cbd5e1;
}

/* Batch Progress Bar */
.batch-progress-wrapper {
  background: #ffffff;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.08);
}

.batch-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #4338ca;
}

.batch-progress-bar-track {
  width: 100%;
  height: 8px;
  background: #e0e7ff;
  border-radius: 999px;
  overflow: hidden;
}

.batch-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #3b82f6);
  border-radius: 999px;
  transition: width 0.25s ease;
}

/* Batch Matrix Table Card */
.batch-table-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: visible !important;
}

.batch-table-responsive {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  min-height: 280px;
}

.batch-matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.batch-matrix-table thead tr {
  background: #dfe7e8;
  border-bottom: 1px solid #c9d5d8;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.batch-matrix-table thead th {
  background: #dfe7e8;
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2a3c40;
  letter-spacing: 0.03em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
}

.batch-matrix-table thead th i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  height: 14px;
  width: 14px;
  vertical-align: -1px;
}

.batch-matrix-table tbody tr {
  background: #edf2f1;
  border-bottom: 1px solid #c9d5d8;
  transition: background-color 0.15s ease;
}

.batch-matrix-table tbody tr:hover,
.batch-matrix-table tbody tr:hover td {
  background-color: #e1ebe7;
}

.batch-matrix-table tbody td {
  background: #edf2f1;
  border-bottom: 1px solid #c9d5d8;
  color: #2a3c40;
  padding: 1.1rem 1rem;
  vertical-align: top;
}

/* Checkbox Column */
.batch-matrix-table .col-check {
  vertical-align: top;
  padding-top: 1.25rem;
}

.batch-row-checkbox,
#batchSelectAllCheck {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: #2563eb;
  border-radius: 4px;
}

/* Channel Column */
.batch-channel-cell {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.batch-channel-mode-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 2px;
}

.batch-mode-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #475569;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.batch-mode-radio-label input[type="radio"] {
  width: 15px;
  height: 15px;
  accent-color: #2563eb;
  cursor: pointer;
  margin: 0;
}

/* Custom Searchable Dropdown matching media_1790062546676.png */
.batch-search-dropdown-wrapper {
  position: relative;
  width: 100%;
}

.batch-search-input-box {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.batch-search-dropdown-input {
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1.5px solid #3b82f6;
  border-radius: 8px;
  padding: 7px 34px 7px 12px;
  font-size: 0.86rem;
  font-weight: 500;
  color: #1e293b;
  outline: none;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.15);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.batch-search-dropdown-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.batch-search-dropdown-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.batch-search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  color: #94a3b8;
  pointer-events: none;
}

.batch-search-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
  max-height: 230px;
  overflow-y: auto;
  z-index: 150;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: #64748b transparent;
}

.batch-search-dropdown-menu.hidden {
  display: none !important;
}

.batch-search-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.batch-search-dropdown-menu::-webkit-scrollbar-track {
  background: transparent;
}

.batch-search-dropdown-menu::-webkit-scrollbar-thumb {
  background: #64748b;
  border-radius: 9999px;
}

.batch-search-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

.batch-search-dropdown-item {
  padding: 8px 14px;
  font-size: 0.85rem;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.1s ease;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-search-dropdown-item:hover,
.batch-search-dropdown-item.highlighted {
  background: #f1f5f9;
  color: #0f172a;
}

.batch-search-dropdown-item.selected {
  background: #f1f5f9;
  font-weight: 600;
  color: #0f172a;
}

.batch-search-dropdown-empty {
  padding: 12px 14px;
  font-size: 0.82rem;
  color: #94a3b8;
  text-align: center;
  font-style: italic;
}

/* Multi-Group Box & In-Box Tag with × Button (Matching media_1790073429935.png) */
.batch-groups-box {
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1.5px solid #3b82f6;
  border-radius: 8px;
  padding: 4px 28px 4px 6px;
  min-height: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  position: relative;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.12);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.batch-groups-box:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.batch-group-chevron {
  position: absolute;
  right: 11px;
  top: 13px;
  font-size: 0.72rem;
  color: #94a3b8;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.batch-groups-box.active .batch-group-chevron {
  transform: rotate(180deg);
}

.batch-group-selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px 7px 2px 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #1e293b;
  max-width: calc(100% - 10px);
  user-select: none;
  line-height: 1.3;
}

.batch-group-selected-tag .batch-group-tag-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-group-selected-tag .batch-group-tag-remove {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0 2px;
  font-size: 0.88rem;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color 0.15s ease;
  margin-left: 2px;
}

.batch-group-selected-tag .batch-group-tag-remove:hover {
  color: #ef4444;
}

.batch-group-inline-search {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.85rem;
  color: #1e293b;
  min-width: 65px;
  flex: 1;
  padding: 0 4px;
  margin: 0;
  height: 26px;
  line-height: 26px;
  font-family: inherit;
  box-sizing: border-box;
}

.batch-group-inline-search::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.batch-group-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  font-size: 0.84rem;
  color: #334155;
  cursor: pointer;
  transition: background 0.12s ease;
  user-select: none;
}

.batch-group-dropdown-item:hover {
  background: #f8fafc;
}

.batch-group-dropdown-item.selected {
  background: #e0f2fe !important;
  font-weight: 500;
  color: #0f172a;
}

.batch-group-dropdown-item.selected:hover {
  background: #bae6fd !important;
}

/* Multi-Channel Box & In-Box Pill Tags (Matching media_1790071574647.png) */
.batch-channels-box {
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1.5px solid #3b82f6;
  border-radius: 8px;
  padding: 4px 28px 4px 6px;
  min-height: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  position: relative;
  cursor: text;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.12);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.batch-channels-box:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.batch-channels-box .batch-search-icon {
  position: absolute;
  right: 10px;
  top: 11px;
  font-size: 0.82rem;
  color: #94a3b8;
  pointer-events: none;
}

.batch-channel-box-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #7c2d37; /* burgundy / maroon border */
  border-radius: 9999px;
  padding: 2px 8px 2px 9px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #1e293b;
  max-width: calc(100% - 10px);
  user-select: none;
  line-height: 1.3;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.batch-channel-box-tag .pill-fb-icon {
  color: #1877f2;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.batch-channel-box-tag .batch-tag-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 175px;
}

.batch-channel-box-tag .batch-tag-remove {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0 2px;
  font-size: 0.85rem;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color 0.15s ease;
  margin-left: 2px;
}

.batch-channel-box-tag .batch-tag-remove:hover {
  color: #b91c1c;
}

.batch-channel-inline-search {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.85rem;
  color: #1e293b;
  min-width: 65px;
  flex: 1;
  padding: 0 4px;
  margin: 0;
  height: 26px;
  line-height: 26px;
  font-family: inherit;
  box-sizing: border-box;
}

.batch-channel-inline-search::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.batch-dropdown-header {
  padding: 7px 12px 4px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #94a3b8;
  user-select: none;
}

.batch-channel-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.12s ease;
  user-select: none;
  border-radius: 4px;
  margin: 1px 4px;
}

.batch-channel-dropdown-item:hover {
  background: #f8fafc;
}

.batch-channel-dropdown-item.selected {
  background: #e0f2fe !important;
  font-weight: 500;
  color: #0f172a;
}

.batch-channel-dropdown-item.selected:hover {
  background: #bae6fd !important;
}

.batch-channel-dropdown-item .channel-item-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.batch-channel-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f1f5f9;
}

.batch-channel-dropdown-item .channel-item-name {
  font-size: 0.82rem;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.batch-channel-check {
  color: #3b82f6;
  font-size: 0.82rem;
  flex-shrink: 0;
  margin-left: 8px;
}

.batch-channel-check.hidden {
  display: none !important;
}

/* Custom scrollbar for channel dropdown matching media_1790071574647.png */
.batch-channel-dropdown-menu {
  scrollbar-width: thin;
  scrollbar-color: #4b5563 transparent;
  max-height: 250px;
}

.batch-channel-dropdown-menu::-webkit-scrollbar {
  width: 5px;
}

.batch-channel-dropdown-menu::-webkit-scrollbar-track {
  background: transparent;
}

.batch-channel-dropdown-menu::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 9999px;
}

.batch-channel-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: #374151;
}


.batch-channel-pills-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  position: relative;
}

.batch-channel-pills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 82px;
  overflow: hidden;
  transition: max-height 0.25s ease;
  width: 100%;
}

.batch-channel-pills-list.expanded {
  max-height: 400px;
}

.btn-toggle-pills {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  transition: background 0.15s;
}

.btn-toggle-pills:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Member Fanpages Container Box matching media_1790073429935.png */
.batch-page-pills-container {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 8px;
  margin-top: 6px;
  box-sizing: border-box;
}

.batch-page-pills-container .batch-page-pills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 82px;
  overflow: hidden;
  transition: max-height 0.25s ease;
  flex: 1 1 auto;
  min-width: 0;
}

.batch-page-pills-container .batch-page-pills-list.expanded {
  max-height: 400px;
}

/* Fanpage Pill matching media_1790073429935.png (burgundy outline) */
.batch-page-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  border: 1.5px solid #7c2d37; /* burgundy / maroon border */
  border-radius: 9999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  max-width: 190px;
}

.batch-page-pill.excluded {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #cbd5e1;
  text-decoration: line-through;
  opacity: 0.6;
}

.batch-page-pill .pill-fb-icon {
  color: #1877f2;
  font-size: 0.78rem;
  display: inline-flex;
}

.batch-page-pill .pill-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.batch-page-pill .pill-remove-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 1px;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s;
}

.batch-page-pill .pill-remove-btn:hover {
  color: #ef4444;
}

/* Content Column */
.batch-content-cell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.batch-content-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 24px;
}

.batch-content-tools-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.batch-row-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  line-height: 1.45;
  resize: vertical;
  min-height: 78px;
  font-family: inherit;
  outline: none;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.batch-row-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.batch-content-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 2px 0 2px;
  gap: 0.5rem;
}

.batch-content-tools-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.btn-batch-spin-icon,
.btn-batch-spin-text {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.25;
  white-space: nowrap;
}

.btn-batch-spin-icon:hover {
  background: #faf5ff;
  border-color: #d8b4fe;
  color: #7e22ce;
  box-shadow: 0 1px 3px rgba(147, 51, 234, 0.1);
}

.btn-batch-spin-text:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1);
}

.btn-batch-spin-icon:active,
.btn-batch-spin-text:active {
  transform: translateY(1px);
}

.batch-char-count {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
}

/* Media Column */
.batch-media-cell {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 0.2rem;
}

/* Empty upload button matching brand emerald palette */
.btn-batch-upload-media {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(6, 133, 103, 0.08) !important;
  color: #068567 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  border: 1px dashed rgba(6, 133, 103, 0.35) !important;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(6, 133, 103, 0.06);
}

.btn-batch-upload-media:hover {
  background: rgba(6, 133, 103, 0.16) !important;
  border-color: rgba(6, 133, 103, 0.6) !important;
  border-style: solid !important;
  color: #034e46 !important;
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 3px 8px rgba(6, 133, 103, 0.18);
}

.btn-batch-upload-media:active {
  transform: translateY(0) scale(0.98);
}

.btn-batch-upload-media i {
  color: inherit !important;
  font-size: 1.05rem !important;
}

/* Attached Media Badge matching Row 1 of media_1790038670097.png */
.batch-media-attached-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  max-width: 105px;
  text-align: center;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.batch-media-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.media-badge-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.media-badge-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 85px;
  display: block;
}

.media-badge-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.media-badge-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 0.68rem;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}

.media-badge-btn.edit:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}

.media-badge-btn.remove:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #ef4444;
}

/* Time Column */
.batch-time-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-batch-header-time {
  background: transparent;
  border: none;
  color: #475569;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.4;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 3px 6px;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-batch-header-time:hover {
  background: #eff6ff;
  color: #16a34a;
}

.btn-batch-header-time i {
  font-size: 0.7rem;
  color: inherit;
  transition: transform 0.2s ease;
}

.btn-batch-time-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.81rem;
  font-weight: 500;
  color: #475569;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: -0.15px;
  line-height: 1.3;
  transition: all 0.15s ease;
}

.btn-batch-time-trigger:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

.btn-batch-time-trigger.has-time {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  font-weight: 600;
}

.btn-batch-time-trigger i.fa-calendar-days {
  color: #64748b;
  font-size: 0.85rem;
}

.btn-batch-time-trigger.has-time i.fa-calendar-days {
  color: #2563eb;
}

/* Modal: Cài đặt thời gian đăng (Matching media_1790042313087.png) */
.batch-schedule-time-modal-box {
  max-width: 580px;
  width: 95%;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
  animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.batch-schedule-time-modal-header {
  padding: 1.1rem 1.35rem;
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.batch-schedule-time-header-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a !important;
}

.batch-schedule-time-header-title .batch-schedule-icon {
  font-size: 1.25rem;
  color: #068567 !important;
}

.batch-schedule-time-modal-body {
  padding: 1.35rem 1.5rem;
}

.batch-time-mode-heading {
  color: #0f172a !important;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.batch-time-mode-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.15rem;
}

.batch-time-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: #334155;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.batch-time-radio-label:hover {
  color: #068567;
}

.batch-time-radio:checked + .batch-time-radio-text {
  color: #068567 !important;
  font-weight: 700 !important;
}

.batch-time-radio-label input[type="radio"] {
  accent-color: #068567;
  width: 17px;
  height: 17px;
  cursor: pointer;
  margin: 0;
}

.batch-time-frame-wrapper {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.4rem;
  margin-bottom: 0.85rem;
}

.batch-time-picker-frame {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  padding: 7px 12px 7px 16px;
  min-width: 420px;
  max-width: 460px;
  gap: 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  position: relative;
}

.batch-time-picker-frame:focus-within,
.batch-time-picker-frame:hover {
  border-color: #068567;
  box-shadow: 0 0 0 3px rgba(6, 133, 103, 0.12);
}

.batch-time-range-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.batch-time-single-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.batch-time-range-row.hidden,
.batch-time-single-row.hidden {
  display: none;
}

.batch-time-input-group {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.batch-time-input-group.single-item {
  width: 100%;
}

.batch-time-display {
  font-size: 0.95rem;
  color: #1e293b;
  font-weight: 500;
  letter-spacing: -0.2px;
  user-select: none;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.batch-time-input-group:hover .batch-time-display {
  color: #068567;
}

.batch-time-native-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.batch-time-arrow-icon {
  font-size: 1.15rem;
  color: #068567;
  user-select: none;
  line-height: 1;
  padding: 0 4px;
}

.batch-time-cal-trigger {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(6, 133, 103, 0.08) !important;
  border: 1px solid rgba(6, 133, 103, 0.22) !important;
  color: #068567 !important;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(6, 133, 103, 0.06);
}

.batch-time-cal-trigger:hover {
  background: rgba(6, 133, 103, 0.16) !important;
  border-color: rgba(6, 133, 103, 0.42) !important;
  color: #034e46 !important;
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(6, 133, 103, 0.12);
}

.batch-time-cal-trigger i {
  color: inherit !important;
  font-size: 0.95rem !important;
}

/* Random Time Configuration (Step 1: Start + OK, Step 2: Quick duration presets) */
.batch-time-random-config {
  margin-top: 1.15rem;
  padding: 1rem 1.15rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.batch-time-random-config.hidden {
  display: none;
}

.batch-time-config-block {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.batch-time-config-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.batch-time-step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #068567 !important;
  color: #ffffff !important;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(6, 133, 103, 0.2);
}

.batch-time-config-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.batch-time-config-subtitle {
  font-size: 0.78rem;
  color: #64748b;
}

.batch-time-start-picker-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.batch-time-input-box-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.35rem 0.5rem 0.35rem 0.75rem;
  width: 100%;
  max-width: 300px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.batch-time-input-box-wrap:hover {
  border-color: #068567;
}

.batch-time-input-box-wrap:focus-within {
  border-color: #068567 !important;
  box-shadow: 0 0 0 3px rgba(6, 133, 103, 0.16) !important;
}

.batch-time-input-box-wrap i {
  color: #068567;
  font-size: 0.92rem;
  margin-right: 8px;
}

.btn-picker-cal-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(6, 133, 103, 0.08) !important;
  border: 1px solid rgba(6, 133, 103, 0.22) !important;
  color: #068567 !important;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-left: 6px;
}

.btn-picker-cal-icon:hover {
  background: rgba(6, 133, 103, 0.16) !important;
  border-color: rgba(6, 133, 103, 0.42) !important;
  color: #034e46 !important;
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(6, 133, 103, 0.12);
}

.btn-picker-cal-icon i {
  color: inherit !important;
  font-size: 0.95rem !important;
  margin-right: 0 !important;
}

/* Custom Calendar & Time Picker Dropdown matching media_1790044735412.png */
.custom-datetime-picker {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1050;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
  user-select: none;
  animation: modalScaleIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-datetime-picker.hidden {
  display: none;
}

.custom-datetime-picker.align-right {
  left: auto;
  right: 0;
}

.cdtp-body {
  display: flex;
  height: 295px;
  max-height: 295px;
  overflow: hidden;
}

/* Left Panel: Calendar */
.cdtp-cal-panel {
  width: 228px;
  height: 100%;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.cdtp-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 4px;
}

.cdtp-month-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  cursor: default;
}

.cdtp-nav-arrows {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cdtp-arrow-btn {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.72rem;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cdtp-arrow-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.cdtp-arrow-btn.disabled {
  opacity: 0.25 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.cdtp-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}

.cdtp-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 8px;
}

.cdtp-day-btn {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 500;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
}

.cdtp-day-btn:hover {
  background: rgba(6, 133, 103, 0.08);
  color: #068567;
}

.cdtp-day-btn.other-month {
  color: #cbd5e1;
}

.cdtp-day-btn.today {
  border-color: #068567;
  font-weight: 700;
  color: #068567;
}

.cdtp-day-btn.active {
  background: #068567 !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(6, 133, 103, 0.25);
}

.cdtp-day-btn.disabled {
  color: #cbd5e1 !important;
  background: transparent !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  opacity: 0.35 !important;
}

.cdtp-day-btn.disabled:hover {
  background: transparent !important;
  color: #cbd5e1 !important;
}

.cdtp-cal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
  margin-top: auto;
}

.cdtp-footer-link-btn {
  background: transparent;
  border: none;
  color: #068567;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.cdtp-footer-link-btn:hover {
  color: #034e46;
  background: rgba(6, 133, 103, 0.08);
}

/* Right Panel: Time Columns (24H: 00-23 and 00-59) */
.cdtp-time-panel {
  width: 124px;
  height: 100%;
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-sizing: border-box;
  overflow: hidden;
}

.cdtp-time-columns-wrap {
  display: flex;
  flex: 1;
  min-height: 0;
  height: calc(100% - 36px);
  max-height: calc(100% - 36px);
  overflow: hidden;
}

.cdtp-time-col {
  flex: 1;
  height: 100%;
  max-height: 100%;
  overflow-y: scroll;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #f1f5f9;
  padding: 4px 2px;
  border-right: 1px solid #f1f5f9;
  box-sizing: border-box;
}

.cdtp-time-col.cdtp-period-col {
  display: none !important;
}

.cdtp-time-col:last-child {
  border-right: none;
}

.cdtp-time-col::-webkit-scrollbar {
  width: 5px;
}

.cdtp-time-col::-webkit-scrollbar-track {
  background: #f8fafc;
}

.cdtp-time-col::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 3px;
}

.cdtp-time-col::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

.cdtp-time-item {
  width: 100%;
  padding: 5px 2px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #334155;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: block;
  text-align: center;
  transition: all 0.12s ease;
  margin-bottom: 2px;
}

.cdtp-time-item:hover {
  background: rgba(6, 133, 103, 0.08);
  color: #068567;
}

.cdtp-time-item.active {
  background: #068567 !important;
  color: #ffffff !important;
  font-weight: 700;
}

.cdtp-time-item.disabled {
  color: #cbd5e1 !important;
  background: transparent !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  opacity: 0.35 !important;
}

.cdtp-time-item.disabled:hover {
  background: transparent !important;
  color: #cbd5e1 !important;
}

/* The Small OK button requested by user at bottom right */
.cdtp-time-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 36px;
  padding: 0 10px;
  border-top: 1px solid #f1f5f9;
  background: #ffffff;
  border-bottom-right-radius: 8px;
  box-sizing: border-box;
}

.cdtp-small-ok-btn {
  background: #068567;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 2.5px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 2px rgba(6, 133, 103, 0.3);
  transition: all 0.15s ease;
}

.cdtp-small-ok-btn:hover {
  background: #056e54;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(6, 133, 103, 0.45);
}

.cdtp-small-ok-btn:active {
  transform: translateY(0);
}

.batch-time-form-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
  width: 100%;
  font-family: inherit;
  cursor: pointer;
}

.btn-time-ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.46rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1.5px solid #068567;
  background: #068567;
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.5px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(6, 133, 103, 0.25);
}

.btn-time-ok:hover {
  background: #056e54;
  border-color: #056e54;
  transform: translateY(-1px);
}

/* Nút OK sáng lên rực rỡ khi chọn mốc thời gian */
.btn-time-ok.is-glowing {
  background: #068567;
  border-color: #04634c;
  box-shadow: 0 0 16px rgba(6, 133, 103, 0.85), 0 0 4px rgba(6, 133, 103, 1);
  animation: pulseOkGlow 1s infinite alternate;
  transform: scale(1.05);
}

@keyframes pulseOkGlow {
  0% {
    box-shadow: 0 0 6px rgba(6, 133, 103, 0.5), 0 0 12px rgba(6, 133, 103, 0.3);
  }
  100% {
    box-shadow: 0 0 18px rgba(6, 133, 103, 0.95), 0 0 28px rgba(6, 133, 103, 0.6);
  }
}

.btn-time-ok.is-confirmed {
  background: #10b981;
  border-color: #059669;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

/* 7 Quick Duration Preset Chips: 5p, 10p, 15p, 20p, 25p, 30p, 1h */
.batch-quick-duration-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.batch-quick-duration-chips .duration-chip {
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.batch-quick-duration-chips .duration-chip:hover {
  background: rgba(6, 133, 103, 0.08);
  border-color: rgba(6, 133, 103, 0.35);
  color: #068567;
  transform: translateY(-1px);
}

.batch-quick-duration-chips .duration-chip.active {
  background: #068567;
  border-color: #068567;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(6, 133, 103, 0.35);
}

.batch-time-target-hint {
  margin-top: 1.15rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(6, 133, 103, 0.06);
  border: 1px solid rgba(6, 133, 103, 0.18);
  color: #065f46;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.batch-schedule-time-modal-footer {
  padding: 0.95rem 1.35rem;
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.batch-time-footer-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#btnCancelBatchScheduleTime {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  padding: 0.52rem 1.35rem !important;
  font-size: 0.88rem !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

#btnCancelBatchScheduleTime:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

#btnApplyBatchScheduleTime {
  background: #068567 !important;
  border: 1px solid #068567 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  padding: 0.52rem 1.45rem !important;
  font-size: 0.88rem !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  box-shadow: 0 2px 6px rgba(6, 133, 103, 0.25) !important;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#btnApplyBatchScheduleTime:hover {
  background: #056e54 !important;
  border-color: #056e54 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 10px rgba(6, 133, 103, 0.35) !important;
}

/* Action Column */
.batch-row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.btn-batch-action {
  width: 32px;
  height: 32px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-batch-action.btn-batch-comment {
  background: rgba(6, 133, 103, 0.08) !important;
  border: 1px solid rgba(6, 133, 103, 0.22) !important;
  color: #068567 !important;
  font-size: 0.95rem;
}

.btn-batch-action.btn-batch-comment:hover {
  background: rgba(6, 133, 103, 0.18) !important;
  border-color: rgba(6, 133, 103, 0.45) !important;
  color: #034e46 !important;
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 2px 6px rgba(6, 133, 103, 0.18);
}

.btn-batch-action.btn-batch-comment:active {
  transform: translateY(0) scale(0.98);
}

.btn-batch-action.btn-batch-comment.has-comments {
  background: #068567 !important;
  border: 1px solid #056e54 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(6, 133, 103, 0.28);
}

.btn-batch-action.btn-batch-comment.has-comments:hover {
  background: #056e54 !important;
  border-color: #056e54 !important;
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 3px 8px rgba(6, 133, 103, 0.35);
}

.btn-batch-action.btn-batch-comment i {
  color: inherit !important;
  font-size: 0.95rem !important;
}

.batch-comment-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #f59e0b;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Tooltip matching media_1790040551935.png */
.btn-batch-action[data-tooltip] {
  position: relative;
}

.btn-batch-action[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: #18181b;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.btn-batch-action[data-tooltip]:hover::before {
  content: "";
  position: absolute;
  top: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #18181b transparent;
  z-index: 100;
  pointer-events: none;
}

.btn-batch-action.btn-delete:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.15);
}

.btn-batch-action.btn-delete:active {
  transform: translateY(0) scale(0.98);
}

/* Bottom Add Row Bar matching media_1790038670097.png */
.batch-add-row-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px dashed #e2e8f0;
  background: #fafcff;
}

.btn-add-batch-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-add-batch-row:hover {
  color: #2563eb;
  background: #eff6ff;
}

.btn-add-batch-icon {
  font-size: 1.05rem;
  color: #64748b;
}

.btn-add-batch-row:hover .btn-add-batch-icon {
  color: #2563eb;
}

/* ====================================================================
   BATCH COMPOSER QUICK ACTIONS & BULK TOOLBAR (media_1790074628018.png)
   ==================================================================== */

.batch-quick-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.batch-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: none;
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.batch-quick-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.batch-quick-btn:active {
  transform: translateY(1px);
  filter: brightness(0.95);
}

.btn-quick-purple {
  background: #5c45b8;
}

.btn-quick-orange {
  background: #f59e0b;
}

.btn-quick-cyan {
  background: #06b6d4;
}

.btn-quick-navy {
  background: #3b497b;
}

.btn-quick-blue {
  background: #2563eb;
}

.btn-quick-green {
  background: #10b981;
}

.btn-quick-t-letter {
  font-weight: 800;
  font-size: 16px;
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1;
}

.batch-counter-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #334155;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
}

.batch-counter-selected {
  color: #10b981;
  font-weight: 700;
  font-size: 0.96rem;
}

.btn-batch-top-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  background: #2563eb !important;
  color: #ffffff !important;
  border: 1px solid #1d4ed8 !important;
  padding: 0.5rem 1rem !important;
  border-radius: 6px !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  width: auto !important;
  min-width: max-content !important;
  height: auto !important;
  line-height: 1.25 !important;
}

.btn-batch-top-action:hover {
  background: #1d4ed8 !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25) !important;
  color: #ffffff !important;
}

.btn-batch-top-action:active {
  transform: translateY(1px) !important;
}

.batch-actions-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  min-width: 215px;
  padding: 6px 0;
  z-index: 250;
  animation: fadeInDropdown 0.15s ease;
}

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

.batch-actions-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 16px;
  background: transparent;
  border: none;
  font-size: 0.86rem;
  color: #334155;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.batch-actions-dropdown-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.batch-actions-dropdown-item.text-danger {
  color: #ef4444;
}

.batch-actions-dropdown-item.text-danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

.batch-actions-dropdown-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 4px 0;
}

.batch-dropdown-icon-t {
  display: inline-block;
  width: 16px;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  color: #06b6d4;
  line-height: 1;
}

/* Modal Tabs & Cards */
.batch-channel-modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

.batch-channel-modal-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.batch-channel-modal-tab.active {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
  font-weight: 600;
}

.batch-channel-modal-tab input[type="radio"] {
  display: none;
}

.batch-modal-group-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 4px;
}

.batch-modal-group-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.batch-modal-group-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.batch-modal-group-card.selected {
  background: #eff6ff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}

.batch-modal-channel-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 4px;
}

.batch-modal-channel-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.batch-modal-channel-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.batch-modal-channel-card.selected {
  background: #eff6ff;
  border-color: #3b82f6;
}

.batch-modal-channel-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* Batch Composer Field Validation Error Highlight */
.batch-field-error {
  border: 1.5px solid #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18) !important;
}

.btn-batch-upload-media.batch-field-error {
  border: 1.5px dashed #ef4444 !important;
  background: #fef2f2 !important;
  color: #dc2626 !important;
}

.btn-batch-time-trigger.batch-field-error {
  border: 1.5px solid #ef4444 !important;
  background: #fef2f2 !important;
  color: #dc2626 !important;
}

/* ==========================================================================
   Multi-Channel Post Details Modal (Matching media_1790174727363.png)
   ========================================================================== */

.post-details-wide-modal {
  max-width: 960px !important;
  width: 95% !important;
  height: 88vh !important;
  max-height: 88vh !important;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background: #ffffff !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.post-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  gap: 1rem;
  flex-shrink: 0;
}

.post-details-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.post-details-header-center {
  flex: 1;
  text-align: center;
}

.post-details-time-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: #334155;
}

.post-details-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-details-header-action {
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  padding: 0.35rem 0.75rem !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
  background: #ffffff !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-details-header-action:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #1e293b !important;
}

.btn-details-header-action.btn-icon-only {
  padding: 0.35rem 0.55rem !important;
}

.dropdown-menu-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  min-width: 190px;
  z-index: 1000;
  padding: 0.35rem 0;
}

.dropdown-menu-popover.hidden {
  display: none;
}

.dropdown-menu-popover .dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #334155;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}

.dropdown-menu-popover .dropdown-item:hover {
  background: #f1f5f9;
}

.dropdown-menu-popover .dropdown-item.text-danger {
  color: #dc2626;
}

.dropdown-menu-popover .dropdown-item.text-danger:hover {
  background: #fef2f2;
}

/* 2-Column Body Layout (Sidebar & Live Facebook Preview) */
.post-details-body {
  flex: 1 1 auto;
  min-height: 0;
  height: calc(100% - 54px);
  max-height: calc(100% - 54px);
  display: flex !important;
  flex-direction: row !important;
  overflow: hidden !important;
  background: #f8fafc;
}

@media (max-width: 900px) {
  .post-details-channels-sidebar {
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;
  }
}

@media (max-width: 680px) {
  .post-details-body {
    flex-direction: column;
  }
  .post-details-channels-sidebar {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    max-height: 180px;
    border-right: none !important;
    border-bottom: 1px solid #e2e8f0;
  }
}

/* Left Column: Channels & Status Sidebar */
.post-details-channels-sidebar {
  width: 290px;
  min-width: 290px;
  max-width: 290px;
  height: 100%;
  border-right: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

.channels-sidebar-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.channels-sidebar-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
}

.channels-sidebar-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.post-details-channels-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.6rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.post-channel-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  border: 1.5px solid transparent;
  background: #ffffff;
  transition: all 0.15s ease;
  position: relative;
}

.post-channel-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.post-channel-item.active {
  background: #f0fdf9;
  border-color: #068567;
  box-shadow: 0 1px 4px rgba(6, 133, 103, 0.12);
}

.post-channel-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.post-channel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
}

.post-channel-fb-badge {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #1877f2;
  color: #ffffff;
  font-size: 8.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #ffffff;
}

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

.post-channel-name {
  font-size: 0.83rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.post-channel-item.active .post-channel-name {
  color: #068567;
}

.post-channel-time {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-channel-cmt-indicator {
  font-size: 0.72rem;
  color: #059669;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.2rem;
}

.post-channel-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.post-channel-item:hover .post-channel-actions {
  opacity: 1;
}

.btn-channel-icon {
  background: none;
  border: none;
  padding: 4px 6px;
  font-size: 0.78rem;
  color: #64748b;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.12s ease;
}

.btn-channel-icon:hover {
  color: #068567;
  background: #e2f3f0;
}

.btn-channel-icon.danger:hover {
  color: #ef4444;
  background: #fee2e2;
}

/* Center Column: Live Facebook Preview */
.post-details-preview-area {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  padding: 1.25rem 1.5rem 3.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

/* Clear, polished vertical scrollbar on the right */
.post-details-preview-area::-webkit-scrollbar,
.custom-scrollbar::-webkit-scrollbar {
  width: 10px !important;
  height: 10px !important;
  display: block !important;
}

.post-details-preview-area::-webkit-scrollbar-track,
.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9 !important;
  border-radius: 8px !important;
  margin: 4px 0 !important;
}

.post-details-preview-area::-webkit-scrollbar-thumb,
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #94a3b8 !important;
  border-radius: 8px !important;
  border: 2px solid #f1f5f9 !important;
}

.post-details-preview-area::-webkit-scrollbar-thumb:hover,
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #64748b !important;
}

.post-details-preview-area,
.custom-scrollbar {
  scrollbar-width: thin !important;
  scrollbar-color: #94a3b8 #f1f5f9 !important;
}

.preview-area-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.preview-area-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.preview-area-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  letter-spacing: 0.02em;
}

.preview-area-disclaimer {
  font-size: 0.74rem;
  color: #94a3b8;
  font-style: italic;
}

/* Facebook Feed Card Mockup */
.facebook-post-card {
  background: #1a221b;
  border: 1px solid #232d24;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  max-width: 580px;
  margin: 0 auto 2.5rem auto;
  width: 100%;
  flex-shrink: 0 !important;
  height: auto !important;
  min-height: min-content !important;
  color: #f3f4f6;
}

.fb-card-top-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.95rem;
  border-bottom: 1px solid #1f271f;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  background: #151c16;
}

.fb-card-author-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.95rem;
}

.fb-card-author-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.fb-card-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #f1f5f9;
}

.fb-card-author-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.fb-card-meta {
  font-size: 0.73rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.1rem;
}

.fb-card-more-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
}

.fb-card-content {
  padding: 0 0.95rem 0.75rem 0.95rem;
  font-size: 0.92rem;
  color: #1e293b;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.fb-card-preset-bg {
  padding: 2.75rem 1.5rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.45;
  letter-spacing: -0.01em;
  white-space: pre-wrap;
  word-break: break-word;
}

.fb-card-photo-wrap {
  width: 100%;
  max-height: 280px;
  overflow: hidden;
  background: #0f172a;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fb-card-photo-img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.fb-card-video-wrap {
  width: 100%;
  max-height: 360px;
  background: #000000;
  position: relative;
}

.fb-card-video-player {
  width: 100%;
  max-height: 360px;
  display: block;
}

.fb-card-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.95rem;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.76rem;
  color: #64748b;
}

.fb-reactions-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.fb-card-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.25rem 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.btn-fb-interaction {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem;
  background: none;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-fb-interaction:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.fb-card-comments-section {
  padding: 0.75rem 0.95rem;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.fb-comments-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed #cbd5e1;
  margin-bottom: 0.35rem;
}

.fb-card-comment-item {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}

.fb-card-comment-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #e2e8f0;
}

.fb-card-comment-body {
  flex: 1;
  min-width: 0;
}

.fb-card-comment-bubble {
  background: #f0f2f5;
  border: 1px solid #e4e6eb;
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.fb-card-comment-author {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

.fb-card-comment-text {
  font-size: 0.82rem;
  color: #1e293b;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.fb-card-comment-photo {
  max-height: 90px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  margin-top: 0.35rem;
}

.fb-card-comment-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.25rem;
  margin-left: 0.5rem;
}

/* Right Column: Notes & Activity Sidebar */
.post-details-notes-sidebar {
  border-left: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notes-sidebar-header {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-notes-tab {
  background: none;
  border: none;
  font-size: 0.95rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.12s ease;
}

.btn-notes-tab:hover,
.btn-notes-tab.active {
  color: #2563eb;
  background: #eff6ff;
}

.notes-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  text-align: center;
  gap: 0.5rem;
}

.notes-status-heading {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.notes-sidebar-footer {
  padding: 0.75rem 0.85rem;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-shrink: 0;
}

.notes-sidebar-input {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  background: #ffffff;
  color: #1e293b;
  outline: none;
}

.notes-sidebar-input:focus {
  border-color: #3b82f6;
}

.btn-notes-submit {
  background: #2563eb;
  border: none;
  color: #ffffff;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.btn-notes-submit:hover {
  background: #1d4ed8;
}

/* ==========================================================================
   AUTO-UPDATE MODAL & TOPBAR BUTTON STYLES
   ========================================================================== */

.btn-update-badge-btn {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}

.btn-update-badge-btn:hover {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
  border-color: #93c5fd !important;
  color: #1e40af !important;
  transform: translateY(-1px);
}

.update-icon-badge {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

.update-version-tag {
  background: #2563eb !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* Modal Box */
.update-modal-box {
  width: 580px;
  max-width: 95vw;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.update-modal-header {
  padding: 18px 24px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.update-modal-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.update-modal-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #068567 0%, #04664f 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(6, 133, 103, 0.25);
  flex-shrink: 0;
}

.update-modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.update-modal-subtitle {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: #64748b;
  font-weight: 400;
}

/* NÚT ĐÓNG X HIỆN ĐẠI THEO YÊU CẦU */
.update-modal-close-btn,
#btnCloseUpdateModal.btn-close-modal,
.update-modal-header .btn-close-modal,
#btnCloseBatchScheduleTimeModal,
.batch-schedule-time-modal-header .btn-close-modal,
.batch-schedule-time-modal-header .btn-modal-close,
.btn-close-modal {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  border: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  color: #64748b !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  font-size: 16px !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.update-modal-close-btn:hover,
#btnCloseUpdateModal.btn-close-modal:hover,
.update-modal-header .btn-close-modal:hover,
#btnCloseBatchScheduleTimeModal:hover,
.batch-schedule-time-modal-header .btn-close-modal:hover,
.batch-schedule-time-modal-header .btn-modal-close:hover,
.btn-close-modal:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #ef4444 !important;
  transform: rotate(90deg) scale(1.08) !important;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.22) !important;
}

.update-modal-close-btn:active,
#btnCloseUpdateModal.btn-close-modal:active,
.update-modal-header .btn-close-modal:active,
#btnCloseBatchScheduleTimeModal:active,
.batch-schedule-time-modal-header .btn-close-modal:active,
.batch-schedule-time-modal-header .btn-modal-close:active,
.btn-close-modal:active {
  transform: rotate(90deg) scale(0.96) !important;
}

.update-modal-body {
  padding: 22px 24px;
  background: #fafbfc;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 70vh;
  overflow-y: auto;
}

/* Version comparison cards */
.update-version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.update-version-card {
  flex: 1;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.update-version-card.current {
  border-left: 3.5px solid #64748b;
}

.update-version-card.latest {
  border-left: 3.5px solid #068567;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.update-version-card .version-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.update-version-card.latest .version-label {
  color: #047857;
}

.update-version-card .version-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.01em;
}

.update-version-card.latest .version-val {
  color: #068567;
}

.update-version-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

/* Status Alert */
.update-status-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
}

.update-status-alert.info {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.update-status-alert.info i {
  color: #068567;
}

.update-status-alert.success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}

.update-status-alert.success i {
  color: #068567;
}

.update-status-alert.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.update-status-alert.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* Download Progress Bar */
.update-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.update-progress-header,
.update-progress-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: #475569;
}

.update-progress-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.update-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #068567, #10b981);
  border-radius: 999px;
  transition: width 0.2s ease;
}

/* Release notes */
.update-release-notes-wrap {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
}

.update-release-notes-title {
  margin: 0 0 8px 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.update-release-notes-content {
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
  max-height: 120px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* Server Configuration */
.update-server-details {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  background: #ffffff;
  font-size: 13px;
}

.update-server-summary {
  cursor: pointer;
  font-weight: 600;
  color: #475569;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s ease;
}

.update-server-summary:hover {
  color: #068567;
}

.update-server-summary i {
  color: #068567;
}

.update-server-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.update-server-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

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

.update-server-input-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}

.update-server-input-row input:focus {
  border-color: #068567;
  box-shadow: 0 0 0 2px rgba(6, 133, 103, 0.15);
}

.update-server-input-row button {
  background: #068567;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.update-server-input-row button:hover {
  background: #056e54;
}

.update-server-hint {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

/* Modal Footer */
.update-modal-footer {
  padding: 16px 24px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

#btnDismissUpdateModal {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 8px;
  padding: 9px 20px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

#btnDismissUpdateModal:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

#btnManualCheckUpdate {
  background: #f0fdf4;
  border: 1.5px solid #068567;
  color: #068567;
  border-radius: 8px;
  padding: 9px 20px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s ease;
}

#btnManualCheckUpdate:hover {
  background: #068567;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(6, 133, 103, 0.25);
}

#modalUpdateApp .hidden {
  display: none !important;
}

#btnStartDownloadUpdate:not(.hidden),
#btnRestartAndInstallUpdate:not(.hidden) {
  background: #068567 !important;
  border: 1px solid #056e54 !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  padding: 9px 22px !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 3px 10px rgba(6, 133, 103, 0.25) !important;
  transition: all 0.18s ease !important;
}

#btnStartDownloadUpdate:not(.hidden):hover,
#btnRestartAndInstallUpdate:not(.hidden):hover {
  background: #056e54 !important;
  box-shadow: 0 5px 14px rgba(6, 133, 103, 0.35) !important;
  transform: translateY(-1px);
}

/* DARK MODE SUPPORT FOR UPDATE MODAL */
[data-theme="dark"] .update-modal-box {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .update-modal-header {
  background: #1e293b;
  border-bottom-color: #334155;
}

[data-theme="dark"] .update-modal-title {
  color: #f8fafc;
}

[data-theme="dark"] .update-modal-subtitle {
  color: #94a3b8;
}

[data-theme="dark"] .update-modal-close-btn,
[data-theme="dark"] #btnCloseBatchScheduleTimeModal,
[data-theme="dark"] .batch-schedule-time-modal-header .btn-close-modal,
[data-theme="dark"] .batch-schedule-time-modal-header .btn-modal-close,
[data-theme="dark"] .btn-close-modal {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .update-modal-close-btn:hover,
[data-theme="dark"] #btnCloseBatchScheduleTimeModal:hover,
[data-theme="dark"] .batch-schedule-time-modal-header .btn-close-modal:hover,
[data-theme="dark"] .batch-schedule-time-modal-header .btn-modal-close:hover,
[data-theme="dark"] .btn-close-modal:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #f87171 !important;
}

[data-theme="dark"] .update-modal-body {
  background: #0f172a;
}

[data-theme="dark"] .update-version-card {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .update-version-card.current {
  border-left-color: #64748b;
}

[data-theme="dark"] .update-version-card.latest {
  border-left-color: #068567;
  background: rgba(6, 133, 103, 0.15);
  border-color: #068567;
}

[data-theme="dark"] .update-version-card .version-val {
  color: #f1f5f9;
}

[data-theme="dark"] .update-version-card.latest .version-val {
  color: #34d399;
}

[data-theme="dark"] .update-version-arrow {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

[data-theme="dark"] .update-status-alert.info {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

[data-theme="dark"] .update-status-alert.success {
  background: rgba(6, 133, 103, 0.15);
  border-color: #068567;
  color: #34d399;
}

[data-theme="dark"] .update-status-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #fca5a5;
}

[data-theme="dark"] .update-progress-wrap,
[data-theme="dark"] .update-release-notes-wrap,
[data-theme="dark"] .update-server-details {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .update-modal-footer {
  background: #1e293b;
  border-top-color: #334155;
}

[data-theme="dark"] #btnDismissUpdateModal {
  background: #334155;
  border-color: #475569;
  color: #cbd5e1;
}

[data-theme="dark"] #btnDismissUpdateModal:hover {
  background: #475569;
  color: #f8fafc;
}

[data-theme="dark"] #btnManualCheckUpdate {
  background: rgba(6, 133, 103, 0.15);
  border-color: #068567;
  color: #34d399;
}

[data-theme="dark"] #btnManualCheckUpdate:hover {
  background: #068567;
  color: #ffffff;
}

/* ==========================================================================
   AUTH MODAL & OVERLAY STYLES
   ========================================================================== */
#authOverlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

#authOverlay.hidden {
  display: none !important;
}

.auth-modal-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  animation: authCardEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-card-header {
  padding: 1.75rem 1.75rem 1.25rem;
  text-align: center;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #f1f5f9;
}

.auth-brand-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 8px 16px -4px rgba(34, 197, 94, 0.4);
}

.auth-brand-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.auth-brand-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
}

.auth-tabs-row {
  display: flex;
  background: #f1f5f9;
  padding: 0.3rem;
  border-radius: 10px;
  margin: 1.25rem 1.75rem 0;
  gap: 0.25rem;
}

.auth-tab-btn {
  flex: 1;
  padding: 0.6rem;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.auth-tab-btn:hover:not(.active) {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}

.auth-tab-btn.active {
  background: #ffffff;
  color: #16a34a;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.auth-card-body {
  padding: 1.5rem 1.75rem 1.75rem;
}

.auth-form-group {
  margin-bottom: 1.1rem;
}

.auth-form-label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.4rem;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 0.9rem;
  color: #94a3b8;
  font-size: 0.9rem;
  pointer-events: none;
}

.auth-input-control {
  width: 100%;
  height: 42px;
  padding: 0 0.9rem 0 2.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #0f172a;
  background: #ffffff;
  transition: all 0.15s ease;
}

.auth-input-control:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.auth-remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -0.15rem 0 1.15rem 0;
  font-size: 0.85rem;
  color: #475569;
}

.auth-remember-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  color: #475569;
  transition: color 0.15s ease;
}

.auth-remember-label:hover {
  color: #1e293b;
}

.auth-remember-checkbox {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  accent-color: #22c55e;
}

.btn-auth-toggle-pwd {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  font-size: 0.95rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.btn-auth-toggle-pwd:hover {
  color: #16a34a;
}

.auth-btn-primary {
  width: 100%;
  height: 44px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.auth-btn-primary:hover {
  background: linear-gradient(135deg, #16a34a, #15803d);
  transform: translateY(-1px);
}

.auth-btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.auth-alert-box {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.825rem;
  line-height: 1.45;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.auth-alert-box.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.auth-alert-box.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.auth-alert-box.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}

.auth-card-footer {
  padding: 0.9rem 1.75rem;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  text-align: center;
  font-size: 0.775rem;
  color: #64748b;
}

/* ==========================================================================
   TOPBAR USER PROFILE WIDGET
   ========================================================================== */
.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.5rem 0.35rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
}

.user-profile-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-profile-name {
  font-size: 0.825rem;
  font-weight: 600;
  color: #0f172a;
}

.user-profile-badge {
  font-size: 0.675rem;
  font-weight: 600;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.user-profile-badge.badge-admin {
  color: #b45309;
}

.btn-logout {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #fee2e2;
  color: #dc2626;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s ease;
}

.btn-logout:hover {
  background: #fecaca;
  color: #b91c1c;
}

/* ==========================================================================
   ADMIN PANEL STYLES
   ========================================================================== */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-stat-card {
  background: #ffffff;
  padding: 1.1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.admin-stat-icon.blue { background: #eff6ff; color: #2563eb; }
.admin-stat-icon.green { background: #f0fdf4; color: #16a34a; }
.admin-stat-icon.amber { background: #fffbeb; color: #d97706; }
.admin-stat-icon.red { background: #fef2f2; color: #dc2626; }

.admin-stat-val {
  font-size: 1.45rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.admin-stat-lbl {
  font-size: 0.775rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 0.25rem;
}

.admin-table-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.btn-plan-quick {
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-plan-quick.trial {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}
.btn-plan-quick.trial:hover {
  background: #dbeafe;
}

.btn-plan-quick.month {
  background: #f0fdf4;
  color: #16a34a;
  border-color: #bbf7d0;
}
.btn-plan-quick.month:hover {
  background: #dcfce7;
}

.btn-plan-quick.life {
  background: #faf5ff;
  color: #9333ea;
  border-color: #e9d5ff;
}
.btn-plan-quick.life:hover {
  background: #f3e8ff;
}

.btn-plan-quick.danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.btn-plan-quick.danger:hover {
  background: #fee2e2;
}

.badge-role-admin {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* ==========================================================================
   DESKTOP MACHINE ID LICENSING STYLES
   ========================================================================== */
#desktopLicenseOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

#desktopLicenseOverlay.hidden {
  display: none !important;
}

.license-modal-card {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  border: 1px solid #e2e8f0;
  padding: 2.25rem;
  text-align: center;
  animation: authFadeIn 0.25s ease-out;
}

.license-icon-shield {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.machine-id-container {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.machine-id-code {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.08em;
}

.btn-copy-mid {
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-copy-mid:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.desktop-license-admin-link {
  margin-top: 1.25rem;
  font-size: 0.8rem;
}

.desktop-license-admin-link a {
  color: #64748b;
  text-decoration: underline;
  transition: color 0.15s;
}

.desktop-license-admin-link a:hover {
  color: #2563eb;
}

/* Admin Subnavigation Tabs */
.admin-subnav-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

.admin-subnav-btn {
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.admin-subnav-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.admin-subnav-btn.active {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
}

.admin-license-generator-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.license-generated-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}

.license-key-copy-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.license-key-display {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #86efac;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  flex: 1;
  color: #15803d;
  word-break: break-all;
}

/* ==========================================================================
   BULK MEDIA STORAGE SOURCE PICKER MODAL (Device / Host AZDIGI, Dropbox, R2)
   ========================================================================== */

.bulk-media-modal-box {
  max-width: 620px;
  width: 95%;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bulk-media-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.bulk-media-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bulk-media-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 1.1rem;
}

.bulk-media-header-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
}

.bulk-media-modal-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.bulk-media-target-badge {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.86rem;
  color: #475569;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.bulk-media-source-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bulk-media-source-card {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem 1.15rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.bulk-media-source-card:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.bulk-media-source-main {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 1;
  cursor: pointer;
}

.bulk-media-source-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.source-icon-device {
  background: linear-gradient(135deg, #ede9fe, #e0e7ff);
  color: #6366f1;
  border: 1px solid #c7d2fe;
}

.source-icon-dropbox {
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  color: #0284c7;
  border: 1px solid #7dd3fc;
}

.source-icon-r2 {
  background: linear-gradient(135deg, #ffedd5, #fed7aa);
  color: #ea580c;
  border: 1px solid #fdba74;
}

.bulk-media-source-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.bulk-media-source-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.bulk-media-source-subtitle-sub {
  font-size: 0.85rem;
  font-weight: 500;
  color: #64748b;
}

.bulk-media-recommended-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 1px 6px;
  border-radius: 6px;
}

.bulk-media-source-desc {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.35;
}

.bulk-media-storage-location {
  font-size: 0.78rem;
  color: #475569;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 5px;
  margin-top: 0.3rem;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.bulk-media-storage-location code {
  color: #0369a1;
  font-weight: 600;
  background: transparent;
  padding: 0;
}

.bulk-media-status-badge {
  font-size: 0.78rem;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.bulk-media-status-badge .status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator.status-offline {
  background: #94a3b8;
}

.status-indicator.status-online {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.bulk-media-source-arrow {
  color: #94a3b8;
  font-size: 0.95rem;
  padding: 0 0.5rem;
}

.bulk-media-gear-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  transition: all 0.2s ease;
  margin-left: 0.75rem;
  flex-shrink: 0;
}

.gear-btn-dropbox {
  background: #2563eb;
  color: #ffffff;
}

.gear-btn-dropbox:hover {
  background: #1d4ed8;
  transform: rotate(20deg);
}

.gear-btn-r2 {
  background: #ea580c;
  color: #ffffff;
}

.gear-btn-r2:hover {
  background: #c2410c;
  transform: rotate(20deg);
}

.bulk-media-footer-help {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed #e2e8f0;
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.45;
}

.bulk-media-footer-help i {
  color: #3b82f6;
  margin-top: 2px;
}

/* Cloud File Browser & Uploader Modal */
.cloud-picker-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 1rem;
}

.cloud-picker-tab {
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.cloud-picker-tab.active {
  color: #1e293b;
  border-bottom-color: #2563eb;
}

.cloud-upload-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s;
}

.cloud-upload-dropzone:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.cloud-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  max-height: 380px;
  overflow-y: auto;
  padding: 0.25rem;
}

.cloud-file-item {
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.5rem;
  cursor: pointer;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.15s;
}

.cloud-file-item:hover {
  border-color: #94a3b8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cloud-file-item.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.cloud-folder-item {
  border: 1.5px solid #fed7aa;
  background: #fffaf5;
}

.cloud-folder-item:hover {
  border-color: #ea580c;
  background: #fff7ed;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.15);
  transform: translateY(-2px);
}

.cloud-folder-thumb-wrap {
  width: 100%;
  height: 90px;
  border-radius: 8px;
  background: #ffedd5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.45rem;
  transition: transform 0.2s ease;
  position: relative;
}

.cloud-folder-item:hover .cloud-folder-thumb-wrap {
  transform: scale(1.05);
  background: #fed7aa;
}

.cloud-folder-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #c2410c;
  background: #ffedd5;
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.r2-breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 5px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  font-size: 0.82rem;
  min-height: 32px;
}

.r2-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #475569;
  cursor: pointer;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.15s;
  user-select: none;
}

.r2-breadcrumb-item:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.r2-breadcrumb-item.active {
  color: #ea580c;
  font-weight: 600;
  cursor: default;
  background: #fff7ed;
}

.r2-breadcrumb-divider {
  color: #94a3b8;
  font-size: 0.75rem;
  user-select: none;
}

.r2-folder-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #c2410c;
  background: #fff7ed;
  border: 1px solid #ffedd5;
  padding: 1px 5px;
  border-radius: 4px;
  margin-top: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-file-thumb-wrap {
  width: 100%;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.45rem;
}

.cloud-file-placeholder-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #94a3b8;
  background: #f8fafc;
  z-index: 1;
}

.cloud-file-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.2s ease, opacity 0.25s ease;
  display: block;
  z-index: 2;
}

video.cloud-file-thumb,
img.cloud-file-thumb,
canvas.cloud-file-thumb {
  opacity: 1;
  background: transparent;
}

canvas.cloud-file-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  z-index: 3;
  pointer-events: none;
}

.cloud-file-item:hover .cloud-file-thumb {
  transform: scale(1.04);
}

.cloud-file-video-badge {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  pointer-events: none;
  z-index: 2;
}

.cloud-file-video-icon {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: #1e293b;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.cloud-file-video-overlay-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  z-index: 4;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  pointer-events: auto;
}

.cloud-file-item:hover .cloud-file-video-overlay-play {
  background: #ea580c;
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.45);
}

.video-lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  color: #0f172a;
  border: 2px solid #e2e8f0;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  z-index: 10;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.video-lightbox-close:hover {
  background: #f1f5f9;
  transform: scale(1.08);
}

.cloud-file-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.cloud-file-size {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* ==========================================================================
   Multi-Dropbox Accounts Manager (SO9 Style)
   ========================================================================== */
.dropbox-accounts-container {
  background: #eefaf6;
  border: 1px solid #ccfbf1;
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 380px;
  overflow-y: auto;
}

.dropbox-accounts-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dropbox-account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.dropbox-account-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.dropbox-account-card.is-default {
  border: 1.5px solid #4f46e5;
  background: #fbfcfe;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
}

.dbx-acc-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}

.dbx-acc-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.92rem;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.dbx-acc-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.dbx-acc-email-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.dbx-acc-email {
  font-weight: 700;
  font-size: 0.94rem;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dbx-badge-default {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.dbx-acc-date {
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 3px;
  white-space: nowrap;
}

.dbx-acc-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  margin-left: 0.85rem;
}

.dbx-btn-set-default {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
}

.dbx-btn-set-default:hover {
  background: #fffbeb !important;
  border-color: #fde047 !important;
  color: #b45309 !important;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.15);
}

.dbx-btn-delete {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.45rem;
  border-radius: 6px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  width: 34px;
  height: 34px;
}

.dbx-btn-delete:hover {
  color: #ef4444;
  background: #fef2f2;
  border-color: #fee2e2;
}

.dbx-btn-access {
  background: #4f46e5;
  color: #ffffff;
  border: none;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0.48rem 1.15rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.2);
}

.dbx-btn-access:hover {
  background: #4338ca;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.dbx-btn-access:active {
  transform: scale(0.98);
}

.btn-add-dropbox-account {
  background: #1e3a8a;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.35rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-add-dropbox-account:hover {
  background: #172554;
}

/* ==========================================================================
   Multi-Cloudflare R2 Accounts Manager
   ========================================================================== */
.r2-accounts-container {
  background: #fff7ed;
  border: 1px solid #ffedd5;
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 380px;
  overflow-y: auto;
}

.r2-account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.r2-account-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.r2-account-card.is-default {
  border: 1.5px solid #ea580c;
  background: #fffaf5;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.1);
}

.r2-acc-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}

.r2-acc-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ea580c, #f97316);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.92rem;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(234, 88, 12, 0.25);
}

.r2-acc-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.r2-acc-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.r2-acc-name {
  font-weight: 700;
  font-size: 0.94rem;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r2-badge-default {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.r2-acc-meta {
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 3px;
  white-space: nowrap;
  flex-wrap: wrap;
}

.r2-acc-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  margin-left: 0.85rem;
}

.r2-btn-set-default {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
}

.r2-btn-set-default:hover {
  background: #fffbeb !important;
  border-color: #fde047 !important;
  color: #b45309 !important;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.15);
}

.r2-btn-delete {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.45rem;
  border-radius: 6px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  width: 34px;
  height: 34px;
}

.r2-btn-delete:hover {
  color: #ef4444;
  background: #fef2f2;
  border-color: #fee2e2;
}

.r2-btn-access {
  background: #ea580c;
  color: #ffffff;
  border: none;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0.48rem 1.15rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.2);
}

.r2-btn-access:hover {
  background: #c2410c;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.3);
}

.r2-btn-access:active {
  transform: scale(0.98);
}

.btn-add-r2-account {
  background: #ea580c;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.35rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-add-r2-account:hover {
  background: #c2410c;
}

/* ==========================================================================
   Web Version Top Loading Progress Bar (Removed)
   ========================================================================== */
#webTopLoadingBar {
  display: none !important;
}

/* ==========================================================================
   Web Version Specific Enhancements & Layout Adjustments
   ========================================================================== */

/* Web Client: Hide Desktop-only Update Button */
body.is-web-client #checkUpdateBtn,
body:not(.is-electron-client) #checkUpdateBtn,
.is-web-client .desktop-only {
  display: none !important;
}

/* ==========================================================================
   SIDEBAR FOOTER & SYSTEM HUB DROPUP MENU (GÓC DƯỚI BÊN TRÁI TOOL)
   ========================================================================== */
.app-sidebar-footer {
  margin-top: auto;
  padding: 0.65rem 0.35rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-system-hub-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Nút Trigger Trung Tâm Tiện Ích ở Chân Sidebar */
.sidebar-system-hub-btn {
  width: 58px;
  height: 56px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  user-select: none;
  padding: 4px;
  outline: none;
}

.sidebar-system-hub-btn:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.3);
  transform: translateY(-1px);
}

.sidebar-system-hub-btn.active {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.3), rgba(16, 185, 129, 0.25));
  border-color: #10b981;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.45);
}

.system-hub-icon-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 1.15rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.sidebar-system-hub-btn:hover .system-hub-icon-box {
  color: #ffffff;
  transform: scale(1.08);
}

.sidebar-system-hub-btn.active .system-hub-icon-box {
  color: #60a5fa;
  transform: rotate(45deg);
}

/* Chấm trạng thái thông minh: Xanh (Online/Bản mới nhất) vs Đỏ nhấp nháy (Có bản mới) */
.system-hub-status-dot {
  position: absolute;
  top: -2px;
  right: -7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid #0b1329;
  transition: all 0.3s ease;
}

.system-hub-status-dot.online {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.system-hub-status-dot.has-update {
  background-color: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: hub-pulse-red 1.5s infinite;
}

@keyframes hub-pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.2); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.system-hub-version-tag {
  font-size: 0.65rem;
  font-weight: 600;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
  line-height: 1;
}

.sidebar-system-hub-btn:hover .system-hub-version-tag,
.sidebar-system-hub-btn.active .system-hub-version-tag {
  color: #cbd5e1;
}

/* Dropup Menu Nổi lên từ góc dưới bên trái */
.system-hub-dropup-menu {
  position: fixed;
  left: 84px;
  bottom: 12px;
  width: 324px;
  background: linear-gradient(165deg, #0f172a 0%, #090d16 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 24px 56px -10px rgba(0, 0, 0, 0.8), 0 0 1px 1px rgba(255, 255, 255, 0.09) inset;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  animation: hub-dropup-appear 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hub-dropup-appear {
  from {
    opacity: 0;
    transform: translateX(-12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.system-hub-dropup-menu.hidden {
  display: none !important;
}

/* Header của Dropup */
.hub-menu-header {
  padding: 0.95rem 1.1rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}

.hub-header-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.hub-brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.hub-brand-info {
  display: flex;
  flex-direction: column;
}

.hub-brand-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.hub-brand-subtitle {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

.hub-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}

.hub-status-pill.online {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.28);
}

.hub-status-pill.has-update {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
  animation: hub-pulse-red 1.5s infinite;
}

.hub-status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

.hub-menu-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  margin: 0.2rem 0;
}

/* Danh sách các item thao tác */
.hub-menu-body {
  padding: 0.45rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hub-menu-item {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  position: relative;
  text-decoration: none;
  outline: none;
}

.hub-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(3px);
}

.hub-menu-item:active {
  transform: translateX(1px) scale(0.99);
}

.hub-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
}

.hub-menu-item:hover .hub-item-icon {
  transform: scale(1.04);
}

.hub-item-icon.refresh-icon {
  background: rgba(37, 99, 235, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.hub-item-icon.backup-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.hub-item-icon.update-icon {
  background: rgba(124, 58, 237, 0.15);
  color: #a855f7;
  border: 1px solid rgba(124, 58, 237, 0.3);
}

/* Spinner khi đang làm mới hệ thống */
.hub-menu-item.is-refreshing .hub-item-icon i {
  animation: fa-spin 1s linear infinite;
}

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

.hub-item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.hub-item-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f1f5f9;
}

.hub-item-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hub-item-badge.success {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.hub-item-badge.version {
  background: rgba(99, 102, 241, 0.16);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.3);
}

.hub-update-badge-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}

.hub-update-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.hub-update-status-dot.online {
  background-color: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.hub-update-status-dot.has-update {
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: hub-pulse-red 1.5s infinite;
}

.hub-item-desc {
  font-size: 0.7rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Footer: Tài khoản & Đăng xuất */
.hub-menu-footer {
  padding: 0.7rem 0.85rem 0.8rem;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hub-user-profile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.hub-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #334155);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.hub-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hub-user-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-user-role {
  font-size: 0.68rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-logout-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.22);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  outline: none;
}

.hub-logout-btn:hover {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
  transform: scale(1.06);
}

/* ==========================================================================
   GLOBAL LUXURY GLOSSY TOOLTIP SYSTEM (TOOLTIP ĐEN BÓNG SANG TRỌNG)
   ========================================================================== */
.global-glossy-tooltip {
  position: fixed;
  z-index: 999999;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.97) 0%, rgba(9, 13, 22, 0.99) 100%);
  color: #ffffff;
  font-size: 0.77rem;
  font-weight: 500;
  line-height: 1.45;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.75), 0 0 1px 1px rgba(255, 255, 255, 0.12) inset;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.global-glossy-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.global-glossy-tooltip .glossy-tooltip-text {
  color: #f1f5f9;
}








/* ==============================================================================
   THEME "BANKCO LIGHT FINTECH ADMIN" (CHUẨN 100% THEO ẢNH MẪU NGƯỜI DÙNG)
   - Nền toàn trang: Trắng kem dịu mắt (#fafafa / #f8fafc)
   - Khung thẻ Card & Sidebar: Trắng tinh khiết (#ffffff), viền nhẹ (#edf2f7 / #e2e8f0), bo góc 16px
   - Khối con, Header bảng & Ô nhập liệu: Xám sáng dịu (#f8fafc / #f1f5f9)
   - Điểm nhấn Xanh: BankCo Signature Emerald Green (#22c55e / #16a34a)
   - Menu Active: Nền xanh mint pastel (#f0fdf4), chữ & vạch báo xanh ngọc (#22c55e)
   - Nút hành động chính: Xanh ngọc (#22c55e), chữ trắng (#ffffff)
   - Nút phụ: Nền (#f8fafc), viền (#e2e8f0), chữ (#4b5563)
   - Tiêu đề: Đen tuyền (#111827), Chữ phụ: Xám trung tính (#6b7280 / #9ca3af)
   ============================================================================== */

/* 1. Nền tổng thể ứng dụng & Thân máy (Nền bên phải: #E9EEEF Canvas) */
html:not([data-theme="dark"]), html:not([data-theme="dark"]) body {
  background-color: #e9eeef !important;
  color: #2a3c40 !important;
  color-scheme: light;
}
html:not([data-theme="dark"]) .app-layout, 
html:not([data-theme="dark"]) .app-main-viewport, 
html:not([data-theme="dark"]) .app-views-wrapper, 
html:not([data-theme="dark"]) .app-view {
  background-color: #e9eeef !important;
  color: #2a3c40 !important;
}

/* 2. Thanh điều hướng Sidebar (Trái) & Logo - Phong cách Dark Spruce (#112B2B) */
html .app-sidebar,
html:not([data-theme="dark"]) .app-sidebar {
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
  background-color: #112b2b !important;
  border-right: 1px solid #1a3a3a !important;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.22) !important;
}

html .app-sidebar-header,
html:not([data-theme="dark"]) .app-sidebar-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

html .app-sidebar-logo,
html:not([data-theme="dark"]) .app-sidebar-logo {
  background: #068567 !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(6, 133, 103, 0.35) !important;
}

html .app-sidebar-logo i,
html:not([data-theme="dark"]) .app-sidebar-logo i {
  color: #ffffff !important;
}

html .app-sidebar-brand-text .brand-title,
html:not([data-theme="dark"]) .app-sidebar-brand-text .brand-title {
  color: #ffffff !important;
  font-weight: 700 !important;
}

html .nav-section-title,
html:not([data-theme="dark"]) .nav-section-title {
  color: #526969 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* ============================================================================
   Nút Menu Sidebar: Phong Cách Dark Spruce & Brand Teal (#068567)
   ============================================================================ */
html .app-nav-item,
html:not([data-theme="dark"]) .app-nav-item {
  color: #8fa5a5 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  position: relative !important;
  cursor: pointer !important;
  transition: color 0.15s ease,
              background-color 0.15s ease,
              border-color 0.15s ease !important;
}

html .app-nav-item .nav-item-text,
html:not([data-theme="dark"]) .app-nav-item .nav-item-text {
  color: #8fa5a5 !important;
  font-weight: 500 !important;
  transition: color 0.15s ease !important;
}

html .app-nav-item .bankco-icon-wrap,
html:not([data-theme="dark"]) .app-nav-item .bankco-icon-wrap {
  width: 22px !important;
  height: 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  color: #8fa5a5 !important;
  transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1),
              color 0.15s ease !important;
}

html .app-nav-item .bankco-icon-wrap svg,
html:not([data-theme="dark"]) .app-nav-item .bankco-icon-wrap svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
  color: inherit !important;
  stroke: currentColor !important;
  transition: stroke 0.18s ease, color 0.18s ease !important;
}

html .app-nav-item .bankco-icon-wrap svg path,
html .app-nav-item .bankco-icon-wrap svg rect,
html .app-nav-item .bankco-icon-wrap svg circle,
html .app-nav-item .bankco-icon-wrap svg polygon,
html .app-nav-item .bankco-icon-wrap svg polyline,
html .app-nav-item .bankco-icon-wrap svg line,
html:not([data-theme="dark"]) .app-nav-item .bankco-icon-wrap svg path,
html:not([data-theme="dark"]) .app-nav-item .bankco-icon-wrap svg rect,
html:not([data-theme="dark"]) .app-nav-item .bankco-icon-wrap svg circle,
html:not([data-theme="dark"]) .app-nav-item .bankco-icon-wrap svg polygon,
html:not([data-theme="dark"]) .app-nav-item .bankco-icon-wrap svg polyline,
html:not([data-theme="dark"]) .app-nav-item .bankco-icon-wrap svg line {
  stroke: currentColor !important;
  transition: stroke 0.18s ease, fill 0.18s ease !important;
}

/* Dots and small filled markers within outline SVGs */
html .app-nav-item .bankco-icon-wrap svg [fill="currentColor"],
html:not([data-theme="dark"]) .app-nav-item .bankco-icon-wrap svg [fill="currentColor"] {
  fill: currentColor !important;
  stroke: none !important;
}

html .app-nav-item .nav-item-arrow,
html:not([data-theme="dark"]) .app-nav-item .nav-item-arrow {
  display: none !important;
}

/* Hiệu ứng HOVER: Nền nhẹ mờ, chữ và icon sáng trắng rõ nét */
html .app-nav-item:hover,
html:not([data-theme="dark"]) .app-nav-item:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  transform: none !important;
}

html .app-nav-item:hover .nav-item-text,
html:not([data-theme="dark"]) .app-nav-item:hover .nav-item-text {
  color: #ffffff !important;
}

html .app-nav-item:hover .bankco-icon-wrap,
html .app-nav-item:hover .bankco-icon-wrap svg,
html:not([data-theme="dark"]) .app-nav-item:hover .bankco-icon-wrap,
html:not([data-theme="dark"]) .app-nav-item:hover .bankco-icon-wrap svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

/* Trạng thái ACTIVE: Hộp viền ngọc #2dd4bf / #068567, nền nhẹ, chữ và icon trắng tinh khiết */
html .app-nav-item.active,
html:not([data-theme="dark"]) .app-nav-item.active {
  background: rgba(6, 133, 103, 0.24) !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(45, 212, 191, 0.55) !important;
  border-radius: 9px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  transform: none !important;
}

html .app-nav-item.active .nav-item-text,
html:not([data-theme="dark"]) .app-nav-item.active .nav-item-text {
  color: #ffffff !important;
  font-weight: 600 !important;
}

html .app-nav-item.active .bankco-icon-wrap,
html .app-nav-item.active .bankco-icon-wrap svg,
html:not([data-theme="dark"]) .app-nav-item.active .bankco-icon-wrap,
html:not([data-theme="dark"]) .app-nav-item.active .bankco-icon-wrap svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

html .app-nav-item.active:hover,
html:not([data-theme="dark"]) .app-nav-item.active:hover {
  background: rgba(6, 133, 103, 0.3) !important;
  border-color: rgba(45, 212, 191, 0.75) !important;
  transform: none !important;
}

html .app-nav-item .nav-item-badge,
html:not([data-theme="dark"]) .app-nav-item .nav-item-badge {
  background: #068567 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 9999px !important;
  padding: 1px 7px !important;
  box-shadow: 0 1px 4px rgba(6, 133, 103, 0.45) !important;
}

/* ============================================================================
   Setting Section (Thanh điều hướng Sidebar - Setting Demo)
   ============================================================================ */
html .nav-section-setting,
html:not([data-theme="dark"]) .nav-section-setting {
  margin-top: 1.1rem !important;
}

html .nav-item-setting,
html:not([data-theme="dark"]) .nav-item-setting {
  height: 40px !important;
  font-size: 0.84rem !important;
}

html .nav-item-setting .nav-item-text,
html:not([data-theme="dark"]) .nav-item-setting .nav-item-text {
  font-size: 0.84rem !important;
  font-weight: 500 !important;
}

.setting-nav-badge {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  padding: 2px 7px !important;
  border-radius: 9999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.2 !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
  transition: all 0.15s ease !important;
}

.setting-nav-badge.info {
  background: rgba(56, 189, 248, 0.14) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

.setting-nav-badge.success {
  background: rgba(52, 211, 153, 0.14) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.3) !important;
}

html #sidebarCheckUpdateBtn .nav-item-text,
html:not([data-theme="dark"]) #sidebarCheckUpdateBtn .nav-item-text {
  flex: 0 0 auto !important;
}

.setting-nav-badge.version {
  background: rgba(255, 255, 255, 0.04) !important;
  color: rgba(255, 255, 255, 0.48) !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  border-radius: 9999px !important;
  font-size: 0.52rem !important;
  font-weight: 500 !important;
  padding: 1px 5.5px !important;
  line-height: 1.15 !important;
  letter-spacing: 0.03em !important;
  margin-left: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}

.setting-nav-badge.version.has-update {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  border-radius: 10px !important;
  padding: 1.5px 7px !important;
  font-weight: 600 !important;
}

.setting-nav-version-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-left: -5px !important;
  flex-shrink: 0 !important;
}

.setting-nav-dot {
  display: none !important;
}

.setting-nav-dot.has-update {
  display: inline-block !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #f59e0b !important;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6) !important;
  opacity: 1 !important;
}

html .nav-item-setting:hover .setting-nav-badge.info,
html:not([data-theme="dark"]) .nav-item-setting:hover .setting-nav-badge.info {
  background: rgba(56, 189, 248, 0.25) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}

html .nav-item-setting:hover .setting-nav-badge.success,
html:not([data-theme="dark"]) .nav-item-setting:hover .setting-nav-badge.success {
  background: rgba(52, 211, 153, 0.25) !important;
  border-color: #34d399 !important;
  color: #ffffff !important;
}

html .nav-item-setting:hover .setting-nav-badge.version,
html:not([data-theme="dark"]) .nav-item-setting:hover .setting-nav-badge.version {
  background: rgba(255, 255, 255, 0.09) !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

html .nav-item-setting:hover .setting-nav-badge.version.has-update,
html:not([data-theme="dark"]) .nav-item-setting:hover .setting-nav-badge.version.has-update {
  background: rgba(245, 158, 11, 0.25) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  color: #fde68a !important;
}

html #sidebarRefreshBtn.is-refreshing .bankco-icon-wrap svg {
  animation: spin 1s linear infinite !important;
}

/* ============================================================================
   Sidebar User Profile & Admin Logout Footer
   ============================================================================ */
html .sidebar-user-footer,
html:not([data-theme="dark"]) .sidebar-user-footer {
  margin-top: auto !important;
  margin-bottom: 0.2rem !important;
  padding: 0.35rem 0.55rem !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.45rem !important;
  box-sizing: border-box !important;
  width: 100% !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
  transition: all 0.15s ease !important;
}

html .sidebar-user-footer:hover,
html:not([data-theme="dark"]) .sidebar-user-footer:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

html .sidebar-user-profile,
html:not([data-theme="dark"]) .sidebar-user-profile {
  display: flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  min-width: 0 !important;
  flex: 1 !important;
}

html .sidebar-user-avatar,
html:not([data-theme="dark"]) .sidebar-user-avatar {
  width: 24px !important;
  height: 24px !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #94a3b8 !important;
  font-size: 0.72rem !important;
  flex-shrink: 0 !important;
}

html .sidebar-user-info,
html:not([data-theme="dark"]) .sidebar-user-info {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  gap: 0 !important;
  justify-content: center !important;
}

html .sidebar-user-name,
html:not([data-theme="dark"]) .sidebar-user-name {
  font-size: 0.74rem !important;
  font-weight: 500 !important;
  color: #cbd5e1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.25 !important;
}

html .sidebar-user-role,
html:not([data-theme="dark"]) .sidebar-user-role {
  font-size: 0.62rem !important;
  font-weight: 500 !important;
  color: #068567 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.15 !important;
}

html .sidebar-logout-btn,
html:not([data-theme="dark"]) .sidebar-logout-btn {
  width: 24px !important;
  height: 24px !important;
  border-radius: 6px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: #64748b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.75rem !important;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
  outline: none !important;
  padding: 0 !important;
}

html .sidebar-logout-btn:hover,
html:not([data-theme="dark"]) .sidebar-logout-btn:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #ef4444 !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Nút Tiện ích Hệ thống ở chân Sidebar */
html .app-sidebar-footer,
html:not([data-theme="dark"]) .app-sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

html .sidebar-system-hub-btn,
html:not([data-theme="dark"]) .sidebar-system-hub-btn {
  background: #143535 !important;
  border: 1px solid #1c4949 !important;
  border-radius: 10px !important;
  color: #8fa5a5 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html .sidebar-system-hub-btn .system-hub-icon-box,
html .sidebar-system-hub-btn .system-hub-label,
html:not([data-theme="dark"]) .sidebar-system-hub-btn .system-hub-icon-box,
html:not([data-theme="dark"]) .sidebar-system-hub-btn .system-hub-label {
  color: #8fa5a5 !important;
  transition: color 0.2s ease !important;
}

html .sidebar-system-hub-btn:hover,
html:not([data-theme="dark"]) .sidebar-system-hub-btn:hover {
  background: #194343 !important;
  border-color: #068567 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(6, 133, 103, 0.25) !important;
}

html .sidebar-system-hub-btn:hover .system-hub-icon-box,
html:not([data-theme="dark"]) .sidebar-system-hub-btn:hover .system-hub-icon-box {
  background: rgba(6, 133, 103, 0.2) !important;
  color: #068567 !important;
  border-color: #068567 !important;
}

html .sidebar-system-hub-btn:hover .system-hub-label,
html:not([data-theme="dark"]) .sidebar-system-hub-btn:hover .system-hub-label {
  color: #ffffff !important;
  font-weight: 600 !important;
}

html .sidebar-system-hub-btn:hover .system-hub-version-tag,
html:not([data-theme="dark"]) .sidebar-system-hub-btn:hover .system-hub-version-tag {
  background: #112b2b !important;
  color: #068567 !important;
  border-color: #068567 !important;
}

html .sidebar-system-hub-btn.active,
html:not([data-theme="dark"]) .sidebar-system-hub-btn.active {
  background: #143535 !important;
  border: 1px solid #068567 !important;
}

html .sidebar-system-hub-btn.active .system-hub-icon-box,
html:not([data-theme="dark"]) .sidebar-system-hub-btn.active .system-hub-icon-box {
  color: #068567 !important;
}

html .sidebar-system-hub-btn.active .system-hub-label,
html:not([data-theme="dark"]) .sidebar-system-hub-btn.active .system-hub-label {
  color: #ffffff !important;
}

/* Menu bật lên (System Hub Dropup Menu) */
html:not([data-theme="dark"]) .system-hub-dropup-menu {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12) !important;
  border-radius: 14px !important;
}html:not([data-theme="dark"]) .hub-menu-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #edf2f7 !important;
}html:not([data-theme="dark"]) .hub-brand-title {
  color: #111827 !important;
}html:not([data-theme="dark"]) .hub-brand-subtitle {
  color: #526969 !important;
}html:not([data-theme="dark"]) .hub-menu-item {
  background: transparent !important;
  color: #193333 !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}html:not([data-theme="dark"]) .hub-menu-item:hover {
  background: #E2F3F0 !important;
  color: #068567 !important;
  border-color: #bbf0e7 !important;
  transform: translateX(2px) !important;
}html:not([data-theme="dark"]) .hub-menu-item:hover .hub-item-title {
  color: #068567 !important;
}html:not([data-theme="dark"]) .hub-menu-item .hub-item-icon {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease !important;
}html:not([data-theme="dark"]) .hub-menu-item:hover .hub-item-icon {
  transform: scale(1.04) !important;
  box-shadow: 0 2px 6px rgba(6, 133, 103, 0.16) !important;
}html:not([data-theme="dark"]) .hub-item-title {
  color: #193333 !important;
  transition: color 0.18s ease !important;
}html:not([data-theme="dark"]) .hub-item-desc {
  color: #526969 !important;
}html:not([data-theme="dark"]) .hub-menu-divider {
  background: #e8f1ef !important;
}

/* 3. Thanh tiêu đề trên cùng (App Topbar) */
html:not([data-theme="dark"]) .app-topbar {
  background: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
  padding: 1.25rem 1.75rem 0.6rem 1.75rem !important;
}html:not([data-theme="dark"]) .topbar-view-title {
  color: #193333 !important;
  font-weight: 700 !important;
  font-size: 1.25rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}html:not([data-theme="dark"]) .topbar-view-title i {
  color: #068567 !important;
  font-size: 1.3rem !important;
}

/* 4. Nút Làm Mới Hệ Thống Lấp Lánh (Soft Action) */
html:not([data-theme="dark"]) .btn-system-refresh {
  background: #ffffff !important;
  border: 1px solid #dbe7e5 !important;
  color: #068567 !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 3px rgba(17, 43, 43, 0.04) !important;
}html:not([data-theme="dark"]) .btn-system-refresh .system-refresh-icon {
  color: #068567 !important;
}html:not([data-theme="dark"]) .btn-system-refresh:hover {
  background: #E2F3F0 !important;
  box-shadow: 0 2px 8px rgba(6, 133, 103, 0.18) !important;
  border-color: #99ded7 !important;
  color: #056e55 !important;
}

/* 5. Thẻ nội dung, Khung bảng & Dashboard (Khối nội dung: #F5F7F7, Đường viền: #C9D5D8) */
html:not([data-theme="dark"]) .schedule-filter-sidebar, html:not([data-theme="dark"]) .schedule-table-pane, html:not([data-theme="dark"]) .card, html:not([data-theme="dark"]) .dashboard-card, html:not([data-theme="dark"]) .composer-card, html:not([data-theme="dark"]) .batch-card, html:not([data-theme="dark"]) .overview-card, html:not([data-theme="dark"]) .channel-groups-container, html:not([data-theme="dark"]) .manage-pages-container, html:not([data-theme="dark"]) .tokens-container, html:not([data-theme="dark"]) .admin-card {
  background: #f5f7f7 !important;
  background-color: #f5f7f7 !important;
  border: 1px solid #c9d5d8 !important;
  box-shadow: 0 1px 3px rgba(42, 60, 64, 0.04) !important;
  color: #2a3c40 !important;
  border-radius: 12px !important;
}

/* 6. Bảng danh sách bài viết & Bảng dữ liệu (Tiêu đề bảng: #DFE7E8, Đường viền: #C9D5D8) */
html:not([data-theme="dark"]) .schedule-table-toolbar {
  background: transparent !important;
  border-bottom: none !important;
}html:not([data-theme="dark"]) .schedule-table-heading {
  color: #2a3c40 !important;
}html:not([data-theme="dark"]) .schedule-table, html:not([data-theme="dark"]) .schedule-data-table, html:not([data-theme="dark"]) .batch-matrix-table, html:not([data-theme="dark"]) .table {
  background: #f5f7f7 !important;
  color: #2a3c40 !important;
  border: 1px solid #c9d5d8 !important;
}html:not([data-theme="dark"]) .schedule-table th, html:not([data-theme="dark"]) .schedule-data-table th, html:not([data-theme="dark"]) .batch-matrix-table thead th, html:not([data-theme="dark"]) .table th {
  background: #dfe7e8 !important;
  color: #2a3c40 !important;
  border-bottom: 1px solid #c9d5d8 !important;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}html:not([data-theme="dark"]) .schedule-table td, html:not([data-theme="dark"]) .schedule-data-table td, html:not([data-theme="dark"]) .batch-matrix-table td, html:not([data-theme="dark"]) .table td {
  background: #edf2f1 !important;
  background-color: #edf2f1 !important;
  border-bottom: 1px solid #c9d5d8 !important;
  color: #2a3c40 !important;
}html:not([data-theme="dark"]) .schedule-table tbody tr:hover td, html:not([data-theme="dark"]) .schedule-data-table tbody tr:hover td, html:not([data-theme="dark"]) .batch-matrix-table tbody tr:hover td, html:not([data-theme="dark"]) .table tbody tr:hover td {
  background: #e1ebe7 !important;
  background-color: #e1ebe7 !important;
}html:not([data-theme="dark"]) .schedule-table tbody tr.selected td, html:not([data-theme="dark"]) .schedule-data-table tbody tr.selected td {
  background: #ddede7 !important;
  border-bottom-color: #c9d5d8 !important;
}

/* 7. Accordion chọn Kênh & Bộ lọc danh mục */
html:not([data-theme="dark"]) .schedule-accordion-item {
  background: #f5f7f7 !important;
  border: 1px solid #c9d5d8 !important;
  box-sizing: border-box !important;
  color: #2a3c40 !important;
}html:not([data-theme="dark"]) .schedule-accordion-item.active {
  background: #f5f7f7 !important;
  border-color: #c9d5d8 !important;
  box-shadow: none !important;
}html:not([data-theme="dark"]) .schedule-accordion-item::before, html:not([data-theme="dark"]) .schedule-accordion-item.active::before {
  display: none !important;
  content: none !important;
}html:not([data-theme="dark"]) .schedule-badge-dot {
  background-color: #068567 !important;
  box-shadow: 0 0 8px rgba(6, 133, 103, 0.4) !important;
}

/* 8. Nút bấm chính & Nút phụ: Chuẩn xác theo Brand Teal (#068567) */
html:not([data-theme="dark"]) .btn-primary, html:not([data-theme="dark"]) .batch-submit-btn, html:not([data-theme="dark"]) button.btn-primary, html:not([data-theme="dark"]) .btn-publish-now, html:not([data-theme="dark"]) .btn-batch-publish, html:not([data-theme="dark"]) .btn-batch-top-action.btn-batch-publish, html:not([data-theme="dark"]) #publishBtn, html:not([data-theme="dark"]) #btnPublishBatchNow, html:not([data-theme="dark"]) #btnSaveChannelGroup, html:not([data-theme="dark"]) #btnApplyBatchSelectChannels, html:not([data-theme="dark"]) #btnApplyBatchScheduleTime, html:not([data-theme="dark"]) #btnSaveBulkCommentsModal, html:not([data-theme="dark"]) #btnSystemRefresh, html:not([data-theme="dark"]) .btn-schedule-create-post {
  background: #068567 !important;
  background-color: #068567 !important;
  background-image: none !important;
  border: 1px solid #068567 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(6, 133, 103, 0.25) !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}html:not([data-theme="dark"]) .btn-primary i, html:not([data-theme="dark"]) .batch-submit-btn i, html:not([data-theme="dark"]) button.btn-primary i, html:not([data-theme="dark"]) .btn-publish-now i, html:not([data-theme="dark"]) .btn-batch-publish i, html:not([data-theme="dark"]) #publishBtn i, html:not([data-theme="dark"]) #btnPublishBatchNow i, html:not([data-theme="dark"]) #btnSaveChannelGroup i, html:not([data-theme="dark"]) #btnApplyBatchSelectChannels i, html:not([data-theme="dark"]) #btnApplyBatchScheduleTime i, html:not([data-theme="dark"]) #btnSaveBulkCommentsModal i, html:not([data-theme="dark"]) #btnSystemRefresh i, html:not([data-theme="dark"]) .btn-schedule-create-post i {
  color: #ffffff !important;
}html:not([data-theme="dark"]) .btn-primary span, html:not([data-theme="dark"]) .batch-submit-btn span, html:not([data-theme="dark"]) button.btn-primary span, html:not([data-theme="dark"]) .btn-publish-now span, html:not([data-theme="dark"]) .btn-batch-publish span, html:not([data-theme="dark"]) #publishBtn span, html:not([data-theme="dark"]) #btnPublishBatchNow span, html:not([data-theme="dark"]) #btnSaveChannelGroup span, html:not([data-theme="dark"]) #btnApplyBatchSelectChannels span, html:not([data-theme="dark"]) #btnApplyBatchScheduleTime span, html:not([data-theme="dark"]) #btnSaveBulkCommentsModal span, html:not([data-theme="dark"]) .btn-schedule-create-post span {
  color: #ffffff !important;
  font-weight: 600 !important;
}html:not([data-theme="dark"]) .btn-primary:hover, html:not([data-theme="dark"]) .batch-submit-btn:hover, html:not([data-theme="dark"]) button.btn-primary:hover, html:not([data-theme="dark"]) .btn-publish-now:hover, html:not([data-theme="dark"]) .btn-batch-publish:hover, html:not([data-theme="dark"]) .btn-batch-top-action.btn-batch-publish:hover, html:not([data-theme="dark"]) #publishBtn:hover, html:not([data-theme="dark"]) #btnPublishBatchNow:hover, html:not([data-theme="dark"]) #btnSaveChannelGroup:hover, html:not([data-theme="dark"]) #btnApplyBatchSelectChannels:hover, html:not([data-theme="dark"]) #btnApplyBatchScheduleTime:hover, html:not([data-theme="dark"]) #btnSaveBulkCommentsModal:hover, html:not([data-theme="dark"]) #btnSystemRefresh:hover, html:not([data-theme="dark"]) .btn-schedule-create-post:hover {
  background: #056e55 !important;
  background-color: #056e55 !important;
  border-color: #056e55 !important;
  box-shadow: 0 4px 14px rgba(6, 133, 103, 0.35) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

/* Nút phụ & Nút Icon tiện ích */
html:not([data-theme="dark"]) .btn-secondary, html:not([data-theme="dark"]) .btn-outline, html:not([data-theme="dark"]) button.btn-secondary, html:not([data-theme="dark"]) .channel-btn-icon, html:not([data-theme="dark"]) .channel-collapse-btn, html:not([data-theme="dark"]) .btn-picker-cal-icon, html:not([data-theme="dark"]) #clearComposerBtn, html:not([data-theme="dark"]) #btnCancelEditComposer, html:not([data-theme="dark"]) #btnCancelEditBatch, html:not([data-theme="dark"]) #btnCloseBatchSelectChannelsModal, html:not([data-theme="dark"]) #btnCancelBatchSelectChannels {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #dbe7e5 !important;
  color: #526969 !important;
  border-radius: 8px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}html:not([data-theme="dark"]) .btn-secondary i, html:not([data-theme="dark"]) .btn-secondary span, html:not([data-theme="dark"]) .btn-outline i, html:not([data-theme="dark"]) .btn-outline span, html:not([data-theme="dark"]) button.btn-secondary i, html:not([data-theme="dark"]) button.btn-secondary span, html:not([data-theme="dark"]) .channel-btn-icon i, html:not([data-theme="dark"]) .channel-collapse-btn i, html:not([data-theme="dark"]) #clearComposerBtn i, html:not([data-theme="dark"]) #clearComposerBtn span, html:not([data-theme="dark"]) #btnCancelBatchSelectChannels i, html:not([data-theme="dark"]) #btnCancelBatchSelectChannels span {
  color: #526969 !important;
  transition: color 0.2s ease !important;
}html:not([data-theme="dark"]) .btn-secondary:hover, html:not([data-theme="dark"]) .btn-outline:hover, html:not([data-theme="dark"]) button.btn-secondary:hover, html:not([data-theme="dark"]) .channel-btn-icon:hover, html:not([data-theme="dark"]) .channel-collapse-btn:hover, html:not([data-theme="dark"]) #clearComposerBtn:hover, html:not([data-theme="dark"]) #btnCancelEditComposer:hover, html:not([data-theme="dark"]) #btnCancelEditBatch:hover, html:not([data-theme="dark"]) #btnCancelBatchSelectChannels:hover {
  background: #f1f7f7 !important;
  color: #193333 !important;
  border-color: #cbd5e1 !important;
}html:not([data-theme="dark"]) .btn-secondary:hover i, html:not([data-theme="dark"]) .btn-secondary:hover span, html:not([data-theme="dark"]) .channel-btn-icon:hover i, html:not([data-theme="dark"]) .channel-collapse-btn:hover i, html:not([data-theme="dark"]) #clearComposerBtn:hover i, html:not([data-theme="dark"]) #clearComposerBtn:hover span {
  color: #193333 !important;
}html:not([data-theme="dark"]) .btn-outline-primary {
  background: transparent !important;
  border: 1px solid #068567 !important;
  color: #068567 !important;
  border-radius: 8px !important;
}html:not([data-theme="dark"]) .btn-outline-primary:hover {
  background: #E2F3F0 !important;
  color: #056e55 !important;
  border-color: #068567 !important;
  box-shadow: 0 2px 10px rgba(6, 133, 103, 0.2) !important;
}

/* 9. Trường nhập liệu, Ô tìm kiếm & Selects */
html:not([data-theme="dark"]) input[type="text"], html:not([data-theme="dark"]) input[type="password"], html:not([data-theme="dark"]) input[type="datetime-local"], html:not([data-theme="dark"]) input[type="search"], html:not([data-theme="dark"]) textarea, html:not([data-theme="dark"]) select, html:not([data-theme="dark"]) .form-input, html:not([data-theme="dark"]) .form-select, html:not([data-theme="dark"]) .schedule-channel-search-input, html:not([data-theme="dark"]) .schedule-toolbar-search-input, html:not([data-theme="dark"]) .channel-group-search-input, html:not([data-theme="dark"]) .channel-search-input, html:not([data-theme="dark"]) .batch-row-textarea {
  background-color: #ffffff !important;
  border: 1px solid #dbe7e5 !important;
  color: #193333 !important;
  border-radius: 8px !important;
}html:not([data-theme="dark"]) input::placeholder, html:not([data-theme="dark"]) textarea::placeholder {
  color: #8fa5a5 !important;
}html:not([data-theme="dark"]) input:focus, html:not([data-theme="dark"]) textarea:focus, html:not([data-theme="dark"]) select:focus, html:not([data-theme="dark"]) .schedule-channel-search-input:focus, html:not([data-theme="dark"]) .schedule-toolbar-search-input:focus, html:not([data-theme="dark"]) .channel-group-search-input:focus, html:not([data-theme="dark"]) .channel-search-input:focus, html:not([data-theme="dark"]) .batch-row-textarea:focus {
  background-color: #ffffff !important;
  border-color: #068567 !important;
  box-shadow: 0 0 0 3px rgba(6, 133, 103, 0.15) !important;
  outline: none !important;
}html:not([data-theme="dark"]) select option {
  background-color: #ffffff !important;
  color: #193333 !important;
}html:not([data-theme="dark"]) input[type="checkbox"]:checked, html:not([data-theme="dark"]) input[type="radio"]:checked, html:not([data-theme="dark"]) .schedule-mode-radio:checked, html:not([data-theme="dark"]) .schedule-group-item-checkbox:checked {
  accent-color: #068567 !important;
}

/* 10. Cửa sổ bật lên (Modals & Overlays) */
html:not([data-theme="dark"]) .modal-overlay {
  background: rgba(17, 43, 43, 0.45) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}html:not([data-theme="dark"]) .modal-box, html:not([data-theme="dark"]) .channel-group-modal-box {
  background: #ffffff !important;
  border: 1px solid #c9d5d8 !important;
  box-shadow: 0 24px 60px rgba(17, 43, 43, 0.15) !important;
  color: #193333 !important;
  border-radius: 14px !important;
  overflow: hidden !important;
}html:not([data-theme="dark"]) .modal-header {
  background: #dfe7e8 !important;
  border-bottom: 1px solid #c9d5d8 !important;
  color: #112b2b !important;
  border-top-left-radius: 13px !important;
  border-top-right-radius: 13px !important;
  overflow: hidden !important;
}html:not([data-theme="dark"]) .modal-footer {
  background: #f5f7f7 !important;
  border-top: 1px solid #dfe7e8 !important;
  border-bottom-left-radius: 13px !important;
  border-bottom-right-radius: 13px !important;
}

/* Multi-Channel Post Details Modal Layout */
html:not([data-theme="dark"]) #postDetailsModal .post-details-wide-modal {
  background: #ffffff !important;
  border: 1px solid #dbe7e5 !important;
}html:not([data-theme="dark"]) #postDetailsModal .post-details-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e8f1ef !important;
  color: #193333 !important;
}html:not([data-theme="dark"]) #postDetailsModal .post-details-body {
  background: #f1f7f7 !important;
}html:not([data-theme="dark"]) #postDetailsModal .post-details-channels-sidebar {
  background: #ffffff !important;
  border-right: 1px solid #e8f1ef !important;
}html:not([data-theme="dark"]) #postDetailsModal .post-details-preview-area {
  background: #f1f7f7 !important;
}

/* Post Details Modal - Header Status Badge "Chờ đăng" (Amber warm pill instead of purple) */
#postDetailsModal .badge-status-pill.purple {
  background: #fffbeb !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
}

html[data-theme="dark"] #postDetailsModal .badge-status-pill.purple {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

/* Post Details Modal - Header Button "Đăng tất cả bài ngay" */
#postDetailsModal #btnModalPublishPostNow {
  border: 1.5px solid #068567 !important;
  color: #068567 !important;
  background: #f0fdf9 !important;
  transition: all 0.15s ease !important;
}

#postDetailsModal #btnModalPublishPostNow:hover {
  background: #068567 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] #postDetailsModal #btnModalPublishPostNow {
  border: 1.5px solid #10b981 !important;
  color: #34d399 !important;
  background: rgba(6, 133, 103, 0.15) !important;
}

html[data-theme="dark"] #postDetailsModal #btnModalPublishPostNow:hover {
  background: #068567 !important;
  color: #ffffff !important;
}

/* Post Details Modal - Active Channel Item in Sidebar */
html:not([data-theme="dark"]) #postDetailsModal .post-channel-item.active {
  background: #f0fdf9 !important;
  border-color: #068567 !important;
  box-shadow: 0 1px 4px rgba(6, 133, 103, 0.12) !important;
}

html:not([data-theme="dark"]) #postDetailsModal .post-channel-item.active .post-channel-name {
  color: #068567 !important;
  font-weight: 700 !important;
}

html[data-theme="dark"] #postDetailsModal .post-channel-item.active {
  background: rgba(6, 133, 103, 0.2) !important;
  border-color: #10b981 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] #postDetailsModal .post-channel-item.active .post-channel-name {
  color: #34d399 !important;
  font-weight: 700 !important;
}

/* 12. Huy hiệu, Tags & Chips */
html:not([data-theme="dark"]) .badge-status-pill {
  background: #f1f7f7 !important;
  border: 1px solid #dbe7e5 !important;
  color: #526969 !important;
}html:not([data-theme="dark"]) .badge-status-pill.success {
  background: #E2F3F0 !important;
  border-color: #bbf0e7 !important;
  color: #068567 !important;
}html:not([data-theme="dark"]) .icon-tag-pill.pill-blue, html:not([data-theme="dark"]) .page-tag-pill, html:not([data-theme="dark"]) .badge-blue {
  background-color: #E2F3F0 !important;
  color: #068567 !important;
  border: 1px solid #bbf0e7 !important;
}html:not([data-theme="dark"]) .btn-pagination-num.active, html:not([data-theme="dark"]) .delay-chip.active, html:not([data-theme="dark"]) .badge-delay-active {
  background: #068567 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-color: #068567 !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 8px rgba(6, 133, 103, 0.3) !important;
}

/* 13. Tabs & Phân mục */
html:not([data-theme="dark"]) .nav-tab, html:not([data-theme="dark"]) .composer-tab, html:not([data-theme="dark"]) .tab-btn, html:not([data-theme="dark"]) .batch-subtab, html:not([data-theme="dark"]) .composer-mode-tab {
  transition: color 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}html:not([data-theme="dark"]) .nav-tab:hover, html:not([data-theme="dark"]) .composer-tab:hover, html:not([data-theme="dark"]) .tab-btn:hover, html:not([data-theme="dark"]) .batch-subtab:hover {
  color: #068567 !important;
  border-bottom-color: #068567 !important;
}html:not([data-theme="dark"]) .nav-tab:hover i, html:not([data-theme="dark"]) .composer-tab:hover i, html:not([data-theme="dark"]) .tab-btn:hover i, html:not([data-theme="dark"]) .batch-subtab:hover i {
  color: #068567 !important;
}html:not([data-theme="dark"]) .nav-tab.active, html:not([data-theme="dark"]) .composer-tab.active, html:not([data-theme="dark"]) .tab-btn.active, html:not([data-theme="dark"]) .batch-subtab.active {
  color: #068567 !important;
  border-bottom-color: #068567 !important;
}

/* 14. Scrollbar Light */
html:not([data-theme="dark"]) ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}html:not([data-theme="dark"]) ::-webkit-scrollbar-track {
  background: #f1f7f7;
}html:not([data-theme="dark"]) ::-webkit-scrollbar-thumb {
  background: #dbe7e5;
  border-radius: 4px;
}html:not([data-theme="dark"]) ::-webkit-scrollbar-thumb:hover {
  background: #068567;
}

/* 15. Dashboard Tổng Quan & Thẻ Chỉ Số (Stat Widgets) */
html:not([data-theme="dark"]) .royal-dashboard-container {
  background: transparent !important;
}html:not([data-theme="dark"]) .royal-header-bar, html:not([data-theme="dark"]) .overview-header-bar {
  background: transparent !important;
}html:not([data-theme="dark"]) .overview-page-title, html:not([data-theme="dark"]) .royal-section-title {
  color: #193333 !important;
}html:not([data-theme="dark"]) .overview-subtitle, html:not([data-theme="dark"]) .royal-section-action-hint {
  color: #526969 !important;
}html:not([data-theme="dark"]) .royal-stat-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-top: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
  border-radius: 14px !important;
  position: relative !important;
  overflow: hidden !important;
  padding: 1.25rem 1.25rem 1.15rem !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  height: 222px !important;
  box-sizing: border-box !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease !important;
}

html:not([data-theme="dark"]) .royal-stat-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08) !important;
  border-color: #cbd5e1 !important;
}

/* Bỏ các dải màu trên đỉnh thẻ stat theo yêu cầu */
html:not([data-theme="dark"]) .royal-stat-card::before {
  display: none !important;
  content: none !important;
}

html:not([data-theme="dark"]) .royal-stat-card.sapphire-card,
html:not([data-theme="dark"]) .royal-stat-card.emerald-card,
html:not([data-theme="dark"]) .royal-stat-card.ruby-card,
html:not([data-theme="dark"]) .royal-stat-card.gold-card {
  border: 1px solid #e2e8f0 !important;
  border-top: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
  background: #ffffff !important;
}

html:not([data-theme="dark"]) .royal-stat-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 44px !important;
  margin: 0 0 1rem 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}

/* Badge trạng thái cao cấp, bo góc pill tròn mềm mại kèm chấm phát sáng */
html:not([data-theme="dark"]) .royal-metric-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 28px !important;
  line-height: 1 !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  white-space: nowrap !important;
  padding: 0 0.75rem !important;
  border-radius: 9999px !important;
  box-sizing: border-box !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
}

html:not([data-theme="dark"]) .royal-metric-badge::before {
  content: '' !important;
  display: inline-block !important;
  width: 6.5px !important;
  height: 6.5px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
}

html:not([data-theme="dark"]) .royal-metric-badge.sapphire {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #dbeafe !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08) !important;
}
html:not([data-theme="dark"]) .royal-metric-badge.sapphire::before {
  background: #2563eb !important;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.6) !important;
}

html:not([data-theme="dark"]) .royal-metric-badge.emerald {
  background: #E2F3F0 !important;
  color: #068567 !important;
  border: 1px solid #bbf0e7 !important;
  box-shadow: 0 1px 3px rgba(6, 133, 103, 0.08) !important;
}
html:not([data-theme="dark"]) .royal-metric-badge.emerald::before {
  background: #068567 !important;
  box-shadow: 0 0 6px rgba(6, 133, 103, 0.6) !important;
}

html:not([data-theme="dark"]) .royal-metric-badge.ruby {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fee2e2 !important;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.08) !important;
}
html:not([data-theme="dark"]) .royal-metric-badge.ruby::before {
  background: #dc2626 !important;
  box-shadow: 0 0 6px rgba(220, 38, 38, 0.6) !important;
}

html:not([data-theme="dark"]) .royal-metric-badge.gold {
  background: #fffbeb !important;
  color: #b45309 !important;
  border: 1px solid #fef3c7 !important;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.08) !important;
}
html:not([data-theme="dark"]) .royal-metric-badge.gold::before {
  background: #d97706 !important;
  box-shadow: 0 0 6px rgba(217, 119, 6, 0.6) !important;
}

/* Hộp icon trực quan hàng 1 */
html:not([data-theme="dark"]) .royal-icon-box {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.2rem !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease !important;
}
html:not([data-theme="dark"]) .royal-icon-box.sapphire {
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #dbeafe !important;
}
html:not([data-theme="dark"]) .royal-icon-box.emerald {
  background: #E2F3F0 !important;
  color: #068567 !important;
  border: 1px solid #bbf0e7 !important;
}
html:not([data-theme="dark"]) .royal-icon-box.ruby {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fee2e2 !important;
}
html:not([data-theme="dark"]) .royal-icon-box.gold {
  background: #fffbeb !important;
  color: #d97706 !important;
  border: 1px solid #fef3c7 !important;
}

html:not([data-theme="dark"]) .royal-stat-body {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  flex-shrink: 0 !important;
  margin: 0 0 0.85rem 0 !important;
  padding: 0 !important;
}

html:not([data-theme="dark"]) .royal-stat-value {
  color: #193333 !important;
  font-weight: 800 !important;
  font-size: 2.15rem !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em !important;
  margin: 0 0 0.25rem 0 !important;
  padding: 0 !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
}
html:not([data-theme="dark"]) .royal-stat-value.text-emerald {
  color: #068567 !important;
}
html:not([data-theme="dark"]) .royal-stat-value.text-ruby {
  color: #dc2626 !important;
}
html:not([data-theme="dark"]) .royal-stat-value.text-gold {
  color: #d97706 !important;
}

html:not([data-theme="dark"]) .royal-stat-label {
  color: #526969 !important;
  font-weight: 500 !important;
  font-size: 0.82rem !important;
  line-height: 1.25 !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 18px !important;
  display: flex !important;
  align-items: center !important;
}

html:not([data-theme="dark"]) .royal-stat-footer {
  margin-top: auto !important;
  height: 38px !important;
  display: flex !important;
  align-items: center !important;
  border-top: 1px solid #e8f1ef !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
html:not([data-theme="dark"]) .royal-subtext {
  color: #526969 !important;
  font-size: 0.73rem !important;
  line-height: 1.3 !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
html:not([data-theme="dark"]) .royal-stat-footer .royal-gold-progress-track {
  width: 100% !important;
  height: 7px !important;
  margin: 0 !important;
}
html:not([data-theme="dark"]) .royal-section-wrap {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Card tính năng hàng 2 (Tài sản Fanpage, Token xoay vòng, Kho lịch đăng) */
html:not([data-theme="dark"]) .royal-chart-card,
html:not([data-theme="dark"]) .royal-table-card,
html:not([data-theme="dark"]) .royal-feature-card,
html:not([data-theme="dark"]) .royal-content-box {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
  color: #193333 !important;
  border-radius: 14px !important;
}

html:not([data-theme="dark"]) .royal-feature-card {
  padding: 1.25rem 1.35rem 1.15rem !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 1.1rem !important;
  position: relative !important;
  overflow: hidden !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease !important;
}

html:not([data-theme="dark"]) .royal-feature-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08) !important;
  border-color: #cbd5e1 !important;
}

html:not([data-theme="dark"]) .royal-feature-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: transparent !important;
  border-bottom: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

html:not([data-theme="dark"]) .royal-feature-title,
html:not([data-theme="dark"]) .royal-box-title {
  color: #193333 !important;
  font-weight: 700 !important;
}

html:not([data-theme="dark"]) .royal-feature-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  font-size: 0.95rem !important;
  letter-spacing: -0.01em !important;
}

/* Icon squircle sang trọng cho tiêu đề card hàng 2 */
.feature-title-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.feature-title-icon.blue {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
}

.feature-title-icon.emerald {
  background: #E2F3F0;
  color: #068567;
  border: 1px solid #bbf0e7;
  box-shadow: 0 2px 6px rgba(6, 133, 103, 0.08);
}

.feature-title-icon.gold {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fef3c7;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.08);
}

.feature-title-icon.purple {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ede9fe;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.08);
}

html:not([data-theme="dark"]) .royal-mini-stats-row {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 0.5rem !important;
  background: #f8fafc !important;
  background-color: #f8fafc !important;
  border: 1px solid #edf2f7 !important;
  border-radius: 10px !important;
  padding: 0.85rem 0.5rem !important;
  align-items: center !important;
  text-align: center !important;
}

html:not([data-theme="dark"]) .royal-mini-stat {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 3px !important;
}

html:not([data-theme="dark"]) .mini-stat-num {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em !important;
  color: #193333 !important;
}

html:not([data-theme="dark"]) .mini-stat-num.text-green {
  color: #068567 !important;
}

html:not([data-theme="dark"]) .mini-stat-num.text-purple {
  color: #7c3aed !important;
}

html:not([data-theme="dark"]) .mini-stat-num.text-gold {
  color: #d97706 !important;
}

html:not([data-theme="dark"]) .mini-stat-num.text-blue {
  color: #2563eb !important;
}

html:not([data-theme="dark"]) .mini-stat-desc,
html:not([data-theme="dark"]) .royal-feature-note {
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  color: #64748b !important;
  white-space: nowrap !important;
}

html:not([data-theme="dark"]) .btn-royal-link {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #068567 !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  padding: 0.32rem 0.75rem !important;
  border-radius: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

html:not([data-theme="dark"]) .btn-royal-link:hover {
  background: #E2F3F0 !important;
  color: #068567 !important;
  border-color: #068567 !important;
  transform: translateX(2px) !important;
  box-shadow: 0 2px 8px rgba(6, 133, 103, 0.15) !important;
}
html:not([data-theme="dark"]) .royal-box-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: transparent !important;
  background-color: transparent !important;
  border-bottom: 1px solid #e8f1ef !important;
  padding: 0 0 0.85rem 0 !important;
  margin: 0 0 1.15rem 0 !important;
}

html:not([data-theme="dark"]) .royal-box-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #193333 !important;
  letter-spacing: -0.01em !important;
  margin: 0 !important;
}

html:not([data-theme="dark"]) .royal-box-tag {
  display: inline-flex !important;
  align-items: center !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #526969 !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  padding: 0.28rem 0.75rem !important;
  border-radius: 9999px !important;
  line-height: 1.2 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

html:not([data-theme="dark"]) .royal-box-tag.live-tag {
  background: #E2F3F0 !important;
  color: #068567 !important;
  border: 1px solid #bbf0e7 !important;
  gap: 6px !important;
}

html:not([data-theme="dark"]) .royal-box-tag.live-tag::before {
  content: '' !important;
  display: inline-block !important;
  width: 6.5px !important;
  height: 6.5px !important;
  border-radius: 50% !important;
  background: #068567 !important;
  box-shadow: 0 0 6px rgba(6, 133, 103, 0.6) !important;
  animation: liveDotPulse 2s infinite ease-in-out !important;
}

@keyframes liveDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

html:not([data-theme="dark"]) .breakdown-name {
  color: #193333 !important;
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  line-height: 1.4 !important;
}

html:not([data-theme="dark"]) .breakdown-count {
  color: #193333 !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  line-height: 1.4 !important;
}

html:not([data-theme="dark"]) .royal-breakdown-track {
  background: #f1f7f7 !important;
  border: 1px solid #dbe7e5 !important;
  border-radius: 8px !important;
}html:not([data-theme="dark"]) .royal-activity-item {
  background: #f8fafc !important;
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #111827 !important;
  border-radius: 8px !important;
}html:not([data-theme="dark"]) .royal-activity-item:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}html:not([data-theme="dark"]) .royal-activity-page {
  color: #111827 !important;
}html:not([data-theme="dark"]) .royal-activity-msg {
  color: #475569 !important;
}html:not([data-theme="dark"]) .royal-activity-time {
  color: #64748b !important;
}html:not([data-theme="dark"]) .royal-activity-empty {
  color: #64748b !important;
  font-weight: 500 !important;
}

/* Card Header (Soạn bài & Xem trước bài đăng) */
html:not([data-theme="dark"]) .composer-card .card-header,
html:not([data-theme="dark"]) .preview-card .card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
  background: transparent !important;
  background-color: transparent !important;
  border-bottom: 1px solid #e8f1ef !important;
  padding: 0 0 0.85rem 0 !important;
  margin: 0 0 1.25rem 0 !important;
  min-height: 46px !important;
}

html:not([data-theme="dark"]) .composer-header-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

html:not([data-theme="dark"]) .composer-card .card-title,
html:not([data-theme="dark"]) .preview-card .card-title {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: #193333 !important;
  letter-spacing: -0.01em !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
}

html:not([data-theme="dark"]) .header-badges-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  flex-wrap: nowrap !important;
  justify-content: flex-end !important;
  flex-shrink: 0 !important;
}

html:not([data-theme="dark"]) #selectedPageBadge {
  display: inline-flex !important;
  align-items: center !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #526969 !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  padding: 0.32rem 0.85rem !important;
  border-radius: 9999px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

html:not([data-theme="dark"]) #tokenRotationBadge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: #eff6ff !important;
  border: 1px solid #dbeafe !important;
  color: #2563eb !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  padding: 0.32rem 0.75rem !important;
  border-radius: 9999px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

html:not([data-theme="dark"]) .btn-reroll-spin {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: #E2F3F0 !important;
  border: 1px solid #bbf0e7 !important;
  color: #068567 !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  padding: 0.32rem 0.85rem !important;
  border-radius: 9999px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}
html:not([data-theme="dark"]) .btn-reroll-spin:hover {
  background: #068567 !important;
  color: #ffffff !important;
}

/* 16. Banner Thông Báo (Harmonized Alerts) */
html:not([data-theme="dark"]) .alert-warning,
html:not([data-theme="dark"]) .alert-banner.warning,
html:not([data-theme="dark"]) .alert-banner-warning {
  background: #fffbeb !important;
  border: 1px solid #fde68a !important;
  color: #92400e !important;
  border-radius: 10px !important;
}
html:not([data-theme="dark"]) .alert-warning .alert-icon,
html:not([data-theme="dark"]) .alert-banner.warning .alert-icon {
  color: #d97706 !important;
}

html:not([data-theme="dark"]) .alert-info,
html:not([data-theme="dark"]) .alert-banner.info,
html:not([data-theme="dark"]) #composerEditingBanner,
html:not([data-theme="dark"]) #batchEditingBanner {
  background: #ddede7 !important;
  border: 1px solid #bbf0e7 !important;
  color: #068567 !important;
  border-radius: 10px !important;
}
html:not([data-theme="dark"]) .alert-info .alert-icon,
html:not([data-theme="dark"]) .alert-banner.info .alert-icon {
  color: #068567 !important;
}

html:not([data-theme="dark"]) .alert-danger,
html:not([data-theme="dark"]) .alert-banner.danger,
html:not([data-theme="dark"]) .alert-banner.error {
  background: #fef2f2 !important;
  border: 1px solid #fecdd3 !important;
  color: #991b1b !important;
  border-radius: 10px !important;
}
html:not([data-theme="dark"]) .alert-danger .alert-icon,
html:not([data-theme="dark"]) .alert-banner.danger .alert-icon {
  color: #dc2626 !important;
}

html:not([data-theme="dark"]) .alert-success,
html:not([data-theme="dark"]) .alert-banner.success {
  background: #ddede7 !important;
  border: 1px solid #bbf0e7 !important;
  color: #068567 !important;
  border-radius: 10px !important;
}
html:not([data-theme="dark"]) .alert-success .alert-icon,
html:not([data-theme="dark"]) .alert-banner.success .alert-icon {
  color: #068567 !important;
}

/* 17. Hộp thoại Thông Báo & Xác Nhận Hệ Thống (Phối màu chuẩn Theme Pearl & Forest Emerald) */
html:not([data-theme="dark"]) .modal-app-confirm-box,
html:not([data-theme="dark"]) #modalAppConfirm .modal-box {
  max-width: 460px !important;
  width: 92% !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #c9d5d8 !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 45px -10px rgba(17, 43, 43, 0.2), 0 0 0 1px rgba(6, 133, 103, 0.08) !important;
  color: #2a3c40 !important;
  overflow: hidden !important;
}
html:not([data-theme="dark"]) #modalAppConfirm .app-confirm-body {
  padding: 2rem 1.75rem 1.5rem 1.75rem !important;
  text-align: center !important;
  background: #ffffff !important;
}
html:not([data-theme="dark"]) #modalAppConfirm #appConfirmTitle {
  color: #112b2b !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  margin: 0 0 0.75rem 0 !important;
  letter-spacing: -0.01em !important;
  text-shadow: none !important;
}
html:not([data-theme="dark"]) #modalAppConfirm #appConfirmMessage {
  color: #596c72 !important;
  font-size: 0.96rem !important;
  line-height: 1.65 !important;
  font-weight: 450 !important;
  white-space: pre-line !important;
  word-break: break-word !important;
  text-shadow: none !important;
}
html:not([data-theme="dark"]) #modalAppConfirm #appConfirmFooter {
  background: #f5f7f7 !important;
  border-top: 1px solid #dfe7e8 !important;
  padding: 1rem 1.5rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.85rem !important;
}
html:not([data-theme="dark"]) #modalAppConfirm #btnAppConfirmCancel {
  background: #ffffff !important;
  color: #596c72 !important;
  border: 1px solid #c9d5d8 !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  padding: 0.6rem 1.35rem !important;
  min-width: 110px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.18s ease !important;
}
html:not([data-theme="dark"]) #modalAppConfirm #btnAppConfirmCancel:hover {
  background: #edf2f1 !important;
  color: #2a3c40 !important;
  border-color: #b5c4c8 !important;
  transform: translateY(-1px) !important;
}
html:not([data-theme="dark"]) #modalAppConfirm #btnAppConfirmOk {
  background: #068567 !important;
  border: 1px solid #056e55 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  padding: 0.6rem 1.5rem !important;
  min-width: 115px !important;
  box-shadow: 0 4px 14px rgba(6, 133, 103, 0.28) !important;
  transition: all 0.18s ease !important;
}
html:not([data-theme="dark"]) #modalAppConfirm #btnAppConfirmOk:hover {
  background: #056e55 !important;
  border-color: #034e46 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(6, 133, 103, 0.38) !important;
}

/* Dark Theme Support for System Dialogs */
html[data-theme="dark"] .modal-app-confirm-box,
html[data-theme="dark"] #modalAppConfirm .modal-box {
  background: #112b2b !important;
  background-color: #112b2b !important;
  border: 1px solid #1a3a3a !important;
  color: #f1f5f9 !important;
}
html[data-theme="dark"] #modalAppConfirm .app-confirm-body {
  background: #112b2b !important;
}
html[data-theme="dark"] #modalAppConfirm #appConfirmTitle {
  color: #f1f5f9 !important;
}
html[data-theme="dark"] #modalAppConfirm #appConfirmMessage {
  color: #94a3b8 !important;
}
html[data-theme="dark"] #modalAppConfirm #appConfirmFooter {
  background: #0d2222 !important;
  border-top: 1px solid #1a3a3a !important;
}
html[data-theme="dark"] #modalAppConfirm #btnAppConfirmCancel {
  background: #1a3a3a !important;
  color: #e2e8f0 !important;
  border: 1px solid #234d4d !important;
}
html[data-theme="dark"] #modalAppConfirm #btnAppConfirmCancel:hover {
  background: #234d4d !important;
  color: #ffffff !important;
}

/* Modal Xác nhận xóa hàng loạt & Xóa bình luận Fanpage (Phối màu chuẩn Theme) */
html:not([data-theme="dark"]) #modalBulkDeleteQueue .modal-box,
html:not([data-theme="dark"]) #modalDeletePostedComment .modal-box {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #c9d5d8 !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 45px -10px rgba(17, 43, 43, 0.2), 0 0 0 1px rgba(6, 133, 103, 0.08) !important;
  color: #2a3c40 !important;
  overflow: hidden !important;
}
html:not([data-theme="dark"]) #modalBulkDeleteQueue .modal-header,
html:not([data-theme="dark"]) #modalDeletePostedComment .modal-header {
  background: #f5f7f7 !important;
  border-bottom: 1px solid #dfe7e8 !important;
  color: #112b2b !important;
}
html:not([data-theme="dark"]) #modalBulkDeleteQueue .modal-header h3,
html:not([data-theme="dark"]) #modalDeletePostedComment .modal-header h3 {
  color: #112b2b !important;
}
html:not([data-theme="dark"]) #modalBulkDeleteQueue .modal-body,
html:not([data-theme="dark"]) #modalDeletePostedComment .modal-body {
  background: #ffffff !important;
  color: #2a3c40 !important;
}
html:not([data-theme="dark"]) #modalBulkDeleteQueue .modal-footer,
html:not([data-theme="dark"]) #modalDeletePostedComment .modal-footer {
  background: #f5f7f7 !important;
  border-top: 1px solid #dfe7e8 !important;
}
html:not([data-theme="dark"]) #labelOptionToolOnly,
html:not([data-theme="dark"]) #labelOptionToolAndFacebook,
html:not([data-theme="dark"]) #labelCommentDeleteToolOnly,
html:not([data-theme="dark"]) #labelCommentDeleteToolAndFacebook {
  background: #edf2f1 !important;
  border: 1px solid #c9d5d8 !important;
  color: #2a3c40 !important;
}
html:not([data-theme="dark"]) #labelOptionToolOnly:hover,
html:not([data-theme="dark"]) #labelOptionToolAndFacebook:hover,
html:not([data-theme="dark"]) #labelCommentDeleteToolOnly:hover,
html:not([data-theme="dark"]) #labelCommentDeleteToolAndFacebook:hover {
  background: #ddede7 !important;
  border-color: #068567 !important;
  color: #068567 !important;
}
html:not([data-theme="dark"]) #deleteCommentPreviewBox,
html:not([data-theme="dark"]) #bulkDeleteSummaryBox {
  background: #f5f7f7 !important;
  border: 1px solid #dfe7e8 !important;
  color: #2a3c40 !important;
}
html:not([data-theme="dark"]) .restore-mode-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #112b2b !important;
}


/* ==========================================================================
   18. KHU VỰC CHỌN KÊNH & NÚT BẤM (BANKCO CHANNEL PICKER & ACTION TOOLBAR)
   ========================================================================== */



/* --- A. THANH BÊN CHỌN KÊNH (SINGLE COMPOSER CHANNEL SIDEBAR) --- */

html:not([data-theme="dark"]) .composer-channel-sidebar, html:not([data-theme="dark"]) .channel-sidebar, html:not([data-theme="dark"]) #channelSidebar {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #edf2f7 !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

html:not([data-theme="dark"]) .channel-sidebar-header {
  background: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

html:not([data-theme="dark"]) .channel-title-text {
  color: #111827 !important;
  font-weight: 700 !important;
}

html:not([data-theme="dark"]) .channel-count-badge {
  color: #6b7280 !important;
  font-weight: 600 !important;
}

/* Khung chọn Page / Nhóm Page liền mạch, bo góc đồng nhất 8px (Giao diện Sáng) */
html:not([data-theme="dark"]) .batch-matrix-table .batch-channel-cell {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  overflow: visible !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

html:not([data-theme="dark"]) .batch-matrix-table .batch-channel-cell:focus-within,
html:not([data-theme="dark"]) .batch-matrix-table .batch-channel-cell:has(.batch-search-dropdown-menu:not(.hidden)) {
  border-color: #068567 !important;
  box-shadow: 0 0 0 2px rgba(6, 133, 103, 0.15) !important;
  z-index: 1000 !important;
}

html:not([data-theme="dark"]) .batch-channel-mode-row,
html:not([data-theme="dark"]) .batch-matrix-table .batch-channel-mode-row {
  background: #f8fafc !important;
  border: none !important;
  border-bottom: 1px solid #e2e8f0 !important;
  border-top-left-radius: 7px !important;
  border-top-right-radius: 7px !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  padding: 7px 12px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  transition: background-color 0.25s ease, border-color 0.25s ease !important;
}

html:not([data-theme="dark"]) .batch-mode-radio-label {
  color: #526969 !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: color 0.15s ease !important;
}

html:not([data-theme="dark"]) .batch-mode-radio-label:hover {
  color: #193333 !important;
}

html:not([data-theme="dark"]) .batch-mode-radio-label input[type="radio"] {
  accent-color: #068567 !important;
}

html:not([data-theme="dark"]) .batch-mode-radio-label input[type="radio"]:checked + span,
html:not([data-theme="dark"]) .batch-mode-radio-label input[type="radio"]:checked ~ span {
  color: #068567 !important;
  font-weight: 600 !important;
}

/* Dropdown box trong bảng ma trận Đăng hàng loạt (bo góc dưới mượt mà, không bị góc vuông) */
html:not([data-theme="dark"]) .batch-matrix-table .batch-groups-box,
html:not([data-theme="dark"]) .batch-matrix-table .batch-channels-box {
  background: transparent !important;
  border: none !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: 7px !important;
  border-bottom-right-radius: 7px !important;
  box-shadow: none !important;
  padding: 4px 28px 4px 10px !important;
  min-height: 38px !important;
  color: #193333 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  position: relative !important;
  cursor: pointer !important;
  transition: background-color 0.25s ease, color 0.25s ease !important;
}

html:not([data-theme="dark"]) .batch-matrix-table .batch-groups-box:focus-within,
html:not([data-theme="dark"]) .batch-matrix-table .batch-channels-box:focus-within,
html:not([data-theme="dark"]) .batch-matrix-table .batch-groups-box.active,
html:not([data-theme="dark"]) .batch-matrix-table .batch-channels-box.active {
  border: none !important;
  box-shadow: none !important;
}

html:not([data-theme="dark"]) .batch-matrix-table .batch-channel-cell:has(.batch-page-pills-container) .batch-groups-box,
html:not([data-theme="dark"]) .batch-matrix-table .batch-channel-cell:has(.batch-page-pills-container) .batch-channels-box {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* Container chứa danh sách pills Fanpage con trong bảng ma trận (bo góc dưới đáy thẻ liền mạch) */
html:not([data-theme="dark"]) .batch-matrix-table .batch-page-pills-container {
  background: #f8fafc !important;
  border: none !important;
  border-top: 1px solid #e2e8f0 !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: 7px !important;
  border-bottom-right-radius: 7px !important;
  margin-top: 0 !important;
  padding: 6px 10px !important;
  color: #193333 !important;
  box-shadow: none !important;
}

/* Ô chọn trong phần Đăng thường (Single Composer) độc lập, bo góc 8px đồng nhất */
html:not([data-theme="dark"]) #singleGroupsBox,
html:not([data-theme="dark"]) #singleChannelsBox {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  color: #193333 !important;
  transition: all 0.2s ease !important;
}

html:not([data-theme="dark"]) #singleGroupsBox:focus-within,
html:not([data-theme="dark"]) #singleChannelsBox:focus-within,
html:not([data-theme="dark"]) #singleGroupsBox.active,
html:not([data-theme="dark"]) #singleChannelsBox.active {
  background: #ffffff !important;
  border-color: #068567 !important;
  box-shadow: 0 0 0 2px rgba(6, 133, 103, 0.15) !important;
}

html:not([data-theme="dark"]) #singleGroupPillsContainer {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
}

/* Đảm bảo tuyệt đối các ô tìm kiếm inline trong khung chọn Page/Nhóm Page (Light mode) không bị dính viền, bo góc hay bóng từ input chung */
html:not([data-theme="dark"]) .batch-channels-box input.batch-channel-inline-search,
html:not([data-theme="dark"]) .batch-groups-box input.batch-group-inline-search,
html:not([data-theme="dark"]) input.batch-channel-inline-search,
html:not([data-theme="dark"]) input.batch-group-inline-search,
html:not([data-theme="dark"]) input#singleChannelInlineSearch,
html:not([data-theme="dark"]) input#singleGroupInlineSearch,
.batch-channels-box input.batch-channel-inline-search,
.batch-groups-box input.batch-group-inline-search,
input.batch-channel-inline-search,
input.batch-group-inline-search,
input#singleChannelInlineSearch,
input#singleGroupInlineSearch {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  color: #193333 !important;
  padding: 0 4px !important;
  margin: 0 !important;
  height: 26px !important;
  line-height: 26px !important;
  font-size: 0.85rem !important;
  min-width: 65px !important;
  flex: 1 !important;
}

html:not([data-theme="dark"]) .batch-channels-box input.batch-channel-inline-search:focus,
html:not([data-theme="dark"]) .batch-groups-box input.batch-group-inline-search:focus,
html:not([data-theme="dark"]) input.batch-channel-inline-search:focus,
html:not([data-theme="dark"]) input.batch-group-inline-search:focus,
html:not([data-theme="dark"]) input#singleChannelInlineSearch:focus,
html:not([data-theme="dark"]) input#singleGroupInlineSearch:focus,
.batch-channels-box input.batch-channel-inline-search:focus,
.batch-groups-box input.batch-group-inline-search:focus,
input.batch-channel-inline-search:focus,
input.batch-group-inline-search:focus,
input#singleChannelInlineSearch:focus,
input#singleGroupInlineSearch:focus {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

html:not([data-theme="dark"]) .batch-group-inline-search::placeholder,
html:not([data-theme="dark"]) .batch-channel-inline-search::placeholder,
html:not([data-theme="dark"]) #singleGroupInlineSearch::placeholder,
html:not([data-theme="dark"]) #singleChannelInlineSearch::placeholder {
  color: #526969 !important;
}

/* Tag và Pill trong ô chọn Page / Nhóm Page (Light mode) chuẩn bo góc & màu sắc liền mạch */
html:not([data-theme="dark"]) .batch-group-selected-tag {
  background: #E2F3F0 !important;
  border: 1px solid #bbf0e7 !important;
  border-radius: 6px !important;
  color: #068567 !important;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease !important;
}

html:not([data-theme="dark"]) .batch-group-selected-tag .batch-group-tag-label {
  color: #068567 !important;
  font-weight: 600 !important;
  transition: color 0.25s ease !important;
}

html:not([data-theme="dark"]) .batch-group-tag-remove {
  color: #068567 !important;
  opacity: 0.7 !important;
  transition: color 0.15s ease, opacity 0.15s ease !important;
}

html:not([data-theme="dark"]) .batch-group-tag-remove:hover {
  color: #ef4444 !important;
  opacity: 1 !important;
}

html:not([data-theme="dark"]) .batch-channel-box-tag {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  color: #193333 !important;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease !important;
}

html:not([data-theme="dark"]) .batch-channel-box-tag .batch-tag-name {
  color: #193333 !important;
  font-weight: 500 !important;
  transition: color 0.25s ease !important;
}

html:not([data-theme="dark"]) .batch-channel-box-tag .pill-fb-icon,
html:not([data-theme="dark"]) .batch-page-pill .pill-fb-icon {
  color: #068567 !important;
}

html:not([data-theme="dark"]) .batch-page-pill {
  background: #E2F3F0 !important;
  border: 1px solid #bbf0e7 !important;
  border-radius: 9999px !important;
  color: #068567 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

html:not([data-theme="dark"]) .batch-page-pill:hover {
  background: #d4ede8 !important;
  border-color: #068567 !important;
}

html:not([data-theme="dark"]) .batch-page-pill.excluded {
  background: #f1f5f9 !important;
  border: 1px dashed #cbd5e1 !important;
  color: #526969 !important;
}

html:not([data-theme="dark"]) .batch-group-chevron,
html:not([data-theme="dark"]) #singleGroupChevron,
html:not([data-theme="dark"]) .batch-search-icon,
html:not([data-theme="dark"]) #singleChannelSearchIcon {
  color: #526969 !important;
}

html:not([data-theme="dark"]) .batch-search-dropdown-menu,
html:not([data-theme="dark"]) .batch-group-dropdown-menu,
html:not([data-theme="dark"]) .batch-channel-dropdown-menu {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  z-index: 99999 !important;
}

html:not([data-theme="dark"]) .batch-search-dropdown-item,
html:not([data-theme="dark"]) .batch-group-dropdown-item,
html:not([data-theme="dark"]) .batch-channel-dropdown-item,
html:not([data-theme="dark"]) .batch-dropdown-group-item {
  color: #193333 !important;
  transition: background-color 0.15s ease, color 0.15s ease !important;
}

html:not([data-theme="dark"]) .batch-search-dropdown-item:hover,
html:not([data-theme="dark"]) .batch-group-dropdown-item:hover,
html:not([data-theme="dark"]) .batch-channel-dropdown-item:hover,
html:not([data-theme="dark"]) .batch-dropdown-group-item:hover {
  background: #f0fdf4 !important;
  color: #068567 !important;
}

html:not([data-theme="dark"]) .batch-search-dropdown-item.selected,
html:not([data-theme="dark"]) .batch-group-dropdown-item.selected,
html:not([data-theme="dark"]) .batch-channel-dropdown-item.selected,
html:not([data-theme="dark"]) .batch-dropdown-group-item.selected {
  background: #E2F3F0 !important;
  color: #068567 !important;
  font-weight: 600 !important;
}

html:not([data-theme="dark"]) .batch-page-pill .pill-name {
  color: #068567 !important;
}

html:not([data-theme="dark"]) .batch-page-pill .pill-remove-btn {
  color: #526969 !important;
}

html:not([data-theme="dark"]) .batch-page-pill .pill-remove-btn:hover {
  color: #ef4444 !important;
}

html:not([data-theme="dark"]) .batch-page-pills-container .batch-page-pills-list.collapsed {
  max-height: 82px !important;
  overflow: hidden !important;
}

html:not([data-theme="dark"]) .batch-page-pills-container .batch-page-pills-list.expanded {
  max-height: 400px !important;
  overflow-y: auto !important;
}

html:not([data-theme="dark"]) .btn-toggle-expand-pills {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  color: #193333 !important;
  padding: 3px 6px !important;
  font-size: 0.75rem !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
  flex-shrink: 0 !important;
  align-self: flex-start !important;
}

html:not([data-theme="dark"]) .btn-toggle-expand-pills:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

html:not([data-theme="dark"]) .channel-search-row {
  background: transparent !important;
}

html:not([data-theme="dark"]) .channel-group-accordion-header {
  background: #f8fafc !important;
  border-top: 1px solid #edf2f7 !important;
  border-bottom: 1px solid #edf2f7 !important;
}

html:not([data-theme="dark"]) .channel-group-name {
  color: #193333 !important;
  font-weight: 700 !important;
}

html:not([data-theme="dark"]) .channel-group-badge {
  background: #E2F3F0 !important;
  color: #068567 !important;
  font-weight: 700 !important;
  border: 1px solid #bbf0e7 !important;
}

html:not([data-theme="dark"]) .channel-custom-checkbox {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 5px !important;
  transition: all 0.15s ease !important;
}

html:not([data-theme="dark"]) .channel-custom-checkbox-wrap:hover .channel-custom-checkbox {
  border-color: #068567 !important;
}

html:not([data-theme="dark"]) .channel-custom-checkbox-wrap input[type="checkbox"]:checked + .channel-custom-checkbox {
  background: #068567 !important;
  border-color: #068567 !important;
}

html:not([data-theme="dark"]) .channel-custom-checkbox-wrap input[type="checkbox"]:checked + .channel-custom-checkbox::after {
  border-color: #ffffff !important;
}

html:not([data-theme="dark"]) .channel-items-list {
  background: transparent !important;
}

html:not([data-theme="dark"]) .channel-item-row {
  border-radius: 10px !important;
  transition: background 0.15s ease, border-color 0.15s ease !important;
  border: 1px solid transparent !important;
}

html:not([data-theme="dark"]) .channel-item-row:hover {
  background: #f8fafc !important;
}

html:not([data-theme="dark"]) .channel-item-row.selected {
  background: #E2F3F0 !important;
  border: 1px solid #bbf0e7 !important;
}

html:not([data-theme="dark"]) .channel-item-name {
  color: #111827 !important;
  font-weight: 600 !important;
}

html:not([data-theme="dark"]) .channel-item-sub {
  color: #6b7280 !important;
}

html:not([data-theme="dark"]) .channel-avatar-img {
  border: 1px solid #edf2f7 !important;
}



/* --- B. KHU VỰC CHỌN KÊNH TRONG LỊCH ĐĂNG (SCHEDULE CHANNEL FILTER) --- */

html:not([data-theme="dark"]) .schedule-filter-box, html:not([data-theme="dark"]) .schedule-channels-col {
  background: #ffffff !important;
  border: 1px solid #edf2f7 !important;
  border-radius: 16px !important;
}

html:not([data-theme="dark"]) .schedule-channel-mode-row {
  background: #f8fafc !important;
  border-bottom: 1px solid #edf2f7 !important;
}

html:not([data-theme="dark"]) .schedule-mode-label {
  color: #6b7280 !important;
}

html:not([data-theme="dark"]) .schedule-mode-label:hover {
  color: #111827 !important;
}

html:not([data-theme="dark"]) .schedule-mode-radio:checked + span {
  color: #068567 !important;
  font-weight: 600 !important;
}

html:not([data-theme="dark"]) .schedule-channel-cat-title {
  color: #193333 !important;
  font-weight: 700 !important;
}

html:not([data-theme="dark"]) .schedule-channel-items-container {
  background: transparent !important;
}

html:not([data-theme="dark"]) .schedule-channel-item-row {
  border-radius: 8px !important;
  border: 1px solid transparent !important;
}

html:not([data-theme="dark"]) .schedule-channel-item-row:hover {
  background: #f8fafc !important;
}

html:not([data-theme="dark"]) .schedule-channel-item-row.selected {
  background: #E2F3F0 !important;
  border-color: #bbf0e7 !important;
}

html:not([data-theme="dark"]) .schedule-channel-name {
  color: #193333 !important;
}

html:not([data-theme="dark"]) .schedule-channel-item-sub, html:not([data-theme="dark"]) .schedule-channel-likes {
  color: #526969 !important;
}



/* --- C. MODAL CHỌN KÊNH ĐĂNG HÀNG LOẠT (#modalBatchSelectChannels) --- */

html:not([data-theme="dark"]) #modalBatchSelectChannels .modal-box {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #193333 !important;
  border-radius: 12px !important;
}

html:not([data-theme="dark"]) #modalBatchSelectChannels .modal-header {
  background: #ffffff !important;
  border-bottom: 1px solid #edf2f7 !important;
}

html:not([data-theme="dark"]) #modalBatchSelectChannels .modal-header h3 {
  color: #193333 !important;
  font-weight: 700 !important;
}

html:not([data-theme="dark"]) #modalBatchSelectChannels .modal-header .text-primary {
  color: #068567 !important;
}

html:not([data-theme="dark"]) #modalBatchSelectChannels .modal-body {
  background: #f8fafc !important;
}

html:not([data-theme="dark"]) #modalBatchSelectChannels .batch-channel-modal-tabs {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 4px !important;
  display: flex !important;
  gap: 6px !important;
}

html:not([data-theme="dark"]) #modalBatchSelectChannels .batch-channel-modal-tab {
  color: #526969 !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

html:not([data-theme="dark"]) #modalBatchSelectChannels .batch-channel-modal-tab:hover {
  color: #193333 !important;
}

html:not([data-theme="dark"]) #modalBatchSelectChannels .batch-channel-modal-tab.active {
  background: #ffffff !important;
  color: #068567 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

html:not([data-theme="dark"]) #modalBatchSelectChannels .batch-modal-group-item, html:not([data-theme="dark"]) #modalBatchSelectChannels .batch-modal-channel-item {
  background: #ffffff !important;
  border: 1px solid #edf2f7 !important;
  border-radius: 10px !important;
  color: #193333 !important;
  transition: all 0.15s ease !important;
}

html:not([data-theme="dark"]) #modalBatchSelectChannels .batch-modal-group-item:hover, html:not([data-theme="dark"]) #modalBatchSelectChannels .batch-modal-channel-item:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

html:not([data-theme="dark"]) #modalBatchSelectChannels .batch-modal-group-item.selected, html:not([data-theme="dark"]) #modalBatchSelectChannels .batch-modal-channel-item.selected {
  background: #E2F3F0 !important;
  border-color: #068567 !important;
}

html:not([data-theme="dark"]) #modalBatchSelectChannels .modal-footer {
  background: #ffffff !important;
  border-top: 1px solid #edf2f7 !important;
}



/* --- D. THANH CÔNG CỤ & CÁC NÚT BẤM TOPBAR BATCH COMPOSER (BankCo Green Border Style) --- */

html:not([data-theme="dark"]) .batch-quick-btn {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #dbe7e5 !important;
  color: #193333 !important;
  border-radius: 10px !important;
  width: 38px !important;
  height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  cursor: pointer !important;
}

html:not([data-theme="dark"]) .batch-quick-btn i {
  color: #193333 !important;
  font-size: 0.95rem !important;
  line-height: 1 !important;
  transition: color 0.15s ease, transform 0.15s ease !important;
}

html:not([data-theme="dark"]) .batch-quick-btn:hover {
  background: #E2F3F0 !important;
  background-color: #E2F3F0 !important;
  border-color: #068567 !important;
  color: #068567 !important;
  box-shadow: 0 3px 10px rgba(6, 133, 103, 0.2) !important;
  transform: translateY(-1px) !important;
}

html:not([data-theme="dark"]) .batch-quick-btn:hover i {
  color: #068567 !important;
  transform: scale(1.08) !important;
}

html:not([data-theme="dark"]) .batch-quick-btn:active {
  background: #d4ede8 !important;
  transform: translateY(1px) !important;
}



/* Nút Hành Động & Nút Biến Thể Trên Thanh Công Cụ Hàng Loạt */

html:not([data-theme="dark"]) .btn-batch-top-action:not(.btn-batch-publish), html:not([data-theme="dark"]) #btnBatchGlobalActions {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #c9d5d8 !important;
  color: #2a3c40 !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  padding: 0 13px !important;
  height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  box-sizing: border-box !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  cursor: pointer !important;
}

html:not([data-theme="dark"]) .btn-batch-top-action:not(.btn-batch-publish) i, html:not([data-theme="dark"]) #btnBatchGlobalActions i {
  color: #2a3c40 !important;
  transition: color 0.15s ease !important;
}

html:not([data-theme="dark"]) .btn-batch-top-spin-icon i,
.btn-batch-top-spin-icon i {
  color: #7c3aed !important;
}

html:not([data-theme="dark"]) .btn-batch-top-spin-text i,
.btn-batch-top-spin-text i {
  color: #2563eb !important;
}

html:not([data-theme="dark"]) .btn-batch-top-action:not(.btn-batch-publish) span, html:not([data-theme="dark"]) #btnBatchGlobalActions span {
  color: #2a3c40 !important;
  font-weight: 600 !important;
  transition: color 0.15s ease !important;
}

html:not([data-theme="dark"]) .btn-batch-top-action:not(.btn-batch-publish):hover, html:not([data-theme="dark"]) #btnBatchGlobalActions:hover {
  background: #E2F3F0 !important;
  background-color: #E2F3F0 !important;
  border-color: #068567 !important;
  color: #068567 !important;
  box-shadow: 0 3px 10px rgba(6, 133, 103, 0.2) !important;
  transform: translateY(-1px) !important;
}

html:not([data-theme="dark"]) .btn-batch-top-action:not(.btn-batch-publish):hover i, html:not([data-theme="dark"]) .btn-batch-top-action:not(.btn-batch-publish):hover span, html:not([data-theme="dark"]) #btnBatchGlobalActions:hover i, html:not([data-theme="dark"]) #btnBatchGlobalActions:hover span {
  color: #068567 !important;
}

html:not([data-theme="dark"]) .btn-batch-top-action:not(.btn-batch-publish):active, html:not([data-theme="dark"]) #btnBatchGlobalActions:active {
  background: #d4ede8 !important;
  transform: translateY(1px) !important;
}

html:not([data-theme="dark"]) .btn-batch-top-action.btn-batch-publish, html:not([data-theme="dark"]) #btnPublishBatchNow {
  background: #068567 !important;
  border-color: #068567 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

html:not([data-theme="dark"]) .btn-batch-top-action.btn-batch-publish:hover, html:not([data-theme="dark"]) #btnPublishBatchNow:hover {
  background: #056e55 !important;
  border-color: #056e55 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(6, 133, 103, 0.45) !important;
}

html:not([data-theme="dark"]) .btn-batch-top-action.btn-batch-publish span, html:not([data-theme="dark"]) #btnPublishBatchNow span {
  color: #ffffff !important;
  font-weight: 600 !important;
}

/* Schedule Mode for Batch Publish Button */
html:not([data-theme="dark"]) .btn-batch-top-action.btn-batch-publish.btn-batch-schedule-mode,
html:not([data-theme="dark"]) #btnPublishBatchNow.btn-batch-schedule-mode {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
}

html:not([data-theme="dark"]) .btn-batch-top-action.btn-batch-publish.btn-batch-schedule-mode:hover,
html:not([data-theme="dark"]) #btnPublishBatchNow.btn-batch-schedule-mode:hover {
  background: #0369a1 !important;
  border-color: #0369a1 !important;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.45) !important;
}

html:not([data-theme="dark"]) .batch-actions-dropdown-menu {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1) !important;
}

html:not([data-theme="dark"]) .batch-actions-dropdown-item {
  color: #193333 !important;
}

html:not([data-theme="dark"]) .batch-actions-dropdown-item:hover {
  background: #f8fafc !important;
  color: #193333 !important;
}



/* Thẻ chọn lịch đăng bài trong Single Composer */

html:not([data-theme="dark"]) .schedule-radio-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #193333 !important;
  border-radius: 10px !important;
}

html:not([data-theme="dark"]) .schedule-radio-card.active {
  background: #E2F3F0 !important;
  border-color: #068567 !important;
}

html:not([data-theme="dark"]) .schedule-radio-card strong {
  color: #193333 !important;
}

html:not([data-theme="dark"]) .schedule-radio-card .radio-card-desc {
  color: #526969 !important;
}



/* Chip dãn cách thời gian ngẫu nhiên */

html:not([data-theme="dark"]) .duration-chip {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #526969 !important;
  border-radius: 8px !important;
}

html:not([data-theme="dark"]) .duration-chip:hover {
  background: #f1f5f9 !important;
  color: #193333 !important;
}

html:not([data-theme="dark"]) .duration-chip.active {
  background: #068567 !important;
  border-color: #068567 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}



/* ==========================================================================
   19. ĐỒNG BỘ 3 LỚP MÀU KHỐI (3-LAYER ELEVATION) & HỆ THỐNG THÔNG BÁO (NOTIFICATIONS)
   Chuẩn xác theo BankCo Light Theme Architecture:
   - Lớp 1: Nền trang ngoài cùng (#F1F7F7)
   - Lớp 2: Khung khối phân mục / Container bao bọc (#ffffff, viền #edf2f7 bo góc 16px)
   - Lớp 3: Các thẻ con / Khối card bên trong (#f8fafc, viền #edf2f7 bo góc 14px)
   ========================================================================== */



/* --- LỚP 1: NỀN TRANG NGOÀI CÙNG (VIEWPORT & LAYOUT: #E9EEEF) --- */

html:not([data-theme="dark"]), html:not([data-theme="dark"]) body, html:not([data-theme="dark"]) .app-layout, html:not([data-theme="dark"]) .app-main-viewport, html:not([data-theme="dark"]) .app-views-wrapper, html:not([data-theme="dark"]) .app-view {
  background-color: #e9eeef !important;
  color: #2a3c40 !important;
}



/* --- LỚP 2: KHUNG KHỐI PHÂN MỤC / CONTAINER BAO BỌC (KHỐI NỘI DUNG: #F5F7F7, VIỀN: #C9D5D8) --- */

html:not([data-theme="dark"]) .card, html:not([data-theme="dark"]) .composer-card, html:not([data-theme="dark"]) .preview-card, html:not([data-theme="dark"]) .batch-card, html:not([data-theme="dark"]) .batch-composer-container, html:not([data-theme="dark"]) .channel-groups-container, html:not([data-theme="dark"]) .manage-pages-container, html:not([data-theme="dark"]) .tokens-container, html:not([data-theme="dark"]) .admin-card, html:not([data-theme="dark"]) .schedule-table-pane, html:not([data-theme="dark"]) .schedule-filter-sidebar, html:not([data-theme="dark"]) .composer-channel-sidebar, html:not([data-theme="dark"]) .channel-sidebar, html:not([data-theme="dark"]) .dashboard-card, html:not([data-theme="dark"]) .royal-feature-card, html:not([data-theme="dark"]) .royal-content-box, html:not([data-theme="dark"]) .royal-chart-card, html:not([data-theme="dark"]) .royal-table-card, html:not([data-theme="dark"]) .modal-box, html:not([data-theme="dark"]) .post-details-wide-modal, html:not([data-theme="dark"]) .post-add-comment-modal-box {
  background: #f5f7f7 !important;
  background-color: #f5f7f7 !important;
  border: 1px solid #c9d5d8 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(42, 60, 64, 0.04) !important;
  color: #2a3c40 !important;
}

html:not([data-theme="dark"]) .modal-header, html:not([data-theme="dark"]) .batch-composer-header, html:not([data-theme="dark"]) .channel-groups-header, html:not([data-theme="dark"]) .channel-sidebar-header, html:not([data-theme="dark"]) .schedule-filter-header {
  background: #dfe7e8 !important;
  border-bottom: 1px solid #c9d5d8 !important;
  color: #2a3c40 !important;
}



/* --- LỚP 3: CÁC THẺ CON / KHỐI CARD BÊN TRONG (LỚP 3) --- */


/* Thẻ bài đăng mô phỏng Facebook (Preview Mockup) */

html:not([data-theme="dark"]) .fb-post-mockup, html:not([data-theme="dark"]) .facebook-post-card {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
  color: #111827 !important;
  overflow: hidden !important;
}

html:not([data-theme="dark"]) .fb-post-header, html:not([data-theme="dark"]) .fb-post-body:not(.colored-background), html:not([data-theme="dark"]) .fb-post-actions, html:not([data-theme="dark"]) .fb-stats-row, html:not([data-theme="dark"]) .fb-card-top-bar, html:not([data-theme="dark"]) .fb-card-author-bar, html:not([data-theme="dark"]) .fb-card-content, html:not([data-theme="dark"]) .fb-card-footer {
  background: #ffffff !important;
  color: #111827 !important;
}



/* Facebook Colored Post Preview */

html:not([data-theme="dark"]) .fb-post-body.colored-background {
  min-height: 240px !important;
  padding: 2.25rem 1.5rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  border-radius: 8px !important;
  margin: 0.35rem 0.85rem 0.65rem !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

html:not([data-theme="dark"]) .fb-post-body.colored-background .fb-post-text {
  color: #ffffff !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35) !important;
  line-height: 1.38 !important;
  word-break: break-word !important;
  white-space: pre-wrap !important;
  margin: 0 auto !important;
  max-width: 92% !important;
  letter-spacing: -0.01em !important;
}

html:not([data-theme="dark"]) .fb-page-name, html:not([data-theme="dark"]) .fb-card-author-name {
  color: #111827 !important;
  font-weight: 600 !important;
}

html:not([data-theme="dark"]) .fb-post-body:not(.colored-background) .fb-post-text, html:not([data-theme="dark"]) .fb-card-caption-text {
  color: #374151 !important;
}

html:not([data-theme="dark"]) .fb-post-time, html:not([data-theme="dark"]) .fb-card-timestamp {
  color: #9ca3af !important;
}


/* ==============================================================================
   19. TINH CHỈNH GIAO DIỆN SÁNG (BANKCO LIGHT THEME TWEAKS)
   Chỉ áp dụng khi không bật Dark Mode (html:not([data-theme="dark"]))
   ============================================================================== */

html:not([data-theme="dark"]) .channel-groups-grid .channel-group-card,
html:not([data-theme="dark"]) .channel-group-card,
html:not([data-theme="dark"]) .group-card,
html:not([data-theme="dark"]) .page-card,
html:not([data-theme="dark"]) .token-card,
html:not([data-theme="dark"]) .token-pool-item,
html:not([data-theme="dark"]) .schedule-card,
html:not([data-theme="dark"]) .channel-comments-group-card {
  background: #ffffff !important;
  border: 1px solid #c9d5d8 !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 10px rgba(42, 60, 64, 0.02) !important;
  color: #2a3c40 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html:not([data-theme="dark"]) .channel-group-card:hover,
html:not([data-theme="dark"]) .group-card:hover,
html:not([data-theme="dark"]) .page-card:hover,
html:not([data-theme="dark"]) .token-card:hover,
html:not([data-theme="dark"]) .channel-comments-group-card:hover {
  background: #ffffff !important;
  border-color: #bbf0e7 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06) !important;
}

html:not([data-theme="dark"]) .backup-section,
html:not([data-theme="dark"]) .restore-section,
html:not([data-theme="dark"]) .restore-mode-card,
html:not([data-theme="dark"]) #sectionManualDropboxToken,
html:not([data-theme="dark"]) #r2UploadTargetFolderBox,
html:not([data-theme="dark"]) #deleteCommentPreviewBox,
html:not([data-theme="dark"]) .form-group-card,
html:not([data-theme="dark"]) .form-section-box,
html:not([data-theme="dark"]) .royal-mini-stats-row,
html:not([data-theme="dark"]) .royal-activity-item {
  background: #f8fafc !important;
  border: 1px solid #edf2f7 !important;
  border-radius: 8px !important;
  color: #193333 !important;
}

html:not([data-theme="dark"]) .batch-table-card,
html:not([data-theme="dark"]) .batch-table-container,
html:not([data-theme="dark"]) .batch-table-wrapper {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
}

html:not([data-theme="dark"]) .batch-matrix-table {
  background: #ffffff !important;
  color: #193333 !important;
}

html:not([data-theme="dark"]) .batch-matrix-table thead tr,
html:not([data-theme="dark"]) .batch-matrix-table th {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #526969 !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  white-space: nowrap !important;
}

html:not([data-theme="dark"]) .btn-batch-header-time {
  color: #526969 !important;
  background: transparent !important;
  border: none !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  white-space: nowrap !important;
}

html:not([data-theme="dark"]) .btn-batch-header-time:hover {
  background: #E2F3F0 !important;
  color: #068567 !important;
}

html:not([data-theme="dark"]) .btn-batch-header-time i {
  color: inherit !important;
  font-size: 0.7rem !important;
}

html:not([data-theme="dark"]) .btn-batch-time-trigger,
html:not([data-theme="dark"]) .btn-batch-time-select,
html:not([data-theme="dark"]) .batch-matrix-table .btn-batch-row-time,
html:not([data-theme="dark"]) .batch-matrix-table .batch-time-btn,
html:not([data-theme="dark"]) .batch-matrix-table button[id^="btnBatchRowTime_"] {
  padding: 0.35rem 0.65rem !important;
  font-size: 0.81rem !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  border-radius: 8px !important;
}

html:not([data-theme="dark"]) .batch-matrix-table thead th i {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 13px !important;
  line-height: 1 !important;
  height: 14px !important;
  width: 14px !important;
}

html:not([data-theme="dark"]) .batch-matrix-table thead tr {
  background: #dfe7e8 !important;
  border-bottom: 1px solid #c9d5d8 !important;
}

html:not([data-theme="dark"]) .batch-matrix-table thead th {
  background: #dfe7e8 !important;
  border-bottom: 1px solid #c9d5d8 !important;
  color: #2a3c40 !important;
}

html:not([data-theme="dark"]) .batch-matrix-table tbody tr {
  background: #edf2f1 !important;
  border-bottom: 1px solid #c9d5d8 !important;
}

html:not([data-theme="dark"]) .batch-matrix-table td {
  background: #edf2f1 !important;
  background-color: #edf2f1 !important;
  border-bottom: 1px solid #c9d5d8 !important;
  color: #2a3c40 !important;
}

html:not([data-theme="dark"]) .batch-matrix-table tbody tr:hover,
html:not([data-theme="dark"]) .batch-matrix-table tbody tr:hover td {
  background: #e1ebe7 !important;
  background-color: #e1ebe7 !important;
}

html:not([data-theme="dark"]) .batch-matrix-table tbody tr.selected td {
  background: #ddede7 !important;
}

html:not([data-theme="dark"]) .batch-row-textarea {
  background: #ffffff !important;
  border: 1px solid #c9d5d8 !important;
  color: #2a3c40 !important;
  border-radius: 8px !important;
}

html:not([data-theme="dark"]) .batch-row-textarea:focus {
  background: #ffffff !important;
  border-color: #068567 !important;
  box-shadow: 0 0 0 3px rgba(6, 133, 103, 0.15) !important;
}

html:not([data-theme="dark"]) .batch-channels-box {
  background: #ffffff !important;
  border: 1px solid #c9d5d8 !important;
  color: #2a3c40 !important;
}

html:not([data-theme="dark"]) .batch-media-placeholder,
html:not([data-theme="dark"]) .batch-media-thumb-box {
  background: #ffffff !important;
  border: 1px solid #c9d5d8 !important;
  border-radius: 8px !important;
}

html:not([data-theme="dark"]) .batch-counter-container {
  background: #edf2f1 !important;
  border: 1px solid #c9d5d8 !important;
  border-radius: 10px !important;
  padding: 6px 14px !important;
  box-sizing: border-box !important;
  color: #526969 !important;
}

html:not([data-theme="dark"]) .batch-counter-counts strong {
  color: #068567 !important;
}

html:not([data-theme="dark"]) .alert-info,
html:not([data-theme="dark"]) .alert-banner.info,
html:not([data-theme="dark"]) #composerEditingBanner,
html:not([data-theme="dark"]) #batchEditingBanner {
  background: #E2F3F0 !important;
  border: 1px solid #bbf0e7 !important;
  color: #068567 !important;
}

/* --- LỊCH ĐĂNG (SCHEDULE DATA TABLE) - GIAO DIỆN SÁNG (BANKCO LIGHT) --- */
html:not([data-theme="dark"]) .schedule-data-table {
  background: #f5f7f7 !important;
  color: #2a3c40 !important;
}

html:not([data-theme="dark"]) .schedule-data-table thead tr {
  background: #dfe7e8 !important;
}

html:not([data-theme="dark"]) .schedule-data-table th {
  background-color: #dfe7e8 !important;
  border-bottom: 1px solid #c9d5d8 !important;
  color: #2a3c40 !important;
  font-size: 0.79rem !important;
  font-weight: 700 !important;
  padding: 0.7rem 0.65rem !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

html:not([data-theme="dark"]) .schedule-data-table thead th:first-child {
  border-top-left-radius: 8px !important;
  border-bottom-left-radius: 8px !important;
}

html:not([data-theme="dark"]) .schedule-data-table thead th:last-child {
  border-top-right-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
}

html:not([data-theme="dark"]) #selectAllQueueCheck,
html:not([data-theme="dark"]) .queue-item-checkbox {
  accent-color: #068567 !important;
}

.schedule-data-table th.col-check,
html[data-theme="dark"] .schedule-data-table th.col-check,
html:not([data-theme="dark"]) .schedule-data-table th.col-check {
  padding-left: 0.35rem !important;
  padding-right: 0.35rem !important;
  background-color: #dfe7e8 !important;
}

html:not([data-theme="dark"]) .schedule-data-table th i {
  color: #596c72 !important;
}

html:not([data-theme="dark"]) .schedule-data-table tbody tr {
  background: #edf2f1 !important;
}

html:not([data-theme="dark"]) .schedule-data-table td {
  background: #edf2f1 !important;
  background-color: #edf2f1 !important;
  border-bottom: 1px solid #c9d5d8 !important;
  color: #2a3c40 !important;
}

html:not([data-theme="dark"]) .schedule-data-table tbody tr:hover td {
  background: #e1ebe7 !important;
  background-color: #e1ebe7 !important;
}

html:not([data-theme="dark"]) .schedule-data-table tbody tr.selected td {
  background: #ddede7 !important;
}

/* Cột 4: Kênh đăng (Fanpage / Nhóm) - Thiết kế Chip Pill tinh tế (Giao diện Sáng) */
html:not([data-theme="dark"]) .queue-channels-badge {
  background: #ddede7 !important;
  border: 1px solid #c9d5d8 !important;
  border-radius: 6px !important;
  padding: 3px 8px !important;
  color: #068567 !important;
  font-weight: 600 !important;
  font-size: 0.8rem !important;
  line-height: 1.4 !important;
  box-sizing: border-box !important;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease !important;
}

html:not([data-theme="dark"]) .queue-channels-badge:hover {
  background: #cce7df !important;
  border-color: #068567 !important;
  color: #056e55 !important;
  text-decoration: none !important;
}

html:not([data-theme="dark"]) .queue-channels-badge.channel-badge-group {
  background: #ddede7 !important;
  border-color: #c9d5d8 !important;
  color: #068567 !important;
}

html:not([data-theme="dark"]) .queue-channels-badge.channel-badge-group:hover {
  background: #cce7df !important;
  border-color: #068567 !important;
  color: #056e55 !important;
}

html:not([data-theme="dark"]) .queue-channels-badge .fa-regular.fa-flag {
  color: #068567 !important;
}

html:not([data-theme="dark"]) .queue-channels-badge .group-icon,
html:not([data-theme="dark"]) .queue-channels-badge.channel-badge-group .group-icon {
  color: #068567 !important;
  transition: color 0.25s ease !important;
}



/* ==============================================================================
   PHỐI MÀU GIAO DIỆN BÊN PHẢI: TRẮNG NGỌC TRAI (PEARL WHITE DESIGN SYSTEM)
   Bảng màu chuẩn 100%:
   1. Nền bên phải:  #E9EEEF
   2. Khối nội dung: #F5F7F7
   3. Tiêu đề bảng:  #DFE7E8
   4. Đường viền:    #C9D5D8
   5. Chữ chính:     #2A3C40
   6. Chữ phụ:       #596C72
   7. Nền đang chọn: #DDEDE7
   8. Chờ đăng:      #7353AE
   Thanh menu bên trái (Sidebar): Giữ nguyên Deep Forest (#112B2B)
   ============================================================================== */

/* 1. Nền bên phải: #E9EEEF */
html:not([data-theme="dark"]),
html:not([data-theme="dark"]) body,
html:not([data-theme="dark"]) .app-layout,
html:not([data-theme="dark"]) .app-main-viewport,
html:not([data-theme="dark"]) .app-views-wrapper,
html:not([data-theme="dark"]) .app-view,
html:not([data-theme="dark"]) .post-details-preview-area,
html:not([data-theme="dark"]) #postDetailsModal .post-details-body {
  background-color: #e9eeef !important;
  color: #2a3c40 !important;
}

/* 2. Khối nội dung: #F5F7F7 */
html:not([data-theme="dark"]) .schedule-filter-sidebar,
html:not([data-theme="dark"]) .schedule-table-pane,
html:not([data-theme="dark"]) .card,
html:not([data-theme="dark"]) .composer-card,
html:not([data-theme="dark"]) .composer-channel-sidebar,
html:not([data-theme="dark"]) .channel-sidebar,
html:not([data-theme="dark"]) .channel-selection-card,
html:not([data-theme="dark"]) .composer-form-card,
html:not([data-theme="dark"]) .batch-card,
html:not([data-theme="dark"]) .batch-composer-container,
html:not([data-theme="dark"]) .channel-groups-container,
html:not([data-theme="dark"]) .manage-pages-container,
html:not([data-theme="dark"]) .tokens-container,
html:not([data-theme="dark"]) .admin-card,
html:not([data-theme="dark"]) .dashboard-card,
html:not([data-theme="dark"]) .royal-stat-card,
html:not([data-theme="dark"]) .royal-chart-card,
html:not([data-theme="dark"]) .royal-table-card,
html:not([data-theme="dark"]) .royal-feature-card,
html:not([data-theme="dark"]) .royal-content-box,
html:not([data-theme="dark"]) .schedule-accordion-item,
html:not([data-theme="dark"]) .modal-box,
html:not([data-theme="dark"]) .channel-group-modal-box,
html:not([data-theme="dark"]) .post-details-wide-modal,
html:not([data-theme="dark"]) .post-add-comment-modal-box,
html:not([data-theme="dark"]) .schedule-matrix-card {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #c9d5d8 !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(42, 60, 64, 0.04) !important;
  color: #2a3c40 !important;
}

/* 3. Tiêu đề bảng: #DFE7E8 */
html:not([data-theme="dark"]) .schedule-table thead,
html:not([data-theme="dark"]) .schedule-table thead th,
html:not([data-theme="dark"]) .schedule-table th,
html:not([data-theme="dark"]) .schedule-data-table thead,
html:not([data-theme="dark"]) .schedule-data-table thead th,
html:not([data-theme="dark"]) .schedule-data-table th,
html:not([data-theme="dark"]) .batch-matrix-table thead,
html:not([data-theme="dark"]) .batch-matrix-table thead tr,
html:not([data-theme="dark"]) .batch-matrix-table thead th,
html:not([data-theme="dark"]) .table thead,
html:not([data-theme="dark"]) .table thead th,
html:not([data-theme="dark"]) .table th,
html:not([data-theme="dark"]) .table-custom th,
html:not([data-theme="dark"]) .discovered-pages-table th,
html:not([data-theme="dark"]) .managed-pages-table th,
html:not([data-theme="dark"]) .bulk-comments-table th,
html:not([data-theme="dark"]) .post-comments-table th,
html:not([data-theme="dark"]) table thead th,
html:not([data-theme="dark"]) .matrix-table th,
html:not([data-theme="dark"]) .schedule-filter-header,
html:not([data-theme="dark"]) .modal-header,
html:not([data-theme="dark"]) .batch-composer-header,
html:not([data-theme="dark"]) .channel-groups-header,
html:not([data-theme="dark"]) .channel-sidebar-header {
  background: #dfe7e8 !important;
  background-color: #dfe7e8 !important;
  border-bottom: 1px solid #c9d5d8 !important;
  color: #2a3c40 !important;
  font-weight: 700 !important;
}
html:not([data-theme="dark"]) .modal-header {
  border-top-left-radius: 13px !important;
  border-top-right-radius: 13px !important;
  overflow: hidden !important;
}

/* Nền dòng dữ liệu: #EDF2F1, Khi rê chuột: #E1EBE7, Đường kẻ: #C9D5D8 */
html:not([data-theme="dark"]) .schedule-table,
html:not([data-theme="dark"]) .schedule-data-table,
html:not([data-theme="dark"]) .table-custom,
html:not([data-theme="dark"]) .table {
  background: #f5f7f7 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid #c9d5d8 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

html:not([data-theme="dark"]) .batch-matrix-table {
  background: #f5f7f7 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid #c9d5d8 !important;
  border-radius: 8px !important;
  overflow: visible !important;
}

html:not([data-theme="dark"]) .batch-matrix-table tbody,
html:not([data-theme="dark"]) .batch-matrix-table tr,
html:not([data-theme="dark"]) .batch-matrix-table td {
  overflow: visible !important;
}

html:not([data-theme="dark"]) .batch-matrix-table tbody tr:has(.batch-search-dropdown-menu:not(.hidden)),
html:not([data-theme="dark"]) .batch-matrix-table tr:has(.batch-search-dropdown-menu:not(.hidden)) {
  position: relative !important;
  z-index: 50 !important;
}

html:not([data-theme="dark"]) .batch-matrix-table td.col-channel:has(.batch-search-dropdown-menu:not(.hidden)) {
  position: relative !important;
  z-index: 51 !important;
}

html:not([data-theme="dark"]) .schedule-table td,
html:not([data-theme="dark"]) .schedule-data-table td,
html:not([data-theme="dark"]) .batch-matrix-table td,
html:not([data-theme="dark"]) .batch-matrix-table tbody tr,
html:not([data-theme="dark"]) .table-custom td,
html:not([data-theme="dark"]) .discovered-pages-table td,
html:not([data-theme="dark"]) .managed-pages-table td,
html:not([data-theme="dark"]) .bulk-comments-table td,
html:not([data-theme="dark"]) .post-comments-table td,
html:not([data-theme="dark"]) .table td {
  background: #edf2f1 !important;
  background-color: #edf2f1 !important;
  border-bottom: 1px solid #c9d5d8 !important;
  color: #2a3c40 !important;
  padding: 0.75rem 1rem !important;
}

html .post-comments-table tbody td,
html:not([data-theme="dark"]) .post-comments-table tbody td,
html[data-theme="dark"] .post-comments-table tbody td {
  vertical-align: top !important;
  padding: 0.75rem 0.65rem !important;
}

html:not([data-theme="dark"]) .schedule-table tbody tr:hover td,
html:not([data-theme="dark"]) .schedule-data-table tbody tr:hover td,
html:not([data-theme="dark"]) .schedule-data-table tr:hover td,
html:not([data-theme="dark"]) .batch-matrix-table tbody tr:hover,
html:not([data-theme="dark"]) .batch-matrix-table tbody tr:hover td,
html:not([data-theme="dark"]) .table-custom tbody tr:hover,
html:not([data-theme="dark"]) .table-custom tbody tr:hover td,
html:not([data-theme="dark"]) .discovered-pages-table tbody tr:hover td,
html:not([data-theme="dark"]) .managed-pages-table tbody tr:hover td,
html:not([data-theme="dark"]) .bulk-comments-table tbody tr:hover td,
html:not([data-theme="dark"]) .post-comments-table tbody tr:hover td,
html:not([data-theme="dark"]) .table tbody tr:hover td,
html:not([data-theme="dark"]) .royal-breakdown-item:hover,
html:not([data-theme="dark"]) .filter-status-item:hover:not(.active) {
  background: #e1ebe7 !important;
  background-color: #e1ebe7 !important;
}

/* 4. Đường viền: #C9D5D8 */
html:not([data-theme="dark"]) input[type="text"],
html:not([data-theme="dark"]) input[type="password"],
html:not([data-theme="dark"]) input[type="datetime-local"],
html:not([data-theme="dark"]) input[type="search"],
html:not([data-theme="dark"]) textarea,
html:not([data-theme="dark"]) select,
html:not([data-theme="dark"]) .form-input,
html:not([data-theme="dark"]) .form-select,
html:not([data-theme="dark"]) .schedule-channel-search-input,
html:not([data-theme="dark"]) .schedule-toolbar-search-input,
html:not([data-theme="dark"]) .channel-group-search-input,
html:not([data-theme="dark"]) .channel-search-input,
html:not([data-theme="dark"]) .batch-row-textarea,
html:not([data-theme="dark"]) .search-input {
  background-color: #ffffff !important;
  border: 1px solid #c9d5d8 !important;
  color: #2a3c40 !important;
  border-radius: 8px !important;
}

html:not([data-theme="dark"]) .schedule-accordion-item,
html:not([data-theme="dark"]) .schedule-accordion-item.active {
  border: 1px solid #c9d5d8 !important;
}

html:not([data-theme="dark"]) .btn-secondary,
html:not([data-theme="dark"]) .btn-outline,
html:not([data-theme="dark"]) button.btn-secondary,
html:not([data-theme="dark"]) .btn-refresh-schedule-custom,
html:not([data-theme="dark"]) .channel-btn-icon,
html:not([data-theme="dark"]) .channel-collapse-btn {
  background: #ffffff !important;
  border: 1px solid #c9d5d8 !important;
  color: #596c72 !important;
  border-radius: 8px !important;
}

/* 5. Chữ chính: #2A3C40 */
html:not([data-theme="dark"]) h1,
html:not([data-theme="dark"]) h2,
html:not([data-theme="dark"]) h3,
html:not([data-theme="dark"]) h4,
html:not([data-theme="dark"]) h5,
html:not([data-theme="dark"]) h6,
html:not([data-theme="dark"]) .topbar-view-title,
html:not([data-theme="dark"]) .schedule-table-heading,
html:not([data-theme="dark"]) .schedule-filter-title,
html:not([data-theme="dark"]) .card-title,
html:not([data-theme="dark"]) .schedule-accordion-btn,
html:not([data-theme="dark"]) .accordion-title,
html:not([data-theme="dark"]) .queue-post-content-link,
html:not([data-theme="dark"]) .queue-post-title,
html:not([data-theme="dark"]) .filter-item-name,
html:not([data-theme="dark"]) .schedule-mode-label span,
html:not([data-theme="dark"]) .royal-stat-value,
html:not([data-theme="dark"]) .overview-page-title,
html:not([data-theme="dark"]) .royal-feature-title,
html:not([data-theme="dark"]) .royal-box-title {
  color: #2a3c40 !important;
}

/* 6. Chữ phụ: #596C72 */
html:not([data-theme="dark"]) input::placeholder,
html:not([data-theme="dark"]) textarea::placeholder,
html:not([data-theme="dark"]) .schedule-toolbar-search-input::placeholder,
html:not([data-theme="dark"]) .text-muted,
html:not([data-theme="dark"]) .subtext,
html:not([data-theme="dark"]) .schedule-table-time,
html:not([data-theme="dark"]) .queue-post-time,
html:not([data-theme="dark"]) .table-footer-text,
html:not([data-theme="dark"]) .filter-count-badge,
html:not([data-theme="dark"]) .royal-stat-label,
html:not([data-theme="dark"]) .royal-subtext,
html:not([data-theme="dark"]) .mini-stat-desc,
html:not([data-theme="dark"]) .royal-feature-note,
html:not([data-theme="dark"]) .overview-subtitle,
html:not([data-theme="dark"]) .char-count {
  color: #596c72 !important;
}

/* 7. Nền đang chọn: #DDEDE7 */
html:not([data-theme="dark"]) .filter-status-item.active {
  background-color: #ddede7 !important;
  border: 1px solid #c9d5d8 !important;
  color: #2a3c40 !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

html:not([data-theme="dark"]) .filter-status-item.active .filter-count-badge {
  background-color: #ddede7 !important;
  color: #2a3c40 !important;
  border: 1px solid #c9d5d8 !important;
}

html:not([data-theme="dark"]) .page-tag-pill,
html:not([data-theme="dark"]) .badge-blue,
html:not([data-theme="dark"]) .channel-tag.active,
html:not([data-theme="dark"]) .page-selection-tag.selected,
html:not([data-theme="dark"]) .icon-tag-pill.pill-blue {
  background-color: #ddede7 !important;
  color: #068567 !important;
  border: 1px solid #c9d5d8 !important;
  font-weight: 600 !important;
}

html:not([data-theme="dark"]) .schedule-table tbody tr.selected td,
html:not([data-theme="dark"]) .table tbody tr.selected td {
  background: #ddede7 !important;
  border-bottom-color: #c9d5d8 !important;
}

/* 8. Chờ đăng: #7353AE */
html:not([data-theme="dark"]) .status-circle.purple {
  background-color: #7353ae !important;
}

html:not([data-theme="dark"]) .queue-status-clean.pending,
html:not([data-theme="dark"]) .queue-status-clean.pending i {
  color: #7353ae !important;
  font-weight: 600 !important;
}

html:not([data-theme="dark"]) .badge-status-pill.purple {
  background-color: rgba(115, 83, 174, 0.12) !important;
  color: #7353ae !important;
  border: 1px solid rgba(115, 83, 174, 0.3) !important;
}

/* NÚT HÀNH ĐỘNG CHÍNH (PRIMARY CTA: #068567) */
html:not([data-theme="dark"]) .btn-primary,
html:not([data-theme="dark"]) .btn-schedule-create-post,
html:not([data-theme="dark"]) .batch-submit-btn,
html:not([data-theme="dark"]) button.btn-primary,
html:not([data-theme="dark"]) .btn-pagination-num.active {
  background: #068567 !important;
  background-color: #068567 !important;
  border: 1px solid #068567 !important;
  color: #ffffff !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}

html:not([data-theme="dark"]) .btn-primary:hover,
html:not([data-theme="dark"]) .btn-schedule-create-post:hover {
  background: #056e55 !important;
  background-color: #056e55 !important;
  border-color: #056e55 !important;
}

/* ==========================================================================
   MODAL: SAO LƯU & KHÔI PHỤC DỮ LIỆU (BACKUP & RESTORE)
   Đồng bộ màu sắc Thương hiệu VibePage (#068567, #112b2b) & Nút đóng X sang trọng
   ========================================================================== */

#modalBackupRestore .backup-modal-box {
  max-width: 660px;
  width: 92%;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  padding: 0 !important;
  animation: backupModalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes backupModalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.backup-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.backup-modal-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.backup-modal-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #068567 0%, #04664f 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(6, 133, 103, 0.25);
  flex-shrink: 0;
}

.backup-modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.backup-modal-subtitle {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: #64748b;
  font-weight: 400;
}

/* NÚT ĐÓNG X ĐƯỢC THIẾT KẾ ĐẸP MẮT THEO YÊU CẦU */
.backup-modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 16px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.backup-modal-close-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
  transform: rotate(90deg) scale(1.08);
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.22);
}

.backup-modal-close-btn:active {
  transform: rotate(90deg) scale(0.96);
}

.backup-modal-body {
  padding: 22px 24px 26px 24px;
  background: #fafbfc;
}

.backup-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s ease;
}

.backup-section-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.backup-section-info {
  flex: 1;
}

.backup-section-heading {
  margin: 0 0 6px 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.backup-accent-icon {
  color: #068567;
}

.backup-section-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}

.backup-section-desc code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 1px 5px;
  border-radius: 4px;
  color: #0f766e;
  font-weight: 600;
  font-size: 12px;
  font-family: inherit;
}

.backup-action-btn.primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  background: #068567;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid #056e54;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(6, 133, 103, 0.25);
  transition: all 0.18s ease;
}

.backup-action-btn.primary:hover {
  background: #056e54;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(6, 133, 103, 0.35);
}

.backup-action-btn.primary:active {
  transform: translateY(0);
}

/* Divider HOẶC */
.backup-modal-divider {
  position: relative;
  text-align: center;
  margin: 16px 0;
}

.backup-modal-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e2e8f0;
}

.backup-divider-text {
  position: relative;
  background: #fafbfc;
  padding: 0 16px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 1.5px;
}

/* File picker row */
.backup-file-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 16px 0;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

.backup-choose-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.backup-choose-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.backup-file-name-label {
  font-size: 13px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Restore modes */
.backup-mode-group {
  margin-top: 14px;
}

.backup-mode-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.backup-mode-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.backup-mode-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.backup-mode-card:hover {
  border-color: #cbd5e1;
}

.backup-mode-card.selected {
  border-color: #068567;
  background: #f0fdf4;
  box-shadow: 0 0 0 2px rgba(6, 133, 103, 0.12);
}

.backup-mode-card#labelRestoreOverwrite.selected {
  border-color: #ef4444;
  background: #fef2f2;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12);
}

.backup-radio {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: #068567;
  flex-shrink: 0;
}

.backup-radio.danger {
  accent-color: #ef4444;
}

.backup-mode-text-wrap {
  flex: 1;
}

.backup-mode-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.backup-mode-title {
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.backup-mode-title.success {
  color: #068567;
}

.backup-mode-title.danger {
  color: #dc2626;
}

.backup-badge-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2.5px 8px;
  border-radius: 20px;
  letter-spacing: 0.2px;
}

.backup-badge-pill.success {
  background: rgba(6, 133, 103, 0.12);
  color: #068567;
  border: 1px solid rgba(6, 133, 103, 0.25);
}

.backup-badge-pill.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.backup-mode-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.45;
}

.backup-mode-desc strong {
  color: #0f172a;
}

/* Nút bắt đầu khôi phục */
.backup-submit-btn {
  width: 100%;
  margin-top: 16px;
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.backup-submit-btn:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

.backup-submit-btn:not(:disabled) {
  background: #068567;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(6, 133, 103, 0.3);
}

.backup-submit-btn:not(:disabled):hover {
  background: #056e54;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(6, 133, 103, 0.4);
}

.backup-submit-btn:not(:disabled):active {
  transform: translateY(0);
}

/* Result alert */
.backup-result-alert {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.backup-result-alert.success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}

.backup-result-alert.error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* --- DARK MODE SUPPORT --- */
[data-theme="dark"] #modalBackupRestore .backup-modal-box {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .backup-modal-header {
  background: #1e293b;
  border-bottom-color: #334155;
}

[data-theme="dark"] .backup-modal-title {
  color: #f8fafc;
}

[data-theme="dark"] .backup-modal-subtitle {
  color: #94a3b8;
}

[data-theme="dark"] .backup-modal-close-btn {
  background: #334155;
  border-color: #475569;
  color: #cbd5e1;
}

[data-theme="dark"] .backup-modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #f87171;
}

[data-theme="dark"] .backup-modal-body {
  background: #0f172a;
}

[data-theme="dark"] .backup-section-card {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .backup-section-heading {
  color: #f8fafc;
}

[data-theme="dark"] .backup-section-desc {
  color: #94a3b8;
}

[data-theme="dark"] .backup-section-desc code {
  background: #0f172a;
  border-color: #334155;
  color: #2dd4bf;
}

[data-theme="dark"] .backup-modal-divider::before {
  background: #334155;
}

[data-theme="dark"] .backup-divider-text {
  background: #0f172a;
  color: #64748b;
}

[data-theme="dark"] .backup-file-picker-row {
  background: #1e293b;
  border-color: #475569;
}

[data-theme="dark"] .backup-choose-btn {
  background: #334155;
  border-color: #475569;
  color: #f8fafc;
}

[data-theme="dark"] .backup-choose-btn:hover {
  background: #475569;
  color: #ffffff;
}

[data-theme="dark"] .backup-file-name-label {
  color: #94a3b8;
}

[data-theme="dark"] .backup-mode-label {
  color: #e2e8f0;
}

[data-theme="dark"] .backup-mode-card {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .backup-mode-card:hover {
  border-color: #475569;
}

[data-theme="dark"] .backup-mode-card.selected {
  border-color: #068567;
  background: rgba(6, 133, 103, 0.15);
}

[data-theme="dark"] .backup-mode-card#labelRestoreOverwrite.selected {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

[data-theme="dark"] .backup-mode-desc {
  color: #94a3b8;
}

[data-theme="dark"] .backup-mode-desc strong {
  color: #f1f5f9;
}

[data-theme="dark"] .backup-submit-btn:disabled {
  background: #334155;
  color: #64748b;
}

