:root {
  --bg-dark: #0a0e17;
  --panel-bg: rgba(18, 26, 43, 0.7);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --accent-cyan: #38bdf8;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  --radius-lg: 16px;
  --radius-md: 10px;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Glowing Blobs */
.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  filter: blur(90px);
  opacity: 0.45;
}

.blob {
  position: absolute;
  border-radius: 50%;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #38bdf8 0%, #0369a1 100%);
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #8b5cf6 0%, #4c1d95 100%);
  bottom: -100px;
  right: -100px;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #10b981 0%, #047857 100%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Layout */
.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.4);
}

.header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.badge {
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mode-badge {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.clock-card {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
}

/* Grid */
.grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .grid-layout {
    grid-template-columns: 1fr;
  }
}

/* Card */
.card {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 12px;
}

.card-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
}

.date-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 6px;
}

/* Status Card Body */
.status-body {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 0;
}

.status-indicator-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid var(--accent-amber);
  animation: pulse-ring 2s infinite;
}

.status-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-amber);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

/* Status Themes */
.status-SUCCESS .status-ring {
  border-color: var(--accent-green);
}
.status-SUCCESS .status-icon {
  background: var(--accent-green);
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.5);
}

.status-FAILED .status-ring {
  border-color: var(--accent-red);
}
.status-FAILED .status-icon {
  background: var(--accent-red);
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.5);
}

.status-PROCESSING .status-ring {
  border-color: var(--accent-cyan);
  animation: spin-ring 1.5s linear infinite;
}
.status-PROCESSING .status-icon {
  background: var(--accent-cyan);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.5);
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 0.3; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

@keyframes spin-ring {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.status-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.status-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* Buttons */
.btn {
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  color: #fff;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.3);
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--panel-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.metric-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
}

.text-success { color: var(--accent-green); }
.text-danger { color: var(--accent-red); }

/* Config List */
.config-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.config-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
}

.config-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.config-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-cyan);
}

/* Terminal Log */
.logs-card {
  grid-column: 1 / -1;
}

.terminal-wrapper {
  background: #060911;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px;
  height: 240px;
  overflow-y: auto;
}

.terminal-content {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-info { color: #38bdf8; }
.log-warn { color: #f59e0b; }
.log-error { color: #ef4444; }

.log-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.log-date-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.select-sm {
  background: rgba(18, 26, 43, 0.9);
  color: var(--accent-cyan);
  border: 1px solid var(--panel-border);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}

.select-sm:focus {
  border-color: var(--accent-cyan);
}

/* Footer */
.footer {
  text-align: center;
  padding: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
