:root {
  color-scheme: light;
  font-family:
    "Golos Text",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --canvas: #eef0f3;
  --surface: #ffffff;
  --surface-subtle: #e4e7ec;
  --text: #2b3138;
  --secondary: #57636a;
  --border: #d3d8de;
  --border-strong: #767b78;
  --action-fill: #ffab00;
  --action-fill-hover: #f59e00;
  --on-action: #2b3138;
  --focus: #0068b5;
  --error: #b42318;
  --disabled: #687278;
  --brand-filter: none;
  --brand-opacity: 1;
  --control-radius: 3px;
  background: var(--canvas);
  color: var(--text);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #22262b;
  --surface: #2d3338;
  --surface-subtle: #262b30;
  --text: #e3ebee;
  --secondary: #aeb9c0;
  --border: #3d454c;
  --border-strong: #78838a;
  --action-fill: #ffab00;
  --action-fill-hover: #ffc133;
  --on-action: #16191d;
  --focus: #65b8ff;
  --error: #ff8a80;
  --disabled: #98a7aa;
  --brand-filter: brightness(0) invert(1);
  --brand-opacity: 0.94;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --canvas: #22262b;
    --surface: #2d3338;
    --surface-subtle: #262b30;
    --text: #e3ebee;
    --secondary: #aeb9c0;
    --border: #3d454c;
    --border-strong: #78838a;
    --action-fill: #ffab00;
    --action-fill-hover: #ffc133;
    --on-action: #16191d;
    --focus: #65b8ff;
    --error: #ff8a80;
    --disabled: #98a7aa;
    --brand-filter: brightness(0) invert(1);
    --brand-opacity: 0.94;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--canvas);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--canvas);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.site-header {
  min-height: 56px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header-inner {
  width: min(100%, 1120px);
  min-height: 56px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
}

.site-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-brand img {
  width: auto;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  filter: var(--brand-filter);
  opacity: var(--brand-opacity);
}

.site-brand-mark {
  height: 32px;
}

.site-brand-wordmark {
  height: 22px;
}

.site-brand-divider {
  width: 1px;
  height: 20px;
  flex: 0 0 1px;
  margin-inline: 4px;
  background: var(--border);
}

.site-brand-context {
  color: var(--secondary);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  white-space: nowrap;
}

.login-main {
  width: min(100%, 1120px);
  min-height: calc(100vh - 57px);
  min-height: calc(100svh - 57px);
  margin: 0 auto;
  padding: 56px 32px 40px;
}

.login-section {
  width: min(100%, 460px);
  margin: 0 auto;
}

h1 {
  margin: 0;
  font-size: 26px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.login-intro {
  margin: 12px 0 0;
  color: var(--secondary);
  font-size: 16px;
  line-height: 24px;
}

.login-form {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.required-help {
  margin: 0;
  color: var(--secondary);
  font-size: 14px;
  line-height: 20px;
}

.form-field {
  margin-top: 20px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

.form-field input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--control-radius);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  line-height: 24px;
  caret-color: var(--action-fill);
}

.form-field input:hover:not(:disabled) {
  border-color: var(--text);
}

.form-field input[aria-invalid="true"] {
  border-color: var(--error);
}

.form-field input:disabled {
  border-color: var(--border);
  color: var(--disabled);
  background: var(--surface-subtle);
  cursor: wait;
}

.password-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.password-toggle {
  min-width: 104px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--control-radius);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  cursor: pointer;
}

.password-toggle:hover:not(:disabled) {
  border-color: var(--text);
  background: var(--surface-subtle);
}

.password-toggle:disabled {
  border-color: var(--border);
  color: var(--disabled);
  cursor: wait;
}

.field-error {
  margin: 8px 0 0;
  color: var(--error);
  font-size: 14px;
  line-height: 20px;
}

.submit-button {
  width: 100%;
  min-height: 48px;
  margin-top: 24px;
  padding: 12px 20px;
  border: 1px solid var(--action-fill);
  border-radius: var(--control-radius);
  background: var(--action-fill);
  color: var(--on-action);
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  cursor: pointer;
}

.submit-button:hover:not(:disabled) {
  border-color: var(--action-fill-hover);
  background: var(--action-fill-hover);
}

.submit-button:disabled {
  border-color: var(--border-strong);
  background: var(--border-strong);
  color: var(--surface);
  cursor: wait;
}

.form-status {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--secondary);
  font-size: 14px;
  line-height: 20px;
}

.form-status[data-state="error"] {
  color: var(--error);
  font-weight: 500;
}

.security-note {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--secondary);
  font-size: 14px;
  line-height: 20px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  .site-header-inner {
    padding: 0 16px;
  }

  .login-main {
    padding: 32px 16px 28px;
  }

  h1 {
    font-size: 22px;
    line-height: 28px;
  }
}

@media (max-width: 420px) {
  .site-brand {
    gap: 8px;
  }

  .site-brand-mark {
    height: 28px;
  }

  .site-brand-wordmark {
    height: 20px;
  }

  .site-brand-divider,
  .site-brand-context {
    display: none;
  }
}

@media (max-width: 340px) {
  .password-control {
    grid-template-columns: minmax(0, 1fr);
  }

  .password-toggle {
    width: 100%;
  }
}
