:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --ink: #13151a;
  --muted: #667085;
  --line: #dde2eb;
  --panel: #ffffff;
  --green: #19d64f;
  --blue: #2563eb;
  --red: #ff2b1a;
  --amber: #f59e0b;
}

* {
  box-sizing: border-box;
}

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

.topbar {
  align-items: center;
  background: #050505;
  border-bottom-right-radius: 42px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 32px;
}

.topbar strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.topbar span,
.topbar a {
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
}

.topbar nav {
  display: flex;
  gap: 18px;
}

.topbar a {
  text-decoration: none;
}

.login-page {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(25, 214, 79, .10), transparent 34%),
    linear-gradient(315deg, rgba(37, 99, 235, .08), transparent 32%),
    var(--bg);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 28px;
}

.login-shell {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 440px);
  max-width: 1040px;
  width: 100%;
}

.login-brand,
.login-card {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.login-brand {
  background: #050505;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 520px;
  overflow: hidden;
  padding: 36px;
  position: relative;
}

.login-brand::before {
  background: linear-gradient(90deg, #19d64f, #d7e600);
  content: "";
  height: 8px;
  left: 36px;
  position: absolute;
  right: 36px;
  top: 36px;
}

.login-logo {
  align-items: center;
  background: #fff;
  border-radius: 8px;
  color: #050505;
  display: inline-flex;
  font-size: 18px;
  font-weight: 900;
  height: 56px;
  justify-content: center;
  margin-bottom: auto;
  width: 74px;
}

.login-brand h1 {
  color: #fff;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1;
  max-width: 620px;
}

.login-brand p:not(.eyebrow) {
  color: rgba(255, 255, 255, .72);
  font-size: 18px;
  line-height: 1.55;
  margin: 18px 0 0;
  max-width: 580px;
}

.security-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.security-list span {
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 11px;
}

.login-card {
  align-self: center;
  background: #fff;
  box-shadow: 0 24px 70px rgba(17, 24, 39, .10);
  padding: 34px;
}

.login-card h2 {
  font-size: 34px;
}

.login-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.5;
  margin: 10px 0 0;
}

.login-card form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.login-card input {
  background: #f8fafc;
  width: 100%;
}

.login-card input:focus {
  border-color: #19d64f;
  box-shadow: 0 0 0 4px rgba(25, 214, 79, .14);
  outline: 0;
}

.login-card button {
  min-height: 50px;
}

.alert {
  background: #ffe4e8;
  border-radius: 8px;
  color: #b42318;
  font-weight: 800;
  margin-top: 16px;
  padding: 12px;
}

.shell {
  margin: 0 auto;
  max-width: 1240px;
  padding: 28px 22px 48px;
}

.hero {
  align-items: end;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr minmax(280px, 420px);
  margin-bottom: 22px;
}

.hero.compact {
  grid-template-columns: 1fr;
}

.eyebrow {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1,
h2 {
  letter-spacing: 0;
  margin: 0;
}

h1 {
  font-size: clamp(32px, 5vw, 62px);
  line-height: .98;
  max-width: 760px;
}

.hero p:last-child {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  max-width: 760px;
}

.quick-card,
.metrics article,
.builder,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.builder-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(300px, 420px) 1fr;
}

.builder {
  display: grid;
  gap: 16px;
  padding: 22px;
}

label {
  color: #313844;
  display: grid;
  font-size: 14px;
  font-weight: 800;
  gap: 7px;
}

input,
select,
textarea,
button {
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  padding: 0 12px;
}

input,
select,
button {
  min-height: 46px;
}

textarea {
  padding: 12px;
  resize: vertical;
}

button {
  background: linear-gradient(90deg, #12df4a, #d7e600);
  border: 0;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.result-panel {
  padding: 22px;
}

.hint {
  color: var(--muted);
  line-height: 1.55;
}

.quick-card {
  padding: 20px;
}

.quick-card span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 10px;
}

code {
  background: #eef2f7;
  border-radius: 6px;
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
  padding: 12px;
}

.metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 22px;
}

.metrics article {
  padding: 18px;
}

.metrics span {
  color: var(--muted);
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
}

.metrics strong {
  font-size: 30px;
}

.panel {
  margin-bottom: 22px;
  overflow: hidden;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  padding: 22px;
}

.form-grid button {
  grid-column: 1 / -1;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.filterbar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(240px, 420px);
  margin-bottom: 22px;
  padding: 16px;
}

.notice {
  border-radius: 8px;
  font-weight: 800;
  margin-bottom: 16px;
  padding: 14px 16px;
}

.notice.success {
  background: #dcfae6;
  color: #067647;
}

.notice.danger {
  background: #ffe4e8;
  color: #b42318;
}

.admin-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  padding: 22px;
}

.admin-card {
  background: #f8fafc;
  border: 1px solid #e4e9f2;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.admin-card p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.admin-card label:has(input[type="checkbox"]) {
  align-items: center;
  display: flex;
  gap: 10px;
}

.admin-card input[type="checkbox"] {
  min-height: auto;
  width: auto;
}

.danger-button {
  background: #ff2b1a;
}

.panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 22px 24px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 1020px;
  width: 100%;
}

th,
td {
  border-top: 1px solid var(--line);
  font-size: 14px;
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f0f2f6;
  color: #313844;
  font-weight: 800;
}

.pill,
.status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.pill {
  background: #ecfdf3;
  color: #067647;
}

.status {
  background: #eef2f7;
  color: #344054;
}

.status-confirmed,
.status-approved,
.status-success,
.status-ok {
  background: #dcfae6;
  color: #067647;
}

.status-error,
.status-cancelled,
.status-rejected,
.status-trash {
  background: #ffe4e8;
  color: #b42318;
}

.status-hold,
.status-pending {
  background: #fff4d6;
  color: #b54708;
}

.empty {
  color: var(--muted);
  padding: 36px 16px;
  text-align: center;
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
  }

  .hero,
  .metrics,
  .builder-grid,
  .form-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .login-page {
    align-items: flex-start;
    padding: 16px;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: auto;
    padding: 26px;
  }

  .login-brand::before {
    left: 26px;
    right: 26px;
    top: 26px;
  }

  .login-logo {
    margin-bottom: 74px;
    margin-top: 28px;
  }

  .login-brand h1 {
    font-size: 38px;
  }

  .login-card {
    padding: 24px;
  }
}
