/* =========================================================
   HỆ THỐNG TRA CỨU HÀNG LOẠT MÃ SỐ THUẾ - STYLES
   ========================================================= */

:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Dark Theme Palette (Default) */
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.78);
  --bg-card-hover: rgba(26, 36, 56, 0.88);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Accents & Brand Colors */
  --accent-red: #e11d48;
  --accent-red-glow: rgba(225, 29, 72, 0.35);
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.3);
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
body.light-theme {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(241, 245, 249, 0.95);
  --border-color: rgba(203, 213, 225, 0.7);
  --border-focus: rgba(99, 102, 241, 0.6);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background Ambient Orbs */
.bg-blur {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.bg-blur-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.35), transparent 70%);
  top: -150px;
  right: -100px;
}

.bg-blur-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25), transparent 70%);
  bottom: -150px;
  left: -150px;
}

.bg-blur-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2), transparent 70%);
  top: 40%;
  left: 30%;
}

.app-layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* =========================================================
   TOP NAVBAR
   ========================================================= */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2.5rem;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

body.light-theme .navbar {
  background: rgba(255, 255, 255, 0.88);
}

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

.brand-emblem {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e11d48, #f59e0b);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-red-glow);
}

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

.brand-title {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .brand-title {
  background: linear-gradient(90deg, #0f172a, #334155);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent-gold);
  letter-spacing: 0.8px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
}

.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
}

.indicator-dot.pulse {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); 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); }
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

/* =========================================================
   MAIN CONTAINER
   ========================================================= */
.main-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  width: 100%;
}

/* Hero Section */
.hero-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 992px) {
  .hero-section {
    flex-direction: column;
    align-items: flex-start;
  }
}

.hero-content {
  flex: 1;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: linear-gradient(90deg, rgba(225, 29, 72, 0.15), rgba(245, 158, 11, 0.15));
  border: 1px solid rgba(225, 29, 72, 0.3);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fb7185;
  margin-bottom: 0.75rem;
}

.hero-heading {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.6rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .hero-heading {
  background: linear-gradient(135deg, #0f172a 40%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 620px;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  min-width: 360px;
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
    min-width: 100%;
  }
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
}

.stat-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.stat-green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.stat-red { background: rgba(225, 29, 72, 0.15); color: #fb7185; }
.stat-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

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

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

.stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

/* =========================================================
   CARD & BATCH PANEL
   ========================================================= */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 2rem;
  transition: var(--transition);
}

.query-card {
  border-top: 2px solid rgba(225, 29, 72, 0.7);
}

.card-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.1rem 1.75rem;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border-color);
}

body.light-theme .card-header-bar {
  background: rgba(241, 245, 249, 0.7);
}

.card-header-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.6px;
  color: #fb7185;
}

.header-icon {
  font-size: 1.15rem;
}

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

.sample-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-sample {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-sample:hover {
  background: rgba(225, 29, 72, 0.2);
  border-color: rgba(225, 29, 72, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.batch-panel {
  padding: 2rem;
}

.batch-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
}

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

.input-section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.num-step {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e11d48, #f59e0b);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent-red);
  background: rgba(225, 29, 72, 0.08);
}

.drop-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.drop-text {
  font-size: 0.92rem;
  color: var(--text-primary);
}

.browse-link {
  color: var(--accent-red);
  text-decoration: underline;
  font-weight: 600;
}

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

.file-loaded-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius-md);
  color: #34d399;
}

.file-icon-badge {
  font-size: 1.4rem;
}

.file-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: left;
}

.file-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #f8fafc;
}

.file-count {
  font-size: 0.78rem;
  color: #34d399;
}

.btn-remove-file {
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.3);
  color: #fb7185;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
}

.btn-remove-file:hover {
  background: rgba(225, 29, 72, 0.3);
  transform: scale(1.05);
}

.divider-text {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  position: relative;
  margin: 1.25rem 0;
  font-weight: 600;
}

.divider-text::before, .divider-text::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 25%;
  height: 1px;
  background: var(--border-color);
}

.divider-text::before { left: 0; }
.divider-text::after { right: 0; }

.batch-textarea {
  width: 100%;
  padding: 0.85rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  outline: none;
  resize: vertical;
  line-height: 1.6;
}

body.light-theme .batch-textarea {
  background: #ffffff;
}

.batch-textarea:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

.batch-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.25rem 0;
}

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

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.select-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

body.light-theme .select-input {
  background: #ffffff;
}

.select-input:focus {
  border-color: var(--accent-red);
}

/* Buttons */
.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-red-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.45);
}

.btn-primary.btn-danger {
  background: linear-gradient(135deg, #dc2626, #991b1b);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.hidden {
  display: none !important;
}

.font-mono {
  font-family: var(--font-mono);
}

/* Right side Progress Card */
.batch-progress-card {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.progress-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.2px;
}

.progress-bar-container {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #e11d48, #f59e0b);
  border-radius: 20px;
  transition: width 0.3s ease;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

/* Terminal Log */
.terminal-log {
  flex: 1;
  background: #05070c;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  max-height: 300px;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 0.95rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #eab308; }
.terminal-dot.green { background: #22c55e; }

.terminal-title {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-left: 0.5rem;
  font-weight: 600;
}

.terminal-body {
  padding: 0.85rem;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.log-line { color: #94a3b8; }
.log-line.success { color: #34d399; }
.log-line.error { color: #fb7185; }
.log-line.warn { color: #fbbf24; }
.log-line.info { color: #60a5fa; }

/* =========================================================
   RESULTS TABLE SECTION
   ========================================================= */
.results-section {
  padding: 1.75rem 2rem;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.results-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.badge-count {
  background: rgba(225, 29, 72, 0.15);
  color: #fb7185;
  border: 1px solid rgba(225, 29, 72, 0.3);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
}

.results-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  font-size: 0.85rem;
  opacity: 0.6;
}

.search-box input {
  padding: 0.55rem 0.85rem 0.55rem 2.2rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  width: 190px;
  transition: var(--transition);
}

.search-box input:focus {
  width: 230px;
  border-color: var(--accent-red);
}

.select-filter {
  width: auto;
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-export.excel {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-export.excel:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-export.csv {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-export.csv:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-icon-danger {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(225, 29, 72, 0.12);
  border: 1px solid rgba(225, 29, 72, 0.25);
  color: #fb7185;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon-danger:hover {
  background: rgba(225, 29, 72, 0.25);
  transform: translateY(-1px);
}

/* Data Table */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.15);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.data-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.cell-mst {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

.cell-name {
  font-weight: 700;
  color: var(--text-primary);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge .badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-active {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}
.status-active .badge-dot { background-color: #34d399; }

.status-inactive {
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.3);
  color: #fb7185;
}
.status-inactive .badge-dot { background-color: #fb7185; }

.status-pending {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}
.status-pending .badge-dot { background-color: #fbbf24; }

.status-notfound {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #94a3b8;
}
.status-notfound .badge-dot { background-color: #94a3b8; }

.status-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}
.status-error .badge-dot { background-color: #ef4444; }

.btn-action-view {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-action-view:hover {
  background: rgba(225, 29, 72, 0.2);
  border-color: rgba(225, 29, 72, 0.4);
}

.btn-action-retry {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.btn-action-retry:hover {
  background: rgba(245, 158, 11, 0.3);
  border-color: rgba(245, 158, 11, 0.7);
  color: #fef3c7;
}

.btn-action-retry.loading {
  opacity: 0.6;
  pointer-events: none;
}

.btn-warning-soft {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.btn-warning-soft:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fff;
}

/* Empty State */
.empty-state {
  padding: 3.5rem 1rem;
  text-align: center;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.empty-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* =========================================================
   FOOTER
   ========================================================= */
.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: rgba(10, 14, 23, 0.85);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* =========================================================
   MODAL DIALOG
   ========================================================= */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-box {
  width: 100%;
  max-width: 600px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: modalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
}

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

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.modal-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-val {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

.modal-val.mst-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #38bdf8;
  font-size: 1.1rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideToast 0.3s ease-out;
  min-width: 280px;
}

@keyframes slideToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.toast-success { border-left: 4px solid var(--accent-emerald); }
.toast.toast-error { border-left: 4px solid var(--accent-red); }
.toast.toast-info { border-left: 4px solid var(--accent-blue); }
.toast.toast-warn { border-left: 4px solid var(--accent-gold); }
