:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--rsf-2022-color-black, #0e1317);
  background:
    radial-gradient(circle at top, rgba(24, 103, 255, 0.12), transparent 34%),
    linear-gradient(180deg, #f6f9fd 0%, #edf3f8 100%);
}

body.gate-shell {
  min-height: 100vh;
  padding: 24px;
}

.gate-shell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gate-panel {
  width: min(100%, 32rem);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.14);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  backdrop-filter: blur(10px);
}

.gate-panel.gate-panel--wide {
  width: min(100%, 68rem);
}

.gate-logo-lockup {
  display: grid;
  justify-items: center;
  gap: 0.875rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.gate-logo-lockup.gate-logo-lockup--left {
  justify-items: start;
  text-align: left;
  margin-bottom: 0;
}

.gate-logo {
  width: 108px;
  height: auto;
}

.gate-brand-mark {
  display: block;
  width: min(100%, 13rem);
  height: auto;
}

.gate-brand-mark.gate-brand-mark--login {
  width: min(100%, 11.5rem);
}

.gate-brand-mark.gate-brand-mark--admin {
  width: min(100%, 8.5rem);
}

.gate-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gate-title {
  margin: 0;
  font-family: "HelveticaNeueLtProBd", "Open Sans Bold", sans-serif;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1;
}

.gate-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 36px;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-family: "Open Sans Semibold", sans-serif;
  font-size: 0.95rem;
}

.gate-copy {
  margin: 0;
  color: var(--rsf-2022-color-13, #667085);
  font-size: 1rem;
  line-height: 1.6;
}

.gate-copy.gate-copy--hero {
  max-width: 42rem;
}

.gate-copy.gate-copy--compact {
  line-height: 1.3;
}

.gate-ip-value {
  margin: 0;
  color: var(--rsf-2022-color-black, #0e1317);
  font-family: "HelveticaNeueLtProBd", "Open Sans Bold", sans-serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.gate-copy strong {
  color: var(--rsf-2022-color-black, #0e1317);
}

.gate-stack {
  display: grid;
  gap: 1rem;
}

.gate-stack.gate-stack--tight {
  gap: 0.75rem;
}

.gate-form {
  margin-top: 1.5rem;
}

.gate-form .form-group {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.gate-form label {
  color: var(--rsf-2022-color-black, #0e1317);
  font-family: "Open Sans Semibold", sans-serif;
  font-size: 0.95rem;
}

.gate-form.rsf-register-form input[type="text"],
.gate-form.rsf-register-form input[type="number"],
.gate-form.rsf-register-form input[type="email"],
.gate-form.rsf-register-form input[type="tel"],
.gate-form.rsf-register-form input[type="date"] {
  margin: 0.75rem 0 0;
}

.gate-form.rsf-register-form input[type="password"] {
  box-shadow: inset 0 0 0 1px var(--rsf-2022-color-12, #d3e0e3);
  padding: 0.905rem 1.5rem 1rem 1.5rem;
  border-radius: 999px;
  width: 100%;
  height: 52px;
  color: var(--rsf-2022-color-black, #0e1317);
  font-family: "Open Sans Regular", sans-serif;
  font-size: var(--h5, 1rem);
  background-color: var(--rsf-2022-color-white, #ffffff);
  border: none;
  outline: none;
  appearance: none;
  margin-bottom: 2.75rem;
  margin-top: 0.75rem;
}

.gate-form.rsf-register-form input[type="password"]::placeholder {
  color: var(--rsf-2022-color-13, #667085);
}

.gate-form-inline.rsf-register-form input[type="text"],
.gate-form-inline.rsf-register-form input[type="number"],
.gate-form-inline.rsf-register-form input[type="email"],
.gate-form-inline.rsf-register-form input[type="tel"],
.gate-form-inline.rsf-register-form input[type="date"],
.gate-form-inline.rsf-register-form input[type="password"] {
  margin-bottom: 0;
}

.gate-form .rsf-btn,
.gate-form button[type="submit"],
.gate-action .rsf-btn {
  width: 100%;
}

.gate-btn {
  min-height: 42px;
  padding: 0.72rem 1.05rem;
  border-radius: 999px;
  font-size: 0.92rem;
  line-height: 1.1;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.gate-btn.gate-btn--compact {
  min-height: 38px;
  padding: 0.58rem 0.9rem;
  font-size: 0.86rem;
}

.gate-btn.gate-btn--wide {
  width: 100%;
}

@media (hover: hover) {
  .gate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
    filter: saturate(1.03);
  }
}

.gate-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.gate-alert {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  font-family: "Open Sans Semibold", sans-serif;
  font-size: 0.95rem;
}

.gate-alert.gate-alert--error {
  background: rgba(255, 50, 53, 0.08);
}

.gate-alert.gate-alert--success {
  background: rgba(52, 215, 156, 0.15);
}

.gate-toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: grid;
  gap: 0.75rem;
  width: min(calc(100vw - 2rem), 23rem);
}

.gate-toast {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1rem 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(211, 224, 227, 0.9);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.gate-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gate-toast.gate-toast--success {
  border-left: 4px solid #1da97a;
}

.gate-toast.gate-toast--error {
  border-left: 4px solid #de2e3a;
}

.gate-toast-copy {
  display: grid;
  gap: 0.2rem;
  flex: 1;
}

.gate-toast-title,
.gate-toast-message {
  margin: 0;
}

.gate-toast-title {
  font-family: "Open Sans Semibold", sans-serif;
  font-size: 0.92rem;
  color: var(--rsf-2022-color-black, #0e1317);
}

.gate-toast-message {
  color: var(--rsf-2022-color-13, #667085);
  line-height: 1.45;
  font-size: 0.92rem;
}

.gate-toast-close {
  border: 0;
  background: transparent;
  color: var(--rsf-2022-color-13, #667085);
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.1rem;
  cursor: pointer;
}

.gate-action {
  margin-top: 1.5rem;
}

.gate-action.gate-action--flush {
  margin-top: 0;
}

.gate-grid {
  display: grid;
  gap: 1.5rem;
}

.gate-admin-shell {
  min-height: 100vh;
  padding: 32px 24px;
  display: flex;
  align-items: center;
}

.gate-admin-panel {
  display: grid;
  gap: 1.75rem;
}

.gate-admin-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(211, 224, 227, 0.9);
}

.gate-admin-brand {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.gate-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.gate-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.gate-admin-card {
  width: min(100%, 72rem);
  margin: 0 auto;
  min-height: min(46rem, calc(100vh - 64px));
}

.gate-admin-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
}

.gate-section {
  min-width: 0;
  padding: 1.375rem 1.5rem;
  border-radius: 18px;
  border: 1px solid rgba(211, 224, 227, 0.85);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.78),
    rgba(248, 251, 253, 0.94)
  );
  box-shadow: none;
}

.gate-section.gate-section--balanced {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.gate-section h2,
.gate-section h3 {
  margin: 0 0 0.75rem;
}

.gate-section-header {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
}

.gate-inline-text {
  color: var(--rsf-2022-color-13, #667085);
}

.gate-form-inline {
  display: grid;
  gap: 1rem;
}

.gate-form-inline.gate-form-inline--compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.gate-form-inline.gate-form-inline--compact .rsf-btn {
  width: auto;
  min-width: 148px;
}

.gate-section .gate-action .rsf-btn {
  width: auto;
  min-width: 168px;
}

.gate-action.gate-action--settled,
.gate-form-inline.gate-form-inline--balanced {
  margin-top: auto;
}

.gate-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(211, 224, 227, 0.85);
  background: rgba(255, 255, 255, 0.96);
}

.gate-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.gate-table-heading {
  padding: 0.95rem 1rem;
  color: var(--rsf-2022-color-black, #0e1317);
  background: rgba(21, 49, 86, 0.06);
  font-family: "Open Sans Semibold", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.gate-table-heading.gate-table-heading--actions {
  text-align: right;
  width: 1%;
  white-space: nowrap;
  padding-right: 1.25rem;
}

.gate-table thead th {
  border-bottom: 1px solid rgba(211, 224, 227, 0.85);
}

.gate-table tbody td {
  padding: 1rem;
  border-bottom: 1px solid rgba(211, 224, 227, 0.85);
  background: transparent;
  vertical-align: middle;
}

.gate-table tbody tr:nth-child(even) td {
  background: rgba(246, 249, 253, 0.72);
}

.gate-table tbody tr:last-child td {
  border-bottom: none;
}

.gate-table form {
  margin: 0;
}

.gate-table td:last-child,
.gate-table-cell-actions {
  width: 1%;
  white-space: nowrap;
}

.gate-table tbody td.gate-table-cell-actions {
  text-align: right;
  padding-right: 1.25rem;
}

.gate-table-form {
  display: flex;
  justify-content: flex-end;
}

.gate-table-form .rsf-btn {
  width: auto;
}

.gate-dialog {
  width: min(calc(100vw - 2rem), 28rem);
  padding: 0;
  border: 0;
  background: transparent;
}

.gate-dialog::backdrop {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
}

.gate-dialog-card {
  padding: 1.5rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.gate-dialog-kicker,
.gate-dialog-title {
  margin: 0;
}

.gate-dialog-kicker {
  color: var(--rsf-2022-color-13, #667085);
  font-family: "Open Sans Semibold", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gate-dialog-title {
  margin-top: 0.45rem;
  margin-bottom: 0.7rem;
  font-family: "HelveticaNeueLtProBd", "Open Sans Bold", sans-serif;
  font-size: 1.4rem;
  line-height: 1.15;
}

.gate-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.gate-empty-state {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(246, 249, 253, 0.96);
  color: var(--rsf-2022-color-13, #667085);
}

.gate-link {
  text-decoration: none;
}

.gate-pagination {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.gate-pagination-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  min-width: 0;
}

.gate-pagination-page,
.gate-pagination-link {
  text-decoration: none;
}

.gate-pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding-inline: 0.8rem;
}

.gate-pagination-control {
  width: 2.5rem;
  padding-inline: 0;
}

.gate-pagination-arrow {
  font-size: 1rem;
  line-height: 1;
}

.gate-pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.3rem;
  min-height: 2.3rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(211, 224, 227, 0.95);
  color: var(--rsf-2022-color-black, #0e1317);
  background: rgba(255, 255, 255, 0.92);
  font-family: "Open Sans Semibold", sans-serif;
  font-size: 0.88rem;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.gate-pagination-page.is-active {
  border-color: rgba(21, 49, 86, 0.96);
  background: #153156;
  color: #ffffff;
}

.gate-pagination-ellipsis {
  color: var(--rsf-2022-color-13, #667085);
  font-family: "Open Sans Semibold", sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.gate-pagination-link.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

[data-ip-list-section][data-loading="true"] {
  opacity: 0.62;
  transition: opacity 160ms ease;
}

@media (max-width: 900px) {
  .gate-admin-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
}

@media (max-width: 640px) {
  body.gate-shell,
  .gate-admin-shell {
    padding: 16px;
  }

  .gate-toast-stack {
    top: 16px;
    right: 16px;
    width: calc(100vw - 2rem);
  }

  .gate-panel,
  .gate-section {
    padding: 1.25rem;
    border-radius: 22px;
  }

  .gate-admin-card {
    min-height: unset;
  }

  .gate-brand-mark.gate-brand-mark--login {
    width: min(100%, 10.5rem);
  }

  .gate-brand-mark.gate-brand-mark--admin {
    width: min(100%, 7.75rem);
  }

  .gate-admin-navbar {
    gap: 0.9rem;
    padding-bottom: 1rem;
  }

  .gate-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .gate-nav-actions {
    width: auto;
    justify-content: flex-end;
  }

  .gate-nav-actions .rsf-btn {
    width: auto;
  }

  .gate-form-inline.gate-form-inline--compact {
    grid-template-columns: 1fr;
  }

  .gate-form-inline.gate-form-inline--compact .rsf-btn {
    width: 100%;
  }

  .gate-section.gate-section--balanced {
    height: auto;
  }

  .gate-action.gate-action--settled,
  .gate-form-inline.gate-form-inline--balanced {
    margin-top: 1rem;
  }

  .gate-table-heading.gate-table-heading--actions,
  .gate-table tbody td.gate-table-cell-actions {
    padding-right: 1rem;
  }

  .gate-table-wrap {
    margin-inline: 0;
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .gate-table {
    width: 100%;
    min-width: 0;
  }

  .gate-table thead {
    display: none;
  }

  .gate-table,
  .gate-table tbody,
  .gate-table tr,
  .gate-table td {
    display: block;
  }

  .gate-table tbody {
    display: grid;
    gap: 0.85rem;
  }

  .gate-table tbody tr {
    border: 1px solid rgba(211, 224, 227, 0.85);
    border-radius: 18px;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98),
      rgba(246, 249, 253, 0.92)
    );
    overflow: hidden;
  }

  .gate-table tbody td {
    width: 100%;
    padding: 0.95rem 1rem;
    border-bottom: 1px solid rgba(211, 224, 227, 0.7);
    white-space: normal;
  }

  .gate-table tbody td::before {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--rsf-2022-color-13, #667085);
    font-family: "Open Sans Semibold", sans-serif;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .gate-table tbody td:first-child::before {
    content: "IP Address";
  }

  .gate-table tbody td.gate-table-cell-actions::before {
    content: "Action";
  }

  .gate-table tbody tr:nth-child(even) td {
    background: transparent;
  }

  .gate-table tbody td.gate-table-cell-actions {
    padding-right: 1rem;
    text-align: left;
    padding-top: 0.8rem;
    padding-bottom: 0.85rem;
    background: rgba(21, 49, 86, 0.03);
  }

  .gate-table-form {
    justify-content: flex-start;
  }

  .gate-table-form .rsf-btn {
    width: auto;
    min-width: 7.5rem;
  }

  .gate-pagination {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .gate-pagination-pages {
    grid-column: 1 / -1;
    order: -1;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: none;
  }

  .gate-pagination-pages::-webkit-scrollbar {
    display: none;
  }

  .gate-pagination-link {
    width: 100%;
  }

  .gate-dialog-actions {
    flex-direction: column-reverse;
  }
}
