﻿:root {
  color-scheme: light;
  --ink: #1c2430;
  --muted: #5c6775;
  --line: #d9d3c7;
  --paper: #f6f3ec;
  --card: #fffdf8;
  --accent: #1f4d45;
  --accent-ink: #fff;
  --danger: #8d2f2f;
  --warn: #f3e6c8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.45 "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.top {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 22px;
  background: var(--accent);
  color: var(--accent-ink);
}

.brand { font-weight: 650; letter-spacing: 0.02em; }

#logout { margin-left: auto; }

.top button.ghost {
  color: var(--accent-ink);
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
}

body:not(.signed-in) .nav,
body:not(.signed-in) #logout { display: none; }

.login-wrap { max-width: 360px; margin: 48px auto; }

.check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.check input { width: auto; }

.nav { display: flex; gap: 6px; }

.nav a {
  color: inherit;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
}

.nav a.active, .nav a:hover { background: rgba(255, 255, 255, 0.16); }

main { padding: 22px; max-width: 1100px; }

h1 { font-size: 22px; margin: 0 0 14px; }
h2 { font-size: 16px; margin: 0 0 8px; }

button.link {
  background: none;
  color: var(--accent);
  padding: 0;
  text-decoration: underline;
}

button:disabled { opacity: 0.45; cursor: default; }

.doc-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

tr.row-diff { background: var(--warn); }
tr.row-only { background: #f3efe6; }

.summary { margin: 0 0 12px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}

.toolbar, .row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar { margin-bottom: 14px; }

label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }

input, select, textarea, button {
  font: inherit;
  color: var(--ink);
}

input, select, textarea {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 7px 8px;
  min-width: 0;
}

textarea { min-height: 72px; width: 280px; }

button, .file-btn {
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
}

button.ghost, .file-btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

button.danger { background: var(--danger); }

.file-btn input { display: none; }

table { width: 100%; border-collapse: collapse; }

th, td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th { color: var(--muted); font-weight: 600; font-size: 13px; }

.note { color: var(--muted); }

.banner {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--warn);
}

.grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
}

.stack { display: grid; gap: 10px; align-content: start; }

@media (max-width: 800px) {
  .grid, .doc-head { grid-template-columns: 1fr; }
  .top { flex-direction: column; align-items: flex-start; gap: 8px; }
}
