body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: #f4f7fb;
  color: #14213d;
  line-height: 1.5;
}

.container {
  max-width: 1420px;
  margin: 0 auto;
  padding: 24px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.button {
  display: inline-block;
  padding: 10px 16px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
}

.button.secondary {
  background: #64748b;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.search-form {
  display: flex !important;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1 1 420px;
}

.search-input-group {
  display: flex !important;
  align-items: center;
  gap: 8px;
  flex: 1 1 320px;
  min-width: 280px;
}

.search-input-group input {
  flex: 1 1 auto;
  min-width: 0;
}

.filter-select {
  min-width: 180px;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.chip {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  text-decoration: none;
}

.chip.active {
  background: #2563eb;
  color: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 6px;
  text-align: left;
  vertical-align: top;
}

/* Ширины колонок: 4 — телефон, 5 — email, 8 — статус, 9 — комментарии */
th:nth-child(4), td:nth-child(4) {
  width: 125px;
}

th:nth-child(5), td:nth-child(5) {
  width: 155px;
  word-break: break-word;
}

th:nth-child(8), td:nth-child(8) {
  width: 110px;
}

th:nth-child(9), td:nth-child(9) {
  width: 360px;
}

th {
  font-size: 12px;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: #334155;
}

input, textarea, select, button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
}

input, textarea, select {
  width: 100%;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

textarea {
  min-height: 96px;
  min-width: 220px;
  resize: vertical;
}

button {
  background: #0f766e;
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.comment-form button,
.status-form button {
  display: none;
}

.inline-form {
  display: inline-block;
  margin-left: 8px;
}

.comment-form {
  display: flex;
  flex-direction: row;
  gap: 6px;
  align-items: center;
  /* Ширину задаёт колонка таблицы, а не поле */
  min-width: 0;
}

.comment-form textarea {
  min-height: 36px;
  height: 36px;
  min-width: 0;
  resize: none;
  overflow: hidden;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.3;
}

.status-form {
  display: flex;
  gap: 6px;
  align-items: center;
}

.status-select {
  min-width: 120px;
  padding: 6px 8px;
  font-size: 13px;
}

.tiny-button {
  padding: 6px 10px;
  font-size: 13px;
}

.status-form {
  display: flex;
  gap: 6px;
  align-items: center;
}

.status-select {
  min-width: 120px;
  padding: 6px 8px;
  font-size: 13px;
}

.tiny-button {
  padding: 6px 10px;
  font-size: 13px;
}

.selection-form {
  display: grid;
  gap: 12px;
}

.selection-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.select-all {
  transform: scale(1.2);
}

.row-select {
  transform: scale(1.1);
}

.flash-list {
  background: #ecfeff;
  border: 1px solid #67e8f9;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.status-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: #e2e8f0;
  color: #0f172a;
}

.status-new {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-in_progress {
  background: #fef3c7;
  color: #b45309;
}

.status-approved {
  background: #dcfce7;
  color: #166534;
}

.status-rejected {
  background: #fee2e2;
  color: #b91c1c;
}
