/* Админка сервиса. Один файл: страниц немного, а сборки в проекте нет
   и заводить её ради трёх экранов незачем. */

:root {
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f6f7f9;
  --accent: #2563eb;
  --ok: #16a34a;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --danger: #b91c1c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); }

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.topbar__in,
.wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 20px;
}

.topbar__in {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 56px;
}

.brand {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand span { color: var(--muted); font-weight: 400; }

.wrap { padding-top: 26px; padding-bottom: 60px; }

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

h1 { font-size: 22px; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 16px; margin: 0 0 10px; letter-spacing: -0.01em; }

.sub { color: var(--muted); font-size: 13.5px; margin: 4px 0 0; }

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

.card--warn {
  background: var(--warn-bg);
  border-color: #fcd34d;
}

.card--warn h2 { color: var(--warn); }

/* кнопки */
.btn {
  display: inline-block;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 9px;
  padding: 8px 14px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { border-color: #cbd2da; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: #1d4fd8; }
.btn--danger { color: var(--danger); }
.btn--small { padding: 6px 11px; font-size: 13px; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* таблица проектов */
table { width: 100%; border-collapse: collapse; }

th, td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: middle;
}

th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; }
.dot--on { background: var(--ok); }
.dot--off { background: #d1d5db; }

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

/* код для вставки */
.snippet {
  display: block;
  width: 100%;
  background: #0f172a;
  color: #e2e8f0;
  border: 0;
  border-radius: 10px;
  padding: 14px 16px;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-all;
  resize: none;
}

.key {
  font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #f3f4f6;
  border-radius: 6px;
  padding: 3px 7px;
}

/* формы */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
.field .hint { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 6px; font-weight: 400; }

/* Перечислять типы по одному — значит однажды забыть очередной: на форме
   входа так и вышло, поля email и password остались узкими. Проще исключить
   те, которым ширина во всю строку не нужна. */
.field input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=submit]),
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #d7dbe0;
  border-radius: 9px;
  padding: 9px 11px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
}

.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid #bfdbfe; border-color: var(--accent); }
.field textarea { min-height: 76px; resize: vertical; }
.field input[type=color] { width: 54px; height: 36px; padding: 2px; border: 1px solid #d7dbe0; border-radius: 8px; background: #fff; }

.field--inline { display: flex; align-items: center; gap: 8px; }
.field--inline label { margin: 0; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

.flash {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  border-radius: 10px;
  padding: 11px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}

.errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}

.errors ul { margin: 6px 0 0; padding-left: 18px; }

/* переписка */
.msg-row { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.msg-row:last-child { border-bottom: 0; }
.msg-row .who { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.msg-row .who.user { color: var(--accent); }

.empty { text-align: center; padding: 34px 20px; color: var(--muted); }

/* шапка: кто вошёл */
.topbar__me { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar__out { display: inline; }

/* вход */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }

.login__box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  width: 100%;
  max-width: 380px;
}

.login__brand { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.login__title { font-size: 20px; margin: 0 0 20px; letter-spacing: -0.02em; }
.login__box .btn { width: 100%; }

@media (max-width: 640px) {
  .cols { grid-template-columns: 1fr; }
  .pagehead { flex-direction: column; align-items: flex-start; }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
