:root {
  color-scheme: dark;
  --bg: #0b1120;
  --bg-deep: #080d18;
  --panel: rgba(18, 28, 47, 0.88);
  --panel-strong: #131f34;
  --line: rgba(173, 193, 225, 0.14);
  --line-strong: rgba(173, 193, 225, 0.25);
  --text: #eff4ff;
  --muted: #8c9ab2;
  --soft: #c1ccde;
  --blue: #6f9cff;
  --blue-bright: #9ebcff;
  --violet: #a895ff;
  --orange: #f6ad72;
  --green: #66d6ac;
  --danger: #fa7e93;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(
      circle at 13% 0%,
      rgba(86, 126, 245, 0.16),
      transparent 31rem
    ),
    radial-gradient(
      circle at 90% 18%,
      rgba(148, 102, 255, 0.11),
      transparent 27rem
    ),
    var(--bg);
  color: var(--text);
  letter-spacing: -0.01em;
}

button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  pointer-events: none;
  filter: blur(1px);
  opacity: 0.42;
  z-index: -1;
}
.ambient-one {
  width: 12rem;
  height: 12rem;
  top: 22rem;
  left: -7rem;
  border-radius: 50%;
  background: rgba(92, 130, 255, 0.13);
}
.ambient-two {
  width: 18rem;
  height: 18rem;
  right: -10rem;
  bottom: 8rem;
  border-radius: 50%;
  background: rgba(182, 116, 255, 0.1);
}

.shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}
.auth-shell {
  width: min(980px, calc(100% - 48px));
  min-height: 100vh;
  margin: auto;
  display: grid;
  place-items: center;
  grid-template-columns: 1fr 380px;
  gap: 80px;
  padding: 64px 0;
}
.auth-brand {
  align-self: center;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.auth-brand h1 {
  margin: 8px 0 12px;
  font-size: clamp(3rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
  font-weight: 750;
}
.brand-copy {
  max-width: 320px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border: 1px solid rgba(158, 188, 255, 0.42);
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(126, 160, 255, 0.28),
    rgba(83, 103, 178, 0.1)
  );
  color: var(--blue-bright);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 0 40px rgba(111, 156, 255, 0.13);
}
.brand-mark.small {
  width: 35px;
  height: 35px;
  border-radius: 11px;
  font-size: 10px;
}
.auth-card,
.panel-card {
  border: 1px solid var(--line);
  background: linear-gradient(
    145deg,
    rgba(23, 36, 61, 0.92),
    rgba(14, 23, 40, 0.92)
  );
  box-shadow: var(--shadow);
  border-radius: 22px;
}
.auth-card {
  width: 100%;
  padding: 34px;
}
.eyebrow,
.mini-kicker {
  margin: 0;
  color: var(--blue-bright);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.auth-card h2 {
  margin: 12px 0 8px;
  font-size: 1.8rem;
  letter-spacing: -0.04em;
}
.muted {
  color: var(--muted);
}
.stack-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}
label {
  display: grid;
  gap: 8px;
  color: var(--soft);
  font-size: 0.84rem;
  font-weight: 600;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: rgba(4, 10, 21, 0.42);
  color: var(--text);
  padding: 12px 13px;
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    background 0.18s;
}
input::placeholder,
textarea::placeholder {
  color: #62708a;
}
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(111, 156, 255, 0.76);
  box-shadow: 0 0 0 3px rgba(111, 156, 255, 0.12);
  background: rgba(6, 14, 28, 0.72);
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 0 15px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  transition:
    transform 0.18s,
    background 0.18s,
    border-color 0.18s,
    opacity 0.18s;
}
.button:hover {
  transform: translateY(-1px);
}
.button:disabled {
  opacity: 0.48;
  cursor: wait;
  transform: none;
}
.button-primary {
  background: linear-gradient(135deg, #648ff1, #816de0);
  box-shadow: 0 10px 28px rgba(100, 143, 241, 0.2);
}
.button-primary:hover {
  background: linear-gradient(135deg, #78a1ff, #9884f3);
}
.button-secondary {
  border-color: var(--line-strong);
  background: rgba(128, 154, 201, 0.09);
  color: var(--soft);
}
.button-secondary:hover {
  background: rgba(128, 154, 201, 0.15);
}
.button-quiet {
  min-height: 34px;
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}
.button-quiet:hover {
  border-color: var(--line-strong);
  color: var(--text);
}
.button-small {
  min-height: 30px;
  padding: 0 10px;
  border-color: var(--line);
  background: rgba(128, 154, 201, 0.08);
  color: var(--soft);
  font-size: 0.75rem;
}
.form-error {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 0.78rem;
  line-height: 1.5;
}
.success-text {
  min-height: 18px;
  color: var(--green);
  font-size: 0.78rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.topbar-brand > span:last-child {
  display: grid;
  gap: 2px;
}
.topbar-brand strong {
  font-size: 0.88rem;
  letter-spacing: -0.02em;
}
.topbar-brand small {
  color: var(--muted);
  font-size: 0.66rem;
}
.topbar-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}
.secure-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
}
.secure-pill i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(102, 214, 172, 0.11);
}
.app-main {
  padding: 62px 0 90px;
}
.hero-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 37px;
}
.hero-row h1 {
  margin: 12px 0 10px;
  font-size: clamp(2.15rem, 5vw, 4.1rem);
  line-height: 1;
  letter-spacing: -0.07em;
}
.hero-copy {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}
.hero-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(102, 214, 172, 0.2);
  border-radius: 14px;
  background: rgba(102, 214, 172, 0.06);
}
.note-icon {
  color: var(--green);
  font-size: 1.2rem;
}
.hero-note strong,
.hero-note small {
  display: block;
}
.hero-note strong {
  margin-bottom: 3px;
  color: #d6ffef;
  font-size: 0.8rem;
}
.hero-note small {
  color: #86bda8;
  font-size: 0.7rem;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin-bottom: 48px;
}
.stat-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 7px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(18, 29, 49, 0.68);
}
.stat-card::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  right: -48px;
  bottom: -50px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.06;
}
.stat-card.accent-blue {
  color: var(--blue);
}
.stat-card.accent-violet {
  color: var(--violet);
}
.stat-card.accent-orange {
  color: var(--orange);
}
.stat-card.accent-green {
  color: var(--green);
}
.stat-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}
.stat-card strong {
  color: var(--text);
  font-size: 2.4rem;
  line-height: 1;
  letter-spacing: -0.08em;
}
.stat-card small {
  color: var(--muted);
  font-size: 0.7rem;
}
.tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 50px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 38px;
}
.tab {
  position: relative;
  padding: 0 0 16px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.tab span {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 7px;
  background: rgba(137, 157, 194, 0.1);
  color: #9eabc0;
  font-size: 0.65rem;
}
.tab.active {
  color: var(--text);
}
.tab.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--blue-bright);
  box-shadow: 0 0 16px rgba(158, 188, 255, 0.52);
}
.tab-panel {
  animation: rise 0.25s ease-out;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 25px;
}
.section-heading h2 {
  margin: 9px 0 8px;
  font-size: 1.65rem;
  letter-spacing: -0.05em;
}
.section-copy {
  max-width: 630px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}
.architecture-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.architecture-card {
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(
    145deg,
    rgba(25, 39, 65, 0.77),
    rgba(13, 23, 41, 0.72)
  );
}
.step-number {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.architecture-card h3 {
  margin: 42px 0 9px;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
}
.architecture-card p {
  min-height: 64px;
  margin: 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.6;
}
.architecture-link {
  display: inline-block;
  margin-top: 22px;
  color: #657893;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.callout {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  padding: 20px 22px;
  border: 1px solid rgba(111, 156, 255, 0.17);
  border-radius: 17px;
  background: linear-gradient(
    90deg,
    rgba(91, 125, 217, 0.12),
    rgba(91, 125, 217, 0.03)
  );
}
.callout-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: rgba(111, 156, 255, 0.17);
  color: var(--blue-bright);
}
.callout strong {
  font-size: 0.82rem;
}
.callout p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}
.callout .button {
  margin-left: auto;
  flex: 0 0 auto;
}
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: 14px;
}
.panel-card {
  padding: 24px;
  box-shadow: none;
}
.form-card {
  display: grid;
  align-content: start;
  gap: 16px;
}
.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 4px;
}
.card-heading h3 {
  margin: 7px 0 0;
  font-size: 1.08rem;
  letter-spacing: -0.04em;
}
.circle-plus {
  color: var(--blue-bright);
  font-size: 1.3rem;
}
.profile-badge {
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(168, 149, 255, 0.13);
  color: var(--violet);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.field-help {
  margin: -7px 0 0;
  color: #74839b;
  font-size: 0.7rem;
  line-height: 1.55;
}
.info-card {
  padding: 30px;
}
.info-card h3 {
  margin: 10px 0;
  font-size: 1.18rem;
  letter-spacing: -0.04em;
}
.info-card > p {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.75;
}
.info-list {
  display: grid;
  gap: 12px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.info-list span {
  color: #6f7f98;
  font-size: 0.7rem;
}
.info-list strong {
  color: var(--soft);
  font-size: 0.7rem;
  text-align: right;
}
.list-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 36px 0 13px;
}
.list-heading h3 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
}
.resource-list,
.profile-list {
  display: grid;
  gap: 10px;
}
.resource-card,
.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 86px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(18, 29, 49, 0.55);
}
.inline-form {
  width: 100%;
  display: grid;
  gap: 9px;
  margin: 2px 0 8px 53px;
  padding: 15px;
  border: 1px solid rgba(111, 156, 255, 0.24);
  border-radius: 12px;
  background: rgba(7, 14, 28, 0.44);
}
.inline-form-title {
  color: var(--soft);
  font-size: 0.73rem;
  font-weight: 700;
}
.inline-form input,
.inline-form textarea {
  padding: 9px;
  border-radius: 8px;
  font-size: 0.72rem;
}
.inline-form-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.warning-text {
  max-width: 260px;
  overflow: hidden;
  color: var(--orange);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.resource-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(111, 156, 255, 0.11);
  color: var(--blue-bright);
  font-size: 0.78rem;
  font-weight: 800;
}
.resource-main {
  min-width: 0;
  flex: 1;
}
.resource-main h4 {
  overflow: hidden;
  margin: 0 0 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
}
.resource-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 0.68rem;
}
.resource-meta b {
  color: var(--soft);
  font-weight: 700;
}
.resource-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--blue-bright);
  padding: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}
.text-button:hover {
  color: #d6e2ff;
}
.text-button.danger {
  color: var(--danger);
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: middle;
  background: var(--green);
}
.status-dot.off {
  background: #6e7b90;
}
.status-dot.warn {
  background: var(--orange);
}
.rules-layout {
  grid-template-columns: minmax(240px, 0.63fr) minmax(0, 1.37fr);
  align-items: start;
}
.select-list {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}
.select-rule {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: rgba(6, 13, 25, 0.24);
  color: var(--soft);
  padding: 12px;
  text-align: left;
}
.select-rule:hover {
  background: rgba(111, 156, 255, 0.08);
}
.select-rule.active {
  border-color: rgba(111, 156, 255, 0.31);
  background: rgba(111, 156, 255, 0.1);
  color: var(--text);
}
.select-rule strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.76rem;
}
.select-rule small {
  color: var(--muted);
  font-size: 0.65rem;
}
.select-rule .count {
  color: var(--blue-bright);
  font-size: 0.7rem;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(111, 156, 255, 0.1);
  color: var(--blue-bright);
  font-size: 1.1rem;
}
.icon-button:hover {
  border-color: var(--line-strong);
}
.empty-state {
  display: grid;
  place-items: center;
  min-height: 350px;
  text-align: center;
}
.empty-icon {
  color: var(--blue);
  font-size: 2.4rem;
}
.empty-state h3 {
  margin: 10px 0 0;
  font-size: 1rem;
}
.empty-state p {
  max-width: 300px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}
.switch-line {
  display: flex;
  align-items: center;
  grid-template-columns: auto;
  gap: 9px;
  color: var(--muted);
  font-size: 0.75rem;
}
.switch-line input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  border-radius: 12px;
  background: #354258;
  transition: background 0.18s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #b5c0d3;
  transition: transform 0.18s;
}
.switch-line input:checked + .switch {
  background: var(--blue);
}
.switch-line input:checked + .switch::after {
  transform: translateX(14px);
  background: #fff;
}
.rules-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  color: var(--soft);
  font-size: 0.76rem;
  font-weight: 700;
}
.rule-rows {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 2px;
}
.rule-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 0.75fr auto;
  align-items: end;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(6, 13, 25, 0.24);
}
.rule-row label {
  gap: 5px;
  font-size: 0.64rem;
}
.rule-row input,
.rule-row select {
  padding: 9px;
  border-radius: 8px;
  font-size: 0.72rem;
}
.remove-rule {
  width: 28px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
}
.remove-rule:hover {
  color: var(--danger);
}
.profile-form {
  max-width: 900px;
  display: grid;
  gap: 17px;
}
.selection-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.selection-columns fieldset {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.selection-columns legend {
  padding: 0 5px;
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 700;
}
.checkbox-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.73rem;
}
.checkbox-item input {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
}
.checkbox-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-card {
  align-items: flex-start;
}
.profile-card .resource-icon {
  background: rgba(102, 214, 172, 0.1);
  color: var(--green);
}
.profile-card .resource-main p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.7rem;
}
.url-hint {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(111, 156, 255, 0.08);
  color: var(--blue-bright);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-card .resource-actions {
  align-self: center;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 7, 14, 0.72);
  backdrop-filter: blur(9px);
}
.modal-card {
  position: relative;
  width: min(540px, 100%);
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: #121d31;
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.45);
}
.modal-card h2 {
  margin: 11px 0 8px;
  font-size: 1.45rem;
  letter-spacing: -0.05em;
}
.modal-card > p {
  font-size: 0.78rem;
  line-height: 1.6;
}
.modal-card label {
  margin-top: 23px;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 17px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
}
.modal-actions {
  display: flex;
  gap: 9px;
  margin-top: 12px;
}
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: min(380px, calc(100% - 44px));
  padding: 12px 15px;
  border: 1px solid rgba(102, 214, 172, 0.28);
  border-radius: 11px;
  background: rgba(24, 51, 51, 0.95);
  color: #cffff0;
  box-shadow: var(--shadow);
  font-size: 0.76rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .shell,
  .auth-shell {
    width: min(100% - 30px, 680px);
  }
  .auth-shell {
    grid-template-columns: 1fr;
    gap: 28px;
    align-content: center;
  }
  .auth-brand {
    justify-content: center;
  }
  .auth-brand h1 {
    font-size: 3.4rem;
  }
  .auth-card {
    max-width: 460px;
    margin: auto;
  }
  .hero-row {
    display: grid;
    align-items: start;
  }
  .hero-note {
    width: max-content;
    max-width: 100%;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .architecture-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .two-column,
  .rules-layout {
    grid-template-columns: 1fr;
  }
  .empty-state {
    min-height: 220px;
  }
  .profile-form {
    max-width: none;
  }
}

@media (max-width: 520px) {
  .shell,
  .auth-shell {
    width: min(100% - 22px, 680px);
  }
  .topbar {
    min-height: 65px;
  }
  .secure-pill {
    display: none;
  }
  .app-main {
    padding-top: 40px;
  }
  .hero-row h1 {
    font-size: 2.5rem;
  }
  .tabs {
    gap: 18px;
    overflow-x: auto;
  }
  .tab {
    flex: 0 0 auto;
  }
  .stat-card {
    min-height: 115px;
    padding: 15px;
  }
  .stat-card strong {
    font-size: 2rem;
  }
  .architecture-grid,
  .selection-columns {
    grid-template-columns: 1fr;
  }
  .architecture-card {
    min-height: 175px;
  }
  .architecture-card h3 {
    margin-top: 26px;
  }
  .callout {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .callout .button {
    margin-left: 49px;
  }
  .resource-card,
  .profile-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .resource-actions,
  .profile-card .resource-actions {
    width: 100%;
    justify-content: flex-start;
    padding-left: 53px;
  }
  .rule-row {
    grid-template-columns: 1fr 1fr;
  }
  .rule-row label:nth-child(2) {
    grid-column: span 2;
  }
  .modal-card {
    padding: 24px;
  }
}
