.dash-access {
  --access-accent: #81f2d4;
  --access-muted: var(--dash-muted, #a6b8cb);
  --access-border: var(--dash-border, #2a3c50);
  padding: clamp(15px, 2vw, 26px);
  display: grid;
  gap: clamp(14px, 1.55vw, 21px);
}

.dash-access [hidden] { display: none !important; }
.dash-access-header, .dash-access-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dash-access-heading { justify-content: flex-start; flex-wrap: wrap; gap: 9px; }
.dash-access-heading h2 { font-size: clamp(1.18rem, 2vw, 1.45rem); line-height: 1.18; letter-spacing: -.025em; }
.dash-access-heading span { color: #c1e6db; font-size: .73rem; border: 1px solid #355e59; background: #17353a; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.dash-access-header p { margin-top: 7px; color: var(--access-muted); line-height: 1.5; font-size: .87rem; }

.dash-access-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0; }
.dash-access[data-traffic-access='whitelist'] .dash-access-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-access-metrics > div { padding: clamp(10px, 1.4vw, 17px); border: 1px solid #2c4356; background: linear-gradient(138deg, #15323c, #172334 80%); border-radius: 10px; min-width: 0; }
.dash-access-metrics dt { color: var(--access-muted); font-weight: 600; font-size: .78rem; line-height: 1.3; }
.dash-access-metrics dd { margin: 5px 0 0; color: #ecfcf6; font-size: clamp(1rem, 2.2vw, 1.53rem); font-weight: 730; letter-spacing: -.035em; overflow-wrap: anywhere; }

.dash-access-filter { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.dash-access-filter label:first-child { width: min(100%, 330px); }
.dash-access :is(input, select) { color: var(--ink, #e9f4ff); background: #0e1a29; border: 1px solid #354b62; border-radius: 8px; padding: 8px 11px; min-height: 39px; width: 100%; font: inherit; line-height: 1.3; }
.dash-access :is(input, select):focus-visible { outline: 2px solid #67e1c5; outline-offset: 1px; }
.dash-access input::placeholder { color: #98aec4; }
.dash-access-filter :is(input, select) { font-size: .85rem; }
.dash-access-back { margin-left: auto; padding: 8px 1px; color: var(--access-accent); font-size: .84rem; font-weight: 630; }
.dash-access-back:hover { text-decoration: underline; }

.dash-access-table-wrap { border: 1px solid var(--access-border); border-radius: 11px; overflow: hidden; }
.dash-access-table { margin: 0; width: 100%; border-collapse: collapse; table-layout: auto; }
.dash-access-table :is(th, td) { padding: 13px 12px; text-align: start; }
.dash-access-table th { color: #b7c8da; background: #17283b; font-size: .8rem; white-space: nowrap; }
.dash-access-table td { border-top: 1px solid #25384b; color: #d2e2f0; font-size: .84rem; line-height: 1.3; overflow-wrap: anywhere; }
.dash-access-table td strong { color: #f2fbff; font-weight: 690; }
.dash-access-table tbody tr:hover { background: #182b3f; }
.dash-access-note { max-width: 270px; }
.dash-access-status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 8px; white-space: nowrap; font-size: .75rem; font-weight: 650; background: #27384a; color: #b6c6d7; }
.dash-access-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dash-access-status[data-status='enabled'] { background: #1b423e; color: #a5f3d8; }
.dash-access-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.dash-access-row-button.dash-button { padding: 5px 9px; min-height: 33px; font-size: .75rem; white-space: nowrap; }
.dash-access-remove.dash-button { color: #ffc1c4; border-color: #714855; background: #362431; }
.dash-access-remove.dash-button:hover { background: #4d2a38; border-color: #c4758a; }

.dash-access-empty { border: 1px dashed #395069; padding: clamp(20px, 4vw, 46px) 12px; text-align: center; border-radius: 10px; color: #e7f6ff; }
.dash-access-empty p { margin-top: 7px; color: var(--access-muted); font-size: .84rem; line-height: 1.45; }

.dash-access-dialog {
  color: var(--ink, #edf4fc);
  background: linear-gradient(145deg, #192b3f, #101a2a 80%);
  border: 1px solid #3c556c;
  border-radius: 15px;
  padding: 0;
  box-shadow: 0 20px 85px #05080ecc;
  width: min(100% - 28px, 485px);
  max-height: calc(100dvh - 38px);
}
.dash-access-dialog::backdrop { background: #070e19bc; backdrop-filter: blur(4px); }
.dash-access-dialog form { display: grid; gap: 13px; padding: clamp(17px, 3vw, 26px); }
.dash-access-dialog h3 { margin: 0; font-size: clamp(1.15rem, 2vw, 1.32rem); line-height: 1.3; }
.dash-access-fields { display: grid; gap: 13px; }
.dash-access-fields label { display: grid; gap: 5px; font-size: .9rem; color: #e8f5fd; }
.dash-access-fields :is(p, small), .dash-access-feedback { margin: 0; font-size: .82rem; color: var(--access-muted); line-height: 1.5; }
.dash-access-fields .dash-access-target { color: #d3f8ed; font-size: .94rem; font-weight: 650; overflow-wrap: anywhere; }
.dash-access-secret { display: grid; gap: 6px; padding: 11px; border: 1px solid #3a5369; background: #0f1a28; border-radius: 8px; }
.dash-access-secret span { color: var(--access-muted); font-size: .8rem; }
.dash-access-secret code { color: #a3ffdf; overflow-wrap: anywhere; user-select: text; font-size: .82rem; }
.dash-access-feedback { min-height: 1em; color: #f5d9a3; }
.dash-access-dialog footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }

@media (max-width: 850px) {
  .dash-access-table :is(th, td) { padding-inline: 8px; }
}

@media (max-width: 720px) {
  .dash-access-table-wrap { border: 0; overflow: visible; }
  .dash-access-table, .dash-access-table tbody { display: block; }
  .dash-access-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .dash-access-table tr { display: grid; padding: 5px 11px; border: 1px solid var(--access-border); border-radius: 9px; margin-bottom: 9px; background: #122030; }
  .dash-access-table tr:last-child { margin-bottom: 0; }
  .dash-access-table td { display: grid; grid-template-columns: minmax(85px, 36%) minmax(0, 1fr); align-items: start; gap: 8px; padding: 8px 0; max-width: none; }
  .dash-access-table td:first-child { border-top: 0; }
  .dash-access-table td::before { content: attr(data-label); color: var(--access-muted); font-size: .75rem; padding-block: 2px; }
  .dash-access-status { justify-self: start; }
}

@media (max-width: 460px) {
  .dash-access-header { align-items: stretch; flex-direction: column; }
  .dash-access-header .dash-button { align-self: start; }
  .dash-access-filter label:first-child { width: 100%; }
  .dash-access-back { margin-left: 0; }
}
