:root {
  color-scheme: light;
  --page: #f4f7fc;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --surface-blue: #edf4ff;
  --text: #0b1733;
  --text-soft: #586681;
  --text-faint: #8995aa;
  --line: #e1e7f0;
  --line-strong: #cdd6e4;
  --blue: #0967ff;
  --blue-dark: #0354d6;
  --navy: #0b1e43;
  --green: #0aa875;
  --green-soft: #e7f9f1;
  --amber: #c87900;
  --amber-soft: #fff5de;
  --red: #d8324a;
  --red-soft: #ffedf0;
  --purple: #7655d6;
  --purple-soft: #f1edff;
  --shadow-sm: 0 5px 18px rgba(18, 39, 76, .06);
  --shadow-md: 0 20px 60px rgba(18, 39, 76, .14);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --content: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 0, rgba(9, 103, 255, .06), transparent 28rem),
    var(--page);
  color: var(--text);
  font: 15px/1.45 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(9, 103, 255, .22);
  outline-offset: 2px;
}

svg {
  display: block;
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #1180ff, #0754ed);
  box-shadow: 0 8px 18px rgba(9, 103, 255, .24);
  color: #fff;
  font-size: 25px;
  font-weight: 850;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  line-height: 1.1;
}

.brand small {
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.1;
}

.auth-screen {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  place-items: center;
  padding: 28px 18px;
  background: #08152f;
}

.auth-screen::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 38px 38px;
  content: "";
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}

.auth-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(4px);
  opacity: .65;
}

.auth-glow-one {
  top: -180px;
  left: -100px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(11, 105, 255, .5), transparent 68%);
}

.auth-glow-two {
  right: -160px;
  bottom: -230px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(118, 85, 214, .28), transparent 68%);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 28px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 32px 90px rgba(0, 8, 27, .42);
}

.brand-auth {
  margin-bottom: 38px;
}

.auth-copy h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 36px);
  letter-spacing: -.035em;
  line-height: 1.08;
}

.auth-copy > p:last-child {
  margin: 12px 0 26px;
  color: var(--text-soft);
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 750;
}

.password-field {
  position: relative;
}

.password-field input,
.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  transition: border-color .18s, box-shadow .18s;
}

.password-field input {
  height: 52px;
  padding: 0 94px 0 15px;
}

.form-field input {
  height: 48px;
  padding: 0 14px;
}

.form-field textarea {
  min-height: 96px;
  padding: 12px 14px;
  resize: vertical;
}

.password-field input:focus,
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(9, 103, 255, .1);
  outline: none;
}

.field-action {
  position: absolute;
  top: 50%;
  right: 8px;
  border: 0;
  padding: 8px;
  transform: translateY(-50%);
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.form-error {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #ffd0d7;
  border-radius: 12px;
  background: var(--red-soft);
  color: #9b2033;
  font-size: 13px;
}

.auth-note {
  margin: 16px 0 0;
  color: var(--text-faint);
  font-size: 12px;
  text-align: center;
}

.app-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid rgba(218, 226, 238, .88);
  background: rgba(244, 247, 252, .9);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  width: min(var(--content), calc(100% - 40px));
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.update-state {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 4px;
  color: var(--text-soft);
  font-size: 12px;
  white-space: nowrap;
}

.connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-soft);
}

.connection-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.connection-dot.offline {
  background: var(--red);
  box-shadow: 0 0 0 4px var(--red-soft);
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: border-color .18s, color .18s, transform .18s, box-shadow .18s;
}

.icon-button:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  color: var(--blue);
  transform: translateY(-1px);
}

.icon-button svg,
.button svg,
.search-field svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-button.loading svg {
  animation: spin .75s linear infinite;
}

.workspace {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
  padding: 38px 0 70px;
}

.page-heading,
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 46px);
  letter-spacing: -.045em;
  line-height: 1;
}

.page-heading > div > p:last-child,
.section-heading p {
  max-width: 660px;
  margin: 11px 0 0;
  color: var(--text-soft);
}

.section-heading {
  align-items: center;
  margin-bottom: 18px;
}

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

.section-heading p {
  margin-top: 5px;
  font-size: 13px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: var(--surface-blue);
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.1;
  transition: background .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: .58;
}

.button-primary {
  background: var(--blue);
  box-shadow: 0 8px 20px rgba(9, 103, 255, .2);
  color: #fff;
}

.button-primary:hover:not(:disabled) {
  background: var(--blue-dark);
  box-shadow: 0 10px 24px rgba(9, 103, 255, .27);
}

.button-secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.button-quiet {
  padding-inline: 10px;
  background: transparent;
  color: var(--text-soft);
}

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

.button-wide {
  width: 100%;
  margin-top: 16px;
}

.button.loading::before {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: spin .7s linear infinite;
}

.button.loading > svg {
  display: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.summary-card {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.summary-label {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
}

.summary-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-blue);
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
}

.summary-icon.good {
  background: var(--green-soft);
  color: var(--green);
}

.summary-icon.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.summary-icon.purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.summary-value {
  margin-top: 12px;
  font-size: 28px;
  font-weight: 780;
  letter-spacing: -.035em;
  line-height: 1;
}

.summary-hint {
  margin-top: 7px;
  color: var(--text-faint);
  font-size: 11px;
}

.skeleton-card,
.skeleton-line {
  position: relative;
  overflow: hidden;
  background: #e9eef6;
}

.skeleton-card::after,
.skeleton-line::after {
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .72), transparent);
  content: "";
  animation: shimmer 1.35s infinite;
}

.tabs {
  display: flex;
  gap: 5px;
  margin: 30px 0 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .74);
  width: max-content;
}

.tab,
.filter {
  border: 0;
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
}

.tab {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 11px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 720;
}

.tab.active {
  background: var(--navy);
  box-shadow: 0 6px 14px rgba(11, 30, 67, .16);
  color: #fff;
}

.tab-count {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(103, 119, 146, .12);
  font-size: 11px;
}

.tab.active .tab-count {
  background: rgba(255, 255, 255, .16);
}

.tab-panel {
  display: none;
  min-height: 280px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-sm);
}

.tab-panel.active {
  display: block;
}

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 17px;
}

.search-field {
  position: relative;
  display: block;
  width: min(360px, 100%);
}

.search-field svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--text-faint);
}

.search-field input {
  width: 100%;
  height: 42px;
  padding: 0 13px 0 39px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  outline: 0;
}

.search-field input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(9, 103, 255, .08);
}

.filter-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px;
  border-radius: 12px;
  background: #eef2f7;
}

.filter {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 9px;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.filter.active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(18, 39, 76, .09);
  color: var(--text);
}

.instance-list {
  display: grid;
  gap: 12px;
}

.instance-card {
  display: grid;
  grid-template-columns: minmax(300px, 1.5fr) minmax(360px, 2fr) auto;
  align-items: center;
  gap: 22px;
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}

.instance-card:hover {
  border-color: #cfdaea;
  box-shadow: 0 10px 28px rgba(18, 39, 76, .08);
  transform: translateY(-1px);
}

.instance-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.instance-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-blue);
  color: var(--blue);
  font-size: 16px;
  font-weight: 850;
}

.instance-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 2px;
  margin: 0;
  font-size: 15px;
  font-weight: 780;
  line-height: 1.3;
}

.instance-phone {
  color: #31527f;
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}

.instance-id {
  margin-top: 4px;
  color: var(--text-faint);
  font: 11px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.identity-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.identity-chip {
  display: inline-flex;
  max-width: 190px;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #f0f3f8;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-chip strong {
  color: var(--text);
  font-weight: 780;
}

.instance-health {
  display: grid;
  grid-template-columns: auto repeat(3, minmax(78px, 1fr));
  align-items: center;
  gap: 12px;
}

.status-badge {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f0f3f8;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 780;
  white-space: nowrap;
}

.status-badge::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-badge.healthy {
  background: var(--green-soft);
  color: #087d59;
}

.status-badge.setup,
.status-badge.paused {
  background: var(--amber-soft);
  color: #9a5e00;
}

.status-badge.attention {
  background: var(--red-soft);
  color: #a82136;
}

.metric {
  min-width: 0;
}

.metric-label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.metric-value {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.instance-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.instance-actions .button {
  min-height: 38px;
  padding: 8px 11px;
  font-size: 12px;
}

.section-state {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 13px;
}

.section-state.error {
  border-color: #ffd0d7;
  background: var(--red-soft);
  color: #992136;
}

.empty-state {
  display: grid;
  min-height: 250px;
  place-items: center;
  padding: 40px 20px;
  text-align: center;
}

.empty-state-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 17px;
  background: var(--surface-blue);
  color: var(--blue);
  font-size: 22px;
  font-weight: 850;
}

.empty-state h3 {
  margin: 0;
  font-size: 17px;
}

.empty-state p {
  max-width: 440px;
  margin: 7px auto 0;
  color: var(--text-soft);
  font-size: 13px;
}

.data-list {
  display: grid;
  gap: 9px;
}

.data-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.5fr) minmax(120px, .75fr) minmax(150px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.data-row-main {
  min-width: 0;
}

.data-row-title {
  overflow: hidden;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-row-subtitle,
.data-label {
  color: var(--text-faint);
  font-size: 11px;
}

.data-row-subtitle {
  margin-top: 4px;
}

.data-value {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 680;
}

.event-row {
  grid-template-columns: 155px minmax(220px, 1fr) minmax(150px, .8fr) auto;
  align-items: start;
}

.event-details {
  grid-column: 1 / -1;
  margin-top: -4px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.event-details summary,
.technical-details summary {
  width: max-content;
  cursor: pointer;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.event-details pre {
  max-height: 240px;
  margin: 9px 0 0;
  overflow: auto;
  padding: 11px;
  border-radius: 10px;
  background: #f5f7fa;
  color: #34415a;
  font: 11px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 15, 34, .58);
  backdrop-filter: blur(5px);
  animation: fade-in .18s ease-out;
}

.modal-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(560px, 100%);
  max-height: min(840px, calc(100dvh - 40px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-md);
  animation: modal-in .2s ease-out;
}

.modal-dialog.wide {
  width: min(760px, 100%);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 22px 17px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.025em;
  line-height: 1.15;
}

.modal-subtitle {
  margin: 7px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  background: #f2f5f9;
}

.modal-body {
  overflow: auto;
  padding: 20px 22px 22px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 760;
}

.form-field label span {
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 550;
}

.form-hint {
  margin: 7px 0 0;
  color: var(--text-faint);
  font-size: 11px;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.pin-result {
  padding: 6px 0 2px;
  text-align: center;
}

.pin-success-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin: 0 auto 13px;
  border-radius: 18px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 24px;
  font-weight: 900;
}

.pin-result h3 {
  margin: 0;
  font-size: 18px;
}

.pin-result > p {
  max-width: 440px;
  margin: 7px auto 0;
  color: var(--text-soft);
  font-size: 13px;
}

.pin-code {
  display: block;
  margin: 20px 0 14px;
  padding: 19px 12px;
  border: 1px dashed #a8c6ff;
  border-radius: 17px;
  background: var(--surface-blue);
  color: var(--navy);
  font: 800 38px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .18em;
  text-indent: .18em;
}

.pin-meta {
  display: flex;
  justify-content: center;
  gap: 14px;
  color: var(--text-faint);
  font-size: 11px;
}

.pin-warning {
  margin-top: 16px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--amber-soft);
  color: #865500;
  font-size: 12px;
  text-align: left;
}

.detail-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-soft);
}

.detail-hero .status-badge {
  margin-left: auto;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.detail-cell {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.detail-cell .metric-value {
  margin-top: 5px;
  white-space: normal;
}

.detail-section {
  margin-top: 20px;
}

.detail-section h3 {
  margin: 0 0 9px;
  font-size: 13px;
}

.detail-note {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 12px;
  white-space: pre-wrap;
}

.identity-manage-list {
  display: grid;
  gap: 7px;
}

.identity-manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.identity-manage-row strong,
.identity-manage-row small {
  display: block;
}

.identity-manage-row small {
  margin-top: 2px;
  color: var(--text-faint);
}

.technical-details {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.runtime-result {
  display: grid;
  gap: 7px;
  margin-top: 11px;
}

.runtime-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.runtime-row span:first-child {
  color: var(--text-soft);
}

.danger-zone {
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.danger-zone h3 {
  color: var(--red);
}

.danger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.confirm-copy {
  margin: 0;
  color: var(--text-soft);
}

.confirm-callout {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: var(--red-soft);
  color: #912035;
  font-size: 12px;
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(380px, calc(100% - 36px));
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  background: #10213f;
  box-shadow: 0 14px 38px rgba(5, 15, 34, .24);
  color: #fff;
  pointer-events: auto;
  animation: toast-in .22s ease-out;
}

.toast.success {
  background: #087d59;
}

.toast.error {
  background: #a82439;
}

.toast-icon {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .17);
  font-size: 11px;
  font-weight: 900;
}

.toast-message {
  font-size: 13px;
  font-weight: 650;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
}

@media (max-width: 1080px) {
  .instance-card {
    grid-template-columns: minmax(210px, 1fr) minmax(330px, 1.7fr);
  }

  .instance-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 860px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-toolbar,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    width: 100%;
  }

  .instance-card {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .instance-health {
    grid-template-columns: repeat(3, 1fr);
  }

  .instance-health .status-badge {
    grid-column: 1 / -1;
  }

  .instance-actions {
    grid-column: auto;
  }

  .data-row,
  .event-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .header-inner,
  .workspace {
    width: min(100% - 24px, var(--content));
  }

  .header-inner {
    min-height: 68px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 22px;
  }

  .brand small,
  .update-state {
    display: none;
  }

  .workspace {
    padding-top: 25px;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .page-heading .button {
    width: 100%;
  }

  .summary-grid {
    gap: 9px;
    margin-top: 22px;
  }

  .summary-card {
    min-height: 103px;
    padding: 14px;
  }

  .summary-value {
    font-size: 25px;
  }

  .tabs {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }

  .tab {
    justify-content: center;
    padding-inline: 7px;
    font-size: 12px;
  }

  .tab-panel {
    margin-inline: -4px;
    padding: 14px;
    border-radius: 20px;
  }

  .filter-group {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
  }

  .instance-health {
    gap: 10px;
  }

  .instance-actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .instance-actions .button:first-child {
    min-width: 0;
  }

  .data-row,
  .event-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .event-details {
    grid-column: auto;
  }

  .modal {
    align-items: end;
    padding: 0;
  }

  .modal-dialog,
  .modal-dialog.wide {
    width: 100%;
    max-height: calc(100dvh - 18px);
    border-radius: 24px 24px 0 0;
    animation-name: sheet-in;
  }

  .modal-header,
  .modal-body {
    padding-right: 17px;
    padding-left: 17px;
  }

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

  .pin-code {
    font-size: 34px;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .modal-actions .button {
    width: 100%;
  }

  .modal-actions .button-primary,
  .modal-actions .button-danger {
    grid-row: 1;
  }

  .toast-region {
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(24px); }
}
