/* ============================================================
   CoreRoom — Settings
   Full-screen settings overlay opened from the sidebar profile.
   Left section rail + scrollable content, matching app tokens.
   ============================================================ */
.set-ov { position: fixed; inset: 0; z-index: 6500; background: rgba(24,22,15,0.42); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 32px; opacity: 1; }
.set-ov.in { opacity: 1; }
.set-modal { width: 100%; max-width: 1040px; height: 88vh; max-height: 820px; background: var(--surface); border-radius: 18px; box-shadow: 0 40px 100px rgba(24,22,15,0.42); display: grid; grid-template-columns: 236px 1fr; overflow: hidden; }
.set-ov.in .set-modal { transform: none; }


/* ---- left rail ---- */
.set-rail { background: var(--surface-warm); border-right: 1px solid var(--hairline); display: flex; flex-direction: column; padding: 20px 14px; min-height: 0; }
.set-rail-head { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; }
.set-rail-av { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; flex: none; }
.set-rail-id { min-width: 0; }
.set-rail-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-rail-org { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.set-nav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; flex: 1; min-height: 0; margin: 0 -4px; padding: 0 4px; }
.set-nav::-webkit-scrollbar { width: 6px; }
.set-nav::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 3px; }
.set-nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border: none; background: transparent; border-radius: 9px; font-family: var(--sans); font-size: 13.5px; color: var(--muted); cursor: pointer; text-align: left; width: 100%; transition: 0.13s; }
.set-nav-item svg { width: 17px; height: 17px; flex: none; color: var(--faint); transition: 0.13s; }
.set-nav-item:hover { background: rgba(120,110,95,0.07); color: var(--ink); }
.set-nav-item.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }
.set-nav-item.on svg { color: var(--accent); }
.set-nav-sep { height: 1px; background: var(--hairline); margin: 9px 8px; }
.set-nav-foot { padding: 4px 2px 0; }
.set-signout { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border: none; background: transparent; border-radius: 9px; font-family: var(--sans); font-size: 13.5px; color: var(--muted); cursor: pointer; width: 100%; transition: 0.13s; }
.set-signout svg { width: 17px; height: 17px; color: var(--faint); }
.set-signout:hover { background: rgba(176,40,40,0.08); color: #9E1B1B; }
.set-signout:hover svg { color: #9E1B1B; }

/* ---- content ---- */
.set-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.set-top { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 19px 24px; border-bottom: 1px solid var(--hairline); }
.set-top h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.set-top .set-top-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.set-x { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--hairline); background: #fff; color: var(--muted); cursor: pointer; display: grid; place-items: center; font-size: 17px; transition: 0.15s; }
.set-x:hover { color: var(--ink); border-color: var(--faint); }
.set-body { flex: 1; overflow-y: auto; padding: 24px; min-height: 0; }
.set-body::-webkit-scrollbar { width: 9px; }
.set-body::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 5px; border: 2px solid var(--surface); }

/* ---- generic blocks ---- */
.set-section { max-width: 660px; }
.set-card { border: 1px solid var(--hairline); border-radius: 14px; background: var(--surface); margin-bottom: 18px; overflow: hidden; }
.set-card-h { padding: 15px 18px 14px; border-bottom: 1px solid var(--hairline-soft); }
.set-card-h h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
.set-card-h p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.set-card-b { padding: 6px 18px 8px; }
.set-card.flush .set-card-b { padding: 0; }

/* field rows */
.set-field { display: flex; align-items: center; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--hairline-soft); }
.set-field:last-child { border-bottom: none; }
.set-field.col { flex-direction: column; align-items: stretch; gap: 8px; }
.set-field-l { flex: 1; min-width: 0; }
.set-field-l label { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.set-field-l .hint { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.set-field-r { flex: none; display: flex; align-items: center; gap: 9px; }

.set-input, .set-select { font-family: var(--sans); font-size: 13.5px; color: var(--ink); background: var(--surface-warm); border: 1px solid var(--hairline); border-radius: 8px; padding: 8px 11px; min-width: 220px; transition: 0.15s; }
.set-input:focus, .set-select:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.set-input.wide { width: 100%; min-width: 0; }
.set-select { min-width: 180px; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236E675C' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
textarea.set-input { min-height: 70px; resize: vertical; line-height: 1.5; }

/* toggle */
.set-tog { width: 40px; height: 23px; border-radius: 12px; background: var(--hairline); border: none; position: relative; cursor: pointer; flex: none; transition: background 0.18s; padding: 0; }
.set-tog::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 0.18s; }
.set-tog.on { background: var(--accent); }
.set-tog.on::after { transform: translateX(17px); }

/* segmented */
.set-seg { display: inline-flex; gap: 3px; background: rgba(120,110,95,0.1); border-radius: 9px; padding: 3px; }
.set-seg button { font-family: var(--sans); font-size: 12.5px; color: var(--muted); border: none; background: transparent; border-radius: 6px; padding: 6px 13px; cursor: pointer; transition: 0.14s; white-space: nowrap; }
.set-seg button.on { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(24,22,15,0.1); }

/* buttons */
.set-btn { font-family: var(--sans); font-size: 13px; font-weight: 500; padding: 8px 15px; border-radius: 9px; border: 1px solid var(--hairline); background: #fff; color: var(--ink); cursor: pointer; transition: 0.15s; white-space: nowrap; }
.set-btn:hover { background: var(--surface-warm); border-color: var(--faint); }
.set-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.set-btn.primary:hover { background: var(--accent-ink); }
.set-btn.danger { color: #9E1B1B; border-color: rgba(176,40,40,0.3); }
.set-btn.danger:hover { background: rgba(176,40,40,0.06); }
.set-btn.sm { padding: 6px 12px; font-size: 12.5px; }

/* avatar editor */
.set-avatar-row { display: flex; align-items: center; gap: 16px; padding: 16px 0 18px; border-bottom: 1px solid var(--hairline-soft); }
.set-avatar-big { width: 64px; height: 64px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 600; flex: none; }

/* members */
.set-member { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--hairline-soft); }
.set-member:last-child { border-bottom: none; }
.set-mem-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; color: #fff; flex: none; }
.set-mem-id { flex: 1; min-width: 0; }
.set-mem-name { font-size: 13.5px; font-weight: 500; }
.set-mem-email { font-size: 12px; color: var(--muted); margin-top: 1px; }
.set-mem-you { font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); border: 1px solid rgba(180,83,9,0.3); border-radius: 10px; padding: 1px 6px; margin-left: 7px; }

/* integrations */
.set-integ { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--hairline-soft); }
.set-integ:last-child { border-bottom: none; }
.set-integ-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; flex: none; letter-spacing: -0.02em; }
.set-integ-id { flex: 1; min-width: 0; }
.set-integ-name { font-size: 13.5px; font-weight: 500; }
.set-integ-desc { font-size: 12px; color: var(--muted); margin-top: 1px; }
.set-integ-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ok); font-weight: 500; }
.set-integ-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* plan */
.set-plan-band { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; border-radius: 12px; background: linear-gradient(110deg, #2A2620, #443B2E); color: #fff; margin-bottom: 18px; }
.set-plan-band .set-plan-actions { display: flex; gap: 9px; flex: none; }
.set-plan-tier { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
.set-plan-name { font-size: 19px; font-weight: 600; margin-top: 3px; }
.set-plan-meta { font-size: 12.5px; color: rgba(255,255,255,0.7); margin-top: 4px; }
.set-plan-band .set-btn { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); color: #fff; }
.set-plan-band .set-btn:hover { background: rgba(255,255,255,0.2); }
.set-usage { padding: 6px 18px 10px; }
.set-usage-row { padding: 11px 0; border-bottom: 1px solid var(--hairline-soft); }
.set-usage-row:last-child { border-bottom: none; }
.set-usage-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 7px; }
.set-usage-top b { font-weight: 500; }
.set-usage-top span { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; flex: none; }
.set-bar { height: 7px; border-radius: 4px; background: var(--hairline); overflow: hidden; }
.set-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }

/* danger zone */
.set-danger { border-color: rgba(176,40,40,0.25); }
.set-danger .set-card-h h3 { color: #9E1B1B; }

.set-note { font-size: 12px; color: var(--faint); margin: 4px 2px 0; font-style: italic; }
.set-note b { color: var(--muted); font-weight: 600; font-style: normal; }
.set-clickable { cursor: pointer; }

/* deposit & models */
.set-dep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 6px 18px 12px; }
.set-dep-row { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-bottom: 1px solid var(--hairline-soft); }
.set-dep-row:nth-last-child(-n+1) { border-bottom: none; }
.set-dep-row .k { font-size: 10.5px; color: var(--faint); font-family: var(--mono); letter-spacing: 0.05em; text-transform: uppercase; }
.set-dep-row .v { font-size: 13px; color: var(--ink); line-height: 1.4; }
.set-dep-tag { display: inline-block; font-size: 12.5px; color: var(--ink); padding: 5px 11px; background: var(--surface-warm); border: 1px solid var(--hairline); border-radius: 8px; }

/* ---- admin Team panel (P0.1d) ---- */
.set-invite-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.set-invite-row .set-input { flex: 1; }
.set-select.sm { padding: 7px 9px; font-size: 12.5px; }
.set-mem-list { display: flex; flex-direction: column; }
.set-sub-h { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin: 14px 0 4px; }
.set-mem-role-self { font-size: 12.5px; color: var(--muted); }
.set-mem-av.pending { background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
.set-member { gap: 11px; }
