.select-control {
  min-height: 38px;
  max-width: 190px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
}

.user-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  max-width: 190px;
  padding: 0 10px;
  border: 1px solid rgba(21, 60, 99, 0.16);
  border-radius: var(--radius);
  color: var(--navy);
  background: #eef5f7;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-panel {
  display: grid;
  gap: 16px;
  margin: 18px 24px 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-actions,
.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bd-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
}

.bd-stat {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.bd-stat strong {
  color: var(--navy);
  font-size: 26px;
  line-height: 1;
}

.bd-stat span {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.bd-stat small,
.admin-table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.admin-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.admin-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  background: #ffffff;
}

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

.admin-table th {
  color: var(--muted);
  background: #f7fafb;
  font-size: 12px;
  font-weight: 850;
}

.admin-table td {
  font-size: 13px;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.mini-button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.mini-button:hover {
  border-color: var(--line-strong);
  background: #f7fafb;
}

.mini-button.danger {
  color: var(--red);
}

.empty-cell {
  height: 72px;
  color: var(--muted);
  text-align: center !important;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(15, 28, 36, 0.42);
  backdrop-filter: blur(6px);
}

.login-modal.is-open {
  display: grid;
}

.login-box {
  width: min(420px, 100%);
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 28, 36, 0.18);
}

.login-logo {
  width: 48px;
  height: 48px;
}

.login-box h2 {
  margin-bottom: 6px;
  color: var(--navy);
}

.login-box label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.login-box input {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #ffffff;
}

.login-submit {
  width: 100%;
  margin-top: 4px;
  color: #ffffff;
  border-color: transparent;
  background: var(--navy);
}

.login-submit:hover {
  border-color: transparent;
  background: #0d2f50;
}

.login-hint {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

[hidden] {
  display: none !important;
}

@media (max-width: 860px) {
  .admin-panel {
    margin-left: 14px;
    margin-right: 14px;
  }

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

  .admin-head {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .select-control {
    max-width: none;
    flex: 1 1 150px;
  }

  .user-pill {
    max-width: none;
    flex: 1 1 130px;
  }

  .admin-panel,
  .login-box {
    padding: 12px;
  }

  .bd-stats {
    grid-template-columns: 1fr;
  }
}
