/* CUEVA Credit Accounts v704 — 12-hour credit repayment correction. */
@media(max-width:820px){
  .credit-correct-payment-btn{
    width:max-content;margin-top:7px;padding:7px 9px;border:1px solid #d9c58f;border-radius:9px;
    background:#faf5e8;color:#7c601e;font:inherit;font-size:8px;font-weight:850
  }
  .credit-correct-payment-btn i{margin-right:4px}
  .credit-correction-closed{display:inline-flex;align-items:center;gap:4px;margin-top:6px;color:#9a9da3;font-size:7px;font-weight:700}

  #creditCorrectionModal .credit-modal-card:before{display:none!important}
  #creditCorrectionModal .credit-modal-head{
    position:relative!important;top:auto!important;margin:0 -16px 14px!important;padding:18px 16px 16px!important;background:#fff!important
  }
  #creditCorrectionModal .credit-modal-head h3{font-size:23px!important;line-height:1.05!important}
  #creditCorrectionModal .credit-modal-head p{font-size:10px!important;font-weight:650!important}
  .credit-correction-window{
    display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid #e5d8b7;border-radius:13px;
    background:#fbf7ec;color:#7e6426;font-size:9px;font-weight:750
  }
  .credit-correction-comparison{
    display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px;margin-top:12px
  }
  .credit-correction-comparison>div{min-height:70px;padding:12px;border:1px solid #e1e3e6;border-radius:15px;background:#f7f8f9}
  .credit-correction-comparison span{display:block;color:#878b93;font-size:8px;font-weight:750}
  .credit-correction-comparison strong{display:block;margin-top:7px;color:#282a2f;font-size:17px;font-weight:900}
  .credit-correction-comparison>i{color:#b18a31;font-size:11px}
  .credit-correction-field{display:grid;gap:7px;margin-top:12px;color:#565a62;font-size:10px;font-weight:800}
  .credit-correction-field input,.credit-correction-field textarea{
    width:100%;box-sizing:border-box;border:1px solid #dfe1e5;border-radius:14px;background:#fff;color:#24262b;
    font:inherit;font-size:16px;font-weight:750;outline:none
  }
  .credit-correction-field input{height:53px;padding:0 13px}
  .credit-correction-field textarea{padding:12px 13px;resize:none;line-height:1.35}
  .credit-correction-field input:focus,.credit-correction-field textarea:focus{border-color:#ba9338;box-shadow:0 0 0 3px rgba(186,147,56,.10)}
  .credit-correction-result{
    display:grid;grid-template-columns:1fr auto;align-items:center;gap:5px 10px;margin-top:12px;padding:12px 13px;
    border:1px solid #e1e3e6;border-radius:15px;background:#fbfbfc
  }
  .credit-correction-result>span{color:#7f838a;font-size:9px;font-weight:750}
  .credit-correction-result>strong{font-size:14px;font-weight:900}
  .credit-correction-result>p{grid-column:1/-1;margin:0;color:#777b82;font-size:8px;font-weight:700}
  .credit-correction-result>p.increase{color:#ac4438}.credit-correction-result>p.decrease{color:#347b4d}
  #creditCorrectionModal .credit-warning-box{margin-top:12px!important;font-size:8px!important;line-height:1.45!important}
  #creditCorrectionModal #confirmCreditCorrectionBtn{background:#17181c!important;color:#fff!important}
  #creditCorrectionModal #confirmCreditCorrectionBtn:disabled{opacity:.42!important}
}

@media(max-width:390px){
  #creditCorrectionModal .credit-modal-head{margin-inline:-13px!important;padding-inline:13px!important}
  .credit-correction-comparison strong{font-size:15px}
}

/* v707: Credit messages follow the existing Manage toast style. */
.credit-message-toast {
  position:fixed;left:50%;top:calc(12px + env(safe-area-inset-top));bottom:auto;z-index:2147483647;
  box-sizing:border-box;width:min(380px,calc(100vw - 28px));padding:12px 14px;
  display:flex;align-items:center;gap:10px;border:1px solid #dfe9e3;border-radius:14px;
  background:#fff;color:#191a1e;box-shadow:0 16px 40px rgba(17,24,20,.18);
  opacity:0;transform:translate(-50%,-12px);transition:opacity .2s ease,transform .2s ease;
  pointer-events:none;font-family:inherit;text-align:left;
}
.credit-message-toast.show {opacity:1;transform:translate(-50%,0)}
.credit-message-toast > i {
  flex:0 0 32px;width:32px;height:32px;display:grid;place-items:center;
  border-radius:50%;background:#e7f8ed;color:#16854c;font-size:13px;
}
.credit-message-toast.warning {border-color:#eadbb7}
.credit-message-toast.warning > i {background:#fff4d8;color:#a27818}
.credit-message-toast.error {border-color:#eed3cf}
.credit-message-toast.error > i {background:#fcece9;color:#b34c40}
.credit-message-toast.info > i {background:#eef1f7;color:#596785}
.credit-message-toast > span {min-width:0;display:grid;gap:4px}
.credit-message-toast strong {color:#18191d;font-size:12px;font-weight:900;line-height:1.3}
.credit-message-toast small {color:#777980;font-size:11px;font-weight:650;line-height:1.45;overflow-wrap:anywhere;white-space:normal}
@media(prefers-reduced-motion:reduce){.credit-message-toast{transition:none}}

/* v709: Duplicate-phone guidance remains visible beside the affected field. */
#creditPhone.credit-phone-invalid {
  border-color:#c75a50!important;background:#fffafa!important;
  box-shadow:0 0 0 2px rgba(199,90,80,.09)!important;
}
#creditPhoneError.credit-phone-error {
  display:block;margin-top:7px;color:#b34c40!important;
  font-size:11px!important;font-weight:650!important;line-height:1.4;
}

/* v710: Short form hints and locked phone number on existing customers. */
#creditPhone[readonly] {background:#f5f6f7!important;color:#777980!important;cursor:default}
#creditPaymentNote:invalid {color:#a1a1a6!important}
#creditPaymentNote option {color:#24262b}

/* v711: In-app note choices replace the native iPhone select menu. */
#creditPaymentNoteChoices.credit-payment-note-grid {
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%;
}
#creditPaymentNoteChoices > button {
  min-width:0;min-height:52px;padding:10px 8px;border:1px solid #dfe1e5;
  border-radius:14px;background:#fff;color:#666970;font:inherit;font-size:12px;
  font-weight:750;line-height:1.3;text-align:center;cursor:pointer;
  -webkit-appearance:none;appearance:none;
}
#creditPaymentNoteChoices > button.selected {
  border-color:#bd963a;background:#faf5e8;color:#73591c;
  box-shadow:0 3px 10px rgba(155,113,23,.06);
}
#creditPaymentNoteChoices > button:focus-visible {outline:2px solid #bd963a;outline-offset:2px}
#creditPaymentNoteChoices.invalid > button {border-color:#c75a50}

/* v712: Color the full overview according to its outstanding balance. */
.credit-overview-card.has-outstanding {
  background:#fff1ef!important;border-color:#efd5d1!important;
  box-shadow:0 9px 24px rgba(169,69,51,.055)!important;
}
.credit-overview-card.is-clear {
  background:#eef7f0!important;border-color:#cfe1d2!important;
  box-shadow:0 9px 24px rgba(44,91,59,.055)!important;
}
.credit-overview-card.has-outstanding .credit-overview-metrics article {
  background:#fff7f5!important;border-color:#efdcd8!important;
}
.credit-overview-card.is-clear .credit-overview-metrics article {
  background:#f5fbf6!important;border-color:#d6e8da!important;
}
.credit-overview-card.has-outstanding .credit-overview-collected {
  background:#fff7f5!important;border-color:#efdcd8!important;
}
.credit-overview-card.is-clear .credit-overview-collected {
  background:#f5fbf6!important;border-color:#d6e8da!important;
}

/* v743: consistent multi-select filter sheets. */

#pageContent #creditFilterModal { display:flex!important; position:fixed!important; inset:0!important; z-index:10050!important; align-items:flex-end!important; justify-content:center!important; padding:0!important; background:rgba(20,22,26,.36)!important; backdrop-filter:blur(5px)!important; }
#pageContent #creditFilterModal[hidden], #pageContent #creditFilterModal[aria-hidden="true"] { display:none!important; }
#pageContent #creditFilterModal .uf-sheet { display:flex!important; flex-direction:column!important; width:100%!important; max-width:560px!important; max-height:85dvh!important; padding:0!important; margin:0!important; overflow:hidden!important; border:0!important; border-radius:24px 24px 0 0!important; background:#f8f8fa!important; box-sizing:border-box!important; }
#pageContent #creditFilterModal .uf-handle { width:34px!important; height:4px!important; margin:9px auto 0!important; background:#d7d8dd!important; border-radius:99px!important; flex-shrink:0!important; }
#pageContent #creditFilterModal .uf-sheet > header { display:flex!important; align-items:flex-start!important; justify-content:space-between!important; gap:12px!important; padding:16px 15px 20px!important; margin:0!important; flex-shrink:0!important; border:0!important; background:transparent!important; text-align:left!important; }
#pageContent #creditFilterModal header small, #pageContent #creditFilterModal header .credit-eyebrow { color:#987426!important; font-size:9px!important; font-weight:800!important; letter-spacing:.16em!important; }
#pageContent #creditFilterModal header h3 { margin:6px 0 7px!important; font-size:23px!important; line-height:1.15!important; letter-spacing:-.035em!important; color:#18191d!important; }
#pageContent #creditFilterModal header p { margin:0!important; font-size:12px!important; line-height:1.45!important; color:#9599a1!important; font-weight:400!important; }
#pageContent #creditFilterModal header > button { display:flex!important; align-items:center!important; justify-content:center!important; width:38px!important; height:38px!important; flex-shrink:0!important; margin:0!important; padding:0!important; border:1px solid #e1e3e6!important; border-radius:12px!important; background:#fff!important; color:#3d4047!important; }
#pageContent #creditFilterModal .uf-body { padding:0 14px 16px!important; overflow-y:auto!important; min-height:0!important; }
#pageContent #creditFilterModal .uf-group { padding:13px!important; margin:0!important; border:1px solid #e2e3e7!important; border-radius:17px!important; background:#fff!important; }
#pageContent #creditFilterModal .uf-group-head { display:flex!important; align-items:center!important; gap:9px!important; margin-bottom:12px!important; }
#pageContent #creditFilterModal .uf-group-head > span { display:flex!important; align-items:center!important; justify-content:center!important; width:28px!important; height:28px!important; border-radius:9px!important; background:#f5eedb!important; color:#a67e28!important; font-size:13px!important; }
#pageContent #creditFilterModal .uf-group-head h4 { margin:0!important; color:#27292e!important; font-size:13px!important; font-weight:800!important; }
#pageContent #creditFilterModal .uf-choices { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:8px!important; margin:0!important; padding:0!important; border:0!important; background:transparent!important; }
#pageContent #creditFilterModal .uf-choices button { display:flex!important; align-items:center!important; justify-content:center!important; gap:7px!important; min-height:40px!important; padding:10px!important; border:1px solid #e1e3e6!important; border-radius:12px!important; background:#fff!important; color:#72757c!important; font-size:12px!important; font-weight:700!important; box-shadow:none!important; }
#pageContent #creditFilterModal .uf-choices button.selected, #pageContent #creditFilterModal .uf-choices button[aria-pressed="true"] { background:#f8f1df!important; border-color:#b58f39!important; color:#806322!important; }
#pageContent #creditFilterModal .uf-sheet footer { display:grid!important; grid-template-columns:1fr 2fr!important; gap:9px!important; flex-shrink:0!important; margin:0!important; padding:12px 15px calc(12px + env(safe-area-inset-bottom))!important; border-top:1px solid #e9e9ee!important; background:#fff!important; }
#pageContent #creditFilterModal footer button { height:44px!important; margin:0!important; padding:0 12px!important; border:1px solid #e1e3e6!important; border-radius:13px!important; background:#fff!important; color:#43464d!important; font-size:12px!important; font-weight:800!important; }
#pageContent #creditFilterModal footer button:last-child { background:#18191d!important; border-color:#18191d!important; color:#fff!important; }
#pageContent #creditFilterModal .uf-priority { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:50%; background:#806322; color:white; font-size:10px; }

#pageContent #creditFilterModal .uf-sheet::before { display:none!important; content:none!important; }
