:root {
  --ink: #172033;
  --muted: #6b7890;
  --line: #dce5f1;
  --blue: #146ef5;
  --blue-dark: #0f57c9;
  --panel: rgba(255, 255, 255, 0.94);
}

body {
  background:
    radial-gradient(circle at 8% 0%, #dfeeff 0, transparent 28rem),
    linear-gradient(180deg, #f7faff 0, #eef3f9 100%);
  color: var(--ink);
  min-height: 100vh;
}

main {
  max-width: 1240px;
  padding: 34px 30px 56px;
}

header {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 32px 34px;
  border-radius: 24px;
  color: white;
  background:
    radial-gradient(circle at 82% 10%, #5aa7ff80 0, transparent 18rem),
    linear-gradient(125deg, #122b62 0%, #185dcc 55%, #1687ed 100%);
  box-shadow: 0 18px 40px #174b9d26;
}

header::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -95px;
  width: 290px;
  height: 290px;
  border: 1px solid #ffffff35;
  border-radius: 50%;
  box-shadow: 0 0 0 35px #ffffff0b, 0 0 0 70px #ffffff08;
}

.brand,
.primary-action {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: #cce4ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

header h1 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.04em;
}

header p {
  max-width: 650px;
  margin-top: 8px;
  color: #deecff;
  font-size: 16px;
}

button {
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px #174b9d24;
}

button:active {
  transform: translateY(0);
}

.primary-action {
  padding: 13px 20px;
  color: #1554a8;
  background: white;
  box-shadow: 0 10px 25px #07225038;
}

.primary-action span {
  margin-right: 5px;
  font-size: 18px;
}

.status,
.settings,
.card,
.table {
  border-color: #d7e2f0;
  background: var(--panel);
  box-shadow: 0 8px 24px #3151780a;
  backdrop-filter: blur(8px);
}

.status {
  margin-top: 18px;
  padding: 14px 18px;
}

.connection {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.connection i {
  width: 10px;
  height: 10px;
  border: 2px solid #bff2d1;
  border-radius: 50%;
  background: #24b95b;
  box-shadow: 0 0 0 4px #24b95b1d;
}

.secondary {
  color: #165bb8;
  background: #eaf3ff;
}

.ghost-danger {
  color: #c83242;
  background: #fff0f1;
}

.settings {
  padding: 18px;
  gap: 18px;
}

.settings-title {
  display: flex;
  min-width: 180px;
  flex-direction: column;
}

.settings-title span {
  font-weight: 800;
}

.settings-title small {
  margin-top: 2px;
}

.settings label {
  color: #43506a;
  font-size: 13px;
}

.settings input {
  width: 100px;
  background: #f9fbfe;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 34px 0 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.025em;
}

.section-heading p {
  margin-top: 4px;
  color: var(--muted);
}

.card {
  position: relative;
  overflow: hidden;
  padding: 20px 22px 20px 26px;
  border-radius: 18px;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(#1f7cff, #65b8ff);
}

.card h3 {
  font-size: 18px;
}

.card p {
  margin: 5px 0 10px;
}

.badge {
  padding: 5px 9px;
  font-weight: 700;
}

.table {
  border-radius: 18px;
}

thead {
  background: #f4f8fd;
}

th {
  color: #53617a;
  font-size: 12px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

td[data-result] {
  font-weight: 750;
}

td[data-result="assigned"] { color: #168444; }
td[data-result="skipped"] { color: #a36a08; }
td[data-result="error"] { color: #c83242; }

dialog {
  border: 1px solid #ffffffaa;
  border-radius: 22px;
  box-shadow: 0 30px 90px #071d3e55;
}

dialog::backdrop {
  background: #07162eb8;
  backdrop-filter: blur(4px);
}

.dialog-head {
  margin: -22px -22px 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.grid {
  padding: 2px;
}

input:focus,
select:focus {
  border-color: #3489f7;
  outline: 0;
  box-shadow: 0 0 0 3px #3489f71c;
}

.member,
.filter {
  border: 1px solid #e2eaf4;
  background: #f7faff;
}

.member {
  grid-template-columns: minmax(220px, 2fr) minmax(230px, 1.5fr) minmax(90px, .65fr) auto;
  gap: 12px;
  padding: 12px;
}

.member strong,
.member-note {
  align-self: center;
}

.member-note,
.member small {
  color: #6c7b90;
  font-weight: 400;
}

.member small {
  line-height: 1.3;
}

.member-active {
  align-items: center;
}

.member-active input {
  width: auto;
}

.multi-picker {
  position: relative;
  display: block;
  font-weight: 400;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field > strong {
  font-weight: 600;
}

.multi-picker-button {
  width: 100%;
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  color: #18212f;
  background: #fff;
  border: 1px solid #cad5e3;
  font-weight: 500;
}

.multi-picker-button:hover,
.multi-picker.open .multi-picker-button {
  color: #18212f;
  background: #fff;
  border-color: #3489f7;
  box-shadow: 0 0 0 3px #3489f71c;
  transform: none;
}

.multi-picker-button b {
  transition: transform 160ms ease;
}

.multi-picker.open .multi-picker-button b {
  transform: rotate(180deg);
}

.multi-picker-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  max-height: 240px;
  padding: 8px;
  overflow: auto;
  border: 1px solid #d6e0ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 45px #1427462e;
}

.multi-picker.open .multi-picker-panel {
  display: block;
}

.multi-picker-panel label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 8px;
  cursor: pointer;
}

.multi-picker-panel label:hover {
  background: #f0f6ff;
}

.multi-picker-panel input {
  width: auto;
  flex: 0 0 auto;
}

.multi-picker-panel em {
  display: block;
  padding: 8px;
  color: #6c7b90;
}

footer {
  position: sticky;
  bottom: -22px;
  margin: 24px -22px -22px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: #ffffffee;
  backdrop-filter: blur(8px);
}

@media (max-width: 700px) {
  main {
    padding: 14px;
  }

  header {
    min-height: 220px;
    padding: 24px;
    align-items: flex-start;
    flex-direction: column;
  }

  .primary-action {
    width: 100%;
  }

  .settings-title {
    min-width: 0;
  }

  .member {
    grid-template-columns: 1fr;
  }
}
[hidden]{display:none!important}
