@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  color-scheme: light;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: #0f1115;
  color: #f7f1e8;
  --ink: #10131c;
  --cream: #f7f1e8;
  --sand: #f5e7d2;
  --accent: #f89e67;
  --accent-strong: #ef7b3f;
  --soft: rgba(255, 255, 255, 0.08);
  --card: rgba(20, 23, 32, 0.92);
  --stroke: rgba(255, 255, 255, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #2a1f17 0%, #0f1115 55%);
}

body.locked #app-shell {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(9, 10, 14, 0.85);
  backdrop-filter: blur(10px);
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

body.locked .login-screen {
  opacity: 1;
  pointer-events: auto;
}

.login-card {
  width: min(420px, 100%);
  background: rgba(18, 21, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 24px;
  display: grid;
  gap: 16px;
  box-shadow: 0 24px 48px rgba(6, 8, 12, 0.6);
}

.login-card h2 {
  margin: 0;
}

.login-card .result {
  margin: 0;
}

.ambient {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(248, 158, 103, 0.18), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(87, 132, 255, 0.12), transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(248, 214, 145, 0.12), transparent 55%);
  pointer-events: none;
  z-index: -1;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 24px;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(248, 158, 103, 0.18), rgba(29, 34, 48, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 22px 40px rgba(7, 8, 12, 0.45);
  animation: floatIn 0.7s ease;
}

.hero-copy {
  flex: 1;
  min-width: 260px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: rgba(247, 241, 232, 0.75);
  margin: 0 0 8px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  color: #fff6e9;
}

.subhead {
  margin: 0;
  font-size: 16px;
  max-width: 440px;
  color: rgba(247, 241, 232, 0.78);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  min-width: 240px;
}

.hero-actions {
  display: flex;
  align-items: flex-start;
}

.stat {
  background: var(--soft);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(247, 241, 232, 0.65);
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.panel {
  background: var(--card);
  border-radius: 20px;
  padding: 22px;
  border: 1px solid var(--stroke);
  box-shadow: 0 18px 36px rgba(7, 10, 16, 0.45);
}

.panel h2 {
  margin: 0 0 6px;
}

.panel-subtitle {
  margin: 0;
  color: rgba(247, 241, 232, 0.7);
  font-size: 14px;
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: rgba(247, 241, 232, 0.7);
}

input {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  border-color: rgba(248, 158, 103, 0.6);
  box-shadow: 0 0 0 3px rgba(248, 158, 103, 0.2);
}

.search {
  min-width: 220px;
}

button {
  align-self: flex-end;
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: var(--ink);
  font-weight: 600;
}

button.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
}

button.small {
  padding: 8px 12px;
  font-size: 12px;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(6, 8, 12, 0.4);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.result {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 12, 18, 0.8);
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 13px;
  white-space: pre-wrap;
  color: #d9d2c7;
}

.result.muted {
  color: rgba(247, 241, 232, 0.5);
}

.result.error {
  border-color: rgba(241, 97, 94, 0.4);
  color: #ffb2ad;
}

.result.success {
  border-color: rgba(130, 224, 170, 0.4);
  color: #c8f7dc;
}

.status-line {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: rgba(247, 241, 232, 0.6);
  margin-bottom: 12px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

th {
  color: rgba(247, 241, 232, 0.7);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

small {
  display: block;
  color: rgba(247, 241, 232, 0.55);
  margin-top: 4px;
}

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

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
  }

  .hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .button-row {
    width: 100%;
  }

  button,
  .search {
    width: 100%;
  }
}
