/* Gold Sylone V6.40 | Optional customer profile photo and square crop */
.gs640-customer-strip{grid-template-columns:64px minmax(190px,1fr) auto auto!important;gap:12px!important;align-items:center!important}
.gs640-customer-strip .gs640-billing-avatar{width:64px!important;height:64px!important;overflow:hidden!important;padding:0!important;border-radius:14px!important;display:flex!important;align-items:center;justify-content:center;background:#293241!important;color:#d7dee8!important}
.gs640-billing-avatar img,.gs640-detail-avatar img{width:100%;height:100%;object-fit:cover;display:block;border-radius:inherit}
.gs640-no-photo{display:flex;align-items:center;justify-content:center;font-size:31px;line-height:1;color:#a8b5c7!important;width:100%;height:100%;font-family:system-ui,sans-serif;user-select:none}
.gs640-customer-meta{display:flex;gap:6px 13px;flex-wrap:wrap;margin-top:6px;font-size:11px;color:#59687b}
.gs640-customer-meta span{white-space:nowrap}.gs640-customer-meta b{color:#263447;font-weight:700}
.gs640-customer-strip .v83-customer-main{min-width:185px}.gs640-customer-strip .v83-customer-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.gs640-photo-panel{margin:15px 0;padding:20px!important;background:#18273b!important;border:1px solid #37506a!important;color:#eef4fc!important;max-width:none!important}
.gs640-photo-head{display:flex;align-items:center;gap:16px;margin-bottom:13px}.gs640-photo-head h2{margin:0 0 4px;font-size:18px;color:#fff}.gs640-photo-head p{margin:0 0 3px;color:#d4e3f0;font-size:13px}.gs640-photo-head small{font-size:12px;color:#aec1d5}
.gs640-detail-avatar{height:88px;width:88px;flex:0 0 88px;border-radius:14px;background:#2b3b50;border:1px solid #53647e;overflow:hidden;display:flex;align-items:center;justify-content:center}
.gs640-photo-form{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.gs640-file-label{font-size:13px;color:#fff;font-weight:650;display:grid;gap:6px}.gs640-file-label input{background:#f9fafb;color:#111827;border:1px solid #bdc9d9;border-radius:9px;font-size:13px;padding:7px;max-width:310px}
.gs640-consent{font-size:12px;color:#dfe6ef;max-width:330px;display:flex;align-items:flex-start;gap:7px}.gs640-consent input{margin-top:1px;accent-color:#d9aa4c}
.gs640-photo-panel > form + form{margin-top:8px}
.gs640-crop-overlay{position:fixed;inset:0;background:rgba(4,10,18,.82);z-index:2147483600;display:grid;place-items:center;padding:15px;color:#f9fafb;font-family:system-ui,Arial,sans-serif}
.gs640-crop-modal{width:min(430px,100%);max-height:94vh;overflow:auto;background:#142237;border:1px solid #c99a41;border-radius:18px;padding:17px;box-shadow:0 25px 70px rgba(0,0,0,.5)}
.gs640-crop-modal h3{font-size:19px;margin:0 0 4px;color:#fff}.gs640-crop-modal p{margin:0 0 13px;font-size:12px;color:#d5e0ee}
.gs640-crop-canvas-wrap{width:min(310px,100%);aspect-ratio:1;margin:0 auto 10px;border-radius:12px;border:3px solid #e8bd62;overflow:hidden;background:#fff}
.gs640-crop-canvas{width:100%;height:100%;display:block;touch-action:none;cursor:grab}
.gs640-crop-modal label{color:#e5edf6;font-weight:650;font-size:12px;display:flex;align-items:center;gap:10px;margin:10px 0}
.gs640-crop-modal input[type=range]{flex:1;accent-color:#e4b851}
.gs640-crop-controls{display:flex;gap:8px;justify-content:center;margin:11px 0;flex-wrap:wrap}
.gs640-crop-controls button,.gs640-crop-actions button{background:#253b56;color:#f4f8fe;border:1px solid #5c7189;border-radius:9px;padding:10px 13px;font-weight:700;cursor:pointer;font-size:13px}
.gs640-crop-actions{display:flex;justify-content:space-between;gap:8px;margin-top:12px}
.gs640-crop-actions .gs640-save{background:#e9b747;color:#111827;border-color:#e9b747;flex:1}
.gs640-crop-actions button:focus-visible{outline:3px solid #e9b747;outline-offset:2px}
.gs640-photo-feedback{font-size:12px;color:#166534;margin-top:7px;font-weight:650;display:block}
.gs640-crop-alert{font-size:12px;color:#ffd596;min-height:16px}
@media(max-width:850px){.gs640-customer-strip{grid-template-columns:64px minmax(0,1fr)!important}.gs640-customer-strip .v83-customer-tags,.gs640-customer-strip .v83-customer-actions{grid-column:1/-1!important;justify-content:flex-start}.gs640-customer-meta{gap:4px 10px}.gs640-photo-head{align-items:flex-start}}
@media(max-width:480px){.gs640-customer-strip{padding:12px!important;gap:8px!important}.gs640-photo-panel{padding:12px!important}.gs640-photo-form{display:grid}.gs640-detail-avatar{width:70px;height:70px;flex-basis:70px}}

/* V6.41: LARGE SIDE PORTRAIT ON NEW BILL. CSS-only; no billing controller changes.
   Respect the existing profile buttons, benefit labels and mobile layout. */
@media (min-width:1320px) {
  .v83-customer-strip.gs640-customer-strip {
    grid-template-columns:minmax(210px,1fr) minmax(440px,auto) 164px!important;
    grid-template-areas:"main tags portrait" "main actions portrait"!important;
    grid-template-rows:auto auto!important;
    min-height:186px!important;
    padding:14px 18px!important;
    gap:8px 18px!important;
  }
  .gs640-customer-strip .v83-customer-main {grid-area:main!important;min-width:0!important}
  .gs640-customer-strip .v83-customer-tags {grid-area:tags!important;grid-column:auto!important;align-self:end!important}
  .gs640-customer-strip .v83-customer-actions {grid-area:actions!important;grid-column:auto!important;align-self:start!important}
  .gs640-customer-strip .gs640-billing-avatar {
    grid-area:portrait!important;width:160px!important;height:160px!important;
    border:2px solid #bd9139!important;border-radius:18px!important;
    box-shadow:0 7px 24px rgba(0,0,0,.22)!important;
    justify-self:end!important;align-self:center!important;
  }
}
@media (min-width:851px) and (max-width:1319px) {
  .v83-customer-strip.gs640-customer-strip {
    grid-template-columns:132px minmax(0,1fr)!important;
    grid-template-areas:"portrait main" "portrait tags" "portrait actions"!important;
    grid-template-rows:auto auto auto!important;
    gap:7px 15px!important;
    min-height:158px!important;
  }
  .gs640-customer-strip .v83-customer-main {grid-area:main!important;min-width:0!important}
  .gs640-customer-strip .v83-customer-tags {grid-area:tags!important;grid-column:auto!important;justify-content:flex-start!important}
  .gs640-customer-strip .v83-customer-actions {grid-area:actions!important;grid-column:auto!important;justify-content:flex-start!important}
  .gs640-customer-strip .gs640-billing-avatar {
    grid-area:portrait!important;width:128px!important;height:140px!important;
    border:2px solid #bd9139!important;border-radius:16px!important;
    box-shadow:0 7px 22px rgba(0,0,0,.17)!important;
    justify-self:start!important;
  }
}
@media (max-width:850px) {
  .v83-customer-strip.gs640-customer-strip {
    grid-template-columns:100px minmax(0,1fr)!important;
    grid-template-areas:"portrait main" "tags tags" "actions actions"!important;
    grid-template-rows:auto auto auto!important;
    gap:8px 12px!important;
  }
  .gs640-customer-strip .v83-customer-main {grid-area:main!important;min-width:0!important}
  .gs640-customer-strip .v83-customer-tags {grid-area:tags!important;grid-column:auto!important;justify-content:flex-start!important}
  .gs640-customer-strip .v83-customer-actions {grid-area:actions!important;grid-column:auto!important;justify-content:flex-start!important}
  .gs640-customer-strip .gs640-billing-avatar {
    grid-area:portrait!important;width:98px!important;height:108px!important;
    border:2px solid #bd9139!important;border-radius:13px!important;
    justify-self:start!important;
  }
}
@media (max-width:410px){
  .v83-customer-strip.gs640-customer-strip {grid-template-columns:83px minmax(0,1fr)!important;gap:7px 10px!important}
  .gs640-customer-strip .gs640-billing-avatar {width:82px!important;height:96px!important}
}
/* Preserve original photo proportions; never stretch an image to fill the frame. */
.gs640-customer-strip .gs640-billing-avatar img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center 28%!important}
/* V6.41 crop preview status: no unexplained blank canvas while decoding. */
.gs640-crop-canvas-wrap{position:relative!important;background:#25364a!important}
.gs640-crop-canvas{background:#f7f1e6!important}
.gs640-crop-loading{font-size:12px;color:#f8e4b5;text-align:center;min-height:20px;margin:5px 0 8px!important;font-weight:600}
.gs640-crop-actions .gs640-save:disabled{opacity:.5;cursor:not-allowed}
.gs640-crop-alert:not(:empty){padding:7px 9px;background:#482e21;border-radius:7px;color:#ffe0bb;font-weight:600}
/* V6.41 contrast and phone-width action alignment corrections */
.gs640-customer-strip .gs640-customer-meta span{color:#ced9e8!important}
.gs640-customer-strip .gs640-customer-meta b{color:#f1d58e!important}
@media (max-width:850px){
  .gs640-customer-strip .v83-customer-tags{grid-area:tags!important;grid-column:1/-1!important;width:100%!important}
  .gs640-customer-strip .v83-customer-actions{grid-area:actions!important;grid-column:1/-1!important;width:100%!important;display:flex!important;flex-flow:row wrap!important;align-items:center;justify-content:flex-start!important}
  .gs640-customer-strip .v83-customer-actions .crm-btn{max-width:100%!important;white-space:normal!important}
}
