body.overlay-open{overflow:hidden}

.customer-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}
.customer-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:20px}
.customer-toolbar h2{margin-top:5px;font-size:21px}
.customer-tools{display:flex;align-items:center;gap:8px}
.customer-tools .filters input{width:min(250px,28vw)}
.customer-tools .filters select{width:150px}
.customer-stats .stat-card{min-height:112px}
.customer-name{font-weight:750}
.customer-channel-badge{display:inline-flex;padding:4px 8px;border-radius:99px;background:var(--success-soft);color:var(--success);font-weight:700;white-space:nowrap}
.customer-actions{display:flex;gap:6px}
.customer-actions button{min-height:32px;padding:6px 9px;font-size:11px}
.customer-contact{display:inline-flex;align-items:center;gap:7px;min-width:132px}.customer-contact-value{font-variant-numeric:tabular-nums;letter-spacing:.015em}.customer-contact-empty{color:var(--muted)}.customer-contact-eye{display:grid;width:28px;min-height:28px;padding:0;place-items:center;border:1px solid transparent;border-radius:8px;background:transparent;color:#8a9793;transition:background .15s ease,border-color .15s ease,color .15s ease}.customer-contact-eye svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7}.customer-contact-eye:hover{border-color:#d9e8e3;background:#f0f7f5;color:#2f7d68}.customer-contact-eye:focus-visible{outline:2px solid #77aa9b;outline-offset:2px}.customer-contact-eye.revealed{background:#e8f3ef;color:#246956}

.customer-drawer,.customer-channel-modal{position:fixed;inset:0;z-index:80;isolation:isolate}
.drawer-mask,.channel-modal-mask{position:absolute;inset:0;background:rgba(15,23,42,.42);animation:overlay-fade .18s ease both}
.drawer-panel{position:absolute;top:0;right:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(440px,100vw);height:100dvh;margin:0;background:var(--surface);border-left:1px solid var(--line);box-shadow:-22px 0 55px rgba(15,23,42,.18);animation:drawer-in .22s cubic-bezier(.22,.8,.25,1) both}
.drawer-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:26px 28px 20px;border-bottom:1px solid var(--line)}
.drawer-head h2{margin-top:5px;font-size:24px;letter-spacing:-.02em}
.drawer-body{overflow-y:auto;padding:10px 28px 24px;overscroll-behavior:contain}
.drawer-body label{margin:15px 0 0;color:var(--muted);font-size:12px;font-weight:650}
.drawer-body input,.drawer-body select{margin-top:7px;background:#fff}
.drawer-footer{display:flex;align-items:center;gap:9px;padding:18px 28px calc(18px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:rgba(255,255,255,.96)}
.drawer-footer>button:first-child{min-width:128px}
.drawer-footer .danger{margin-left:auto}
.overlay-close{display:grid;place-items:center;flex:0 0 38px;width:38px;min-height:38px;padding:0;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--muted);font-size:24px;font-weight:400;line-height:1}
.overlay-close:hover{border-color:#c8ced7;background:var(--surface-subtle);color:var(--ink)}

.customer-channel-modal{display:grid;place-items:center;padding:22px}
.customer-channel-modal .modal-dialog{position:relative;display:grid;grid-template-rows:auto auto minmax(0,1fr);width:min(640px,calc(100vw - 44px));max-height:min(720px,calc(100dvh - 44px));padding:0;overflow:hidden;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:0 24px 70px rgba(15,23,42,.24);animation:modal-in .2s cubic-bezier(.22,.8,.25,1) both}
.customer-channel-modal .dialog-head{margin:0;padding:24px 26px 18px;border-bottom:1px solid var(--line)}
.customer-channel-modal .dialog-head h2{margin-top:5px;font-size:23px}
.customer-channel-modal .channel-create{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;padding:18px 26px;margin:0;border-bottom:1px solid var(--line)}
.customer-channel-modal .channel-create input{margin:0}
.channel-modal-body{overflow-y:auto;padding:12px 26px 24px;overscroll-behavior:contain}
.customer-channel-modal .channel-list{display:grid;gap:8px}
.customer-channel-modal .channel-row{grid-template-columns:minmax(0,1fr) auto auto auto;gap:8px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-subtle)}
.customer-channel-modal .channel-row input{margin:0;background:#fff}
.customer-channel-modal .switch-row{white-space:nowrap}
.channel-delete{background:var(--surface);border-color:#efc2be;color:var(--danger)}
.channel-delete:hover{background:var(--danger-soft);border-color:#e39c96}

@keyframes overlay-fade{from{opacity:0}to{opacity:1}}
@keyframes drawer-in{from{transform:translateX(28px);opacity:.35}to{transform:none;opacity:1}}
@keyframes modal-in{from{transform:translateY(8px) scale(.985);opacity:.45}to{transform:none;opacity:1}}

@media(max-width:1100px){
  .customer-toolbar{align-items:stretch;flex-direction:column}
  .customer-tools{align-items:stretch;flex-wrap:wrap}
  .customer-tools .filters{flex:1}
  .customer-tools .filters input{width:100%}
}

@media(max-width:760px){
  .customer-stats{grid-template-columns:1fr}
  .customer-tools,.customer-tools .filters{display:grid;width:100%}
  .customer-tools .filters select{width:100%}
  .drawer-panel{width:100vw;border-left:0}
  .drawer-head{padding:20px 20px 16px}
  .drawer-body{padding:7px 20px 20px}
  .drawer-footer{padding:15px 20px calc(15px + env(safe-area-inset-bottom))}
  .customer-channel-modal{padding:12px}
  .customer-channel-modal .modal-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}
  .customer-channel-modal .dialog-head{padding:20px 18px 16px}
  .customer-channel-modal .channel-create{grid-template-columns:1fr;padding:15px 18px}
  .channel-modal-body{padding:10px 18px 18px}
  .customer-channel-modal .channel-row{grid-template-columns:1fr auto auto}
  .customer-channel-modal .channel-row input{grid-column:1/-1}
}

@media(prefers-reduced-motion:reduce){
  .drawer-mask,.channel-modal-mask,.drawer-panel,.customer-channel-modal .modal-dialog{animation:none}
}
