:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --border: #e5e7eb;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
}

input,
select,
button {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.stat-card,
.panel-card,
.table-card,
.form-card,
.cluster-card,
.metric-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 9999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-buy { background: #dcfce7; color: #15803d; }
.badge-watch { background: #fef3c7; color: #b45309; }
.badge-review { background: #dbeafe; color: #1d4ed8; }
.badge-reject { background: #fee2e2; color: #b91c1c; }
.badge-completed { background: #dcfce7; color: #166534; }
.badge-processing { background: #dbeafe; color: #1d4ed8; }
.badge-failed { background: #fee2e2; color: #b91c1c; }
.badge-muted { background: #f1f5f9; color: #475569; }
.badge-warning { background: #fef3c7; color: #b45309; }

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 9999px;
  background: #e2e8f0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: #64748b;
  font-weight: 700;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
  font-size: 0.88rem;
}

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

.metric-positive { color: #16a34a; }
.metric-negative { color: #dc2626; }
.metric-primary { color: #2563eb; }

.side-overlay {
  background: rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(3px);
}

.log-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
  line-height: 1.5;
}

.kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #2563eb;
}

.login-card {
  width: min(420px, calc(100vw - 32px));
}

.nav-active {
  color: #2563eb;
  font-weight: 700;
}
