:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #1f2328;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --red: #dc2626;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

/* вход */
#login { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card { max-width: 420px; width: 100%; text-align: center; }
.login-card h1 { font-size: 22px; margin: 0 0 8px; }
.hint { font-size: 13px; color: var(--muted); margin: 12px 0 0; }

button {
  font: inherit;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
}
button:hover { border-color: #c7cbd1; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:disabled { opacity: .6; cursor: default; }
button.link { border: none; background: none; color: var(--accent); padding: 0; }

/* каркас */
header {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.brand { font-weight: 600; }
nav { display: flex; gap: 6px; }
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.who { margin-left: auto; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
main { max-width: 900px; margin: 16px auto; padding: 0 16px 40px; }

/* карточки «сегодня» */
.item .head { font-size: 16px; }
.item .why { margin: 2px 0 4px; }
.item .msg {
  width: 100%; min-height: 76px; margin-top: 10px; padding: 8px 10px; resize: vertical;
  border: 1px solid var(--line); border-radius: 8px; background: #fbfbfc; font: inherit; color: var(--ink);
}
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* база */
.add label { font-weight: 600; display: block; margin-bottom: 6px; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.filters { display: flex; gap: 8px; margin: 14px 0 10px; flex-wrap: wrap; }
.filters input { flex: 1; min-width: 180px; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.row-item .main { flex: 1; }
.empty { color: var(--muted); text-align: center; }

/* итоги */
.big { font-size: 28px; font-weight: 600; margin: 6px 0; }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.bar div { height: 100%; background: var(--accent); }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 3px 0; }
h2 { font-size: 15px; margin: 0 0 8px; }

@media (max-width: 560px) {
  .row { flex-direction: column; }
  .row-item { flex-direction: column; align-items: stretch; }
}

/* импорт рабочей таблицы: пометки и постраничность */
.tag { font-size: 11px; background: var(--line); color: var(--muted); border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.actions-col { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 12px; }
.pager button:disabled { opacity: .4; cursor: default; }
.row-item a { color: var(--accent); text-decoration: none; }
.row-item a:hover { text-decoration: underline; }
