:root {
  --bg: #d9e2ec;
  --bg-strong: #c6d2df;
  --ink: #233547;
  --panel: rgba(247, 250, 252, 0.96);
  --line: rgba(35, 53, 71, 0.16);
  --accent: #2f6ea4;
  --accent-strong: #204f79;
  --accent-soft: #e7f0f8;
  --danger: #b3473c;
  --shadow: 0 16px 40px rgba(32, 52, 73, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Liberation Sans", "Nimbus Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #edf3f8 0, var(--bg) 120px, var(--bg-strong) 100%);
}

.shell {
  width: min(760px, calc(100% - 32px));
  margin: 24px auto 40px;
  display: grid;
  gap: 16px;
  position: relative;
}

.chrome {
  border: 1px solid rgba(27, 45, 62, 0.26);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #eef3f7;
}

.chrome-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #6389ae 0, #4d7399 100%);
  color: #fff;
}

.chrome-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.8rem;
  font-weight: 700;
}

.chrome-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-action {
  padding: 8px 12px;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(46, 79, 112, 0.2);
  border-radius: 10px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.brand {
  padding-bottom: 28px;
  background:
    linear-gradient(180deg, rgba(235, 242, 249, 0.96) 0, rgba(247, 250, 252, 0.96) 100%);
}

.info-note {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(63, 99, 133, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0, rgba(236, 243, 249, 0.96) 100%);
}

.info-note-title {
  margin-bottom: 6px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5c7791;
}

.info-note-copy {
  margin-bottom: 0;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: #5c7791;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1, h2, h3 {
  color: #18314a;
}

.lede {
  max-width: 54ch;
  margin-bottom: 0;
  color: rgba(35, 53, 71, 0.82);
}

.stack {
  display: grid;
  gap: 14px;
}

.inline-edit {
  display: flex;
  gap: 10px;
  align-items: end;
}

.inline-field {
  flex: 1 1 auto;
}

.compact input {
  max-width: 320px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-weight: 600;
}

input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 6px;
  border: 1px solid rgba(63, 99, 133, 0.32);
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  box-shadow: inset 0 1px 2px rgba(17, 32, 46, 0.06);
}

button {
  border: 0;
  border-radius: 6px;
  padding: 11px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  background: linear-gradient(180deg, #4d85b6 0, #2f6ea4 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

button:hover {
  background: linear-gradient(180deg, #4279aa 0, #285d8b 100%);
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

button.ghost {
  background: linear-gradient(180deg, #fefefe 0, #e7edf3 100%);
  color: var(--ink);
  border: 1px solid rgba(46, 79, 112, 0.22);
  box-shadow: none;
}

.hint {
  margin-bottom: 0;
  color: rgba(35, 53, 71, 0.68);
}

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

.credential-list {
  display: grid;
  gap: 16px;
}

.credential-row {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid rgba(63, 99, 133, 0.18);
  background: linear-gradient(180deg, #ffffff 0, #f1f5f8 100%);
}

.credential-copy {
  flex: 1 1 320px;
}

.credential-label {
  margin-bottom: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5c7791;
}

.credential-value {
  margin-bottom: 6px;
  font-family: "Liberation Mono", "SFMono-Regular", monospace;
  font-size: 1rem;
  word-break: break-all;
}

.credential-value.muted {
  color: rgba(35, 53, 71, 0.56);
}

.credential-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
}

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

.facts {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.facts div {
  padding: 14px 16px;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff 0, #f1f5f8 100%);
  border: 1px solid rgba(63, 99, 133, 0.18);
}

dt {
  font-size: 0.85rem;
  color: rgba(35, 53, 71, 0.62);
  margin-bottom: 6px;
}

dd {
  margin: 0;
  font-family: "Liberation Mono", "SFMono-Regular", monospace;
  overflow-wrap: anywhere;
}

.danger {
  margin-top: 24px;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid rgba(179, 71, 60, 0.22);
  background: linear-gradient(180deg, rgba(255, 246, 245, 0.96) 0, rgba(252, 237, 235, 0.96) 100%);
}

.secret-console {
  margin: 10px 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(21, 45, 67, 0.22);
  overflow: hidden;
  background: #102131;
  color: #e8f2fb;
}

.secret-inline {
  margin-top: 2px;
}

.secret-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: linear-gradient(180deg, #18344c 0, #13293d 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.secret-pill {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.secret-value {
  margin: 0;
  padding: 18px 16px;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: "Liberation Mono", "SFMono-Regular", monospace;
  font-size: 0.98rem;
}

.feedback-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 32px));
  z-index: 60;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(46, 79, 112, 0.22);
  background: linear-gradient(180deg, #ffffff 0, #eef3f7 100%);
  box-shadow: 0 12px 28px rgba(30, 48, 67, 0.18);
  animation: toast-in 140ms ease-out;
  font-weight: 600;
}

.feedback-toast.error {
  border-color: rgba(179, 71, 60, 0.42);
  background: linear-gradient(180deg, #fff6f5 0, #fbe1de 100%);
  color: #8d2419;
}

.feedback-toast.success {
  border-color: rgba(39, 122, 80, 0.34);
  background: linear-gradient(180deg, #f4fff7 0, #dff4e7 100%);
  color: #1f6d43;
}

.feedback-toast.info {
  border-color: rgba(47, 110, 164, 0.28);
  background: linear-gradient(180deg, #f7fbff 0, #e3eff9 100%);
  color: var(--accent-strong);
}

.feedback-toast.warning {
  border-color: rgba(199, 125, 33, 0.42);
  background: linear-gradient(180deg, #fffaf2 0, #f8e4be 100%);
  color: #9a5b05;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(18, 34, 49, 0.34);
  z-index: 40;
}

.modal-card {
  width: min(460px, 100%);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid rgba(46, 79, 112, 0.24);
  background: #f7fafc;
  box-shadow: 0 24px 64px rgba(19, 34, 47, 0.24);
}

.modal-title {
  margin-bottom: 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.modal-copy {
  margin-bottom: 18px;
  color: rgba(35, 53, 71, 0.78);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.is-loading {
  position: relative;
  color: transparent !important;
}

.is-loading svg {
  opacity: 0;
}

.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

.ghost.is-loading::after {
  border: 2px solid rgba(35, 53, 71, 0.2);
  border-top-color: rgba(35, 53, 71, 0.85);
}

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

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

.hidden {
  display: none;
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 760px);
    margin: 16px auto 24px;
  }

  .panel {
    padding: 20px;
    border-radius: 10px;
  }

  .chrome-bar {
    flex-wrap: wrap;
  }

  button,
  .row button {
    width: 100%;
  }

  .inline-edit {
    flex-direction: column;
    align-items: stretch;
  }

  .inline-edit .icon-button {
    width: 100%;
  }

  .credential-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }
}
