:root {
  --bg: #0f1115;
  --surface: #1a1d24;
  --surface-hover: #232730;
  --text: #e2e4e9;
  --text-muted: #94a3b8;
  --accent: #6b8aff;
  --accent-hover: #5468ff;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #334155;
  --input-bg: #1e222b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding: 1rem;
}

/* Таблица: десктоп */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); text-align: left; }
th { background: var(--surface); position: sticky; top: 0; z-index: 10; }
tr:hover { background: var(--surface-hover); }

/* Ночные заявки */
.off-hours-row {
  background: #2a1a1a !important;
  border-left: 3px solid var(--danger);
}
.off-hours-row::after {
  content: "⚠️ Согласование с куратором";
  display: block;
  font-size: 0.75rem;
  color: var(--warning);
  margin-top: 4px;
}

/* Мобильные карточки */
@media (max-width: 768px) {
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
  }
  td {
    border: none;
    padding: 0.5rem 0;
    position: relative;
    padding-left: 50%;
  }
  td::before {
    content: attr(data-label);
    position: absolute;
    left: 1rem;
    width: 45%;
    font-weight: 600;
    color: var(--text-muted);
  }
}

/* Элементы формы */
input, select, textarea {
  width: 100%;
  padding: 0.625rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(107, 138, 255, 0.2);
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #dc2626; }

/* Уведомление про КПП */
.kpp-notice {
  background: #1a2744;
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 1rem 0;
}
.kpp-notice.warning {
  border-left-color: var(--warning);
  background: #2a241a;
}
