/* style.css */
:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #333;
  --muted: #666;
  --primary: #1e88e5;
  --primary-hover: #1565c0;
  --success: #28a745;
  --success-hover: #218838;
  --danger: #e53935;
  --danger-hover: #c62828;
  --radius: 6px;
  --shadow: rgba(0,0,0,0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;     /* центр по горизонтали */
}

.container {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px var(--shadow);
  width: 100%;
  max-width: 500px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

h2 {
  margin-bottom: 1rem;
}

form {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}
label {
  font-size: 0.9rem;
  color: var(--muted);
}
input[type="date"],
input[type="time"],
input[type="number"],
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-size: 1rem;
}

/* Унифицированные кнопки в столбик */
button,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  transition: background 0.2s ease;
  margin-top: 0.5rem;
}

button.primary,
a.btn.primary {
  background: var(--primary);
}
button.primary:hover,
a.btn.primary:hover {
  background: var(--primary-hover);
}

button.success,
a.btn.success {
  background: var(--success);
}
button.success:hover,
a.btn.success:hover {
  background: var(--success-hover);
}

button.danger,
a.btn.danger {
  background: var(--danger);
}
button.danger:hover,
a.btn.danger:hover {
  background: var(--danger-hover);
}

.table-actions {
  display: flex;
  flex-direction: column;  /* все кнопки — в столбик */
  gap: 0.5rem;
  margin-top: 1rem;
}

.table-responsive {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
thead {
  background: var(--primary);
  color: #fff;
}
th,
td {
  padding: 0.75rem;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}
tbody tr:nth-child(even) {
  background: #fafafa;
}

.summary {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: 0.95rem;
}

/* Адаптив */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }
  .container {
    max-width: 100%;
    padding: 1rem;
  }
  .table-responsive {
    overflow-x: auto;
  }
}
