/* ============================================================
   «Profil va sozlamalar» — tashkilot kabineti (#profil, js/org-profile.js; v106)
   Kabinet tokenlari (--op-*) — yorugʻ/qorongʻi rejim oʻzi almashadi. Emoji yoʻq; belgilar — inline SVG.
   ============================================================ */
.opf { --opf-gold: #c9a227; --opf-navy: #1f3b73; --opf-mute: var(--muted, #5b6b86); container-type: inline-size; container-name: opf; }
.opf-in { max-width: 1120px; margin: 0 auto; }
.opf-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.opf-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* chap boʻlimlar menyusi (Claude / Linear sozlamalari uslubi) */
.opf-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: var(--op-r-panel, 16px);
  background: var(--op-tile); border: 1px solid var(--op-card-b); }
.opf-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--op-ink); text-decoration: none;
  font: 600 13.5px/1.2 'Inter', system-ui, sans-serif; transition: background var(--op-dur, .2s); }
.opf-nav a svg { width: 17px; height: 17px; flex: 0 0 auto; opacity: .75; }
.opf-nav a:hover { background: var(--op-tint-h); }
.opf-nav a:focus-visible { outline: 2px solid var(--opf-gold); outline-offset: 1px; }

/* sarlavha kartasi */
.opf-head { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: var(--op-r-card, 20px); background: var(--op-card);
  border: 1px solid var(--op-card-b); box-shadow: 0 1px 2px rgba(20, 42, 82, .04), 0 10px 30px rgba(20, 42, 82, .06); }
.opf-av { width: 72px; height: 72px; flex: 0 0 72px; border-radius: 50%; display: grid; place-items: center; color: #f3d989;
  font: 800 24px/1 'Manrope', 'Inter', sans-serif; letter-spacing: .02em; background: linear-gradient(150deg, #1f3b73, #142a52);
  box-shadow: 0 0 0 3px var(--op-card), 0 0 0 5px var(--opf-gold), 0 12px 26px rgba(20, 42, 82, .22); }
.opf-head-t { min-width: 0; flex: 1; }
.opf-head-t h1 { margin: 0; font: 800 clamp(19px, 2.4vw, 24px)/1.2 'Manrope', 'Inter', sans-serif; color: var(--op-ink); letter-spacing: -.01em; overflow-wrap: anywhere; }
.opf-head-t h1:focus { outline: none; }
.opf-head-t p { margin: 5px 0 0; color: var(--opf-mute); font-size: 13.5px; }
.opf-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px !important; }
.opf-plan, .opf-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font: 700 12px/1 'Inter', sans-serif; }
.opf-plan { background: var(--op-tint-h); color: var(--op-ink); }
.opf-plan.t-pro, .opf-plan.t-trial { background: linear-gradient(135deg, #1f3b73, #2f54a8); color: #fff; }
.opf-plan.t-plus { background: linear-gradient(135deg, #e9d28a, #c9a227); color: #3a2b00; }
.opf-chip { background: var(--op-tint); color: var(--opf-mute); font-weight: 600; }
.opf-cta { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 0; cursor: pointer;
  font: 700 13.5px/1 'Inter', sans-serif; color: #2b2000; background: linear-gradient(135deg, #f3d989, #c9a227); box-shadow: 0 8px 20px rgba(201, 162, 39, .28); white-space: nowrap; }
.opf-cta svg { width: 16px; height: 16px; }
.opf-cta.ghost { background: transparent; color: var(--op-ink); border: 1px solid var(--op-card-b); box-shadow: none; }
.opf-cta:focus-visible, .opf-btn:focus-visible, .opf-link:focus-visible, .opf-sw:focus-visible { outline: 2px solid var(--opf-gold); outline-offset: 2px; }

/* boʻlimlar */
.opf-sec { scroll-margin-top: 84px; }
.opf-sec h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font: 800 16px/1.3 'Manrope', 'Inter', sans-serif; color: var(--op-ink); }
.opf-sec h2:focus { outline: none; }
.opf-sec-ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--op-tint-h); color: var(--op-ink); }
.opf-sec-ic svg { width: 16px; height: 16px; }
.opf-sec-n { margin: 0 0 10px 40px; color: var(--opf-mute); font-size: 12.5px; }
.opf-card { border-radius: var(--op-r-card, 20px); background: var(--op-card); border: 1px solid var(--op-card-b); padding: 6px 18px; }
.opf-sub { margin: 16px 0 6px; font: 700 12px/1.2 'Inter', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--opf-mute); }

/* qatorlar (ai.lex.uz profil roʻyxatidan yaxshiroq: belgi · nom · izoh · amal) */
.opf-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--op-line); width: 100%; text-align: left;
  background: none; border-left: 0; border-right: 0; border-bottom: 0; color: inherit; font: inherit; text-decoration: none; }
.opf-card > .opf-row:first-child, .opf-card > .opf-uses:first-child, .opf-card > .opf-plancard:first-child { border-top: 0; }
.opf-row-ic { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 11px; background: var(--op-tint); color: var(--op-ink); }
.opf-row-ic svg { width: 18px; height: 18px; }
.opf-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.opf-row-t b { font: 650 14px/1.3 'Inter', sans-serif; color: var(--op-ink); }
.opf-row-t small { font-size: 12.5px; line-height: 1.4; color: var(--opf-mute); }
.opf-row-go { width: 18px; height: 18px; color: var(--opf-mute); flex: 0 0 auto; }
.opf-row-go svg { width: 18px; height: 18px; }
.opf-link { cursor: pointer; border-radius: 12px; transition: background var(--op-dur, .2s); }
.opf-link:hover { background: var(--op-tint); margin: 0 -10px; padding-left: 10px; padding-right: 10px; width: calc(100% + 20px); }
.opf-link.is-hint .opf-row-t small { color: var(--op-gold-ink); font-weight: 600; }
.opf-lang { flex: 0 0 auto; }

/* foydalanish (Claude «Usage» uslubi) */
.opf-uses { display: grid; gap: 4px; padding: 8px 0; }
.opf-use { padding: 12px 0; border-top: 1px solid var(--op-line); }
.opf-uses .opf-use:first-child { border-top: 0; }
.opf-use-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.opf-use-h span { font: 650 13.5px/1.3 'Inter', sans-serif; color: var(--op-ink); }
.opf-use-h b { font: 800 15px/1 'Manrope', 'Inter', sans-serif; color: var(--op-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.opf-use-h b em { font-style: normal; font-weight: 600; color: var(--opf-mute); }
.opf-use small { display: block; margin-top: 7px; font-size: 12px; color: var(--opf-mute); }
.opf-bar { height: 8px; border-radius: 999px; background: var(--op-tint-h); overflow: hidden; }
.opf-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2f54a8, #1f3b73); transition: width .6s var(--op-ease, ease); }
.opf-bar.warm i { background: linear-gradient(90deg, #e0b23a, #c9a227); }
.opf-bar.hot i { background: linear-gradient(90deg, #e2725b, #c2410c); }
.opf-use.is-lock .opf-use-h b { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: linear-gradient(135deg, #e9d28a, #c9a227); color: #3a2b00; }

/* tarif kartasi va toʻlovlar */
.opf-plancard { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 0 4px; padding: 16px 18px; border-radius: 16px;
  background: var(--op-tint); border: 1px solid var(--op-card-b); }
.opf-plancard small { display: block; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--opf-mute); font-weight: 700; }
.opf-plancard b { display: block; margin: 3px 0; font: 800 22px/1.1 'Manrope', 'Inter', sans-serif; color: var(--op-ink); }
.opf-plancard span { font-size: 13px; color: var(--opf-mute); }
.opf-plancard.t-plus { background: linear-gradient(135deg, rgba(233, 210, 138, .22), rgba(201, 162, 39, .08)); border-color: rgba(201, 162, 39, .45); }
.opf-pays, .opf-devs { list-style: none; margin: 0; padding: 0; }
.opf-pays li, .opf-devs li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--op-line); }
.opf-pays li:first-child, .opf-devs li:first-child { border-top: 0; }
.opf-pay-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.opf-pay-t b { font: 650 14px/1.3 'Inter', sans-serif; color: var(--op-ink); }
.opf-pay-t small { font-size: 12px; color: var(--opf-mute); }
.opf-pay-a { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; text-align: right; }
.opf-pay-a b { font: 800 14px/1 'Manrope', 'Inter', sans-serif; color: var(--op-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.opf-st { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font: 700 11.5px/1 'Inter', sans-serif; white-space: nowrap; }
.opf-st.ok { background: rgba(22, 163, 74, .12); color: #15803d; }
.opf-st.wait { background: rgba(201, 162, 39, .16); color: var(--op-gold-ink); }
.opf-st.bad { background: rgba(220, 38, 38, .1); color: #b91c1c; }
.opf-st.muted { background: var(--op-tint-h); color: var(--opf-mute); }
body.dark .opf-st.ok { color: #6ee7a0; } body.dark .opf-st.bad { color: #fca5a5; }

/* tugmalar va kalitlar */
.opf-acts { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 0 14px; }
.opf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; cursor: pointer;
  font: 700 13.5px/1 'Inter', sans-serif; border: 1px solid transparent; color: #fff; background: linear-gradient(135deg, #2f54a8, #1f3b73); white-space: nowrap; }
.opf-btn svg { width: 16px; height: 16px; }
.opf-btn.ghost { background: transparent; color: var(--op-ink); border-color: var(--op-card-b); }
.opf-btn.ghost:hover { background: var(--op-tint); }
.opf-btn.danger { background: transparent; color: #b91c1c; border-color: rgba(220, 38, 38, .35); }
body.dark .opf-btn.danger { color: #fca5a5; border-color: rgba(252, 165, 165, .35); }
.opf-btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.opf-btn[disabled] { opacity: .45; cursor: not-allowed; }
.opf-sw { position: relative; width: 46px; height: 28px; flex: 0 0 46px; border-radius: 999px; border: 0; cursor: pointer; padding: 0;
  background: var(--op-tint-h); box-shadow: inset 0 0 0 1px var(--op-card-b); transition: background var(--op-dur, .2s); }
.opf-sw i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  transition: transform var(--op-dur, .2s) var(--op-ease, ease); }
.opf-sw.on { background: linear-gradient(135deg, #2f54a8, #1f3b73); box-shadow: none; }
.opf-sw.on i { transform: translateX(18px); }
.opf-sw[disabled] { opacity: .45; cursor: not-allowed; }

/* boʻsh holat, skelet, chiqish */
.opf-empty { display: flex; align-items: center; gap: 14px; padding: 16px 0; }
.opf-empty > svg { width: 34px; height: 34px; flex: 0 0 34px; padding: 8px; border-radius: 11px; background: var(--op-tint); color: var(--opf-mute); }
.opf-empty p { margin: 0; display: flex; flex-direction: column; gap: 3px; }
.opf-empty b { font: 650 14px/1.3 'Inter', sans-serif; color: var(--op-ink); }
.opf-empty small { font-size: 12.5px; color: var(--opf-mute); }
.opf-muted { color: var(--opf-mute); font-size: 13px; padding: 10px 0; }
.opf-out { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; padding: 6px 2px 24px; }
.opf-sk { display: grid; gap: 16px; } .opf-sk i { display: block; height: 110px; border-radius: 20px; background: var(--op-tint-h); animation: opfPulse 1.4s ease-in-out infinite; }
.opf-sk i:first-child { height: 120px; }
@keyframes opfPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.opf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* tor ekran: chap menyu — tepada aylanadigan chiplar */
@container opf (max-width: 860px) {
  .opf-grid { grid-template-columns: 1fr; gap: 16px; }
  .opf-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 4px; gap: 4px; background: transparent; border: 0; }
  .opf-nav::-webkit-scrollbar { display: none; }
  .opf-nav a { flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--op-card-b); background: var(--op-card); border-radius: 999px; font-size: 12.5px; }
}
@container opf (max-width: 560px) {
  .opf-head { flex-wrap: wrap; padding: 18px; gap: 14px; }
  .opf-av { width: 58px; height: 58px; flex-basis: 58px; font-size: 20px; }
  .opf-cta { width: 100%; justify-content: center; }
  .opf-card { padding: 4px 14px; }
  .opf-plancard { flex-direction: column; align-items: stretch; }
  .opf-pays li { flex-wrap: wrap; } .opf-pay-a { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .opf-out { flex-direction: column; } .opf-out .opf-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .opf-bar i, .opf-sw i, .opf-sk i { transition: none; animation: none; } }
