:root {
  --bg: #f1f4f8;
  --ink: #0f1a2b;
  --ink-soft: #5e6d82;
  --card: rgba(255, 255, 255, 0.92);
  --accent: #1454d0;
  --accent-strong: #0f45b2;
  --success: #1a8f63;
  --danger: #c33042;
  --line: #d9e1ec;
  --shadow: 0 20px 44px rgba(12, 30, 66, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -10%, #dbe7ff 0%, transparent 36%),
    radial-gradient(circle at 110% 0%, #d7f4ea 0%, transparent 36%),
    linear-gradient(150deg, #eff3f8 0%, #f6f8fb 100%);
  min-height: 100vh;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
}

p {
  margin: 0;
}

.bg-orb {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(72px);
  pointer-events: none;
  opacity: 0.45;
}

.bg-orb-a {
  top: -140px;
  left: -120px;
  background: #a4bbff;
}

.bg-orb-b {
  right: -140px;
  bottom: -140px;
  background: #9ee2c9;
}

.shell {
  position: relative;
  z-index: 2;
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.hero-headline {
  margin-bottom: 18px;
  animation: rise-in 420ms ease-out;
}

.hero-headline h1 {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  margin-top: 6px;
  color: var(--ink-soft);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.74rem;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.card-login {
  max-width: 560px;
  margin: 24px auto 56px;
  padding: 30px;
  animation: rise-in 420ms ease-out;
}

.card-dashboard {
  padding: 24px;
  animation: rise-in 420ms ease-out;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.topbar-left {
  display: grid;
  gap: 4px;
}

.topbar-left h2 {
  letter-spacing: -0.02em;
}

.action-groups {
  display: grid;
  gap: 10px;
  margin: 16px 0 14px;
}

.form-grid,
.grid-2 {
  display: grid;
  gap: 14px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  display: grid;
  gap: 12px;
}

.panel-head {
  display: grid;
  gap: 4px;
}

.panel-log {
  margin-top: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fbfdff;
  color: var(--ink);
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

input:focus,
select:focus {
  outline: 2px solid rgba(20, 84, 208, 0.18);
  border-color: var(--accent);
  background: #fff;
}

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 120ms ease, filter 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn-primary {
  background: linear-gradient(130deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-weight: 700;
}

.btn-secondary {
  background: #f5f8fe;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-success {
  background: rgba(26, 143, 99, 0.12);
  color: #125f43;
  border-color: rgba(26, 143, 99, 0.28);
}

.btn-danger {
  background: rgba(195, 48, 66, 0.1);
  color: #8d1f2f;
  border-color: rgba(195, 48, 66, 0.24);
}

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

.action-row-workflow .btn {
  background: #fff;
}

.muted {
  color: var(--ink-soft);
}

.status {
  min-height: 1.2em;
  color: var(--accent-strong);
  font-weight: 600;
  margin-bottom: 10px;
}

.error {
  color: var(--danger);
  margin-top: 6px;
}

.mask {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

pre {
  margin: 0;
  max-height: 330px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #0f1827;
  color: #d2dcf3;
  border-radius: 10px;
  padding: 12px;
  font-size: 0.84rem;
}

@keyframes rise-in {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-dashboard {
    padding: 16px;
  }

  .card-login {
    margin-top: 14px;
    padding: 20px;
  }
}
