/* ====================================================
   PIXEL PRO — Clean Light Editorial
   Soft whites + gentle blue accents + modern clarity
   ==================================================== */

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

:root {
  /* Core palette: clean whites & soft grays */
  --bg-deep: #f5f7fa;
  --bg-primary: #ffffff;
  --bg-elevated: #f0f2f5;
  --bg-card: #ffffff;
  --surface-hover: rgba(0, 0, 0, 0.02);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);

  /* Text hierarchy */
  --text-primary: #1a1d26;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  /* Accent — vivid blue-violet */
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-dim: rgba(99, 102, 241, 0.08);
  --accent-glow: rgba(99, 102, 241, 0.06);

  /* Semantic */
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.08);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.08);
  --cyan: #0ea5e9;
  --cyan-dim: rgba(14, 165, 233, 0.08);
  --yellow: #f59e0b;
  --yellow-dim: rgba(245, 158, 11, 0.08);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Spacing & shape */
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows — soft light-mode */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.06);
}

/* ===========================
   Reset
   =========================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Subtle decorative top bar */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #a78bfa, #ec4899, var(--accent));
  z-index: 1000;
}

/* Ambient gradient glow */
body::after {
  content: '';
  position: fixed;
  top: -30%;
  right: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.04) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.bg-orbs { display: none; }

/* ===========================
   Layout
   =========================== */
.app-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* ===========================
   Header
   =========================== */
.app-header {
  padding: 14px 0;
  position: sticky;
  top: 3px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  margin: 0 -24px;
  padding-left: 24px;
  padding-right: 24px;
}

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

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

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(145deg, var(--accent), #a78bfa);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.25);
  transition: var(--transition);
}

.logo-icon:hover {
  transform: rotate(-4deg) scale(1.05);
}

.logo h1 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-buy-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
  text-decoration: none;
  white-space: nowrap;
  animation: gentlePulse 3s ease-in-out infinite;
}

.btn-buy-key:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
  filter: brightness(1.06);
}

@keyframes gentlePulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25); }
  50% { box-shadow: 0 2px 18px rgba(245, 158, 11, 0.4); }
}

/* User badge */
.user-display {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-badge {
  padding: 5px 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.2px;
}

.btn-logout {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-logout:hover {
  background: var(--red-dim);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--red);
}

/* ===========================
   Cards
   =========================== */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

/* Subtle top-edge gradient line on cards */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
}

.glass-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow), var(--shadow-glow);
}

/* ===========================
   Login / Setup
   =========================== */
.cdkey-setup {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 40px 0;
}

.setup-card {
  width: 100%;
  max-width: 440px;
  text-align: center;
  animation: fadeSlideUp 0.7s cubic-bezier(0.2, 0, 0, 1);
}

.setup-icon {
  font-size: 3.2rem;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.15));
}

.setup-card h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.setup-desc {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 0.88rem;
}

/* ===========================
   Inputs
   =========================== */
.input-group {
  margin-bottom: 16px;
  text-align: left;
}

.input-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.input-hint {
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 0 16px rgba(99, 102, 241, 0.06);
  background: var(--bg-primary);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: linear-gradient(145deg, var(--accent), #818cf8);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
  filter: brightness(1.06);
}

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

.btn-secondary {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.btn-danger {
  background: var(--red-dim);
  border: 1.5px solid rgba(239, 68, 68, 0.15);
  color: var(--red);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; filter: none !important; }

/* Loader */
.btn-loader {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ===========================
   Tab Navigation
   =========================== */
.tab-nav {
  display: flex;
  gap: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 8px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-body);
  transition: var(--transition);
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.tab-btn:hover {
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.03);
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.25);
  font-weight: 600;
}

.tab-btn.active svg { stroke: #fff; }

/* ===========================
   Tab Panels
   =========================== */
.tab-panel { display: none; }
.tab-panel.active {
  display: block;
  animation: fadeSlideUp 0.35s cubic-bezier(0.2, 0, 0, 1);
}

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

.card-header h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.card-header p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.card-header code {
  background: var(--accent-dim);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--accent);
}

/* ===========================
   Balance Display
   =========================== */
.balance-display {
  text-align: center;
  padding: 24px;
}

.balance-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
}

.balance-value {
  display: block;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -2px;
}

/* ===========================
   Result Areas
   =========================== */
.result-area {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  animation: fadeSlideUp 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.result-success {
  border-left: 3px solid var(--green);
  border-color: rgba(34, 197, 94, 0.15);
  background: rgba(34, 197, 94, 0.04);
}

.result-error {
  border-left: 3px solid var(--red);
  border-color: rgba(239, 68, 68, 0.15);
  background: rgba(239, 68, 68, 0.04);
}

/* ===========================
   Status Badges
   =========================== */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-success { background: var(--green-dim); color: var(--green); }
.status-failed { background: var(--red-dim); color: var(--red); }
.status-pending { background: var(--yellow-dim); color: var(--yellow); }
.status-running { background: var(--cyan-dim); color: var(--cyan); }
.status-cancelled { background: rgba(0, 0, 0, 0.04); color: var(--text-muted); }

/* ===========================
   Batch Submit
   =========================== */
.batch-actions { margin-top: 8px; }

.progress-wrap {
  margin-top: 16px;
  padding: 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.progress-bar {
  width: 100%;
  height: 5px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #818cf8);
  border-radius: 3px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.batch-results { overflow-x: auto; }

.batch-results table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.batch-results th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.batch-results td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

/* ===========================
   Toast Notifications
   =========================== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: #fff;
  animation: toastIn 0.35s cubic-bezier(0.2, 0, 0, 1);
  box-shadow: var(--shadow-lg);
  max-width: 360px;
  backdrop-filter: blur(8px);
}

.toast-success { background: var(--green); }
.toast-error { background: var(--red); }
.toast-info { background: var(--accent); }
.toast-exit { animation: toastOut 0.3s ease-out forwards; }

/* ===========================
   Footer
   =========================== */
.app-footer {
  text-align: center;
  padding: 28px 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.3px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

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

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 640px) {
  .app-container { padding: 0 16px; }
  .tab-btn span { display: none; }
  .tab-btn { padding: 12px; }
  .glass-card { padding: 20px; }
  .setup-card h2 { font-size: 1.3rem; }
  .app-header { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .btn-buy-key span { display: none; }
  .btn-buy-key { padding: 8px 12px; }
}

/* ===========================
   Scrollbar
   =========================== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.2); }

/* ===========================
   Announcement Banner
   =========================== */
.announcement-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.03));
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-primary);
  animation: fadeSlideDown 0.5s cubic-bezier(0.2, 0, 0, 1);
  word-break: break-word;
}

.announcement-banner .announce-icon { flex-shrink: 0; font-size: 1.1rem; }

.announcement-banner a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(99, 102, 241, 0.3);
  font-weight: 500;
  transition: var(--transition);
}

.announcement-banner a:hover {
  color: var(--accent-light);
  text-decoration-color: var(--accent);
}

.announcement-banner p { margin-bottom: 6px; }
.announcement-banner p:last-child { margin-bottom: 0; }
.announcement-banner strong { font-weight: 600; color: inherit; }
.announcement-banner ul, .announcement-banner ol { padding-left: 20px; margin: 4px 0; }

/* ===========================
   Task List
   =========================== */
.task-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.task-actions .btn {
  width: auto;
  padding: 10px 20px;
}

.task-list-area {
  animation: fadeSlideUp 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.task-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.task-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.task-table th {
  text-align: left;
  padding: 11px 14px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
}

.task-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

.task-table tr:last-child td { border-bottom: none; }

.task-table tr:hover td {
  background: rgba(0, 0, 0, 0.015);
}

.email-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
}

.msg-cell {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.col-id {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.col-date {
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.col-wait {
  white-space: nowrap;
  font-size: 0.76rem;
  color: var(--cyan);
  font-weight: 500;
}

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

.btn-cancel-task {
  padding: 5px 12px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  background: var(--red-dim);
  color: var(--red);
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
}

.btn-cancel-task:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}

.empty-hint {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* Batch Summary */
.batch-summary {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.summary-item {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.summary-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.summary-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-total .summary-num { color: var(--accent); }
.summary-success .summary-num { color: var(--green); }
.summary-fail .summary-num { color: var(--red); }

.batch-table-wrap { overflow-x: auto; }

.batch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.batch-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.batch-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

/* ===========================
   Task Pagination
   =========================== */
.task-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  padding: 12px 0;
}

.page-btn {
  padding: 8px 20px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

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

.page-info {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Checkboxes */
.col-checkbox { width: 36px; text-align: center; }

.col-checkbox input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--accent);
}

.row-selected td {
  background: rgba(99, 102, 241, 0.04) !important;
}

/* Result rows (single submit) */
.result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.result-row:last-child { border-bottom: none; }

.result-row .label {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
}

.result-row .value {
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
}

.result-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Query mode toggle (legacy compat) */
.query-mode-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border-radius: var(--radius-xs);
  padding: 3px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.toggle-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-body);
  transition: var(--transition);
}

.toggle-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 4px rgba(99, 102, 241, 0.25);
}

/* ===========================
   Custom Confirm Modal
   =========================== */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease-out;
}

.confirm-overlay.confirm-exit {
  animation: fadeOut 0.2s ease-out forwards;
}

.confirm-box {
  max-width: 400px;
  width: 100%;
  padding: 28px !important;
  animation: fadeSlideUp 0.25s cubic-bezier(0.2, 0, 0, 1);
}

.confirm-message {
  font-size: 0.92rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 24px;
  text-align: center;
}

.confirm-actions {
  display: flex;
  gap: 10px;
}

.confirm-actions .btn {
  flex: 1;
  padding: 11px 20px;
}

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

/* ===========================
   Live Status Monitor
   =========================== */
.live-status-card {
  padding: 20px 24px !important;
  margin-bottom: 20px;
}

.live-status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.live-status-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.live-status-title svg {
  color: var(--accent);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: #ef4444;
  border-radius: 4px;
  animation: livePulse 2s ease-in-out infinite;
}

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

.live-status-counters {
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.live-counter span:first-child {
  font-weight: 700;
}

.live-dot-success,
.live-dot-fail {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.live-dot-success {
  background: #22c55e;
  box-shadow: 0 0 4px rgba(34, 197, 94, 0.5);
}

.live-dot-fail {
  background: #ef4444;
  box-shadow: 0 0 4px rgba(239, 68, 68, 0.5);
}

.live-dots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 0;
  min-height: 36px;
  align-items: center;
}

.live-dots-grid .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.live-dots-grid .dot:hover {
  transform: scale(1.6);
  z-index: 1;
}

.live-dots-grid .dot.dot-success {
  background: #22c55e;
  box-shadow: 0 0 3px rgba(34, 197, 94, 0.4);
}

.live-dots-grid .dot.dot-success:hover {
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}

.live-dots-grid .dot.dot-fail {
  background: #ef4444;
  box-shadow: 0 0 3px rgba(239, 68, 68, 0.4);
}

.live-dots-grid .dot.dot-fail:hover {
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
}

.live-dots-grid .dot.dot-empty {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  opacity: 0.5;
}

.live-status-timeline {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
}
