:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --danger: #dc2626;
  --border: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--primary);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 420px;
}

h1, h2 {
  margin-top: 0;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

input, select, button {
  font: inherit;
}

input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 16px;
}

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  text-decoration: none;
}

button.secondary, .btn.secondary {
  background: #64748b;
}

button.danger {
  background: var(--danger);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.toolbar .field {
  display: flex;
  flex-direction: column;
  min-width: 160px;
}

.toolbar label {
  margin-bottom: 6px;
  font-size: 14px;
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.meta {
  color: var(--muted);
  font-size: 14px;
}

.error {
  color: var(--danger);
  margin-top: 12px;
}

.success {
  color: #059669;
  margin-top: 12px;
}

#table {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.hidden {
  display: none;
}

.admin-panel {
  margin-top: 24px;
}

.admin-panel table {
  width: 100%;
  border-collapse: collapse;
}

.admin-panel th,
.admin-panel td {
  border-bottom: 1px solid var(--border);
  padding: 8px;
  text-align: left;
}

.note {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
