:root {
  --bg: #f4f7f9;
  --surface: #ffffff;
  --surface-2: #eef3f6;
  --ink: #18242f;
  --muted: #637283;
  --line: #d9e2ec;
  --accent: #116466;
  --accent-dark: #0b4b4d;
  --danger: #b42318;
  --success: #0f7a4f;
  --focus: #d6a21f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
}

a {
  color: var(--accent-dark);
  font-weight: 700;
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.topbar__user {
  color: var(--muted);
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.topbar__user span {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.topbar__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.topbar__actions form {
  margin: 0;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 52px;
}

.auth-layout {
  min-height: calc(100vh - 160px);
  display: grid;
  align-items: center;
  justify-items: center;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 12px 34px rgba(24, 36, 47, 0.06);
}

.login-panel {
  width: min(440px, 100%);
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

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

h1 {
  font-size: 1.65rem;
}

h2 {
  font-size: 1.08rem;
}

.entry-form {
  display: grid;
  gap: 18px;
}

.form-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.form-heading p {
  color: var(--muted);
  margin: 6px 0 0;
}

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

label,
fieldset {
  display: grid;
  gap: 7px;
}

label span,
legend {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #bfccd8;
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(214, 162, 31, 0.38);
  outline-offset: 2px;
}

.span-all {
  grid-column: 1 / -1;
}

.checks {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.checks label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 500;
}

.checks input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.button,
.icon-button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.button:hover,
.icon-button:hover {
  background: var(--accent-dark);
}

.button:disabled {
  cursor: progress;
  opacity: 0.72;
}

.button--ghost {
  background: var(--surface-2);
  color: var(--ink);
}

.button--ghost:hover {
  background: #dce7ed;
}

.icon-button {
  width: 52px;
  padding: 0;
  font-size: 0.78rem;
}

.alert {
  border-radius: 8px;
  padding: 13px 16px;
  border: 1px solid;
  background: #fff;
}

.alert ul {
  margin: 0;
  padding-left: 20px;
}

.alert p {
  margin: 0 0 6px;
  font-weight: 800;
}

.alert--error {
  color: var(--danger);
  border-color: #f1b8b2;
  background: #fff4f2;
}

.alert--success {
  color: var(--success);
  border-color: #acd7c3;
  background: #f0fbf6;
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 14px 16px;
  }

  .topbar__user {
    margin-left: 0;
  }

  .shell {
    width: min(100% - 24px, 680px);
    margin-top: 18px;
  }

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

  .form-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .form-heading .button {
    width: 100%;
  }
}
