:root {
  color-scheme: light;
  --color-bg: #f5f6f8;
  --color-panel: #ffffff;
  --color-ink: #1f2937;
  --color-muted: #667085;
  --color-line: #d7dce3;
  --color-brand: #c91927;
  --color-brand-dark: #95111c;
  --color-dark: #111827;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--color-dark);
  color: #ffffff;
  border-bottom: 3px solid var(--color-brand);
}

.topbar__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--color-brand);
}

.brand__accent {
  color: #ff6b73;
}

.workspace {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px 20px;
}

.panel {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 20px;
}

.panel + .panel {
  margin-top: 16px;
}

.panel__title {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

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

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.status-item {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fbfcfd;
}

.status-item__label {
  margin: 0 0 6px;
  color: var(--color-muted);
  font-size: 13px;
}

.status-item__value {
  margin: 0;
  font-weight: 700;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--color-brand);
  background: var(--color-brand);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--color-brand-dark);
  border-color: var(--color-brand-dark);
}

.button--secondary {
  background: #ffffff;
  color: var(--color-brand);
}

.button--secondary:hover {
  background: #fff1f2;
  color: var(--color-brand-dark);
}

.button--full {
  width: 100%;
  justify-content: center;
}

.button--topbar {
  border-color: #ffffff;
  background: transparent;
  color: #ffffff;
}

.button--topbar:hover {
  background: #ffffff;
  color: var(--color-dark);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #f7f8fa 0%, #e9edf2 100%);
}

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

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--color-dark);
  font-size: 22px;
  font-weight: 800;
}

.auth-panel {
  background: #ffffff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
}

.auth-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.auth-subtitle {
  margin: 8px 0 20px;
  color: var(--color-muted);
  line-height: 1.45;
}

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

.field {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 9px 11px;
  color: var(--color-ink);
  font: inherit;
  font-weight: 400;
}

.field input:focus {
  outline: 3px solid rgba(201, 25, 39, 0.16);
  border-color: var(--color-brand);
}

.alert {
  border-radius: var(--radius);
  padding: 11px 12px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.4;
}

.alert--error {
  border: 1px solid #f3b7bf;
  background: #fff1f3;
  color: #8f1020;
}

.alert--success {
  border: 1px solid #9ed8b0;
  background: #effaf2;
  color: #176d31;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  color: var(--color-muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--color-line);
}

.external-login {
  display: grid;
  gap: 10px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, #f4f6f9 0%, #e8ecf2 100%);
  background-size: 28px 28px, auto;
}

.login-shell {
  width: min(1040px, 100%);
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(380px, 1fr);
  overflow: hidden;
  border: 1px solid #cfd5de;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.18);
}

.login-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(201, 25, 39, 0.18), transparent 42%),
    #111827;
}

.login-aside::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: var(--color-brand);
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 800;
}

.brand__mark--large {
  width: 42px;
  height: 42px;
  font-size: 21px;
}

.login-aside__content {
  position: relative;
  z-index: 1;
  max-width: 380px;
}

.login-kicker {
  margin: 0 0 12px;
  color: #ff9aa3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-headline {
  margin: 0;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: 0;
}

.login-copy {
  margin: 18px 0 0;
  color: #c7d0dd;
  line-height: 1.55;
}

.login-badges {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.login-badges span,
.login-security span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.login-badges span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px;
}

.login-panel__header {
  margin-bottom: 20px;
}

.auth-eyebrow {
  margin: 0 0 8px;
  color: var(--color-brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-title {
  margin: 0;
  color: #101828;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.auth-subtitle {
  margin: 9px 0 0;
  color: var(--color-muted);
  line-height: 1.45;
}

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

.field {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfd5de;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--color-ink);
  background: #ffffff;
  font: inherit;
  font-weight: 400;
}

.field input:focus {
  outline: 3px solid rgba(201, 25, 39, 0.16);
  border-color: var(--color-brand);
}

.password-input {
  position: relative;
  display: block;
}

.password-input input {
  padding-right: 88px;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 6px;
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  background: #f2f4f7;
  color: #475467;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.password-toggle:hover {
  background: #e4e7ec;
}

.button--login {
  min-height: 44px;
  justify-content: center;
  margin-top: 2px;
  font-size: 15px;
}

.button--login:disabled {
  cursor: wait;
  opacity: 0.75;
}

.provider-button {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  border: 1px solid #cfd5de;
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: #101828;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.provider-button:hover {
  border-color: var(--color-brand);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
  transform: translateY(-1px);
}

.provider-button__mark {
  width: 44px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f2f4f7;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.provider-button__mark--ajj {
  background: #fff1f3;
  color: var(--color-brand);
}

.provider-button strong,
.provider-button small {
  display: block;
}

.provider-button strong {
  font-size: 14px;
}

.provider-button small {
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 12px;
}

.provider-button--disabled {
  color: #667085;
  background: #f7f8fa;
  cursor: not-allowed;
}

.provider-button--disabled:hover {
  border-color: #cfd5de;
  box-shadow: none;
  transform: none;
}

.login-security {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.login-security span {
  background: #f2f4f7;
  color: #475467;
}

.login-help {
  margin: 18px 0 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .auth-page {
    padding: 14px;
    place-items: stretch;
  }

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

  .login-aside {
    min-height: 270px;
    padding: 24px;
  }

  .login-headline {
    font-size: 30px;
  }

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

@media (max-width: 460px) {
  .login-headline {
    font-size: 26px;
  }

  .auth-title {
    font-size: 24px;
  }

  .provider-button {
    grid-template-columns: 38px 1fr;
  }

  .provider-button__mark {
    width: 38px;
  }
}
