/* Mijoz kabineti — telefon uchun (Telegram mini ilova va telefon brauzeri). Faqat .client-shell va tor ekranda ishlaydi. */
.cm-tabbar{display:none}
.cm-profile{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:6px 0 2px}
.cm-profile .cm-pavatar{width:76px;height:76px;border-radius:50%;display:grid;place-items:center;font-size:26px;font-weight:800;color:#1b2a32;background:linear-gradient(150deg,#ffe597,#f2c958 60%,#e0ab2f);box-shadow:0 12px 28px #f2c95855,inset 0 1px 0 #ffffff80;margin-bottom:6px}
.cm-profile strong{font-size:20px}
.cm-profile small{color:#6c7c85;margin-bottom:10px}
.cm-profile .cm-prow{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;padding:13px 4px;border-top:1px solid #e3eaec;font-size:14px}
.cm-profile .cm-prow span{color:#6c7c85}
.cm-profile .cm-prow b.ok{color:#2f8f5b}
.cm-profile .cm-pbtns{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%;margin-top:10px}
.cm-profile .cm-prow b.warn,.client-tg dd.warn{color:#b9772a}
.cm-profile .cm-pavatar{overflow:hidden}
.cm-profile .cm-pavatar img,.cm-avatar-img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.cm-ask{margin:0 0 12px;line-height:1.55;color:#4d5f68}
.avatar.cm-photo{padding:0;overflow:hidden}
.client-tg{display:flex;gap:18px;align-items:center;padding:16px 18px;margin:0 0 16px;border:1px solid #e0e7ea;border-radius:18px;background:linear-gradient(135deg,#f8fafb,#f1f6f7)}
.client-tg-photo{flex:none;width:84px;height:84px;border-radius:50%;overflow:hidden;display:grid;place-items:center;font-size:28px;font-weight:800;color:#1b2a32;background:linear-gradient(150deg,#ffe597,#f2c958 60%,#e0ab2f);box-shadow:0 8px 20px #f2c95844}
.client-tg-photo img{width:100%;height:100%;object-fit:cover;display:block}
.client-tg-info{min-width:0;flex:1}
.client-tg-info h3{margin:0 0 8px;font-size:15px}
.client-tg dl{margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px 18px}
.client-tg dt{font-size:11px;color:#6c7c85;letter-spacing:.5px;text-transform:uppercase}
.client-tg dd{margin:2px 0 0;font-weight:650;overflow-wrap:anywhere}
@media (max-width:560px){.client-tg{flex-direction:column;text-align:center}.client-tg dl{text-align:left}}

@media (max-width:760px){
  html{-webkit-text-size-adjust:100%}
  body{background:#eef3f5}
  .client-shell{--cm-bar:68px;--cm-line:#dfe7ea;--cm-ink:#122029;--cm-mute:#6c7c85;--cm-gold:#f2c958;--cm-card:#fff;min-height:100dvh}
  .client-shell .sidebar,.client-shell .au-k-trigger,.client-shell .header-clock,.client-shell .header-signature,.client-shell .crumb,
  .client-shell .demo-banner,.client-shell .top-right .badge,.client-shell .top-right .identity,.client-shell .mobile-toggle,
  .client-shell .page-head .eyebrow,.client-shell .page-head .subtitle{display:none!important}
  .client-shell .main{margin-left:0;width:100%}
  .client-shell .content{padding:14px 14px calc(var(--cm-bar) + 28px + env(safe-area-inset-bottom));max-width:none}

  /* ---- Yuqori panel ---- */
  .client-shell .topbar{position:sticky;top:0;z-index:30;height:calc(56px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 14px 0;display:flex;align-items:center;justify-content:space-between;border-radius:0 0 20px 20px}
  .client-shell .topbar:before{content:"BESTCADCAM";font-weight:800;letter-spacing:2.5px;font-size:13px;color:var(--cm-gold)}
  .client-shell .top-right{display:flex;align-items:center;gap:10px;margin:0}
  .client-shell .top-right .avatar{width:38px;height:38px;font-size:13px}
  .client-shell .top-right [data-logout]{width:40px;height:40px}
  html.telegram-mini-app .client-shell [data-logout]{display:none}

  /* ---- Sahifa sarlavhasi ---- */
  .client-shell .page-head{display:flex!important;flex-direction:row!important;align-items:center;justify-content:space-between!important;gap:10px;margin:2px 0 14px!important;padding:0!important;text-align:left!important}
  .client-shell .page-head>div{margin:0!important;text-align:left!important}
  .client-shell .page-head h1{font-size:22px;margin:0;letter-spacing:-.3px}
  .client-shell .page-head .actions{margin:0}
  .client-shell .page-head .actions button{min-height:38px;padding:0 14px;border-radius:12px;font-size:13px}

  /* ---- Davr filtri ---- */
  .client-shell .filter-period{background:var(--cm-card);border:1px solid var(--cm-line);border-radius:16px;padding:8px;margin:0 0 10px;display:block;box-shadow:0 6px 20px #12202908}
  .client-shell .filter-period .date-filter{display:grid;grid-template-columns:1fr 1fr;gap:6px 8px;align-items:center}
  .client-shell .filter-period .date-filter>label,.client-shell .filter-period .date-filter>span:not(.input-affordance-wrap),.client-shell .filter-period>.muted{display:none!important}
  .client-shell .filter-period .input-affordance-wrap{width:100%;min-width:0}
  .client-shell .filter-period input{width:100%;min-width:0}
  .client-shell .filter-period .date-filter>button{width:100%;min-height:34px;font-size:13px;padding:0 10px;border-radius:11px}
  .client-shell .filter-period input{min-height:38px!important;padding:0 36px 0 11px!important;border-radius:11px!important}
  .client-shell .filter-period .input-affordance{width:32px;height:32px;right:3px}
  .client-shell .filter-period .input-affordance svg{width:17px;height:17px}
  .client-shell .filter-period #dashboard-month-form,.client-shell #dashboard-month-form .date-filter{grid-template-columns:1fr 1fr}
  .client-shell #dashboard-month-form .input-affordance-wrap{grid-column:1/-1;width:100%}

  /* ---- Inputlar va tugmalar ---- */
  .client-shell input,.client-shell select,.client-shell textarea{font-size:16px!important;min-height:42px;border-radius:12px}
  .client-shell textarea{min-height:110px}
  .client-shell button{min-height:40px}
  .client-shell .small{min-height:34px}

  /* ---- Bosh sahifa ---- */
  .client-shell .client-welcome{display:block;padding:20px;margin:0 0 14px;border-radius:24px;background:linear-gradient(135deg,#142a36,#0f1d27 70%)}
  .client-shell .client-welcome:after{display:none}
  .client-shell .client-welcome span{font-size:10px;letter-spacing:2px}
  .client-shell .client-welcome h1{font-size:23px;line-height:1.2;margin:10px 0 0}
  .client-shell .client-welcome p{display:none}
  .client-shell .client-balance{border:0;padding:16px 0 0;margin-top:14px;border-top:1px solid #ffffff1f;flex-direction:column;align-items:flex-start}
  .client-shell .client-balance small{margin:0 0 6px;font-size:12px}
  .client-shell .client-balance b{font-size:30px;line-height:1.15;margin:0}
  .client-shell .client-balance b+b{font-size:18px;color:#d6bd7a}
  .client-shell .client-balance em{margin-top:8px}
  .client-shell .online-pay-button{width:100%;margin:16px 0 0;min-height:50px;border-radius:16px;font-size:15px;justify-content:center}
  .client-shell .client-welcome>div:first-child{display:flex;flex-direction:column}
  .client-shell .client-welcome .online-pay-button{order:3}

  .client-shell .client-actions{grid-template-columns:1fr 1fr;gap:10px;margin:0 0 14px}
  .client-shell .client-actions button{min-height:96px;padding:14px;border-radius:18px;flex-direction:column;gap:8px;align-items:flex-start}
  .client-shell .client-actions button>svg:last-child{display:none}
  .client-shell .client-actions button small{display:none}
  .client-shell .client-actions button b{font-size:13.5px;line-height:1.25}
  .client-shell .client-actions button:hover{transform:none}

  .client-shell .metrics{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 14px}
  .client-shell .metric{padding:14px;border-radius:18px;min-height:0}
  .client-shell .metric-top{font-size:12px;gap:6px}
  .client-shell .metric-icon{width:30px;height:30px}
  .client-shell .metric-value{font-size:21px;margin-top:8px}
  .client-shell .metric-alt{font-size:12px}
  .client-shell .metric-foot{display:none}

  /* ---- Panel va jadval -> kartalar ---- */
  .client-shell .panel{border-radius:18px;padding:14px!important;margin:0 0 12px}
  .client-shell .panel h2{font-size:17px;margin:0 0 8px}
  .client-shell .panel p{font-size:14px;line-height:1.55;margin:6px 0}
  .client-shell .panel:has(>.table-wrap),.client-shell .panel:has(>.empty){background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
  .client-shell .page-head>div:first-child{text-align:left;min-width:0}
  .client-shell .page-head h1{text-align:left;background:none;-webkit-text-fill-color:var(--cm-ink);color:var(--cm-ink)}
  .client-shell .panel-head{margin-bottom:10px}
  .client-shell .panel-head h2{font-size:17px}
  .client-shell .toolbar{margin:0 0 10px}
  .client-shell .toolbar .actions{display:flex;gap:8px;width:100%}
  .client-shell .toolbar .search{flex:1;min-width:0}
  .client-shell .toolbar .search input{width:100%;padding-left:38px!important;min-height:40px}
  .client-shell .toolbar .search{background-image:none!important;padding:0!important;border:0!important;background-color:transparent!important;box-shadow:none!important}
  .client-shell .toolbar{background:transparent!important;padding:0!important;border:0!important;box-shadow:none!important}
  .client-shell .toolbar .search input{background:#fff!important;border:1px solid var(--cm-line)!important;box-shadow:0 4px 14px #12202908}
  .client-shell .toolbar .actions>button{display:none}
  .client-shell .toolbar .search svg~svg{display:none!important}
  .client-shell .toolbar .search{position:relative}
  .client-shell .toolbar .search svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:17px;height:17px;pointer-events:none}
  .client-shell .toolbar .actions>button{flex:none;min-width:84px}

  .client-shell .table-wrap{overflow:visible;border:0;background:transparent}
  .client-shell .table-wrap table,.client-shell .table-wrap tbody{display:block;width:100%;min-width:0}
  .client-shell .table-wrap thead{display:none}
  .client-shell .table-wrap tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;align-items:center;padding:12px 14px;margin:0 0 8px;background:var(--cm-card);border:1px solid var(--cm-line);border-radius:18px;box-shadow:0 6px 18px #12202907}
  .client-shell .table-wrap td{display:block;padding:0;border:0;min-width:0;font-size:14px;color:var(--cm-ink);text-align:left;background:none}
  .client-shell .table-wrap td:first-child{grid-column:1;grid-row:1}
  .client-shell .table-wrap td:last-child{grid-column:2;grid-row:1;justify-self:end;font-weight:750;font-size:16px;white-space:nowrap}
  .client-shell .table-wrap td:not(:first-child):not(:last-child){grid-column:1/-1;display:flex;justify-content:space-between;align-items:baseline;gap:14px;padding-top:6px;border-top:1px dashed var(--cm-line)}
  .client-shell .table-wrap td[data-label]:not(:first-child):not(:last-child):before{content:attr(data-label);flex:none;color:var(--cm-mute);font-size:11px;font-weight:650;letter-spacing:.8px;text-transform:uppercase}
  .client-shell .table-wrap td:not(:first-child):not(:last-child)>*{text-align:right}
  .client-shell .table-wrap td.cm-hide{display:none!important}
  .client-shell .table-wrap .id-tag{font-size:13px}
  .client-shell .table-wrap .person{display:flex;align-items:center;gap:8px}
  .client-shell .table-wrap .help{display:inline;margin-left:6px;font-size:11px;color:var(--cm-mute)}
  .client-shell .table-wrap .amount{font-size:16px}
  .client-shell .table-wrap td[colspan]{grid-column:1/-1;display:block}

  .client-shell .empty{padding:36px 16px;border-radius:20px;background:var(--cm-card);border:1px dashed var(--cm-line)}
  .client-shell .table-footer{display:flex;flex-direction:column;gap:10px;align-items:stretch;padding:4px 0 0;text-align:center;font-size:12px;color:var(--cm-mute)}
  .client-shell .table-footer .actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}

  .client-shell .table-footer:has(button[disabled]+button[disabled]){display:none}

  /* ---- Pastdan chiqadigan oynalar ---- */
  .client-shell~dialog[open],dialog[open]{width:100%;max-width:none;margin:auto 0 0;border-radius:26px 26px 0 0;max-height:92dvh;padding-bottom:calc(16px + env(safe-area-inset-bottom));overflow:auto}
  dialog[open]::backdrop{background:#0a141a99}
  dialog .actions{display:flex;flex-direction:column-reverse;gap:10px}
  dialog .actions button{width:100%;min-height:48px}

  /* ---- Dumaloq pastki menyu ---- */
  :root{--cm-bar:84px}
  body.cm-on .cm-tabbar{display:grid;grid-template-columns:repeat(var(--cm-n,5),1fr);position:fixed;left:12px;right:12px;bottom:calc(10px + env(safe-area-inset-bottom));z-index:40;height:74px;padding:9px 6px 6px;background:#0d1a22eb;border:1px solid #ffffff14;border-radius:999px;box-shadow:0 18px 44px #0a141a73,inset 0 1px 0 #ffffff12;-webkit-backdrop-filter:blur(16px) saturate(1.4);backdrop-filter:blur(16px) saturate(1.4);animation:cm-bar-in .55s cubic-bezier(.2,.9,.25,1.1) both}
  .cm-tabbar .cm-glow{position:absolute;top:2px;left:6px;width:calc((100% - 12px)/var(--cm-n,5));height:60px;display:grid;place-items:center;transform:translate3d(calc(var(--cm-slot,0) * 100%),0,0);transition:transform .5s cubic-bezier(.34,1.35,.5,1);pointer-events:none}
  .cm-tabbar .cm-glow:before{content:"";width:62px;height:62px;border-radius:50%;background:radial-gradient(circle,#f2c95859,#f2c95800 68%)}
  .cm-tabbar button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:4px;min-height:0;min-width:0;padding:0;border:0!important;background:transparent!important;box-shadow:none!important;color:#8fa4ae!important;font-size:10px;font-weight:650;letter-spacing:0;white-space:nowrap;-webkit-tap-highlight-color:transparent;transition:color .25s}
  .cm-tabbar .cm-ico{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#ffffff0f;transition:transform .45s cubic-bezier(.34,1.56,.64,1),background .3s,box-shadow .3s,color .3s}
  .cm-tabbar .cm-ico svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;overflow:visible}
  .cm-tabbar .cm-ico .f{fill:currentColor;fill-opacity:.16;stroke:none;transition:fill-opacity .3s}
  .cm-tabbar button:active .cm-ico{transform:scale(.9)}
  .cm-tabbar button.on{color:#f6d66f!important}
  .cm-tabbar button.on .cm-ico{background:linear-gradient(150deg,#ffe597,#f2c958 60%,#e0ab2f);color:#1b2a32;transform:translateY(-9px) scale(1.1);box-shadow:0 10px 22px #f2c95866,inset 0 1px 0 #ffffff80}
  .cm-tabbar button.on .cm-ico .f{fill-opacity:.32}
  .cm-tabbar button.on .cm-ico svg{animation:cm-pop .5s cubic-bezier(.34,1.56,.64,1)}
  .cm-tabbar button.on .cm-lbl{transform:translateY(-6px)}
  .cm-tabbar .cm-lbl{transition:transform .35s cubic-bezier(.34,1.56,.64,1)}

  /* ---- Bo'limdan bo'limga o'tish animatsiyasi ---- */
  #content.cm-in-r{animation:cm-from-r .42s cubic-bezier(.2,.8,.2,1) both}
  #content.cm-in-l{animation:cm-from-l .42s cubic-bezier(.2,.8,.2,1) both}
  #content.cm-in-up{animation:cm-from-up .5s cubic-bezier(.2,.8,.2,1) both}
  @keyframes cm-from-r{from{opacity:0;transform:translate3d(34px,0,0) scale(.985)}to{opacity:1;transform:none}}
  @keyframes cm-from-l{from{opacity:0;transform:translate3d(-34px,0,0) scale(.985)}to{opacity:1;transform:none}}
  @keyframes cm-from-up{from{opacity:0;transform:translate3d(0,22px,0)}to{opacity:1;transform:none}}
  @keyframes cm-pop{0%{transform:scale(.6) rotate(-14deg)}60%{transform:scale(1.18) rotate(6deg)}100%{transform:scale(1) rotate(0)}}
  @keyframes cm-bar-in{from{opacity:0;transform:translate3d(0,40px,0)}to{opacity:1;transform:none}}
  .client-shell .au-enter{animation-duration:.45s;animation-delay:calc(var(--au-i,0) * 35ms)}

  /* ---- Dizayn tuzatishlari ---- */
  .client-shell .panel-head,.client-shell .panel-body{padding:0!important}
  .client-shell .panel-body .summary-text{font-size:14px;line-height:1.6;color:var(--cm-mute)}
  .client-shell .client-welcome{position:relative;overflow:hidden}
  .client-shell .client-welcome:before{content:"";position:absolute;right:-70px;top:-90px;width:240px;height:240px;border-radius:50%;background:radial-gradient(circle,#f2c95840,#f2c95800 70%);pointer-events:none}
  .client-shell .client-actions button>svg:first-child{width:42px;height:42px;padding:10px;border-radius:50%;background:#fff3cf;color:#a67c1d;flex:none}
  .client-shell button:not(.cm-x):active{transform:scale(.97)}
  .client-shell .metric{transition:transform .2s}
  .client-shell .metric:active{transform:scale(.98)}
  #toast{bottom:calc(var(--cm-bar,68px) + 28px + env(safe-area-inset-bottom))!important}
  #local-crm-demo-banner{display:none}
}

@media (prefers-reduced-motion:reduce){.cm-tabbar *,#content.cm-in-r,#content.cm-in-l,#content.cm-in-up,body.cm-on .cm-tabbar{animation:none!important;transition:none!important}}
