/* The app shell (public/shell.js, public/profile.js): GHL-TEARDOWN-APP-SHELL.md. */

/* ----- rail: header controls, icons, collapse ----- */
.rail-logo { justify-content: space-between; }
.rail-collapse {
  background: none; border: 0; color: var(--rail-text-dim); padding: 4px; border-radius: 6px;
  display: grid; place-items: center;
}
.rail-collapse:hover { background: var(--rail-hover); color: #fff; }
.rail-tools { display: flex; gap: 6px; margin: 0 12px 10px; align-items: stretch; }
.rail-tools .rail-search { margin: 0; flex: 1; min-width: 0; }
.rail-search.as-button {
  display: flex; align-items: center; gap: 7px; width: 100%; cursor: pointer;
  padding: 6px 8px 6px 9px; border-radius: 7px; border: 1px solid #333e56;
  background: #222b3e; color: var(--rail-text-dim); font-size: 13px; text-align: left;
}
.rail-search.as-button:hover { border-color: #46526d; color: var(--rail-text); }
.rail-search.as-button .search-placeholder { flex: 1; }
.rail-search.as-button kbd {
  font: 500 10.5px/1 Inter, sans-serif; color: var(--rail-text-dim);
  border: 1px solid #3a4560; border-radius: 4px; padding: 2px 4px;
}
.rail-qa {
  flex-shrink: 0; width: 34px; border-radius: 7px; border: 1px solid #333e56; background: #222b3e;
  color: #f5b544; display: grid; place-items: center;
}
.rail-qa:hover { border-color: #46526d; }
.nav-item .ico { display: grid; place-items: center; }
.nav-item .ico svg { opacity: 0.92; }
.nav-foot { padding: 4px 8px 10px; border-top: 1px solid #2c3650; }

/* Manually collapsed: icons only, at any width. */
.app.rail-collapsed { grid-template-columns: 64px 1fr; }
.app.rail-collapsed .nav-item .label, .app.rail-collapsed .switcher-text,
.app.rail-collapsed .tagline, .app.rail-collapsed .search-placeholder,
.app.rail-collapsed .rail-search kbd, .app.rail-collapsed .switcher .chev { display: none; }
.app.rail-collapsed .nav-item { justify-content: center; }
.app.rail-collapsed .rail-tools { flex-direction: column; margin: 0 10px 10px; }
.app.rail-collapsed .rail-qa { width: 100%; height: 32px; }
.app.rail-collapsed .rail-search.as-button { justify-content: center; padding: 7px 0; }
.app.rail-collapsed .rail-logo { flex-direction: column; gap: 8px; padding: 14px 0 8px; }
.app.rail-collapsed .switcher { justify-content: center; margin: 6px 10px 10px; width: calc(100% - 20px); padding: 8px 0; }
.app.rail-collapsed .logo-mark { margin: 0 auto; }

/* The automatic narrow layout keeps the search and Quick Actions buttons. */
@media (max-width: 1000px) {
  .rail-search.as-button { display: flex !important; justify-content: center; padding: 7px 0; }
  .rail-search.as-button .search-placeholder, .rail-search.as-button kbd { display: none; }
  .rail-tools { flex-direction: column; margin: 0 10px 10px; }
  .rail-qa { width: 100%; height: 32px; }
  .rail-collapse { display: none; }
}

/* Phones: the rail is a drawer behind the menu button. */
.topbar .hdr-btn.topbar-menu { display: none; }
@media (max-width: 767px) {
  .app, .app.rail-collapsed { grid-template-columns: 1fr; }
  .rail {
    position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); z-index: 60;
    transform: translateX(-102%); transition: transform 0.18s ease; box-shadow: 4px 0 24px rgba(0,0,0,0.25);
  }
  .app.rail-open .rail { transform: none; }
  .app.rail-open::after { content: ''; position: fixed; inset: 0; background: rgba(15,20,30,0.45); z-index: 55; }
  .rail .nav-item .label, .rail .switcher-text, .rail .tagline,
  .rail .rail-search.as-button .search-placeholder, .rail .rail-search.as-button kbd { display: revert; }
  .rail .nav-item { justify-content: flex-start; }
  .rail .rail-tools { flex-direction: row; margin: 0 12px 10px; }
  .rail .rail-qa { width: 34px; height: auto; }
  .rail .rail-search.as-button { justify-content: flex-start; padding: 6px 8px 6px 9px; }
  .rail .rail-search.as-button .search-placeholder { display: block; }
  .rail .switcher { justify-content: flex-start; margin: 6px 12px 10px; width: calc(100% - 24px); padding: 9px 11px; }
  .rail .rail-logo { flex-direction: row; padding: 16px 18px 10px; }
  .topbar .hdr-btn.topbar-menu { display: grid; }
  .topbar { padding: 8px 10px; gap: 6px; flex-wrap: wrap; }
  .topbar .user-menu .who { display: none; }
}

/* ----- top bar ----- */
.topbar .hdr-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center;
  color: #fff; flex-shrink: 0; position: relative;
}
.topbar .hdr-btn.ghost { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.topbar .hdr-btn.ghost:hover { color: var(--text); }
.shell-badge {
  position: absolute; top: -4px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--red); color: #fff; font: 600 10px/17px Inter, sans-serif; text-align: center;
  border: 2px solid var(--surface);
}
.shell-avatar {
  border-radius: 50%; background: #6b7a90; color: #fff; display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 600; overflow: hidden; flex-shrink: 0;
}
.shell-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-btn { border: 0; background: none; padding: 0; border-radius: 50%; display: grid; }
.avatar-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ----- popovers, menus, drawers ----- */
.shell-pop {
  position: fixed; z-index: 80; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(16,24,40,0.16);
}
.shell-icon-btn { background: none; border: 0; color: var(--muted); padding: 5px; border-radius: 6px; display: grid; place-items: center; }
.shell-icon-btn:hover { background: var(--hover); color: var(--text); }
.shell-menu { padding: 6px; min-width: 230px; }
.shell-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none;
  border-radius: 7px; text-align: left; font-size: 13.5px; color: var(--text);
}
.shell-menu-item:hover { background: var(--hover); }
.shell-menu-item.danger { color: #b42318; }

.shell-drawer-back { position: fixed; inset: 0; z-index: 70; background: rgba(15,20,30,0.28); }
.shell-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; background: var(--surface);
  display: flex; flex-direction: column; box-shadow: -8px 0 28px rgba(16,24,40,0.18);
}
.shell-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.shell-drawer-title { font-size: 17px; font-weight: 650; }
.shell-drawer-body { flex: 1; overflow-y: auto; padding: 0 18px 20px; }

/* ----- switcher ----- */
.sw-pop { width: 340px; max-width: calc(100vw - 16px); }
.sw { display: flex; flex-direction: column; max-height: min(520px, 80vh); }
.sw-search {
  margin: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 13.5px;
}
.sw-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.sw-list { overflow-y: auto; padding: 0 6px 8px; }
.sw-head { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--dim); padding: 10px 8px 4px; }
.sw-row, .sw-agency, .sw-create {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: none;
  border-radius: 7px; text-align: left; color: var(--text);
}
.sw-row:hover, .sw-row:focus, .sw-agency:hover, .sw-agency:focus, .sw-create:hover, .sw-create:focus { background: var(--hover); outline: none; }
.sw-row.on { background: var(--brand-soft); }
.sw-row-ico { color: var(--muted); display: grid; place-items: center; flex-shrink: 0; }
.sw-row-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sw-row-name { font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-row-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-agency { color: var(--brand); font-weight: 600; font-size: 13.5px; border-bottom: 1px solid var(--line-soft); border-radius: 0; margin-bottom: 2px; }
.sw-none { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 8px; font-size: 12px; color: var(--muted); }
.sw-link { background: none; border: 0; color: var(--brand); font-size: 12px; font-weight: 600; padding: 0; }
.sw-empty { padding: 14px 10px; color: var(--muted); font-size: 13px; }
.sw-create-btn { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-weight: 600; font-size: 12.5px; }

/* ----- Quick Actions ----- */
.qa-pop { width: 320px; max-width: calc(100vw - 16px); }
.qa { padding: 10px; }
.qa-title { font-size: 14px; font-weight: 650; padding: 2px 4px 8px; }
.qa-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; margin: 4px 0;
  border: 0; border-radius: 7px; background: #f8fafc; text-align: left;
}
.qa-item:hover { background: var(--brand-soft); }
.qa-ico { color: #178af6; display: grid; place-items: center; }
.qa-text { display: flex; flex-direction: column; }
.qa-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.qa-sub { font-size: 12px; color: var(--muted); }
.qa-empty { font-size: 13px; color: var(--muted); padding: 4px; }

/* ----- global search ----- */
.gs-back { position: fixed; inset: 0; z-index: 90; background: rgba(15,20,30,0.42); display: flex; justify-content: center; align-items: flex-start; padding: 9vh 12px 12px; }
.gs {
  width: 660px; max-width: 100%; max-height: 78vh; background: var(--surface); border-radius: 12px;
  box-shadow: 0 24px 60px rgba(16,24,40,0.3); display: flex; flex-direction: column; overflow: hidden;
}
.gs-bar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); color: var(--muted); }
.gs-input { flex: 1; border: 0; font: inherit; font-size: 16px; color: var(--text); min-width: 0; background: none; }
.gs-input:focus { outline: none; }
.gs-input::-webkit-search-cancel-button { display: none; }
.gs-esc { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 5px; font-size: 11px; padding: 2px 6px; }
.gs-tabs { display: flex; gap: 18px; padding: 0 16px; border-bottom: 1px solid var(--line-soft); }
.gs-tab { background: none; border: 0; padding: 10px 1px 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.gs-tab.on { color: #155eef; border-bottom-color: #155eef; }
.gs-pills { display: flex; gap: 6px; padding: 10px 16px 0; flex-wrap: wrap; }
.gs-pill { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; color: var(--text); }
.gs-pill.on { background: var(--brand-soft); border-color: #b2ccff; color: #155eef; }
.gs-body { flex: 1; overflow-y: auto; padding: 6px 8px 10px; min-height: 140px; }
.gs-group { padding: 4px 0; }
.gs-group-head { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em; color: var(--dim); padding: 8px 8px 4px; text-transform: uppercase; }
.gs-see-all { background: none; border: 0; color: var(--brand); font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.gs-row { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px; border: 0; background: none; border-radius: 8px; text-align: left; }
.gs-row.on { background: var(--hover); }
.gs-row-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-soft); color: #155eef; display: grid; place-items: center; flex-shrink: 0; }
.gs-row-text { display: flex; flex-direction: column; min-width: 0; }
.gs-row-title { font-size: 13.5px; font-weight: 550; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-row-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-empty { text-align: center; padding: 34px 12px; color: var(--muted); font-size: 13px; }
.gs-empty-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.gs-loading { padding: 30px 12px; text-align: center; color: var(--muted); font-size: 13px; }
.gs-foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.gs-foot kbd, .help-key kbd {
  font: 500 11px/1 Inter, sans-serif; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px;
  padding: 2px 5px; background: #f8fafc; color: var(--text);
}
@media (max-width: 767px) {
  .gs-back { padding: 0; }
  .gs { max-height: 100vh; height: 100vh; border-radius: 0; }
  .gs-foot { display: none; }
}

/* ----- notifications drawer ----- */
.nt-tabs { display: flex; gap: 16px; padding: 0 18px 0 12px; border-bottom: 2px solid var(--line-soft); }
.nt-tab { background: none; border: 0; padding: 4px 4px 10px; font-size: 14px; font-weight: 600; color: var(--text); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.nt-tab.on { color: #1d4ed8; border-bottom-color: #1d4ed8; }
.nt-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 8px; }
.nt-mark { background: none; border: 0; padding: 0; font-weight: 700; text-decoration: underline; color: #0c2d3f; font-size: 13.5px; }
.nt-list { display: flex; flex-direction: column; gap: 2px; }
.nt-row { display: flex; gap: 11px; width: 100%; padding: 10px 8px; border: 0; background: none; border-radius: 8px; text-align: left; }
.nt-row:hover { background: var(--hover); }
.nt-row.unread { background: #f0f6ff; }
.nt-ico { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; flex-shrink: 0; font-size: 13px; }
.nt-text { display: flex; flex-direction: column; min-width: 0; }
.nt-title { font-size: 13.5px; font-weight: 550; color: var(--text); }
.nt-body { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nt-when { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.nt-empty, .nt-clear { padding: 40px 10px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* ----- help, changelog, profile menu ----- */
.help-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.help-sec { border-top: 1px solid var(--line-soft); padding: 14px 0 6px; }
.help-sec h3 { font-size: 13px; font-weight: 650; margin: 0 0 10px; }
.help-key { display: flex; align-items: center; gap: 12px; font-size: 13px; padding: 4px 0; }
.help-key kbd { min-width: 54px; text-align: center; }
.help-link { display: block; background: none; border: 0; padding: 6px 0; color: var(--brand); font-weight: 600; font-size: 13.5px; }
.help-na, .cl-na { color: var(--muted); font-size: 13px; margin: 0; }
.cl-pop { width: 300px; }
.cl { padding: 14px; }
.cl-title { font-weight: 650; margin-bottom: 6px; }
.pm-pop { width: 270px; }
.pm { padding: 12px 6px 6px; }
.pm-who { display: flex; gap: 11px; align-items: center; padding: 0 8px 10px; }
.pm-text { min-width: 0; }
.pm-name { font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-email { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-hr { border: 0; border-top: 1px solid var(--line-soft); margin: 4px 0; }
.pm-item { display: flex; gap: 9px; align-items: center; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 7px; text-align: left; font-size: 13.5px; color: var(--text); }
.pm-item:hover { background: var(--hover); }

/* ----- My Profile ----- */
.pf { padding: 18px 26px 40px; max-width: 980px; }
.pf-head { margin-bottom: 14px; }
.pf-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-top: 12px; overflow-x: auto; }
.pf-tab { background: none; border: 0; padding: 8px 1px 10px; font-weight: 600; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.pf-tab.on { color: #155eef; border-bottom-color: #155eef; }
.pf-loading { color: var(--muted); padding: 20px 0; }
.pf-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; box-shadow: var(--shadow); }
.pf-card-head { padding: 16px 20px 0; }
.pf-card-title { font-size: 16px; font-weight: 650; margin: 0; }
.pf-card-sub { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.pf-card-body { padding: 14px 20px 18px; }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.pf-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pf-label { font-size: 12.5px; font-weight: 600; color: #344054; }
.pf-hint { font-size: 12px; color: var(--muted); }
.pf-input { padding: 8px 11px; border: 1px solid #d0d5dd; border-radius: 8px; font: inherit; font-size: 13.5px; background: var(--surface); color: var(--text); min-width: 0; }
.pf-input:focus { outline: none; border-color: #84adff; box-shadow: 0 0 0 3px #eff4ff; }
.pf-photo { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.pf-avatar { width: 72px; height: 72px; border-radius: 50%; background: #6b7a90; color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 650; overflow: hidden; flex-shrink: 0; }
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pf-photo-btns { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.danger { color: #b42318; }
.pf-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.pf-actions.start { justify-content: flex-start; }
.pf-error { color: #b42318; font-size: 13px; margin-top: 10px; }
.pf-check { display: flex; gap: 9px; align-items: center; font-size: 13.5px; margin-bottom: 8px; }
.pf-sig-toolbar { display: flex; gap: 4px; margin-top: 8px; border: 1px solid #d0d5dd; border-bottom: 0; border-radius: 8px 8px 0 0; padding: 5px; background: #f9fafb; flex-wrap: wrap; }
.pf-tool { border: 0; background: none; padding: 4px 8px; border-radius: 5px; font-size: 12.5px; font-weight: 600; color: #344054; }
.pf-tool:hover, .pf-tool.on { background: #eaecf0; }
.pf-sig-editor { min-height: 110px; border: 1px solid #d0d5dd; border-radius: 0 0 8px 8px; padding: 10px 12px; font-size: 13.5px; }
.pf-sig-editor:focus { outline: none; border-color: #84adff; }
.pf-sig-editor:empty::before { content: attr(data-placeholder); color: var(--dim); }
.pf-sig-source { width: 100%; border-radius: 0 0 8px 8px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.pf-rules { margin: 12px 0 0; padding: 0 0 0 18px; font-size: 12.5px; color: var(--muted); columns: 2; }
.pf-rules li.ok { color: #067647; }
.pf-row { display: flex; gap: 10px; align-items: center; }
.pf-tag { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #ecfdf3; color: #067647; }
.pf-na { color: var(--muted); font-size: 13px; background: #f9fafb; border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; margin: 12px 0 0; }
.pf-providers { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; max-width: 360px; }
.pf-provider { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
.pf-provider-name { font-weight: 600; font-size: 13.5px; }
.pf-matrix-wrap { overflow-x: auto; }
.pf-matrix { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 460px; }
.pf-matrix th { text-align: center; font-size: 12.5px; color: #475467; font-weight: 600; padding: 8px; }
.pf-matrix th:first-child { text-align: left; }
.pf-matrix tr.pf-cat th { text-align: left; background: #f9fafb; color: var(--text); font-size: 13px; }
.pf-matrix td { border-top: 1px solid var(--line-soft); padding: 10px 8px; }
.pf-ev { color: var(--text); }
.pf-cell { text-align: center; }
.pf-unsupported { font-size: 11.5px; color: var(--dim); }
.pf-switch { width: 16px; height: 16px; accent-color: #155eef; }
.pf-modal-back { position: fixed; inset: 0; z-index: 95; background: rgba(15,20,30,0.42); display: grid; place-items: center; padding: 12px; }
.pf-modal { background: var(--surface); border-radius: 12px; padding: 20px; width: 440px; max-width: 100%; max-height: 92vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(16,24,40,0.3); }
.pf-modal .pf-input { width: 100%; margin-top: 4px; }
.pf-qr { display: grid; place-items: center; margin: 12px 0; }
.pf-key { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; margin-bottom: 8px; }
.pf-key code { background: #f2f4f7; padding: 3px 7px; border-radius: 5px; font-size: 12.5px; word-break: break-all; }
.pf-codes { columns: 2; font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; padding-left: 22px; }
@media (max-width: 767px) {
  .pf { padding: 14px 14px 32px; }
  .pf-grid { grid-template-columns: 1fr; }
  .pf-rules, .pf-codes { columns: 1; }
}

/* ----- sign-in second step ----- */
.signin .otp-note { font-size: 13px; color: var(--muted); margin: -4px 0 10px; }
.rail-search.as-button .mag { position: static; display: grid; place-items: center; color: inherit; }

/* `hidden` must win over the display these components set (.btn, .rail-qa…). */
.rail [hidden], .pf [hidden], .pf-modal [hidden], .gs [hidden], .shell-pop [hidden], .shell-drawer [hidden], .topbar [hidden] { display: none !important; }

/* ----- Settings: GHL swaps the module list for its settings sections ----- */
/* (public/settings.js drawSettingsRail). Always full width: the sections
   have no icons to collapse to. */
.app.rail-settings, .app.rail-settings.rail-collapsed { grid-template-columns: var(--rail-w) 1fr; }
.app.rail-settings .rail-collapse { display: none; }
.app.rail-settings .nav-foot { display: none; }
.app.rail-settings .switcher-text, .app.rail-settings .switcher .chev,
.app.rail-settings .search-placeholder, .app.rail-settings .rail-search kbd { display: revert; }
.app.rail-settings .rail-search.as-button .search-placeholder { display: block; }
.app.rail-settings .rail-tools { flex-direction: row; margin: 0 12px 10px; }
.app.rail-settings .rail-qa { width: 34px; height: auto; }
.app.rail-settings .rail-search.as-button { justify-content: flex-start; padding: 6px 8px 6px 9px; }
.app.rail-settings .rail-logo { flex-direction: row; padding: 16px 18px 10px; }
.app.rail-settings .switcher { justify-content: flex-start; margin: 6px 12px 10px; width: calc(100% - 24px); padding: 9px 11px; }
.app.rail-settings .nav { padding: 4px 0 16px; }
.set-back {
  display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 12px; padding: 8px 14px 8px 10px;
  border: 0; border-radius: 0 6px 6px 0; background: #2f3b52; color: #fff;
  font: 500 14px/20px Inter, system-ui, sans-serif; cursor: pointer;
}
.set-back:hover { background: #38455f; }
.set-title { padding: 2px 12px 10px; color: #fff; font: 500 18px/28px Inter, system-ui, sans-serif; }
.set-group {
  display: flex; align-items: center; gap: 12px; margin: 14px 12px 6px;
  color: var(--rail-text); font: 500 10.5px/16px Inter, system-ui, sans-serif; letter-spacing: 0.02em;
}
.set-group::after { content: ''; flex: 1; height: 1px; background: #4a5670; }
.app.rail-settings .nav-item.set-item { padding: 8px 12px; margin: 0 0 1px; border-radius: 0; font-size: 14px; }
.app.rail-settings .nav-item.set-item .label { display: block; }
.app.rail-settings .nav-item.set-item.on { background: var(--rail-active); }

/* The section fills the work area; Settings › Calendars runs edge to edge
   under its own header strip, as GHL's does. */
.page-body.set-page.is-flush { padding: 0; }
