:root {
  --app-bg: #f5f7f8;
  --app-panel: #ffffff;
  --app-text: #111827;
  --app-muted: #5b6472;
  --app-border: #d7dde5;
  --app-border-strong: #a9b4c2;
  --app-primary: #0f766e;
  --app-primary-dark: #115e59;
  --app-danger-bg: #fff4f4;
  --app-danger-border: #f3b4b4;
  --app-danger-text: #9c1b1b;
  --app-shadow: 0 16px 42px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--app-bg);
  color: var(--app-text);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-shell {
  width: min(440px, 100%);
}

.auth-card {
  display: grid;
  gap: 22px;
  padding: 30px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-panel);
  box-shadow: var(--app-shadow);
}

.brand-lock {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.98), rgba(17, 94, 89, 0.96)),
    #0f766e;
}

.auth-heading {
  display: grid;
  gap: 5px;
}

.auth-heading p,
.eyebrow {
  margin: 0;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-heading h1,
.topbar h1,
.intro h2 {
  margin: 0;
  line-height: 1.1;
}

.auth-heading h1 {
  font-size: 28px;
}

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

.auth-form label {
  display: grid;
  gap: 7px;
  color: #293241;
  font-size: 14px;
  font-weight: 800;
}

.auth-form input {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--app-border-strong);
  border-radius: 6px;
  background: #fbfcfd;
  color: var(--app-text);
}

.auth-form input:focus {
  border-color: var(--app-primary);
  outline: 3px solid rgba(15, 118, 110, 0.16);
}

.alert {
  padding: 11px 12px;
  border: 1px solid var(--app-danger-border);
  border-radius: 6px;
  background: var(--app-danger-bg);
  color: var(--app-danger-text);
  font-size: 14px;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid var(--app-border-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--app-text);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.btn--primary {
  border-color: var(--app-primary);
  background: var(--app-primary);
  color: #ffffff;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--app-primary-dark);
}

.btn--ghost:hover,
.btn--ghost:focus-visible,
.component-card__action:hover,
.component-card__action:focus-visible {
  border-color: var(--app-primary);
  outline: 3px solid rgba(15, 118, 110, 0.14);
}

.app-page {
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--app-border);
  background: var(--app-panel);
}

.topbar h1 {
  margin-top: 4px;
  font-size: 26px;
}

.topbar__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--app-muted);
  font-size: 14px;
  font-weight: 800;
}

.catalog-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 26px 0 38px;
}

.intro {
  display: grid;
  gap: 8px;
  max-width: 780px;
  margin-bottom: 22px;
}

.intro h2 {
  font-size: 22px;
}

.intro p {
  margin: 0;
  color: var(--app-muted);
  font-size: 15px;
  line-height: 1.55;
}

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

.component-card {
  display: grid;
  min-height: 178px;
  grid-template-rows: 1fr auto;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-panel);
}

.component-card--disabled {
  background: #fafbfc;
  color: #6b7280;
}

.component-card__body {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.component-card__status {
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid rgba(15, 118, 110, 0.26);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--app-primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.component-card--disabled .component-card__status {
  border-color: #d1d5db;
  background: #f3f4f6;
  color: #6b7280;
}

.component-card h3 {
  margin: 0;
  font-size: 19px;
}

.component-card p {
  margin: 0;
  color: var(--app-muted);
  font-size: 14px;
  line-height: 1.45;
}

.component-card__action {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--app-border);
  color: var(--app-primary-dark);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.component-card__action--disabled {
  color: #8b949e;
}

@media (max-width: 900px) {
  .component-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .component-grid {
    grid-template-columns: 1fr;
  }
}
