/* ==========================================================================
   CoreStation - Core Blockchain (XCB) Autonomous Node & Asset Station
   Design: Calm, High-Legibility, White-Canvas Precision Engineering
   Theme: Neutral White & Slate (#0f172a / #f8fafc) + Steel Blue Accent (#1e40af / #2563eb)
   ========================================================================== */

:root {
  /* Brand Accents - Calm, institutional steel blue & crisp emerald */
  --primary: #1e40af;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-tint: rgba(30, 64, 175, 0.08);
  --primary-border: #bfdbfe;

  --accent-blue: #0284c7;
  --accent-blue-light: #f0f9ff;
  
  --success: #059669;
  --success-light: #ecfdf5;
  --success-border: #a7f3d0;
  
  --warning: #d97706;
  --warning-light: #fffbeb;
  --warning-border: #fde68a;
  
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;

  /* Surfaces & Canvas - True White Base */
  --bg-page: #ffffff;
  --bg-surface: #f8fafc;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --bg-subtle: #f8fafc;

  /* Text Colors - High-Contrast Precision Typography */
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Borders & Dividers */
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-focus: #94a3b8;

  /* Shadows - Minimal, natural, zero neon glow */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.03);

  /* Structure */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Fira Code", Menlo, monospace;
}

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

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

.font-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Drawer Navigation (Mobile / Full Menu)
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1500;
  animation: fadeIn 0.15s ease-out;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100vh;
  background-color: #ffffff;
  border-right: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  z-index: 1501;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  animation: slideInLeft 0.2s ease-out;
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

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

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-surface);
}

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

.drawer-logo {
  height: 32px;
  width: 32px;
}

.drawer-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.btn-close-drawer {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

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

.drawer-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 14px 12px 6px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1.05rem;
  text-decoration: none !important;
  transition: all 0.15s;
}

.drawer-link:hover {
  background-color: var(--bg-surface);
  color: var(--primary);
}

.drawer-link.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Header Navbar
   ========================================================================== */
.navbar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.btn-hamburger {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-hamburger:hover {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-focus);
}

.navbar-brand .brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo-svg {
  width: 32px;
  height: 32px;
  display: block;
}

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

.brand-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Main Top Navigation Tabs (Dashboard vs Details) */
.main-tabs-nav {
  display: flex;
  align-items: center;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 3px;
  gap: 3px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9999px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 9px 24px;
  text-decoration: none !important;
  transition: all 0.15s ease;
  border: none;
  background: transparent;
  cursor: pointer;
}

.tab-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.6);
}

.tab-btn.active {
  background-color: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

.tab-icon {
  font-size: 1.05rem;
}

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

.net-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--success);
}

.btn-db-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-db-status:hover {
  background-color: var(--bg-hover);
  color: var(--primary);
  border-color: var(--primary-border);
}

/* ==========================================================================
   Sub-Tabs Navigation (Within Details View)
   ========================================================================== */
.sub-tabs-container {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
  background-color: var(--bg-surface);
  border-radius: var(--radius);
  padding: 4px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.sub-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1.02rem;
  padding: 10px 22px;
  text-decoration: none !important;
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.sub-tab-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.7);
}

.sub-tab-btn.active {
  background-color: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

.sub-view {
  display: none;
}

.sub-view.active {
  display: block;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.main-container {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  flex: 1;
}

.app-view {
  display: none;
}

.app-view.active {
  display: block;
  animation: fadeInView 0.15s ease-out;
}

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

.view-header {
  margin-bottom: 24px;
}

.view-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.view-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   Hero KPI Banner (Dashboard)
   ========================================================================== */
.hero-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.hero-kpi-card {
  min-width: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-kpi-card:hover {
  border-color: var(--border-focus);
}

.hero-kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.hero-kpi-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-kpi-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.hero-kpi-val {
  font-size: clamp(1.4rem, 1.7vw, 1.8rem);
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-mono);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  margin-bottom: 4px;
}

.hero-kpi-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.4;
}

/* Quick Actions Bar */
.quick-actions-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding: 12px 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.quick-actions-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 4px;
}

/* Dashboard 2-Column Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
}

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

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background-color: #ffffff;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.card-content {
  padding: 20px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none !important;
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #ffffff;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none !important;
}

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

.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--success);
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-success:hover {
  background-color: #047857;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.9rem;
}

/* Copy Action Button */
.copy-btn {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

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

/* ==========================================================================
   Tables
   ========================================================================== */
.table-responsive {
  overflow-x: auto;
  width: 100%;
}

.daily-table, .custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.02rem;
  text-align: left;
}

.daily-table th, .custom-table th {
  background-color: var(--bg-surface);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.daily-table td, .custom-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.daily-table tbody tr:hover, .custom-table tbody tr:hover {
  background-color: var(--bg-hover);
}

.daily-table tr:last-child td, .custom-table tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   Badges
   ========================================================================== */
.badge-online {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 3px 10px;
  color: #ffffff;
}

.badge-info {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.badge-gray {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   Search & Inputs
   ========================================================================== */
.search-box-large {
  display: flex;
  gap: 8px;
  width: 100%;
}

.search-box-large input, .form-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1.02rem;
  padding: 11px 16px;
  background-color: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s;
}

.search-box-large input:focus, .form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint);
}

.form-select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  background-color: #ffffff;
  color: var(--text-main);
  outline: none;
}

/* ==========================================================================
   Code Boxes
   ========================================================================== */
.article-code-box, .code-snippet {
  background-color: #0f172a;
  color: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.55;
  overflow-x: auto;
  margin: 12px 0;
  position: relative;
}

.code-snippet code {
  color: #38bdf8;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-container {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 820px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.15s ease-out;
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface);
}

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

.modal-close-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

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

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   Article Cards & Content
   ========================================================================== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.article-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.article-card-cat {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.article-card-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 8px;
}

.article-card-summary {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-light);
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

/* Article Modal Body Typography */
.article-modal-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-modal-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 24px 0 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

.article-modal-content h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 18px 0 10px;
}

.article-modal-content p {
  margin-bottom: 12px;
}

.article-modal-content ul, .article-modal-content ol {
  margin: 10px 0 16px 20px;
}

.article-modal-content li {
  margin-bottom: 6px;
}

.article-alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin: 14px 0;
  font-size: 0.88rem;
  border-left: 4px solid;
}

.article-alert.info {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.article-alert.success {
  background-color: var(--success-light);
  border-color: var(--success);
  color: var(--success);
}

.article-alert.warning {
  background-color: var(--warning-light);
  border-color: var(--warning);
  color: #92400e;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background-color: #0f172a;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  animation: toastSlideUp 0.2s ease-out;
}

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

/* ==========================================================================
   Footer
   ========================================================================== */
.app-footer {
  border-top: 1px solid var(--border-color);
  background-color: #ffffff;
  padding: 20px 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.app-footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
  .navbar-container {
    padding: 10px 16px;
  }
  
  .main-tabs-nav {
    display: none; /* Mobile uses drawer menu */
  }
  
  .main-container {
    padding: 16px;
  }
  
  .hero-kpi-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-container {
    max-width: 100%;
    max-height: 94vh;
    border-radius: var(--radius);
  }
}

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

.spin {
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* ==========================================================================
   Worker List & Card Styles
   ========================================================================== */
.worker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  transition: all 0.15s ease;
  gap: 12px;
}

.worker-row:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  background-color: #fafbfc;
}

.worker-col-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.worker-device-icon {
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #f1f5f9;
  border-radius: 8px;
  flex-shrink: 0;
}

.worker-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.worker-name {
  font-weight: 700;
  font-size: 15.5px;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.worker-pool {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.worker-col-right {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: right;
}

.worker-hr-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.worker-hr {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
}

.worker-hr-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.worker-status {
  min-width: 68px;
  text-align: right;
}

.toggle-workers-btn {
  display: block;
  width: 100%;
  padding: 8px 12px;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--primary);
  background: var(--surface-secondary);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  transition: all 0.15s ease;
}

.toggle-workers-btn:hover {
  background: #ffffff;
  border-color: var(--primary);
}
