/* ===== V10 USER REQUEST PATCH ===== */
/* Profile opens as a proper popup, same interaction style as Edit */
#clientProfileModal .modal-card{max-width:1120px}
#clientProfileModal #clientHistory{display:block!important;margin:0!important;border:0!important;box-shadow:none!important;padding:0!important}
#clientProfileModal .profile-popup-head{position:sticky;top:-17px;margin:-17px -17px 14px;padding:14px 17px;background:#fff;border-bottom:1px solid var(--line);z-index:30;display:flex;align-items:center;justify-content:space-between;gap:12px}

/* Three membership buckets only */
.diet-alert-card.membership-soon{border-left:4px solid #d9822b;background:#fffaf0}
.diet-alert-card.membership-today{border-left:4px solid #b5473c;background:#fff3f1}
.diet-alert-card.membership-ended{border-left:4px solid #68727d;background:#f6f7f8}

/* ===== FINAL INVOICE PDF — A4, single source of truth (no zoom hack, no duplicate @page) ===== */
/* Design: readable sizes throughout; the bottom block (terms + signature) is pushed to the
   foot of the page with margin-top:auto so a 1-service bill and a 4-service bill both look like
   a properly filled A4 page instead of leaving a big empty gap or a squeezed layout. */
@media print{
  @page{size:A4;margin:10mm}
  body{background:#fff}
  .invoice-print{
    width:100%;max-width:100%;margin:0;
    min-height:277mm;
    padding:12px;
    border:none;border-radius:0;box-shadow:none;overflow:visible;
    display:flex;flex-direction:column;
    -webkit-print-color-adjust:exact;print-color-adjust:exact
  }
  .invoice-print:before{height:6px;margin:-12px -12px 12px}
  .invoice-head{padding-bottom:10px}
  .invoice-logo{width:68px;height:52px}
  .invoice-title h1{font-size:20px!important;padding:6px 11px}
  .invoice-meta{gap:10px;margin:12px 0}
  .invoice-box{padding:8px 9px;font-size:9.5px;break-inside:avoid}
  .invoice-items{margin-top:8px}
  .invoice-items th,.invoice-items td{padding:6px 8px;font-size:9.5px;line-height:1.3}
  .invoice-items tr{break-inside:avoid}
  .invoice-total{margin-top:10px;width:300px}
  .invoice-total div{padding:5px 9px;font-size:9.5px}
  .invoice-total .grand{font-size:11px!important}
  .invoice-amount-words{margin-top:8px;padding:6px 9px;font-size:9px;break-inside:avoid}
  .invoice-print .invoice-payment-history{margin-top:8px;padding:6px 9px;break-inside:avoid}
  .invoice-print .invoice-payhist-table{table-layout:fixed;width:100%}
  .invoice-print .invoice-payhist-table td,.invoice-print .invoice-payhist-table th{font-size:8.3px;padding:3px 4px;word-break:break-word;overflow-wrap:break-word}
  .invoice-bottom{gap:12px;margin-top:auto;padding-top:10px;align-items:end;break-inside:avoid}
  .invoice-terms{font-size:8.3px!important;line-height:1.35;padding:7px 9px!important}
  .invoice-sign{padding:7px;font-size:8.8px;break-inside:avoid}
  .invoice-sign img{max-width:100px;max-height:44px}
  .invoice-print>div:last-child{margin-top:8px;padding-top:6px;font-size:8.5px}
}
