:root {
  --bg: #f4f2ee;
  --ink: #1c2422;
  --muted: #6b746f;
  --line: #d6d1c7;
  --field: #fff;
  --accent: #2c5b54;
  --accent-ink: #f4f2ee;
  --panel: #1e3632;
  --panel-ink: #e7e3da;
  --wave: rgba(231, 227, 218, .14);
  --err: #a6382b;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151a19;
    --ink: #e6e3dc;
    --muted: #8d9692;
    --line: #2f3735;
    --field: #1b2120;
    --accent: #7fb3a8;
    --accent-ink: #10201d;
    --panel: #0f1d1b;
    --panel-ink: #cfd8d3;
    --wave: rgba(207, 216, 211, .1);
    --err: #e5826f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page { min-height: 100%; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }

.side {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  color: var(--panel-ink);
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.side .waves { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--wave); }
.side > :not(.waves) { position: relative; }

.brand { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 600; letter-spacing: .01em; }
.brand svg { width: 26px; height: 26px; }

.main { display: flex; flex-direction: column; padding: 40px 24px 28px; }
.form-wrap { width: 100%; max-width: 344px; margin: auto; }
h1 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 24px; }

label { display: block; font-size: 13px; font-weight: 500; margin: 0 0 6px; }
.field { margin-bottom: 16px; }
input[type=text], input[type=password] {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
}
input[type=text]:focus, input[type=password]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 22px; font-size: 13px; }
.check { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; cursor: pointer; }
.check input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }

.submit {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.submit:hover { filter: brightness(1.06); }
.submit[disabled] { cursor: progress; opacity: .7; }

.err { margin: 0 0 16px; padding: 10px 12px; border-left: 3px solid var(--err); background: color-mix(in srgb, var(--err) 9%, transparent); color: var(--err); font-size: 13px; }


@media (max-width: 820px) {
  .page { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { padding: 20px 20px 22px; min-height: 0; }
  .main { padding: 36px 16px 24px; }
}
