:root {
  --bg: #f4f0ea;
  --ink: #132334;
  --ink-soft: #4d6073;
  --surface: #ffffff;
  --surface-2: #fcfaf7;
  --line: #dccfbf;
  --accent: #0a7f8f;
  --accent-2: #f08a4b;
  --danger: #a22c29;
  --radius: 14px;
  --shadow: 0 14px 38px rgba(16, 34, 49, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

.gradient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(10, 127, 143, 0.23), transparent 35%),
    radial-gradient(circle at 84% 14%, rgba(240, 138, 75, 0.24), transparent 32%),
    radial-gradient(circle at 56% 87%, rgba(19, 35, 52, 0.1), transparent 42%);
  z-index: -1;
}

.theme-surface {
  display: grid;
  place-items: center;
}

.login-shell {
  width: min(95vw, 980px);
  padding: 24px;
}

.auth-card {
  max-width: 460px;
  background: linear-gradient(165deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  animation: rise-in 360ms ease-out;
}

.logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: block;
  margin-bottom: 8px;
}

.logo.small {
  width: 48px;
  height: 48px;
  margin: 0;
}

.logo-shield {
  object-fit: cover;
  object-position: center 28%;
}

.eyebrow {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  font-size: 0.8rem;
}

h1 {
  margin: 4px 0 8px;
  font-size: clamp(1.35rem, 1.8vw, 1.8rem);
}

h2 {
  margin: 0 0 16px;
  font-size: 1.15rem;
}

p {
  margin: 8px 0;
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: 0.92rem;
}

.topbar {
  width: min(1200px, 96vw);
  margin: 22px auto 12px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.dashboard-grid {
  width: min(1200px, 96vw);
  margin: 8px auto 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 16px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  animation: rise-in 300ms ease-out;
}

.stack {
  display: grid;
  gap: 10px;
}

.oauth-meta {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffaf1;
  padding: 10px 12px;
}

.oauth-meta p {
  margin: 6px 0;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

input:disabled {
  opacity: 0.68;
  background: #f2f2f2;
}

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: inline-block;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(140deg, var(--accent), #07616d);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.row {
  display: flex;
  align-items: center;
}

.gap {
  gap: 8px;
}

.selected-card {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffaf1;
  padding: 12px;
}

.status {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 390px;
  border-radius: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.status.error {
  border-color: #e8b6b4;
  background: #fff4f3;
  color: var(--danger);
}

.status.success {
  border-color: #9dd6a2;
  background: #f0fff1;
  color: #245b2f;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }
}
