/* Wilbur — blue/white theme extracted from prototype CSS */

:root {
  --bg-top: #bfe5ff;
  --bg-mid: #d7efff;
  --bg-bottom: #ffffff;
  --card-glass: rgba(255, 255, 255, 0.55);
  --card-stroke: rgba(255, 255, 255, 0.6);
  --text-strong: #111827;
  --text-muted: #6b7280;
  --field-bg: #f3f4f6;
  --field-stroke: #e5e7eb;
  --focus: #3b82f6;
  --btn: #111111;
  --btn-text: #ffffff;
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
  --radius-xl: 18px;
  --radius-md: 12px;
  --radius-sm: 10px;
}

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

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--text-strong);
  background: linear-gradient(
    180deg,
    var(--bg-top) 0%,
    var(--bg-mid) 35%,
    var(--bg-bottom) 100%
  );
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* ---- Card ---- */
.card {
  padding: 2rem 2.5rem 2.5rem;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--card-glass);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid var(--card-stroke);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.card--wide {
  max-width: 800px;
}

/* ---- Brand badge (top-left) ---- */
.brand {
  position: fixed;
  top: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-weight: 600;
  font-size: 14px;
  opacity: 0.9;
  z-index: 1;
}

.brand-badge {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #111;
  background: #ffffffc9;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
}

/* ---- Decorative arcs ---- */
.arcs {
  position: fixed;
  inset: -10% -5% auto -5%;
  height: 70%;
  pointer-events: none;
  opacity: 0.7;
  filter: blur(0.2px);
  z-index: 0;
}

.arcs svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---- Logo pill (card header) ---- */
.logo-pill {
  width: 56px;
  height: 56px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ---- Headings ---- */
h1 {
  font-size: 20px;
  line-height: 1.2;
  text-align: center;
  margin: 6px 0;
  font-weight: 700;
  color: var(--text-strong);
}

.sub {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 18px;
}

/* ---- Form fields ---- */
label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 4px;
  color: var(--text-strong);
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
  width: 100%;
  padding: 10px 12px;
  background: var(--field-bg);
  border: 1px solid var(--field-stroke);
  border-radius: var(--radius-md);
  color: var(--text-strong);
  font: inherit;
  font-size: 0.9375rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  background: #fff;
}

::placeholder {
  color: #9ca3af;
}

/* ---- Buttons ---- */
.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #1c1c1c, #000);
  color: var(--btn-text);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.25);
  transition: filter 0.15s, transform 0.15s;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.05);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--run {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(59, 130, 246, 0.3),
    0 0 12px rgba(59, 130, 246, 0.25);
}

.btn--run:hover:not(:disabled) {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(59, 130, 246, 0.4),
    0 0 16px rgba(59, 130, 246, 0.35);
}

.btn--secondary {
  background: transparent;
  color: var(--text-strong);
  border: 1px solid var(--field-stroke);
  box-shadow: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.8125rem;
  padding: 8px 14px;
}

.btn--secondary:hover:not(:disabled) {
  background: var(--field-bg);
}

/* ---- Layout helpers ---- */
.spacer {
  margin: 1.5rem 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.topbar h1 {
  text-align: left;
  margin: 0;
  font-size: 1.25rem;
}

/* ---- Status / alerts ---- */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--field-stroke);
  font-size: 0.875rem;
  margin: 1rem 0;
}

.alert--info {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.alert--success {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.alert--error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

/* ---- Log table ---- */
.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  margin: 0.5rem 0;
}

.log-table th,
.log-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--field-stroke);
}

.log-table th {
  background: var(--field-bg);
  font-weight: 600;
  position: sticky;
  top: 0;
}

.log-wrap {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--field-stroke);
  border-radius: var(--radius-md);
}

/* ---- Hidden utility ---- */
.hidden {
  display: none;
}

/* ---- Caption ---- */
.caption {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
}
