:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #dbe3ea;
  --text: #111827;
  --muted: #64748b;
  --blue: #2563eb;
  --green: #15803d;
  --amber: #d97706;
  --violet: #6d28d9;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(230, 236, 244, 0.88), rgba(246, 247, 249, 0) 360px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.account-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.account-bar a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: #334155;
  padding: 0 12px;
  text-decoration: none;
}

.account-bar a:hover {
  border-color: rgba(37, 99, 235, 0.38);
  color: var(--blue);
}

.central-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-card {
  display: grid;
  place-items: center;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid #16233a;
  border-radius: 8px;
  background: #061326;
  box-shadow: var(--shadow);
}

.brand-card img {
  width: min(92%, 620px);
  height: auto;
  display: block;
}

.hero-copy {
  padding: 8px 0;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 6px 0 12px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.96;
}

.hero-copy p:last-child {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.6;
}

.dashboard-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  padding: 18px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: 1.15rem;
}

.section-heading span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

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

.dashboard-card {
  position: relative;
  min-height: 236px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: inherit;
  padding: 18px;
  text-decoration: none;
}

.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--blue);
}

.dashboard-card.violet::before { background: var(--violet); }
.dashboard-card.green::before { background: var(--green); }
.dashboard-card.amber::before { background: var(--amber); }

.dashboard-card.is-active {
  background: #ffffff;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.dashboard-card.is-active:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.12);
}

.dashboard-card.is-disabled {
  opacity: 0.72;
}

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

.status,
.arrow {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.status {
  background: #e0f2fe;
  color: #075985;
  padding: 0 10px;
}

.is-disabled .status {
  background: #e2e8f0;
  color: #475569;
}

.arrow {
  color: var(--muted);
}

.dashboard-card h3 {
  margin: auto 0 8px;
  font-size: 1.32rem;
  line-height: 1.12;
}

.dashboard-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(420px, 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 24px;
}

.auth-card img {
  display: block;
  width: min(260px, 100%);
  margin: 0 auto 22px;
  border-radius: 8px;
  background: #061326;
}

.auth-card h1 {
  margin: 6px 0 18px;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  line-height: 1.05;
}

.auth-form,
.admin-form {
  display: grid;
  gap: 12px;
}

.auth-form label,
.admin-form label,
.user-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.auth-form input,
.admin-form input,
.admin-form select,
.user-row input,
.user-row select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 0 10px;
  outline: none;
}

.auth-form input:focus,
.admin-form input:focus,
.admin-form select:focus,
.user-row input:focus,
.user-row select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auth-form button,
.admin-form button,
.user-row button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-weight: 900;
  padding: 0 14px;
}

.form-alert {
  margin-bottom: 14px;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  background: #fff1f2;
  color: #9f1239;
  font-weight: 800;
  padding: 10px 12px;
}

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

.admin-form {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  align-items: end;
  margin-bottom: 18px;
}

.user-list {
  display: grid;
  gap: 10px;
}

.user-row {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 0.8fr 1fr auto auto auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.user-row strong,
.user-row small {
  display: block;
}

.user-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
}

.check-label {
  align-self: center;
}

.check-label input {
  width: auto;
  min-height: auto;
}

.user-row .danger-button {
  background: #be123c;
}

@media (max-width: 1100px) {
  .hero,
  .dashboard-grid,
  .admin-form,
  .user-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .central-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
  }

  .hero,
  .dashboard-grid,
  .admin-form,
  .user-row {
    grid-template-columns: 1fr;
  }

  .account-bar {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .brand-card {
    min-height: 170px;
  }

  .section-heading {
    flex-direction: column;
  }
}
