
:root { --card: #12151c; --muted:#1a1f29; --stroke:#2b3240; --text:#e6ebf5; --text-dim:#b9c1d3; }
body { background:#0e1117; color:var(--text); font:14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif; }
.container { max-width:1200px; margin:48px auto; padding:0 16px; }
.page-title { text-align:center; font-weight:700; margin:12px 0 20px; }
.toolbar { display:flex; gap:12px; justify-content:flex-end; align-items:center; margin-bottom:16px; }
.toolbar input[type="date"] { background:var(--muted); border:1px solid var(--stroke); border-radius:10px; padding:10px 12px; color:var(--text); }
.btn { background:var(--muted); color:var(--text); border:1px solid var(--stroke); border-radius:12px; padding:10px 14px; cursor:pointer; }
.btn:hover { background:#222837; }
.btn-secondary { opacity:.9 }
.day-header { background:var(--card); border:1px solid var(--stroke); border-radius:18px; padding:16px; margin-bottom:10px; text-align:center; font-weight:700; }
.day-header.silver { box-shadow: inset 0 0 0 3px rgba(192,192,192,.25); }
.day-header.gold { box-shadow: inset 0 0 0 3px rgba(218,165,32,.25); }
.table-wrap { background:var(--card); border:1px solid var(--stroke); border-radius:18px; overflow:hidden; }
.grid { width:100%; border-collapse:separate; border-spacing:0; }
.grid thead th { background:#0f1420; color:var(--text); text-align:left; font-weight:600; padding:12px 14px; border-bottom:1px solid var(--stroke); }
.grid tbody td { padding:14px; border-bottom:1px solid var(--stroke); vertical-align:top; color:var(--text-dim); }
/* Чередующиеся строки — используют общие цвета приложения */
.grid tbody tr:nth-child(odd) {
  background: var(--tile);   /* тёмная тема — тёмная плитка, светлая — светлая */
}
.grid tbody tr:nth-child(even) {
  background: var(--tile2);  /* второй оттенок плитки из app.css/white.css */
}

/* Ховер по строке — лёгкий подсвет, показывает, что можно кликать */
.grid tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 6%, var(--tile2));
  cursor: pointer;
}

/* Выбранная (активная) строка */
.grid tbody tr.selected {
  background: color-mix(in srgb, var(--accent) 18%, var(--tile));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent);
  color: var(--ink); /* основной текстовый цвет темы */
}

.grid tbody tr.selected td {
  color: inherit;
}

.cell-time { font-size:22px; font-weight:800; color:var(--text); }
.cell-fio { font-weight:600; color:var(--text); }
.cell-sub { color:var(--text-dim); font-size:12px; margin-top:2px; }
.footer-actions { display:flex; gap:12px; justify-content:flex-end; margin:18px 0 40px; }
@media (max-width:900px){ .grid thead { display:none; } .grid tbody td{ display:block; padding:10px 12px; } .grid tbody tr{ border-bottom:1px solid var(--stroke);} .grid tbody td::before{ content:attr(data-col); display:block; font-weight:600; color:var(--text);} .cell-time{font-size:18px;} }

/* === Модалка редактирования записи === */

.mgr-modal-backdrop[hidden] {
  display: none;
}

.mgr-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.mgr-modal {
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--stroke);
  padding: 18px 20px 16px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 18px 45px rgba(0,0,0,0.35);
}

.mgr-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mgr-modal__header h2 {
  margin: 0;
  font-size: 18px;
}

.mgr-modal__close {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
}

.mgr-modal__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mgr-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mgr-field label {
  font-size: 13px;
  color: var(--text-dim);
}

.mgr-field input,
.mgr-field textarea {
  background: var(--muted);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text);
  font: inherit;
}

.mgr-modal__footer {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* === ПЕЧАТНАЯ ВЕРСИЯ ПАНЕЛИ МЕНЕДЖЕРА — ОБНОВЛЁННАЯ === */

.mgr-print {
  display: none; /* скрыто на экране */
  font-size: 14px;
}

/* Секции печати */
.mgr-print__header,
.mgr-print__body,
.mgr-print__footer {
  page-break-inside: avoid;
}

/* ---------- HEADER ---------- */
.mgr-print__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10mm;
  border-bottom: 1px solid #000;
  padding-bottom: 4mm;
}

/* ЛОГОТИП */
.mgr-print__logo-wrap {
  max-width: 120px;
}

.mgr-print__logo {
  max-width: 100%;
  height: auto;
}

/* БЛОК СПРАВА: ПОДПИСЬ + КРУПНАЯ ДАТА */
.mgr-print__head-text {
  text-align: right;
}

.mgr-print__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2mm;
}

.mgr-print__date {
  font-size: 20px;
  font-weight: 700;
}


/* ---------- TITLE (в центре, над таблицей) ---------- */
.mgr-print__title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ---------- TABLE ---------- */
.mgr-print__table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 8mm;
}

.mgr-print__table th {
  border: 1px solid #000;
  padding: 3mm 2mm;
  text-align: center;
  background: #f2f2f2;
  font-weight: 600;
}

.mgr-print__table td {
  border: 1px solid #000;
  padding: 2mm 2mm;
  text-align: left;
}

/* ---------- FOOTER ---------- */
.mgr-print__footer {
  margin-top: 8mm;
  border-top: 1px solid #000;
  padding-top: 4mm;
  font-size: 12px;
}

.mgr-print__note {
  margin-bottom: 4mm;
  font-size: 12px;
}

.mgr-print__promo {
  font-style: italic;
  opacity: .85;
}

/* ---------- PRINT-ONLY RULES ---------- */
@media print {
  /* Всё скрыть */
  body * {
    visibility: hidden !important;
  }

  /* кроме печатного блока */
  #mgr-print,
  #mgr-print * {
    visibility: visible !important;
  }

  /* Расположение листа */
  #mgr-print {
    display: block !important;
    position: absolute;
    inset: 0;
    padding: 15mm 12mm;
    background: #fff;
    color: #000;
  }
}

/* Архивные строки — визуально приглушённые */
.grid tbody tr.archived {
  opacity: 0.6;
}

.grid tbody tr.archived td {
  color: var(--text-dim);
}
