/**
 * Satta Admin Panel - Modern UI/UX Design System
 * Built with CSS Custom Properties, Deep Slate Palette, Glassmorphism, and Responsive Flex/Grid Layout
 */

:root {
  --bg-body: #0b0f19;
  --bg-card: #111827;
  --bg-card-hover: #162032;
  --bg-surface: #1e293b;
  --bg-surface-hover: #27354a;
  --bg-sidebar: #0f172a;
  --bg-topbar: rgba(15, 23, 42, 0.85);

  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-focus: rgba(99, 102, 241, 0.5);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --info: #0ea5e9;
  --info-bg: rgba(14, 165, 233, 0.15);
  --purple: #a855f7;
  --purple-bg: rgba(168, 85, 247, 0.15);

  --sidebar-width: 270px;
  --topbar-height: 70px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px -3px rgba(99, 102, 241, 0.35);

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Base */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: #818cf8;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* App Layout Wrapper */
.admin-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.sidebar-brand {
  height: var(--topbar-height);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, transparent 100%);
}

.sidebar-brand .brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.sidebar-brand .brand-text {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: #fff;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.sidebar-brand .brand-text small {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
}

.sidebar-nav {
  padding: 1.25rem 0.85rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-section-title {
  padding: 0.85rem 0.75rem 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition);
  position: relative;
}

.sidebar-link i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  color: var(--text-dim);
  transition: var(--transition);
}

.sidebar-link:hover {
  color: #fff;
  background-color: var(--bg-surface);
}

.sidebar-link:hover i {
  color: var(--primary);
}

.sidebar-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.05) 100%);
  border-left: 3px solid var(--primary);
  font-weight: 600;
}

.sidebar-link.active i {
  color: var(--primary);
}

.sidebar-link .badge {
  margin-left: auto;
  font-size: 0.7rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-full);
}

/* Main Area */
.admin-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: var(--bg-body);
}

/* Topbar */
.admin-topbar {
  height: var(--topbar-height);
  background-color: var(--bg-topbar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-toggler {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.topbar-toggler:hover {
  color: #fff;
  background: var(--bg-surface-hover);
  border-color: var(--primary);
}

.live-time-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background-color: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: #c7d2fe;
}

.live-time-chip .pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
  animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

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

.topbar-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: var(--transition);
}
.topbar-btn:hover {
  background-color: var(--bg-surface-hover);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}
.user-profile-menu:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

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

/* Content Area */
.admin-content {
  flex: 1;
  padding: 1.75rem;
}

/* Page Header / Breadcrumb Bar */
.page-header-box {
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header-box .page-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.page-header-box .page-subtitle {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Cards */
.admin-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.admin-card-header {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.015);
}

.admin-card-header .card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-card-body {
  padding: 1.5rem;
}

/* Stat Cards */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.3);
}

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

.stat-card .stat-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.stat-card .stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-card .stat-desc {
  font-size: 0.775rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stat-card .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-icon.primary { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.stat-icon.success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.stat-icon.warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.stat-icon.danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.stat-icon.info { background: rgba(14, 165, 233, 0.15); color: #38bdf8; }
.stat-icon.purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

/* Form Controls */
.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  display: block;
}

.form-control,
.form-select {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.95rem;
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--bg-surface-hover);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 3px var(--primary-glow);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-dim);
}

textarea.form-control {
  min-height: 120px;
  font-family: inherit;
}

/* Custom Buttons */
.btn {
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff;
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}
.btn-secondary:hover {
  background-color: var(--bg-surface-hover);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-xs {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 6px;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: 6px;
}

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

.badge-primary { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-success { background: var(--success-bg); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: var(--warning-bg); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { background: var(--danger-bg); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-info { background: var(--info-bg); color: #7dd3fc; border: 1px solid rgba(14, 165, 233, 0.3); }

/* Tables */
.table-responsive {
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.table-custom {
  width: 100%;
  margin-bottom: 0;
  color: var(--text-main);
  border-collapse: separate;
  border-spacing: 0;
}

.table-custom thead th {
  background-color: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  border-top: none;
  white-space: nowrap;
}

.table-custom tbody tr {
  transition: var(--transition);
  background-color: var(--bg-card);
}

.table-custom tbody tr:nth-of-type(even) {
  background-color: rgba(255, 255, 255, 0.015);
}

.table-custom tbody tr:hover {
  background-color: rgba(99, 102, 241, 0.07);
}

.table-custom tbody td {
  padding: 0.95rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
}

.result-badge {
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
  color: #fff;
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  min-width: 48px;
  text-align: center;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

/* Modals */
.modal-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  color: var(--text-main);
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
}

.modal-header .modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
}

/* Live Ad Preview Box */
.ad-preview-box {
  background-color: #ffffff;
  color: #000000;
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  min-height: 140px;
  overflow: auto;
  border: 2px dashed #94a3b8;
}

/* Alerts */
.alert-custom {
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}
.alert-custom.alert-success {
  background-color: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}
.alert-custom.alert-danger {
  background-color: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* Quick Action Card */
.quick-action-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #fff;
  transition: var(--transition);
}
.quick-action-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
  color: #fff;
}
.quick-action-card .action-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* Responsive & Mobile Drawer */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1035;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  z-index: 1030;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0 0.5rem;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.4);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.35rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
  flex: 1;
  text-align: center;
  cursor: pointer;
  background: transparent;
  border: none;
}
.mobile-nav-item i {
  font-size: 1.15rem;
  margin-bottom: 2px;
}
.mobile-nav-item:hover, .mobile-nav-item.active {
  color: var(--primary);
}
.mobile-nav-item.highlight-btn {
  color: #fff;
}
.mobile-nav-item.highlight-btn i {
  background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.show {
    transform: translateX(0);
  }
  .sidebar-overlay.show {
    display: block;
  }
  .admin-main {
    margin-left: 0;
    padding-bottom: 74px; /* Space for mobile bottom bar */
  }
  .admin-topbar {
    padding: 0 1rem;
    height: 60px;
  }
  .admin-content {
    padding: 1rem 0.85rem;
  }
  .page-title {
    font-size: 1.25rem !important;
  }
  .page-header-box {
    margin-bottom: 1.25rem;
  }
  .mobile-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
  }
  /* Prevent auto-zooming on mobile input focus */
  .form-control, .form-select {
    font-size: 16px !important;
  }
  .btn {
    min-height: 42px;
  }
  .stat-card .stat-value {
    font-size: 1.6rem;
  }
}

/* Summernote WYSIWYG Editor Dark Theme Styles */
.note-editor.note-frame {
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  overflow: hidden;
}

.note-toolbar {
  background-color: var(--bg-surface) !important;
  border-bottom: 1px solid var(--border-color) !important;
  padding: 0.5rem 0.75rem !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.25rem !important;
}

.note-btn {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-main) !important;
  padding: 0.35rem 0.65rem !important;
  font-size: 0.8rem !important;
  border-radius: 4px !important;
}

.note-btn:hover,
.note-btn:focus,
.note-btn.active {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

.note-btn-group .note-btn {
  border-radius: 0 !important;
}

.note-btn-group .note-btn:first-child {
  border-top-left-radius: 4px !important;
  border-bottom-left-radius: 4px !important;
}

.note-btn-group .note-btn:last-child {
  border-top-right-radius: 4px !important;
  border-bottom-right-radius: 4px !important;
}

.note-dropdown-menu {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-lg) !important;
  color: var(--text-main) !important;
}

.note-dropdown-item {
  color: var(--text-main) !important;
}

.note-dropdown-item:hover {
  background-color: var(--bg-surface) !important;
  color: #fff !important;
}

.note-editable {
  background-color: #ffffff !important;
  color: #1a1a1a !important;
  min-height: 260px;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 1.25rem !important;
}

.note-statusbar {
  background-color: var(--bg-surface) !important;
  border-top: 1px solid var(--border-color) !important;
}

.note-statusbar .note-resizebar .note-icon-bar {
  border-top-color: var(--border-color) !important;
}

.note-modal .modal-content {
  background-color: var(--bg-card) !important;
  color: var(--text-main) !important;
}

/* ==========================================================================
   Summernote Popovers & Ad Link Editor (Safe Edit Mode - Links Disabled)
   ========================================================================== */

/* In Summernote built-in link popover, hide the clickable URL so link will not work in edit mode and only edit options show */
.note-link-popover .popover-content > span:first-child,
.note-link-popover .note-popover-content > span:first-child,
.note-link-popover a:not(.note-btn) {
  display: none !important;
}

.note-link-popover .note-btn[data-event="showLinkDialog"] {
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%) !important;
  color: #fff !important;
  font-weight: 600 !important;
  border: none !important;
}

/* Custom Ad Link Edit Floating Popover */
.ad-link-edit-popover {
  position: absolute;
  z-index: 1060;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.5));
  animation: adPopFadeIn 0.15s ease-out;
}

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

.ad-link-edit-popover .popover-inner {
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  background-color: #0f172a !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-sm);
}

/* Visual cues for editable links and buttons inside the editor */
.note-editable a {
  cursor: pointer !important;
  transition: var(--transition);
}

.note-editable a:hover {
  outline: 2px dashed rgba(99, 102, 241, 0.8) !important;
  outline-offset: 3px !important;
}

.note-editable a button,
.note-editable button {
  cursor: pointer !important;
  user-select: text !important;
}



