/* Mijoz kartasi (C agent). «Aurora Vision», B varianti: keng karta + vertikal «Mijoz tarixi». Soya yo'q, radius 18, o'tish 180 ms. */
:root { --cc-d: 180ms; --cc-st: 40ms; --cc-ease: var(--ease, cubic-bezier(.16, 1, .3, 1)); --cc-in: cc-in; --cc-rise: cc-rise; --cc-line: cc-line; --cc-shim: cc-shim; --cc-pulse: cc-pulse;
  --cc-up: -2px; --cc-sweep: 650ms; }
@media (prefers-reduced-motion: reduce) { :root { --cc-d: 1ms; --cc-st: 0ms; --cc-in: none; --cc-rise: none; --cc-line: none; --cc-shim: none; --cc-pulse: none; --cc-up: 0px; --cc-sweep: 1ms; } }
html[data-motion="lite"] { --cc-st: 0ms; --cc-rise: none; --cc-line: none; --cc-shim: none; --cc-pulse: none; --cc-sweep: 1ms; }
html[data-motion="off"] { --cc-d: 1ms; --cc-st: 0ms; --cc-in: none; --cc-rise: none; --cc-line: none; --cc-shim: none; --cc-pulse: none; --cc-up: 0px; --cc-sweep: 1ms; }

.cv { display: flex; flex-direction: column; min-height: 100%; }
.cv.cc-in, .cv .cv-panel.cc-in { animation: var(--cc-in) var(--cc-d) var(--cc-ease) both; }

/* ---- sarlavha ---- */
.cv .cv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.cv .cv-head .cv-t { flex: 1; min-width: 220px; }
.cv .cv-head h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: break-word; }
.cv .cv-av { width: 52px; height: 52px; border-radius: 18px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 22px;
  color: var(--v, #7703fc); background: var(--tint, var(--v-t, #f3ecfe)); border: 2px solid var(--soft, #d9c2fe); }
.cv .cv-av.green { border-color: var(--green, #16a34a); } .cv-av.yellow { border-color: var(--amber, #d97706); } .cv-av.red { border-color: var(--red, #e2445c); }
.cv .cv-chips { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.cv .cv-chips .pill { font-size: 13px; padding: 4px 12px; }
.cv .cv-moodat { margin: 0; font-size: 12.5px; }
.cv .cv-sub { color: var(--gray, #6e6c78); font-size: 14px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.cv .cv-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.cv h3 { font-size: 17px; margin: 0; letter-spacing: -.01em; display: flex; gap: 8px; align-items: center; }
.cv .cv-sec { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cv .cv-sec + .cv-sec { margin-top: 22px; }

/* ---- hover: 2px ko'tarilish + binafsha chegara + yorug'lik supurgisi ---- */
.cv .cc-lift { position: relative; overflow: hidden; border: 1px solid transparent; transition: transform var(--cc-d) var(--cc-ease), border-color var(--cc-d) var(--cc-ease), background-color var(--cc-d) var(--cc-ease); }
.cv .cc-lift::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(105deg, transparent 30%, color-mix(in srgb, var(--v, #7703fc) 10%, transparent) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform var(--cc-sweep) var(--cc-ease); }
.cv .cc-lift:hover { transform: translateY(var(--cc-up)); border-color: var(--v, #7703fc); }
.cv .cc-lift:hover::after { transform: translateX(120%); }

/* ---- faktlar ---- */
.cv .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cv .fact { background: var(--panel, #f4f4f7); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.cv .fact .caps { font-size: 10.5px; }
.cv .fact div { margin-top: 4px; font-size: 16px; font-weight: 600; overflow-wrap: break-word; font-variant-numeric: tabular-nums; }
.cv .fact small { display: block; color: var(--gray, #6e6c78); font-weight: 400; font-size: 12.5px; }
.cv .fact.warn { background: var(--amber-t, #fbf1e3); } .cv .fact.warn .caps { color: var(--amber-tx, #8a4b05); }
.cv .fact.good { background: var(--green-t, #e8f8ee); } .cv .fact.good .caps { color: var(--green-tx, #11753a); }

/* ---- ochiq tasklar ---- */
.cv .cv-tt { border: 1px solid var(--line, #e8e7ee); border-radius: 18px; overflow: hidden; }
.cv .cv-main { container: ccmain / inline-size; }
.cv .cv-tr { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "tt dd" "ac ac"; gap: 8px 12px; align-items: center; padding: 13px 16px; border-top: 1px solid var(--line, #e8e7ee);
  transition: background-color var(--cc-d) var(--cc-ease); }
.cv .cv-tr:first-child { border-top: 0; }
.cv .cv-tr:not(.th)::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--v, #7703fc);
  transform: scaleY(0); transition: transform var(--cc-d) var(--cc-ease); }
.cv .cv-tr:not(.th):hover { background: var(--surf, #f8f7fb); }
.cv .cv-tr:not(.th):hover::before { transform: scaleY(1); }
.cv .cv-tr.late::before { background: var(--red, #e2445c); transform: scaleY(1); }
.cv .cv-tr.th { background: var(--surf, #f8f7fb); padding: 11px 16px; font: 700 11px/1.2 'Manrope', 'Onest', system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--gray, #6e6c78); }
.cv .cv-tr > .tt, .cv .cv-tr.th > span:nth-child(1) { grid-area: tt; min-width: 0; }
.cv .cv-tr > .dd, .cv .cv-tr.th > span:nth-child(2) { grid-area: dd; text-align: right; white-space: nowrap; }
.cv .cv-tr > .ac { grid-area: ac; }
.cv .cv-tr.th > span:nth-child(3) { display: none; }
.cv .cv-tr .tt { font-weight: 600; overflow-wrap: break-word; }
.cv .cv-tr .dd { font-size: 14px; font-variant-numeric: tabular-nums; }
.cv .cv-tr .dd.r { color: var(--red, #e2445c); font-weight: 600; }
.cv .cv-tr .ac { display: flex; gap: 6px; justify-content: flex-start; flex-wrap: wrap; }
@container ccmain (min-width: 680px) {
  .cv .cv-tr { grid-template-columns: minmax(160px, 1fr) 150px auto; grid-template-areas: "tt dd ac"; }
  .cv .cv-tr > .dd, .cv .cv-tr.th > span:nth-child(2) { text-align: left; white-space: normal; }
  .cv .cv-tr .ac { justify-content: flex-end; }
  .cv .cv-tr.th > span:nth-child(3) { display: block; grid-area: ac; }
}
.cv .cv-tr .ac .btn { min-height: 36px; padding: 6px 14px; font-size: 13.5px; }
.cv .cv-tr .ac.muted { color: var(--gray, #6e6c78); font-size: 13px; }
.cv .cv-tt.stack .cv-tr { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tt" "dd" "ac"; gap: 6px; }
.cv .cv-tt.stack .cv-tr > .dd { text-align: left; white-space: normal; }
.cv .cv-tt.stack .cv-tr .ac { justify-content: flex-start; }

/* ---- shikoyatlar ---- */
.cv .cv-cmp { border-color: var(--line, #e8e7ee); border-radius: 18px; padding: 13px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--card-bg, var(--card, #fff)); }
.cv .cv-cmp.late { border-color: var(--red-t, #fcebee); background: linear-gradient(90deg, var(--red-t, #fcebee), var(--card-bg, var(--card, #fff)) 40%); }
.cv .cv-cmp .tx { flex: 1; min-width: 160px; overflow-wrap: break-word; }
.cv .cv-cmp small { color: var(--gray, #6e6c78); font-size: 13px; }

/* ---- plitkalar ---- */
.cv .cv-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.cv .cv-tile { border-radius: 18px; padding: 14px 16px; background: var(--panel, #f4f4f7); min-width: 0; }
.cv .cv-tile.g { background: var(--green-t, #e8f8ee); }
.cv .cv-tile .caps { font-size: 11px; }
.cv .cv-tile.g .caps { color: var(--green-tx, #11753a); }
.cv .cv-tile b { display: block; font-size: 20px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.cv .cv-tile small { display: block; color: var(--gray, #6e6c78); font-size: 13px; }
.cv .cv-tile ul { list-style: none; margin: 4px 0 0; padding: 0; font-size: 14px; }
.cv .cv-tile li + li { margin-top: 4px; }
.cv .cv-tile li small { display: inline; margin-left: 6px; }

/* ---- bo'sh bo'limlar ---- */
.cv .cc-none { border: 1px dashed var(--line, #e8e7ee); border-radius: 18px; padding: 14px 16px; }
.cv .cc-none .hint { margin: 0; }
.cv .cc-none-s { margin: 4px 0 0; font-size: 13px; color: var(--v, #7703fc); font-weight: 600; }
.cv .cc-none.ok .hint { color: var(--green, #16a34a); font-weight: 600; }

/* ---- Mijoz tarixi (vertikal timeline) ---- */
.cv .cv-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cv .tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cv .tl-head h3 { flex: 1 1 auto; }
.cv .tl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cv .tl-chips .chip { min-height: 30px; padding: 4px 12px; font-size: 12.5px; transition: background-color var(--cc-d) var(--cc-ease), border-color var(--cc-d) var(--cc-ease), color var(--cc-d) var(--cc-ease); }
.cv .tl-note { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line, #e8e7ee); border-radius: 14px; padding: 6px 6px 6px 12px; background: var(--card-bg, var(--card, #fff));
  transition: border-color var(--cc-d) var(--cc-ease); }
.cv .tl-note:focus-within { border-color: var(--v, #7703fc); }
.cv .tl-note > .ic { width: 18px; height: 18px; color: var(--gray3, #b4b1bf); }
.cv .tl-note:focus-within > .ic { color: var(--v, #7703fc); }
.cv .tl-note input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 15px; background: transparent; padding: 6px 0; }
.cv .tl-note .btn { min-height: 36px; padding: 6px 14px; font-size: 13.5px; }
.cv .tl { position: relative; list-style: none; margin: 6px 0 0 6px; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 14px; }
.cv .tl::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; border-radius: 2px; background: linear-gradient(var(--soft, #d9c2fe), var(--line, #e8e7ee)); transform-origin: 50% 0; }
.cv .tl.tl-in::before { animation: var(--cc-line) 480ms var(--cc-ease) both; }
.cv .tl li { position: relative; overflow-wrap: break-word; padding: 2px 8px 2px 0; border-radius: 12px; }
.cv .tl li::before { content: ''; position: absolute; left: -26px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--gray3, #b4b1bf); border: 2px solid var(--card-bg, var(--card, #fff));
  outline: 3px solid var(--panel, #f4f4f7); transition: transform var(--cc-d) var(--cc-ease); }
.cv .tl li:hover::before { transform: scale(1.25); }
.cv .tl li.red::before { background: var(--red, #e2445c); outline-color: var(--red-t, #fcebee); }
.cv .tl li.amber::before { background: var(--amber, #d97706); outline-color: var(--amber-t, #fbf1e3); }
.cv .tl li.blue::before { background: var(--blue, #3894f7); outline-color: var(--blue-t, #eaf3fe); }
.cv .tl li.violet::before { background: var(--v, #7703fc); outline-color: var(--tint, var(--v-t, #f3ecfe)); }
.cv .tl li.green::before { background: var(--green, #16a34a); outline-color: var(--green-t, #e8f8ee); }
.cv .tl .tm { font-size: 12px; color: var(--gray, #6e6c78); font-variant-numeric: tabular-nums; }
.cv .tl .tt { font-size: 14px; font-weight: 600; }
.cv .tl .tx { font-size: 13.5px; color: var(--gray, #6e6c78); margin-top: 2px; white-space: pre-wrap; }
.cv .tl.tl-in > li { animation: var(--cc-rise) var(--cc-d) var(--cc-ease) both; }
.cv .tl.tl-in > li:nth-child(2) { animation-delay: calc(var(--cc-st) * 1); } .tl.tl-in > li:nth-child(3) { animation-delay: calc(var(--cc-st) * 2); }
.cv .tl.tl-in > li:nth-child(4) { animation-delay: calc(var(--cc-st) * 3); } .tl.tl-in > li:nth-child(5) { animation-delay: calc(var(--cc-st) * 4); }
.cv .tl.tl-in > li:nth-child(6) { animation-delay: calc(var(--cc-st) * 5); } .tl.tl-in > li:nth-child(7) { animation-delay: calc(var(--cc-st) * 6); }
.cv .tl.tl-in > li:nth-child(8) { animation-delay: calc(var(--cc-st) * 7); } .tl.tl-in > li:nth-child(n+9) { animation-delay: calc(var(--cc-st) * 8); }
.cv .tl li.tl-new { animation: var(--cc-rise) var(--cc-d) var(--cc-ease) both, var(--cc-pulse) 1.2s var(--cc-ease) 1; }
.cv .tl-more { align-self: flex-start; }
.cv .tl-hint { margin: 0; font-size: 12.5px; }
.cv .tl-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 8px; }
.cv .tl-empty .hint { margin: 0; }
.cv .tl-skel { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 4px 26px; }
.cv .tl-skel span { display: block; height: 34px; border-radius: 10px; }

/* ---- skeleton (shimmer) ---- */
:is(.cl-split, .sheet[data-kind="client"]) .cc-skel { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.cl-split .cpane .cc-skel { padding: 28px 32px; }
:is(.cl-split, .sheet[data-kind="client"]) .cc-sk { height: 14px; border-radius: 8px; }
:is(.cl-split, .sheet[data-kind="client"]) .cc-sk.hx { height: 28px; border-radius: 10px; }
:is(.cl-split, .sheet[data-kind="client"]) .cc-sk.w60 { width: 60%; } .cc-sk.w40 { width: 40%; } .cc-sk.w80 { width: 80%; }
:is(.cl-split, .sheet[data-kind="client"]) .cc-sk.line { height: 48px; border-radius: 14px; }
:is(.cl-split, .sheet[data-kind="client"]) .cc-sk-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 6px 0; }
:is(.cl-split, .sheet[data-kind="client"]) .cc-sk.box { height: 70px; border-radius: 14px; }
:is(.cl-split, .sheet[data-kind="client"]) .cc-sk, .cv .tl-skel span { background: linear-gradient(90deg, var(--panel, #f4f4f7) 0%, var(--surf, #f8f7fb) 40%, var(--tint, var(--v-t, #f3ecfe)) 50%, var(--surf, #f8f7fb) 60%, var(--panel, #f4f4f7) 100%);
  background-size: 300% 100%; animation: var(--cc-shim) 1.4s linear infinite; }

/* ---- bo'sh holat (H.ui.empty bo'lsa o'sha; quyidagisi zaxira) ---- */
.cl-split .cpane .cc-pick { min-height: calc(100vh - var(--toph, 64px) - 40px); justify-content: center; }
.cv .cv-side .tl-empty { padding: 16px 8px; }
.cv .cv-side .tl-empty .eart { transform: scale(.75); margin-bottom: 0; }
:is(.cl-split, .sheet[data-kind="client"]) .cc-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; min-height: 320px; padding: 32px; }
:is(.cl-split, .sheet[data-kind="client"]) .cc-empty-t { margin: 8px 0 0; font-weight: 600; font-size: 15.5px; max-width: 360px; }
:is(.cl-split, .sheet[data-kind="client"]) .cc-empty-s { margin: 0; color: var(--gray, #6e6c78); font-size: 13.5px; max-width: 360px; }
:is(.cl-split, .sheet[data-kind="client"]) .cc-art { position: relative; width: 88px; height: 88px; border-radius: 50%; background: var(--tint, var(--v-t, #f3ecfe)); flex: none; }
:is(.cl-split, .sheet[data-kind="client"]) .cc-art span { position: absolute; border-radius: 999px; }
:is(.cl-split, .sheet[data-kind="client"]) .cc-art .o1 { width: 34px; height: 34px; left: 27px; top: 27px; background: var(--soft, #d9c2fe); }
:is(.cl-split, .sheet[data-kind="client"]) .cc-art .o2 { width: 14px; height: 14px; right: 6px; top: 12px; background: var(--lilac, #a970ff); }
:is(.cl-split, .sheet[data-kind="client"]) .cc-art .o3 { width: 22px; height: 10px; left: 10px; bottom: 16px; background: var(--blue-t, #eaf3fe); }
:is(.cl-split, .sheet[data-kind="client"]) .cc-art.miss .o1 { background: var(--red-t, #fcebee); } .cc-art.tl { width: 56px; height: 56px; } .cc-art.tl .o1 { width: 22px; height: 22px; left: 17px; top: 17px; }
:is(.cl-split, .sheet[data-kind="client"]) .cc-art.tl .o2 { width: 9px; height: 9px; right: 4px; top: 8px; } .cc-art.tl .o3 { width: 14px; height: 7px; left: 6px; bottom: 10px; }

/* ---- kompyuter: keng o'ng panel ---- */
.cl-split .cpane .cv-head { padding: 24px 32px; border-bottom: 1px solid var(--line, #e8e7ee);
  background: radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--v, #7703fc) 8%, transparent), transparent 55%),
    radial-gradient(90% 140% at 100% 0%, color-mix(in srgb, var(--blue, #3894f7) 6%, transparent), transparent 50%); }
.cl-split .cpane .cv-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; padding: 24px 32px 32px; align-items: start; }
.cl-split .cpane .cv-main { min-width: 0; }
.cl-split .cpane .cv-facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cl-split .cpane .cv-side { position: sticky; top: calc(var(--toph, 65px) + 16px); border: 1px solid var(--line, #e8e7ee); border-radius: 18px; padding: 16px; background: var(--surf, #f8f7fb);
  max-height: calc(100vh - var(--toph, 65px) - 32px); overflow-y: auto; scrollbar-width: thin; }
.cl-split .cpane .cv-side .tl li::before { border-color: var(--surf, #f8f7fb); }
.cl-split .cpane .errbox { margin: 24px 32px; }
@media (min-width: 1024px) and (max-width: 1279px) {
  .cl-split .cpane .cv-body { grid-template-columns: minmax(0, 1fr); }
  .cl-split .cpane .cv-side { position: static; max-height: none; }
}

/* ---- telefon: pastdan chiquvchi oyna ---- */
.cv .cv-tabs { margin: 14px 0 6px; }
.cv .cv-panel { padding-top: 6px; }
.cv .cv-panel > .cv-sec:first-child { margin-top: 8px; }
.cv .cv-bar { display: none; }
.sheet[data-kind="client"] .sbody { padding-bottom: 0; flex: 1; display: flex; flex-direction: column; }
.sheet[data-kind="client"] .cv { flex: 1; }
.sheet[data-kind="client"] .cv-acts { display: none; }
.sheet[data-kind="client"] .cv-bar { display: flex; gap: 10px; position: sticky; bottom: 0; margin: auto -20px 0; padding: 12px 20px calc(12px + var(--safe-b, env(safe-area-inset-bottom, 0px)));
  background: var(--card-bg, var(--card, #fff)); border-top: 1px solid var(--line, #e8e7ee); }
.sheet[data-kind="client"] .cv-bar > * { flex: 1; }
.sheet[data-kind="client"] .cv-panel { padding-bottom: 20px; }
.sheet[data-kind="client"] .cv-tr.th { display: none; }
.sheet[data-kind="client"] .cc-lift:hover { transform: none; }

@keyframes cc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cc-rise { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes cc-line { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes cc-shim { from { background-position: 100% 0; } to { background-position: -200% 0; } }
@keyframes cc-pulse { 0% { background: var(--tint, var(--v-t, #f3ecfe)); } 100% { background: transparent; } }
