/* Общий стиль. Ставка на плотную таблицу и крупные лица: обе задачи
   рассматриваются подолгу, поэтому важнее читаемость, чем украшения. */
:root {
  --bg: #f6f7f9;
  --panel: #fff;
  --line: #e3e6ea;
  --text: #1c2024;
  --muted: #6b7480;
  --accent: #2f6fd0;
  --green: #1f9d55;
  --yellow: #d99400;
  --red: #d0402f;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header {
  background: var(--panel); border-bottom: 1px solid var(--line);
  padding: 0 20px; display: flex; align-items: center; gap: 22px;
  position: sticky; top: 0; z-index: 10;
}
header .brand { font-weight: 600; padding: 14px 0; margin-right: 8px; }
header nav { display: flex; gap: 18px; }
header nav a { padding: 14px 0; color: var(--text); border-bottom: 2px solid transparent; }
header nav a.active { border-bottom-color: var(--accent); color: var(--accent); }
header .spacer { margin-left: auto; }
header .who { color: var(--muted); font-size: 13px; }

main { padding: 22px; max-width: 1400px; margin: 0 auto; }
h1 { font-size: 21px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 24px 0 10px; }

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px; margin-bottom: 18px;
}
.toolbar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  font: inherit; padding: 7px 9px; border: 1px solid var(--line);
  border-radius: 7px; background: #fff; color: var(--text);
}
button, .btn {
  font: inherit; padding: 8px 14px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
}
button.ghost, .btn.ghost { background: #fff; color: var(--text); border-color: var(--line); }
button.danger { background: #fff; color: var(--red); border-color: #e8bcb5; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
th { font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.dot.green { background: var(--green); }
.dot.yellow { background: var(--yellow); }
.dot.red { background: var(--red); }

.grid-faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.face-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.face-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #dfe3e8; }
.face-card .meta { padding: 9px 10px; font-size: 13px; }
.face-card .meta b { display: block; }
.muted { color: var(--muted); font-size: 13px; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 20px; background: #eef1f5; font-size: 12px; color: var(--muted); }
.empty { padding: 40px; text-align: center; color: var(--muted); }
.error { background: #fdecea; color: var(--red); padding: 9px 12px; border-radius: 7px; margin-bottom: 12px; }

.login-wrap { max-width: 330px; margin: 90px auto; }
.login-wrap .panel { padding: 22px; }
.login-wrap input { width: 100%; }
.login-wrap button { width: 100%; margin-top: 12px; }
