:root {
  --bdi-blue: #002040;
  --bdi-blue-2: #00325f;
  --bdi-light-blue: #93d5df;
  --border: #d8dee8;
  --text: #1c2530;
  --muted: #627085;
  --bg: #f4f7fb;
  --white: #ffffff;
  --danger: #8a1f1f;
  --success: #164f2a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 16px;
}

.admin-page { max-width: 1400px; }

.card {
  background: var(--white);
  border: 4px solid var(--bdi-blue);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 12px 35px rgba(0, 32, 64, 0.12);
}

.header {
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.logo {
  width: 220px;
  max-width: 42%;
  height: auto;
}

h1 {
  margin: 0 0 8px;
  color: var(--bdi-blue);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

h2 {
  color: var(--bdi-blue);
  font-size: 19px;
  margin: 28px 0 14px;
}

p { margin: 0; }

.hint, .muted { color: var(--muted); }
.required { color: var(--danger); }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

label, legend {
  display: block;
  font-weight: 700;
  line-height: 1.35;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  margin-top: 7px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  font-weight: 400;
}

textarea { resize: vertical; }

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 26px;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin: 0 0 14px;
}

.radio-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.radio-row label {
  font-weight: 400;
  white-space: nowrap;
}

button {
  background: var(--bdi-blue);
  color: var(--white);
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-top: 18px;
}

button:hover { background: var(--bdi-blue-2); }
button:disabled { opacity: 0.7; cursor: not-allowed; }
button.secondary { background: #697386; }

.status {
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-weight: 700;
}

.status.success {
  background: #e6f4ea;
  color: var(--success);
  border: 1px solid #b7dfc2;
}

.status.error {
  background: #fdeaea;
  color: var(--danger);
  border: 1px solid #edb9b9;
}

.hidden { display: none !important; }

.panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  background: #fbfcfe;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.toolbar-actions button { margin-top: 0; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.metric {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #fbfcfe;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  color: var(--bdi-blue);
  font-size: 28px;
  margin-top: 6px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 1200px;
  background: var(--white);
}

th, td {
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  background: var(--bdi-blue);
  color: var(--white);
  position: sticky;
  top: 0;
}

@media (max-width: 760px) {
  .card { padding: 20px; border-width: 3px; }
  .header { flex-direction: column; align-items: flex-start; }
  .logo { width: 190px; max-width: 100%; }
  .grid.two, .metrics-grid { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; }
  .toolbar-actions { justify-content: flex-start; }
  .radio-row { flex-direction: column; gap: 8px; }
}
