﻿:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --card: #ffffff;
  --line: #d9e0ea;
  --text: #1f2a37;
  --primary: #0f766e;
  --danger: #b91c1c;
  --input-border: #c5cfdb;
  --header-start: #0f766e;
  --header-end: #155e75;
  --badge-bg: #d1fae5;
  --badge-fg: #065f46;
  --hint: #475569;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.header {
  background: linear-gradient(120deg, var(--header-start), var(--header-end));
  color: #fff;
  padding: 14px 0;
}

.container {
  width: min(1100px, 94%);
  margin: 0 auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
}

.card.small { max-width: 520px; }

.form-grid {
  display: grid;
  gap: 10px;
}

.form-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 5px;
  font-size: 14px;
}

input, button, select {
  font: inherit;
  padding: 9px;
  border-radius: 8px;
  border: 1px solid var(--input-border);
}

button {
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
}

button.secondary { background: #334155; }
button.danger { background: var(--danger); }

.btn-link {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  padding: 9px 12px;
  line-height: 1.2;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 8px;
  vertical-align: top;
}

.badge {
  background: var(--badge-bg);
  color: var(--badge-fg);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.center-title { text-align: center; margin-top: 0; }
.center-row { display: flex; justify-content: center; align-items: center; }
.nowrap { white-space: nowrap; }
.centered-card { margin-left: auto; margin-right: auto; }
.public-access-card {
  text-align: center;
}
.public-access-card form {
  display: flex;
  justify-content: center;
}
.auth-center {
  min-height: calc(100vh - 96px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
}
.auth-card {
  width: min(520px, 100%);
  margin: 0;
}

.success { color: #047857; }
.error { color: #b91c1c; }
.info { color: #0f766e; }
.hint { color: var(--hint); font-size: 14px; }

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f141a;
    --card: #151c24;
    --line: #2b3644;
    --text: #e5edf5;
    --primary: #14b8a6;
    --danger: #ef4444;
    --input-border: #3b4a5e;
    --header-start: #0f766e;
    --header-end: #0f4c5c;
    --badge-bg: #073f37;
    --badge-fg: #6ee7b7;
    --hint: #9fb3c8;
  }
}

@media (max-width: 780px) {
  .form-grid.cols-2 { grid-template-columns: 1fr; }
}
