@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap");

:root {
  --bg: #f4f6fa;
  --bg-soft: #eef1f6;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --danger: #dc2626;
  --ok: #10b981;
  --sidebar-bg: #f1f2ee;
  --surface-bg: #ffffff;
  --surface-radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family:
    "DM Sans",
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background:
    radial-gradient(
      circle at 32% 16%,
      transparent 0 39px,
      #d7dce6 40px 41px,
      transparent 42px
    ),
    radial-gradient(
      circle at 32% 16%,
      transparent 0 84px,
      #d7dce6 85px 86px,
      transparent 87px
    ),
    radial-gradient(
      circle at 32% 16%,
      transparent 0 139px,
      #d7dce6 140px 141px,
      transparent 142px
    ),
    radial-gradient(
      circle at 32% 16%,
      transparent 0 204px,
      #d7dce6 205px 206px,
      transparent 207px
    ),
    radial-gradient(
      circle at 32% 16%,
      transparent 0 274px,
      #d7dce6 275px 276px,
      transparent 277px
    );
}

.auth-page::before {
  opacity: 0;
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 44%) 1fr;
  background: #f3f5f8;
}

.auth-left {
  display: grid;
  place-items: center;
  padding: 26px;
}

.auth-card {
  width: min(520px, 100%);
  min-height: 86vh;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 28px 22px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.auth-brand {
  font-family: "DM Sans", "IBM Plex Serif", Georgia, serif;
  font-size: 34px;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.auth-center {
  display: grid;
  align-content: center;
  justify-items: stretch;
  padding: 22px 0 12px;
}

.auth-title {
  margin: 0;
  text-align: center;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #171717;
  font-weight: 500;
}

.auth-subtitle {
  text-align: center;
  margin-top: 10px;
  font-size: 24px;
  color: #64748b;
  font-weight: 400;
}

.auth-form {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.auth-field {
  display: grid;
  gap: 10px;
}

.auth-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-form input {
  height: 46px;
  border-radius: 10px;
  border-color: #e2e8f0;
  padding: 12px 14px;
}

.auth-form input:focus {
  outline: none;
  border-color: #c7d2fe;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.auth-form input::placeholder {
  color: #94a3b8;
}

.auth-primary {
  width: 100%;
  border: 1px solid #94a3b8;
  background: #8b8b8b;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  cursor: pointer;
}

.auth-primary:hover {
  filter: brightness(0.97);
}

.auth-sep {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 6px 0 2px;
  color: #94a3b8;
  font-size: 12px;
}

.auth-card .form-message {
  margin-top: 2px;
}

.auth-sep::before,
.auth-sep::after {
  content: "";
  height: 1px;
  background: #e2e8f0;
}

.auth-oauth {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.gmark {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: conic-gradient(
    from 210deg,
    #ea4335 0 25%,
    #fbbc05 0 50%,
    #34a853 0 75%,
    #4285f4 0 100%
  );
}

.auth-switch {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 900;
}

.auth-legal {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
  line-height: 1.4;
}

.auth-legal a {
  color: #64748b;
}

.auth-right {
  position: relative;
  overflow: hidden;
  background: #eef1ea;
  border-left: 1px solid #e2e8f0;
}

.auth-right::before {
  content: "";
  position: absolute;
  inset: -120px -120px -120px -120px;
  opacity: 0.9;
  background:
    radial-gradient(
      circle at 62% 44%,
      transparent 0 92px,
      rgba(148, 163, 184, 0.35) 93px 94px,
      transparent 95px
    ),
    radial-gradient(
      circle at 62% 44%,
      transparent 0 170px,
      rgba(148, 163, 184, 0.25) 171px 172px,
      transparent 173px
    ),
    radial-gradient(
      circle at 62% 44%,
      transparent 0 260px,
      rgba(148, 163, 184, 0.2) 261px 262px,
      transparent 263px
    ),
    radial-gradient(
      circle at 62% 44%,
      transparent 0 360px,
      rgba(148, 163, 184, 0.18) 361px 362px,
      transparent 363px
    );
}

.auth-right-inner {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 36px;
}

.auth-big {
  width: min(720px, 60%);
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 500;
  color: #171717;
}

.auth-accent {
  color: var(--accent);
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  font-weight: 700;
  font-size: 14px;
}

.brand-wordmark {
  font-family: "DM Sans", "IBM Plex Serif", Georgia, serif;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand-dot {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-group-label {
  color: #9ca3af;
  font-size: 11px;
  margin: 8px 6px 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 8px 10px;
  text-decoration: none;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
}

.nav-ic {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  background: #64748b;
  -webkit-mask-size: 18px 18px;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-size: 18px 18px;
  mask-repeat: no-repeat;
  mask-position: center;
}

.nav-link:hover .nav-ic {
  background: #1e40af;
}
.nav-link.active .nav-ic {
  background: #0f172a;
}

.nav-ic.i-dashboard {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%2011l9-8%209%208'%3E%3C/path%3E%3Cpath%20d='M5%2010v10h14V10'%3E%3C/path%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%2011l9-8%209%208'%3E%3C/path%3E%3Cpath%20d='M5%2010v10h14V10'%3E%3C/path%3E%3C/svg%3E");
}

.nav-ic.i-agents {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='4'%20y='6'%20width='16'%20height='12'%20rx='3'%3E%3C/rect%3E%3Cpath%20d='M9%2018v2'%3E%3C/path%3E%3Cpath%20d='M15%2018v2'%3E%3C/path%3E%3Cpath%20d='M9%2010h.01'%3E%3C/path%3E%3Cpath%20d='M15%2010h.01'%3E%3C/path%3E%3Cpath%20d='M10%2013h4'%3E%3C/path%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='4'%20y='6'%20width='16'%20height='12'%20rx='3'%3E%3C/rect%3E%3Cpath%20d='M9%2018v2'%3E%3C/path%3E%3Cpath%20d='M15%2018v2'%3E%3C/path%3E%3Cpath%20d='M9%2010h.01'%3E%3C/path%3E%3Cpath%20d='M15%2010h.01'%3E%3C/path%3E%3Cpath%20d='M10%2013h4'%3E%3C/path%3E%3C/svg%3E");
}

.nav-ic.i-chat {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2015a4%204%200%200%201-4%204H8l-5%203V7a4%204%200%200%201%204-4h10a4%204%200%200%201%204%204z'%3E%3C/path%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2015a4%204%200%200%201-4%204H8l-5%203V7a4%204%200%200%201%204-4h10a4%204%200%200%201%204%204z'%3E%3C/path%3E%3C/svg%3E");
}

.nav-ic.i-pending {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%208v5l3%202'%3E%3C/path%3E%3Ccircle%20cx='12'%20cy='12'%20r='9'%3E%3C/circle%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%208v5l3%202'%3E%3C/path%3E%3Ccircle%20cx='12'%20cy='12'%20r='9'%3E%3C/circle%3E%3C/svg%3E");
}

.nav-ic.i-integrations {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%201v4'%3E%3C/path%3E%3Cpath%20d='M12%2019v4'%3E%3C/path%3E%3Cpath%20d='M4.2%204.2l2.8%202.8'%3E%3C/path%3E%3Cpath%20d='M17%2017l2.8%202.8'%3E%3C/path%3E%3Cpath%20d='M1%2012h4'%3E%3C/path%3E%3Cpath%20d='M19%2012h4'%3E%3C/path%3E%3Cpath%20d='M4.2%2019.8L7%2017'%3E%3C/path%3E%3Cpath%20d='M17%207l2.8-2.8'%3E%3C/path%3E%3Ccircle%20cx='12'%20cy='12'%20r='3'%3E%3C/circle%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%201v4'%3E%3C/path%3E%3Cpath%20d='M12%2019v4'%3E%3C/path%3E%3Cpath%20d='M4.2%204.2l2.8%202.8'%3E%3C/path%3E%3Cpath%20d='M17%2017l2.8%202.8'%3E%3C/path%3E%3Cpath%20d='M1%2012h4'%3E%3C/path%3E%3Cpath%20d='M19%2012h4'%3E%3C/path%3E%3Cpath%20d='M4.2%2019.8L7%2017'%3E%3C/path%3E%3Cpath%20d='M17%207l2.8-2.8'%3E%3C/path%3E%3Ccircle%20cx='12'%20cy='12'%20r='3'%3E%3C/circle%3E%3C/svg%3E");
}

.nav-ic.i-settings {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%2015.5a3.5%203.5%200%201%200%200-7%203.5%203.5%200%200%200%200%207z'/%3E%3Cpath%20d='M19.4%2015a1.65%201.65%200%200%200%20.33%201.82l.06.06a2%202%200%200%201-1.42%203.42h-.2a1.65%201.65%200%200%200-1.5%201.1l-.02.08a2%202%200%200%201-3.86%200l-.02-.08a1.65%201.65%200%200%200-1.5-1.1h-.2a2%202%200%200%201-1.42-3.42l.06-.06A1.65%201.65%200%200%200%204.6%2015l-.02-.08a2%202%200%200%1%200-3.86l.02-.08a1.65%201.65%200%200%200-.33-1.82l-.06-.06A2%202%200%200%1%205.63%201.76h.2a1.65%201.65%200%200%0%201.5-1.1l.02-.08a2%202%200%200%1%203.86%200l.02.08a1.65%201.65%200%200%0%201.5%201.1h.2a2%202%200%200%1%201.42%203.42l-.06.06a1.65%201.65%200%200%0%201-.33%201.82l.02.08a2%202%200%200%1%200%203.86z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%2015.5a3.5%203.5%200%201%200%200-7%203.5%203.5%200%200%200%200%207z'/%3E%3Cpath%20d='M19.4%2015a1.65%201.65%200%200%200%20.33%201.82l.06.06a2%202%200%200%201-1.42%203.42h-.2a1.65%201.65%200%200%200-1.5%201.1l-.02.08a2%202%200%200%201-3.86%200l-.02-.08a1.65%201.65%200%200%200-1.5-1.1h-.2a2%202%200%200%201-1.42-3.42l.06-.06A1.65%201.65%200%200%200%204.6%2015l-.02-.08a2%202%200%200%1%200-3.86l.02-.08a1.65%201.65%200%200%200-.33-1.82l-.06-.06A2%202%200%200%1%205.63%201.76h.2a1.65%201.65%200%200%0%201.5-1.1l.02-.08a2%202%200%200%1%203.86%200l.02.08a1.65%201.65%200%200%0%201.5%201.1h.2a2%202%200%200%1%201.42%203.42l-.06.06a1.65%201.65%200%200%0%201-.33%201.82l.02.08a2%202%200%200%1%200%203.86z'/%3E%3C/svg%3E");
}

.nav-link:hover {
  background: #eef2ff;
  color: #1e40af;
}
.nav-link.active {
  background: #e7e9ee;
  color: #111827;
}

.sidebar-footer {
  margin-top: auto;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  color: var(--muted);
}

.profile-card {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  width: 100%;
  min-width: 0;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  flex-shrink: 0;
}

.subtle-btn {
  padding: 6px 10px;
  font-size: 11px;
  border-radius: 10px;
  color: #475569;
  background: #f8fafc;
}

.subtle-btn:hover {
  border-color: #cbd5e1;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.profile-row > div:not(.avatar):not(.profile-actions) {
  min-width: 0;
  flex: 1;
}

.avatar {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 9px;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
}

.profile-name {
  font-weight: 800;
  font-size: 12px;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-meta {
  font-size: 11px;
  color: #64748b;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface-bg);
}

.topbar {
  height: 56px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.breadcrumbs {
  color: #9ca3af;
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.content {
  padding: 20px;
  display: grid;
  gap: 14px;
}

.content > * {
  min-width: 0;
}

.page-header h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.page-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.metrics {
  display: grid;
  gap: 12px;
}

.metrics-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.metrics-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  padding: 14px 14px 12px;
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.05);
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metric-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 800;
}

.metric-ic {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #475569;
}

.metric-value {
  margin-top: 10px;
  font-size: 34px;
  letter-spacing: -0.03em;
  font-weight: 900;
  color: #0f172a;
}

.metric-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.metric-sub.delta.pos {
  color: #047857;
}
.metric-sub.delta.neg {
  color: #b91c1c;
}

.kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.surface {
  background: var(--surface-bg);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--surface-radius);
  padding: 18px;
}

.kpi-label {
  color: var(--muted);
  font-size: 12px;
}

.kpi-value {
  margin-top: 6px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.layout-2 {
  display: grid;
  gap: 12px;
  grid-template-columns: 2fr 1fr;
}

.layout-2.equal {
  grid-template-columns: 1fr 1fr;
}

.panel h2 {
  margin: 0 0 4px;
  font-size: 14px;
}

.panel p.subtle {
  margin: 0 0 12px;
}

.subtle {
  color: var(--muted);
  font-size: 12px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.stack {
  display: grid;
  gap: 8px;
}

details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: #f9fafb;
}

summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
}

.run-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.run-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.run-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.run-item-meta {
  font-size: 12px;
  color: #6b7280;
}

.status-pill {
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}

.status-pending_approval {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}
.status-approved {
  background: #dbeafe;
  color: #1e3a8a;
  border-color: #93c5fd;
}
.status-executed {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.status-failed,
.status-blocked {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.empty-note {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px;
  color: #6b7280;
  font-size: 12px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
}

.field-row {
  display: grid;
  grid-template-columns: 1.4fr 220px;
  gap: 12px;
  align-items: center;
}

.input-icon {
  position: relative;
}

.input-icon input {
  padding-left: 36px;
}

.input-icon .ic {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
}

.select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 13px) calc(50% - 2px);
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: #111827;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.btn.soft {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
}

.btn.soft:hover {
  border-color: #cbd5e1;
}

.btn.primary:hover {
  filter: brightness(0.98);
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: #0f172a;
}

.btn.icon {
  padding: 8px 10px;
  border-radius: 10px;
}

.btn.warn {
  border-color: #fecaca;
  color: var(--danger);
  background: #fff5f5;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  background: var(--panel-soft);
  color: #4b5563;
}

.pill.ok {
  background: #ecfdf5;
  color: #047857;
}

pre {
  margin: 8px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fafb;
  color: #111827;
  font-size: 12px;
  white-space: pre-wrap;
  max-height: 280px;
  overflow: auto;
}

.dev-details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.dev-details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 18px;
}

.modal {
  width: min(720px, 96vw);
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.18);
  overflow: hidden;
}

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

.modal-title {
  font-size: 13px;
  font-weight: 900;
  color: #0f172a;
}

.modal-body {
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}

.modal-actions {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.tg-note {
  border: 1px solid #bae6fd;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
}

.tg-alert-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.tg-alert {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  border: 1px solid transparent;
  background: #f8fafc;
  color: #334155;
}

.tg-alert.info {
  border-color: #bae6fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.tg-alert.success {
  border-color: #86efac;
  background: #ecfdf5;
  color: #047857;
}

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

.tg-meta {
  display: grid;
  gap: 4px;
}

.tg-meta-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

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

.step-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.step-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.table-wrap {
  max-width: 100%;
  overflow: auto;
}

.btn.mini {
  padding: 6px 10px;
  font-size: 11px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  text-align: left;
}

.table th {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #64748b;
  text-transform: uppercase;
  background: #f8fafc;
}

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

.inline-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

.badge.ok {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.badge.warn {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}
.badge.danger {
  background: #fff1f2;
  color: #991b1b;
  border-color: #fecdd3;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
}

.pill.green {
  border-color: #86efac;
  background: #ecfdf5;
  color: #047857;
}
.pill.orange {
  border-color: #fdba74;
  background: #fff7ed;
  color: #9a3412;
}
.pill.gray {
  border-color: #e2e8f0;
  background: #f1f5f9;
  color: #475569;
}
.pill.red {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.agent-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.04);
  cursor: pointer;
}

.agent-head {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: start;
  gap: 12px;
}

.agent-ic {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #e8efff;
  border: 1px solid #dbeafe;
  display: grid;
  place-items: center;
  color: #1d4ed8;
  font-weight: 900;
}

.agent-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.agent-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: #64748b;
}

.agent-desc {
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.agent-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
}

.agent-foot strong {
  color: #0f172a;
}

.chat-shell {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 14px;
  min-height: calc(100vh - 170px);
}

.chat-main {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  background: #fff;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-title {
  font-size: 22px;
  font-weight: 900;
  margin: 0;
}

.chat-sub {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.chat-empty {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 12px;
  color: #64748b;
}

.chat-empty .bot {
  width: 120px;
  height: 120px;
  border-radius: 26px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: #1d4ed8;
  font-size: 46px;
  font-weight: 900;
}

.chat-stream {
  overflow: auto;
  display: grid;
  gap: 10px;
  align-content: start;
  padding-right: 6px;
}

.bubble {
  max-width: 78%;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.45;
}

.bubble.user {
  margin-left: auto;
  background: #eef2ff;
  border-color: #c7d2fe;
}

.bubble.meta {
  background: #f8fafc;
  color: #475569;
}

.chat-input {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 10px;
  align-items: center;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  padding-top: 12px;
}

.send-btn {
  width: 44px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #7b7b7b;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.send-btn:hover {
  filter: brightness(0.98);
}

.chat-side {
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  background: #fff;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.side-title {
  font-size: 18px;
  font-weight: 900;
  margin: 0;
}

.mini-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  font-weight: 900;
}

.history-list {
  display: grid;
  gap: 8px;
  align-content: start;
  overflow: auto;
}

.history-empty {
  display: grid;
  place-items: center;
  padding: 28px 10px;
  text-align: center;
  color: #94a3b8;
  border: 1px dashed #e2e8f0;
  border-radius: 14px;
}

.pending-card {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.pending-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.pending-agent {
  font-size: 13px;
  color: #64748b;
}

.pending-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-top: 6px;
}

.pending-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.scroll-area {
  max-height: calc(100vh - 320px);
  overflow: auto;
  padding-right: 6px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.chip.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.toggle {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #e5e7eb;
  border: 1px solid #e2e8f0;
  cursor: pointer;
}

.toggle.on {
  background: #2563eb;
  border-color: #2563eb;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(2, 6, 23, 0.18);
  transition: left 120ms ease;
}

.toggle.on::after {
  left: 21px;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.tab {
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.tab.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.qr-box {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.qr-box img {
  display: block;
  max-width: 320px;
  width: 100%;
  height: auto;
  margin-top: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  image-rendering: pixelated;
}

code {
  background: #eef2ff;
  color: #1e40af;
  border-radius: 6px;
  padding: 2px 5px;
  font-size: 12px;
}

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

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.hero {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(145deg, #f8fafc, #eef3ff);
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 16px 0;
}

.hero-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.onboarding-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 32% 68%;
  position: relative;
  z-index: 1;
}

.onboarding-side {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.onboarding-brand {
  font-family: "DM Sans", "IBM Plex Serif", Georgia, serif;
  font-size: 36px;
  margin: 0;
}

.onboarding-main {
  display: grid;
  place-items: center;
  padding: 18px;
}

.onboarding-card {
  width: min(760px, 94%);
  min-height: 78vh;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 24px;
}

.auth-card {
  min-height: 560px;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.auth-tabs .btn {
  background: #f8fafc;
}

.auth-tabs .btn.tab-active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.form-message {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #991b1b;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  margin-top: 8px;
}

.onboarding-progress {
  height: 6px;
  border-radius: 999px;
  background: #eceff5;
  overflow: hidden;
  margin-bottom: 34px;
}

.onboarding-progress > span {
  display: block;
  height: 100%;
  background: #111;
  transition: width 200ms ease;
}

.onboarding-body {
  width: min(470px, 100%);
  margin: 0 auto;
}

.onboarding-body h2 {
  font-size: 42px;
  line-height: 1.05;
  margin: 0 0 12px;
}

.guardrail-grid {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.guardrail-row {
  display: grid;
  grid-template-columns: 1fr 170px;
  align-items: center;
  gap: 10px;
}

.guardrail-row label {
  font-size: 13px;
  color: #111827;
}

.onboarding-page {
  background: #eef1ea;
}

.onboarding-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.9;
  background:
    radial-gradient(
      circle at 22% 46%,
      transparent 0 92px,
      rgba(148, 163, 184, 0.25) 93px 94px,
      transparent 95px
    ),
    radial-gradient(
      circle at 22% 46%,
      transparent 0 170px,
      rgba(148, 163, 184, 0.2) 171px 172px,
      transparent 173px
    ),
    radial-gradient(
      circle at 22% 46%,
      transparent 0 260px,
      rgba(148, 163, 184, 0.18) 261px 262px,
      transparent 263px
    ),
    radial-gradient(
      circle at 22% 46%,
      transparent 0 360px,
      rgba(148, 163, 184, 0.14) 361px 362px,
      transparent 363px
    ),
    radial-gradient(
      circle at 18% 18%,
      rgba(148, 163, 184, 0.18) 0 2px,
      transparent 3px
    ),
    radial-gradient(
      circle at 10% 68%,
      rgba(148, 163, 184, 0.18) 0 2px,
      transparent 3px
    ),
    radial-gradient(
      circle at 30% 28%,
      rgba(148, 163, 184, 0.14) 0 2px,
      transparent 3px
    ),
    radial-gradient(
      circle at 34% 62%,
      rgba(148, 163, 184, 0.14) 0 2px,
      transparent 3px
    );
}

.welcome-brand {
  position: fixed;
  top: 22px;
  left: 26px;
  z-index: 2;
  font-family: "DM Sans", "IBM Plex Serif", Georgia, serif;
  font-size: 36px;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.welcome-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 44px;
}

.welcome-card {
  width: min(1180px, 92vw);
  min-height: min(760px, 86vh);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.08);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.welcome-progress {
  height: 6px;
  background: #eceff5;
  overflow: hidden;
}

.welcome-progress > span {
  display: block;
  height: 100%;
  background: #111;
  transition: width 200ms ease;
}

.welcome-grid {
  display: grid;
  grid-template-columns: 1fr minmax(380px, 520px) 1fr;
}

.welcome-body {
  grid-column: 2;
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 44px 12px;
}

.welcome-body h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.welcome-sub {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.55;
}

.welcome-step {
  display: grid;
  gap: 16px;
  margin-top: 4px;
}

.welcome-actions {
  display: flex;
  justify-content: flex-start;
}

.welcome-actions .btn.primary {
  border-color: #111827;
  background: #111827;
}

.actions-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
}

.chart-canvas {
  width: 100%;
  height: 280px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.eyebrow {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

.lede {
  max-width: 58ch;
  color: var(--muted);
}

.header-1 {
  font-size: 48px;
  font-weight: 500;
  font-family: "DM Sans", "IBM Plex Serif", Georgia, serif;
  color: #171717;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metrics-3 {
    grid-template-columns: 1fr;
  }
  .metrics-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .layout-2,
  .layout-2.equal {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .chat-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0 12px;
  }
  .content {
    padding: 12px;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .metrics-4 {
    grid-template-columns: 1fr;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .onboarding-wrap {
    grid-template-columns: 1fr;
  }
  .onboarding-side {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .onboarding-card {
    min-height: auto;
  }
  .onboarding-body h2 {
    font-size: 32px;
  }
  .guardrail-row {
    grid-template-columns: 1fr;
  }
  .step-head {
    flex-direction: column;
  }
}

/* ============================================
   SPINNER COMPONENT
   ============================================ */

.spinner {
  display: inline-block;
  position: relative;
}

.spinner-ring {
  display: inline-block;
  width: 40px;
  height: 40px;
  position: relative;
}

.spinner-ring:after {
  content: "";
  display: block;
  width: 32px;
  height: 32px;
  margin: 4px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  border-color: var(--accent) transparent var(--accent) transparent;
  animation: spinner-rotate 1.2s linear infinite;
}

/* Size variants */
.spinner-sm .spinner-ring {
  width: 20px;
  height: 20px;
}

.spinner-sm .spinner-ring:after {
  width: 14px;
  height: 14px;
  margin: 3px;
  border-width: 2px;
}

.spinner-md .spinner-ring {
  width: 40px;
  height: 40px;
}

.spinner-md .spinner-ring:after {
  width: 32px;
  height: 32px;
  margin: 4px;
  border-width: 3px;
}

.spinner-lg .spinner-ring {
  width: 64px;
  height: 64px;
}

.spinner-lg .spinner-ring:after {
  width: 54px;
  height: 54px;
  margin: 5px;
  border-width: 4px;
}

/* Color variants */
.spinner-light .spinner-ring:after {
  border-color: #fff transparent #fff transparent;
}

.spinner-muted .spinner-ring:after {
  border-color: var(--muted) transparent var(--muted) transparent;
}

/* Spinner overlay for full-page or container loading */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(244, 246, 250, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  animation: spinner-fade-in 0.2s ease-out forwards;
}

.spinner-overlay-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--surface-radius);
  opacity: 0;
  animation: spinner-fade-in 0.2s ease-out forwards;
}

.spinner-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px;
  background: var(--panel);
  border-radius: 16px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.spinner-overlay-text {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
  margin: 0;
}

/* Inline spinner for buttons */
.btn .spinner-inline {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
  vertical-align: text-bottom;
}

/* Hide content while loading */
.loading-state {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

@keyframes spinner-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes spinner-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-right {
    display: none;
  }
  .auth-card {
    min-height: auto;
  }
  .auth-title {
    font-size: 38px;
  }
  .auth-big {
    font-size: 36px;
  }

  .welcome-stage {
    justify-content: center;
    padding: 18px;
  }
  .welcome-brand {
    position: static;
    padding: 18px 18px 0;
  }
  .welcome-grid {
    grid-template-columns: 1fr;
  }
  .welcome-body {
    grid-column: 1;
    padding: 34px 18px;
  }
}
