/* ============================================================
   MedBridge — in-app Settings screen. Extends styles.css
   ============================================================ */

.set-wrap { display: flex; flex-direction: column; flex: 1; height: 100%; min-height: 0; }
.set-head {
  padding: 22px 26px 0; max-width: 1080px; margin: 0 auto; width: 100%;
}
.set-head h1 { font-size: 23px; font-weight: 700; letter-spacing: -.4px; }
.set-head .sub { font-size: 13px; color: var(--text-3); margin-top: 3px; }

.set-grid {
  flex: 1; min-height: 0; overflow: auto;
  display: grid; grid-template-columns: 216px 1fr;
  gap: 28px; max-width: 1080px; margin: 0 auto; width: 100%;
  padding: 20px 26px 60px; align-items: start;
}
@media (max-width: 800px) { .set-grid { grid-template-columns: 1fr; } }

/* left tab nav */
.set-tabs { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
.set-tab {
  display: flex; align-items: center; gap: 11px;
  height: 38px; padding: 0 12px; border-radius: 9px;
  font-size: 13px; font-weight: 500; color: var(--text-2); text-align: left;
  transition: background .12s, color .12s;
}
.set-tab:hover { background: var(--surface-2); color: var(--text); }
.set-tab.active { background: var(--primary-light); color: var(--primary-darker); font-weight: 600; }
.set-tab .st-ic { color: var(--text-3); display: grid; place-items: center; width: 18px; }
.set-tab.active .st-ic { color: var(--primary); }

/* content */
.set-content { min-width: 0; max-width: 680px; }
.set-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); margin-bottom: 18px; overflow: hidden;
}
.set-card-h { padding: 15px 18px 13px; border-bottom: 1px solid var(--hairline); }
.set-card-h h3 { font-size: 14.5px; font-weight: 700; letter-spacing: -.1px; }
.set-card-h p { font-size: 12px; color: var(--text-3); margin-top: 3px; }

.set-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; border-bottom: 1px solid var(--hairline);
}
.set-row:last-child { border-bottom: none; }
.set-row .sr-main { flex: 1; min-width: 0; }
.set-row .sr-label { font-size: 13.5px; font-weight: 600; }
.set-row .sr-desc { font-size: 12px; color: var(--text-3); margin-top: 2px; line-height: 1.45; }
.set-row .sr-ctrl { flex-shrink: 0; }

/* toggle switch */
.tgl {
  width: 40px; height: 23px; border-radius: 13px; background: var(--border-strong);
  position: relative; transition: background .16s; flex-shrink: 0; cursor: pointer;
}
.tgl::after {
  content: ""; position: absolute; top: 2.5px; left: 2.5px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .16s;
}
.tgl.on { background: var(--primary); }
.tgl.on::after { transform: translateX(17px); }

/* small segmented (settings) */
.set-seg { display: inline-flex; background: var(--surface-3); border: 1px solid var(--border); border-radius: 9px; padding: 3px; gap: 2px; }
.set-seg button {
  height: 30px; padding: 0 14px; border-radius: 7px; font-size: 12.5px; font-weight: 600;
  color: var(--text-3); white-space: nowrap; transition: color .12s, background .12s, box-shadow .12s;
}
.set-seg button.active { background: var(--surface); color: var(--primary-dark); box-shadow: var(--sh-sm); }
.set-seg button:hover:not(.active) { color: var(--text); }

/* accent swatches */
.set-accents { display: flex; gap: 10px; }
.set-acc {
  width: 46px; height: 38px; border-radius: 9px; overflow: hidden; position: relative;
  border: 2px solid transparent; box-shadow: var(--sh-sm); display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
}
.set-acc.active { border-color: var(--text); }
.set-acc .chk { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }

/* profile header */
.set-profile { display: flex; align-items: center; gap: 15px; padding: 18px; }
.set-profile .av { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 19px; font-weight: 700; flex-shrink: 0; }
.set-profile .pn { font-size: 16px; font-weight: 700; }
.set-profile .pt { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.set-profile .badges { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }

/* field input */
.set-input {
  height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2);
  padding: 0 11px; font-size: 13px; outline: none; min-width: 200px; transition: border .12s, box-shadow .12s, background .12s;
}
.set-input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-light); }
.set-input[disabled] { color: var(--text-3); cursor: not-allowed; }

/* slider */
.set-slider { width: 160px; }
.set-slider input { width: 100%; accent-color: var(--primary); }

/* info strip */
.set-info {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 0 18px 16px;
  border-radius: 9px; background: var(--primary-light); border: 1px solid var(--primary-mid); font-size: 12px; color: var(--primary-darker); line-height: 1.5;
}
.set-info svg { flex-shrink: 0; margin-top: 1px; }

.set-foot {
  display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  padding: 4px 0 0;
}
.set-saved { font-size: 12px; color: var(--mb-good, #1E8A5C); font-weight: 600; display: flex; align-items: center; gap: 6px; margin-right: auto; }

.set-key { font-size: 11px; color: var(--text-3); }
.mono-tag { font-family: var(--mono); font-size: 11.5px; background: var(--surface-3); padding: 1px 7px; border-radius: 5px; color: var(--text-2); }
