/* app/static/admin/admin.css */
:root {
  color-scheme: light;
  --page: #f3f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --line: #e3e9ec;
  --text: #17252d;
  --muted: #697981;
  --accent: #416b79;
  --accent-strong: #355c69;
  --accent-soft: #edf3f5;
  --success: #23744c;
  --success-bg: #edf7f1;
  --warning: #8a6930;
  --warning-bg: #faf5e9;
  --danger: #a83d3d;
  --danger-bg: #fff1f0;
  --shadow: 0 22px 60px rgba(30, 52, 62, .08);
  --radius-lg: 20px;
  --radius-md: 14px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: Inter, Manrope, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px 44px;
  position: relative;
}
.login-card {
  width: min(100%, 430px);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.035em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: var(--accent);
  font-size: 15px;
  font-weight: 750;
}
.login-heading { margin: 38px 0 24px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}
h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 10px;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.12;
  letter-spacing: -.045em;
}
h2 { margin: 0; font-size: 20px; letter-spacing: -.035em; }
.muted { color: var(--muted); }
.login-heading .muted { margin-bottom: 0; font-size: 14px; line-height: 1.55; }
.form-stack { display: grid; gap: 17px; }
.field { display: grid; gap: 8px; }
.field > span { color: #384b54; font-size: 13px; font-weight: 650; }
.field input {
  width: 100%;
  height: 47px;
  padding: 0 13px;
  border: 1px solid #d8e1e5;
  border-radius: 11px;
  outline: none;
  color: var(--text);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(65, 107, 121, .12);
}
.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--accent); }
.button-primary:hover { background: var(--accent-strong); }
.button-wide { width: 100%; min-height: 48px; margin-top: 4px; }
.button-quiet { color: #405760; background: #fff; border-color: var(--line); }
.button-quiet:hover { background: var(--surface-soft); border-color: #cbd7dc; }
.notice {
  margin: 0 0 18px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13px;
}
.notice-error { color: var(--danger); background: var(--danger-bg); border-color: #f5d1cf; }
.login-footnote { margin: 24px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.environment-label {
  position: absolute;
  bottom: 14px;
  margin: 0;
  color: #849198;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.page-shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0 32px; }
.topbar {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.88);
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-right form { margin: 0; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; color: #51636b; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4b9b6a; }
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 36px 3px 22px;
}
.page-heading h1 { margin-bottom: 8px; }
.page-heading .muted { margin-bottom: 0; font-size: 14px; }
.environment-badge {
  padding: 7px 10px;
  border: 1px solid #dce5e8;
  border-radius: 999px;
  color: #60717a;
  background: #fbfcfd;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-bottom: 15px; }
.summary-card, .content-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(30, 52, 62, .035);
}
.summary-card { display: flex; align-items: center; gap: 14px; min-height: 108px; padding: 20px; }
.summary-icon, .integration-mark {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  font-weight: 750;
}
.icon-blue { color: var(--accent); background: var(--accent-soft); }
.icon-green { color: var(--success); background: var(--success-bg); }
.card-label { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.card-value { margin: 0 0 3px; font-size: 16px; font-weight: 720; }
.card-detail { margin: 0; color: var(--muted); font-size: 12px; }
.content-card { margin-bottom: 15px; padding: 22px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-heading > .muted { margin: 0; font-size: 12px; }
.integration-list { border-top: 1px solid var(--line); }
.integration-row { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.integration-row:last-child { border-bottom: 0; }
.integration-copy { display: flex; align-items: center; gap: 12px; }
.integration-mark { width: 36px; height: 36px; border-radius: 11px; font-size: 13px; }
.mark-geld { color: #436c60; background: #eff5f2; }
.mark-meldid { color: #576982; background: #f0f3f7; }
.mark-core { color: #7b6850; background: #f7f4ef; }
.integration-copy strong { display: block; margin-bottom: 3px; font-size: 13px; }
.integration-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.state-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.state-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state-ready { color: var(--success); background: var(--success-bg); }
.state-pending { color: var(--warning); background: var(--warning-bg); }
.details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; border-top: 1px solid var(--line); }
.details-grid > div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.details-grid dt { color: var(--muted); font-size: 12px; }
.details-grid dd { margin: 0; color: #344851; font-size: 12px; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.page-footer { display: flex; justify-content: space-between; gap: 14px; padding: 7px 3px; color: #829098; font-size: 11px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

@media (max-width: 680px) {
  .page-shell { width: min(100% - 24px, 560px); padding-top: 12px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin: 28px 2px 18px; }
  .summary-grid, .details-grid { grid-template-columns: 1fr; }
  .summary-card { min-height: 92px; }
  .content-card { padding: 17px; }
  .details-grid > div { align-items: flex-start; flex-direction: column; gap: 5px; }
  .details-grid dd { text-align: left; }
  .page-footer { flex-direction: column; }
}
@media (max-width: 430px) {
  .login-card { padding: 26px 21px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar-right { width: 100%; justify-content: space-between; }
  .integration-row { align-items: flex-start; flex-direction: column; justify-content: center; padding: 12px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
