/* web/shared/style.css — общий минимальный стиль для всех страниц */

:root {
  color-scheme: light dark;
  --bg: #f7f7f8;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --border: #e2e2e2;
  --accent: #2f7fe0;
  --danger: #d64545;
  --success: #2f9e56;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171a;
    --surface: #1f2023;
    --text: #f0f0f0;
    --muted: #9a9a9a;
    --border: #303236;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  overflow-x: auto;
}

button, .btn {
  font: inherit;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.logout-btn { background: transparent; }

table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--border); padding: 6px 8px; text-align: center; font-size: 14px; white-space: nowrap; }
th { background: rgba(127,127,127,0.08); }
td.computed-col { font-weight: bold; background: rgba(127,127,127,0.06); }
td.placeholder-col { color: var(--muted); background: rgba(127,127,127,0.03); }

.col-action {
  border: none;
  background: none;
  padding: 0 2px;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.45;
  cursor: pointer;
}
.col-action:hover { opacity: 1; color: var(--text); }
.col-action.col-action-danger:hover { color: var(--danger); }
td[contenteditable="true"] { cursor: text; }
td[contenteditable="true"]:focus { outline: 2px solid var(--accent); }

.error-banner {
  background: rgba(214,69,69,0.12);
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.subject-list { display: flex; flex-wrap: wrap; gap: 8px; }
.subject-list a.btn { text-decoration: none; }

.muted { color: var(--muted); font-size: 13px; }
