:root {
  color-scheme: light;
  --canvas: #f4f5ef;
  --paper: #ffffff;
  --paper-soft: #f8f9f5;
  --ink: #17201c;
  --ink-soft: #56605a;
  --muted: #7d8781;
  --line: #e4e8df;
  --line-strong: #d8ded3;
  --sidebar: #18221d;
  --sidebar-soft: #243029;
  --lime: #a8ed72;
  --lime-bright: #c8ff9a;
  --lime-deep: #3b7628;
  --green-soft: #eff8e9;
  --red: #b64938;
  --red-soft: #fff1ef;
  --shadow: 0 18px 48px rgba(31, 48, 38, 0.08);
  --sidebar-width: 248px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--canvas);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.5;
}

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

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
}

a {
  color: inherit;
}

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

h1 {
  margin-bottom: 0.65rem;
  font-size: clamp(2rem, 3.4vw, 3.15rem);
  font-weight: 820;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

h2 {
  margin-bottom: 0.25rem;
  font-size: 1.08rem;
  font-weight: 720;
  letter-spacing: -0.025em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.eyebrow {
  margin-bottom: 0.55rem;
  color: #718078;
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 16px 16px 16px 5px;
  background: var(--lime);
  color: #19251e;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.08em;
  transform: rotate(-3deg);
}

.brand-mark.small {
  width: 39px;
  height: 39px;
  border-radius: 11px 11px 11px 4px;
  font-size: 1rem;
}

.button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 730;
  line-height: 1;
  text-decoration: none;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

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

.button:disabled {
  opacity: 0.55;
  transform: none;
}

.button.primary {
  background: var(--sidebar);
  color: #fff;
  box-shadow: 0 9px 20px rgba(24, 34, 29, 0.14);
}

.button.primary:hover {
  background: #26362e;
}

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

.button.secondary:hover {
  border-color: #c4cdc1;
  background: var(--paper-soft);
}

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

.button.compact {
  min-height: 38px;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
}

.button.wide {
  width: 100%;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

label {
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  padding: 0.78rem 0.85rem;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #91ac84;
  box-shadow: 0 0 0 3px rgba(95, 140, 74, 0.12);
}

textarea {
  resize: vertical;
}

.auth-page,
.install-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(circle at 7% 6%, rgba(168, 237, 114, 0.17), transparent 28rem),
    var(--canvas);
}

.auth-card,
.install-shell {
  width: min(100%, 560px);
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  padding: clamp(1.7rem, 5vw, 3rem);
  box-shadow: var(--shadow);
}

.auth-card .brand-mark {
  margin-bottom: 2rem;
}

.auth-card p {
  color: var(--ink-soft);
}

.stack-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.6rem;
}

.stack-form label {
  display: grid;
  gap: 0.45rem;
}

.scope-box {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-soft);
  padding: 1rem;
}

.scope-box span {
  color: var(--muted);
}

.install-shell {
  width: min(100%, 960px);
}

.install-heading {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.install-heading p,
.section-heading p {
  color: var(--muted);
}

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

.section-heading {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.section-heading > span {
  display: grid;
  flex: 0 0 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--green-soft);
  color: var(--lime-deep);
  font-weight: 900;
}

.section-heading p {
  margin: 0;
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

.alert,
.feedback {
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.alert {
  margin-bottom: 1rem;
}

.feedback {
  position: fixed;
  z-index: 80;
  top: 78px;
  right: 28px;
  width: min(420px, calc(100vw - 2rem));
  box-shadow: 0 18px 42px rgba(19, 31, 24, 0.18);
}

.alert.error,
.feedback.error {
  border: 1px solid #efc8c5;
  background: var(--red-soft);
  color: var(--red);
}

.feedback.success {
  border: 1px solid #c7dfbd;
  background: #f1faed;
  color: #346d3f;
}

.alert ul {
  margin-bottom: 0;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  display: flex;
  width: var(--sidebar-width);
  height: 100vh;
  flex-direction: column;
  overflow-y: auto;
  background: var(--sidebar);
  color: #e9f0e9;
  padding: 22px 16px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 20px;
  color: #fff;
  text-decoration: none;
}

.brand-copy {
  display: grid;
  min-width: 0;
}

.brand-copy strong {
  font-size: 1.1rem;
  font-weight: 780;
  letter-spacing: -0.03em;
}

.brand-copy small {
  margin-top: 1px;
  color: #8fa096;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.59rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.workspace-switcher {
  display: grid;
  align-items: center;
  gap: 9px;
  grid-template-columns: 36px minmax(0, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  padding: 9px;
}

.workspace-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #46574e;
  border-radius: 9px;
  background: #304038;
  font-size: 0.7rem;
  font-weight: 800;
}

.workspace-switcher label {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.workspace-switcher label > span {
  color: #8fa096;
  font-size: 0.61rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-switcher select {
  min-width: 0;
  height: 23px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #eef3ef;
  padding: 0;
  box-shadow: none;
  font-size: 0.76rem;
  font-weight: 700;
}

.workspace-switcher select option {
  background: var(--sidebar-soft);
  color: #fff;
}

.sidebar nav {
  display: grid;
  gap: 4px;
  margin-top: 26px;
}

.nav-label {
  margin-bottom: 3px;
  padding: 0 10px;
  color: #809087;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.sidebar nav button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #9caba2;
  padding: 10px 11px;
  font-size: 0.84rem;
  font-weight: 650;
  text-align: left;
}

.sidebar nav button > span {
  display: grid;
  width: 18px;
  place-items: center;
  color: #aab8af;
  font-size: 1rem;
}

.sidebar nav button:hover {
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
}

.sidebar nav button.active {
  background: rgba(168, 237, 114, 0.1);
  color: var(--lime-bright);
}

.sidebar nav button.active > span {
  color: var(--lime);
}

.plan-card {
  display: grid;
  gap: 10px;
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
}

.plan-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.68rem;
}

.plan-card > div:first-child strong {
  color: var(--lime-bright);
}

.plan-card > div:first-child span {
  color: #85968c;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.plan-progress {
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
}

.plan-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
}

.plan-card p {
  margin: 0;
  color: #82938a;
  font-size: 0.65rem;
  line-height: 1.45;
}

.plan-card button {
  width: fit-content;
  border: 0;
  background: transparent;
  color: #d6e0d9;
  padding: 0;
  font-size: 0.67rem;
  font-weight: 700;
}

.sidebar-user {
  display: grid;
  align-items: center;
  gap: 9px;
  grid-template-columns: 31px minmax(0, 1fr) 24px;
  margin-top: 15px;
  padding: 0 5px;
}

.user-avatar {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  background: var(--lime-bright);
  color: #2f482a;
  font-size: 0.63rem;
  font-weight: 850;
}

.sidebar-user > div {
  display: grid;
  min-width: 0;
}

.sidebar-user strong {
  overflow: hidden;
  color: #edf2ee;
  font-size: 0.69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user > div span {
  overflow: hidden;
  color: #819188;
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user form {
  display: contents;
}

.sidebar-user button {
  border: 0;
  background: transparent;
  color: #8fa096;
  padding: 3px;
  font-size: 1rem;
}

.sidebar-user button:hover {
  color: var(--lime);
}

.main {
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  display: flex;
  min-height: 65px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 245, 239, 0.94);
  padding: 12px clamp(1.25rem, 3vw, 2.15rem);
}

.server-pill {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 620;
}

.server-pill::first-letter {
  color: #69bd4c;
}

.view-panel {
  width: min(100%, 1260px);
  margin: 0 auto;
  padding: clamp(1.7rem, 4vw, 2.7rem) clamp(1.25rem, 3vw, 2.15rem) 4rem;
}

.view-panel[hidden] {
  display: none;
}

.page-title-row {
  display: grid;
  align-items: start;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 1.35rem;
}

.page-title-row > div:first-child {
  max-width: 900px;
}

.page-title-row > div:first-child > p:last-child {
  max-width: 860px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.connection-progress {
  display: flex;
  min-width: 190px;
  align-items: center;
  gap: 12px;
  border: 1px solid #d9ead0;
  border-radius: 16px;
  background: var(--green-soft);
  padding: 17px 18px;
  color: #4c7045;
}

.connection-progress > span {
  font-size: 1.2rem;
}

.connection-progress div {
  display: grid;
}

.connection-progress strong {
  color: #44663d;
  font-size: 1.24rem;
  line-height: 1.05;
}

.connection-progress small {
  margin-top: 4px;
  color: #76906f;
  font-size: 0.62rem;
}

.compact-progress {
  background: #fff;
}

.global-progress {
  border-color: #d5e3ce;
  background: linear-gradient(135deg, #f5faef, #edf7e7);
}

.connection-security-note {
  display: grid;
  align-items: start;
  gap: 12px;
  grid-template-columns: 22px minmax(0, 1fr);
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
  padding: 14px 16px;
  color: #587151;
}

.connection-security-note > span {
  font-size: 1rem;
}

.connection-security-note div {
  display: grid;
  gap: 3px;
}

.connection-security-note strong {
  font-size: 0.76rem;
}

.connection-security-note p {
  margin: 0;
  color: #758079;
  font-size: 0.69rem;
}

.global-security-note {
  border-color: #d5e3ce;
  background: #f8fbf5;
}

.connections-list {
  display: grid;
  gap: 0.75rem;
}

.global-connections-list .connection-card {
  border-color: #d2dfcc;
  box-shadow: 0 10px 28px rgba(56, 91, 44, 0.07);
}

.connection-card {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(31, 48, 38, 0.035);
}

.connection-card summary {
  display: flex;
  min-height: 77px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}

.connection-card summary::-webkit-details-marker {
  display: none;
}

.connection-card summary > div:first-child {
  min-width: 0;
}

.connection-card summary h2 {
  margin-bottom: 3px;
  font-size: 0.98rem;
}

.connection-card summary p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #778078;
  font-size: 0.68rem;
  font-weight: 750;
  white-space: nowrap;
}

.counter-badge,
.global-badge {
  border-radius: 999px;
  padding: 6px 10px;
}

.counter-badge {
  background: var(--green-soft);
  color: #5c7b55;
}

.global-badge {
  background: var(--sidebar);
  color: var(--lime-bright);
}

.summary-meta b {
  display: inline-block;
  color: #8b958e;
  font-size: 0.9rem;
  transition: transform 150ms ease;
}

.connection-card[open] .summary-meta b {
  transform: rotate(180deg);
}

.connection-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.3rem 1rem;
  border-top: 1px solid var(--line);
  padding: 18px;
}

.field {
  min-width: 0;
}

.field label {
  display: flex;
  min-height: 22px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.field-label {
  display: inline-flex;
  align-items: center;
}

.field label strong {
  font-size: 0.72rem;
}

.required {
  margin-left: 2px;
  color: var(--red);
}

.configured,
.not-configured {
  font-size: 0.61rem;
  font-weight: 700;
}

.configured {
  color: #56814d;
}

.not-configured {
  color: #929b95;
}

.field input,
.field textarea,
.field select {
  min-height: 42px;
  border-radius: 10px;
  font-size: 0.75rem;
}

.field textarea {
  min-height: 128px;
}

.help {
  margin: 0.4rem 0 0.15rem;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.45;
}

.field code {
  display: block;
  overflow-wrap: anywhere;
  color: #7d8781;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.54rem;
}

.field-error {
  margin: 0.35rem 0 0;
  color: var(--red);
  font-size: 0.66rem;
}

.input-with-action {
  position: relative;
}

.input-with-action input {
  padding-right: 42px;
}

.icon-button {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #849087;
  padding: 0;
  transform: translateY(-50%);
}

.icon-button:hover,
.icon-button.revealed {
  background: var(--green-soft);
  color: #4a7042;
}

.icon-button span[aria-hidden] {
  font-size: 1.05rem;
}

.card-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 12px 18px 14px;
}

.sync-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.sync-section {
  display: grid;
  gap: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.44);
  margin-bottom: 1rem;
  padding: 1rem;
}

.sync-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.sync-section-heading h2 {
  margin-bottom: 0.3rem;
}

.sync-section-heading p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.global-sync-section {
  border-color: #d2dfcc;
  background: #f7fbf4;
}

.embedded-global-sync {
  margin-top: 1rem;
}

.sync-card {
  display: grid;
  align-items: center;
  gap: 10px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 8px 22px rgba(31, 48, 38, 0.035);
}

.global-sync-card {
  border-color: #d2dfcc;
}

.sync-provider-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--paper-soft);
  color: #758178;
  font-size: 1rem;
}

.sync-card.connected .sync-provider-icon {
  background: var(--green-soft);
  color: #56814d;
}

.sync-card.error .sync-provider-icon {
  background: var(--red-soft);
  color: var(--red);
}

.sync-card div {
  display: grid;
  min-width: 0;
}

.sync-card strong {
  font-size: 0.76rem;
}

.sync-card div span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.6rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.setup-card {
  display: grid;
  align-content: start;
  gap: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--paper);
  padding: 1.2rem;
  box-shadow: 0 8px 22px rgba(31, 48, 38, 0.035);
}

.settings-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  background: var(--green-soft);
  color: #55744e;
  font-size: 0.7rem;
  font-weight: 850;
}

.setup-card p {
  color: var(--muted);
  font-size: 0.74rem;
}

.copy-row {
  display: flex;
  gap: 0.6rem;
}

.empty-state {
  width: min(680px, calc(100% - 2rem));
  border: 1px dashed #b8c4b5;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.45);
  margin: 3rem auto;
  padding: 2.5rem;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 13px;
  background: var(--green-soft);
  margin: 0 auto 1rem;
  color: #5a7952;
  font-size: 1.35rem;
}

.empty-state p {
  color: var(--muted);
}

.legal-page {
  min-height: 100vh;
  padding: clamp(1rem, 4vw, 3rem);
  background:
    radial-gradient(circle at top left, rgba(168, 237, 114, 0.17), transparent 30rem),
    var(--canvas);
}

.legal-shell {
  width: min(100%, 860px);
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: var(--paper);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  box-shadow: var(--shadow);
}

.legal-shell > .brand {
  width: fit-content;
  margin-bottom: 2.5rem;
  color: var(--ink);
}

.legal-updated,
.legal-shell section p {
  color: var(--muted);
}

.legal-shell section {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 0.5rem;
}

.legal-shell footer {
  display: flex;
  gap: 1rem;
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding-top: 1.5rem;
}

.legal-shell footer a {
  color: var(--lime-deep);
  font-weight: 800;
}

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

@media (max-width: 860px) {
  :root {
    --sidebar-width: 100%;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .brand {
    padding-bottom: 14px;
  }

  .sidebar nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 14px;
  }

  .nav-label {
    display: none;
  }

  .sidebar nav button {
    justify-content: center;
  }

  .plan-card {
    display: none;
  }

  .sidebar-user {
    margin-top: 14px;
  }

  .main {
    margin-left: 0;
  }

  .feedback {
    top: 14px;
    right: 14px;
  }

  .page-title-row {
    grid-template-columns: 1fr;
  }

  .connection-progress {
    width: fit-content;
  }

  .sync-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  h1 {
    font-size: 2rem;
  }

  .topbar {
    padding: 10px 1rem;
  }

  .view-panel {
    padding: 1.35rem 1rem 3rem;
  }

  .connection-fields,
  .settings-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .full {
    grid-column: auto;
  }

  .sync-grid {
    grid-template-columns: 1fr;
  }

  .connection-card summary {
    align-items: flex-start;
  }

  .connection-card summary p {
    white-space: normal;
  }

  .summary-meta {
    align-items: flex-end;
    flex-direction: column;
  }

  .copy-row {
    flex-direction: column;
  }

  .install-heading {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .sidebar nav button {
    gap: 5px;
    padding: 9px 6px;
    font-size: 0.7rem;
  }

  .sidebar nav button > span {
    display: none;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .connection-card summary {
    flex-direction: column;
  }

  .summary-meta {
    width: 100%;
    align-items: center;
    flex-direction: row;
    justify-content: flex-end;
  }

  .sync-card {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .sync-card .button {
    grid-column: 1 / -1;
  }

  .card-footer .button,
  .button-row .button {
    width: 100%;
  }
}
