/* ===== Customer account: nav menu + sign-in / sign-up / verify modal ===== */

.account-wrap{position:relative}
.account-menu{position:absolute;right:0;top:calc(100% + .4rem);min-width:230px;background:var(--white);border:1px solid var(--gray-200);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);padding:.5rem;z-index:300;display:none}
.account-menu.open{display:block}
.account-menu-head{padding:.6rem .7rem .7rem;border-bottom:1px solid var(--gray-100);margin-bottom:.35rem}
.account-menu-name{font-weight:600;color:var(--gray-900);font-size:.92rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-menu-email{font-size:.8rem;color:var(--gray-500);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-menu button{width:100%;text-align:left;padding:.6rem .7rem;border-radius:var(--radius);font-size:.9rem;color:var(--gray-600);transition:background .15s,color .15s}
.account-menu button:hover{background:var(--gray-100);color:var(--red)}
.account-menu a{display:flex;align-items:center;gap:.6rem;padding:.6rem .7rem;border-radius:var(--radius);font-size:.9rem;color:var(--gray-700);text-decoration:none;transition:background .15s,color .15s}
.account-menu a .icon{color:var(--gray-400)}
.account-menu a:hover{background:var(--gray-100);color:var(--gray-900)}
.account-menu a:hover .icon{color:var(--green)}
.account-menu-sep{height:1px;background:var(--gray-100);margin:.35rem 0}
/* checkout: save delivery details to profile */
.save-details{display:flex;align-items:center;gap:.55rem;font-size:.86rem;color:var(--gray-600);margin:-.25rem 0 1rem;cursor:pointer}
.save-details[hidden]{display:none}
.save-details input{width:16px;height:16px;accent-color:var(--green)}
/* success page */
.success-actions{display:flex;justify-content:center;align-items:center;gap:.75rem;flex-wrap:wrap}
.track-order-btn{display:inline-flex;align-items:center;gap:.5rem;padding:.85rem 1.5rem;margin-top:1.5rem;border-radius:var(--radius);border:1px solid var(--gray-300);color:var(--gray-800);font-size:.95rem;font-weight:600;text-decoration:none;transition:border-color .15s,color .15s,background .15s}
.track-order-btn:hover{border-color:var(--green);color:var(--green);background:var(--green-light)}

.auth-overlay{position:fixed;inset:0;background:rgba(15,23,42,.5);backdrop-filter:blur(2px);opacity:0;pointer-events:none;transition:opacity .2s ease;z-index:999}
.auth-overlay.open{opacity:1;pointer-events:auto}
.auth-modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-46%) scale(.98);width:min(calc(100vw - 32px),420px);max-height:calc(100vh - 32px);overflow-y:auto;background:var(--white);border-radius:var(--radius-xl);box-shadow:0 24px 64px rgba(15,23,42,.25);padding:2rem 1.75rem 1.75rem;opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s ease;z-index:1000}
.auth-modal.open{opacity:1;pointer-events:auto;transform:translate(-50%,-50%) scale(1)}
.auth-close{position:absolute;top:.85rem;right:.85rem;width:34px;height:34px;border-radius:var(--radius);display:flex;align-items:center;justify-content:center;color:var(--gray-500);transition:background .15s,color .15s}
.auth-close:hover{background:var(--gray-100);color:var(--gray-900)}

.auth-view[hidden]{display:none}
.auth-icon{width:52px;height:52px;border-radius:50%;background:var(--green-light);color:var(--green-mid);display:flex;align-items:center;justify-content:center;margin-bottom:1rem}
.auth-view h2{font-size:1.35rem;font-weight:800;letter-spacing:-.02em;color:var(--gray-900);margin-bottom:.3rem}
.auth-sub{font-size:.9rem;color:var(--gray-500);margin-bottom:1.4rem;line-height:1.5}
.auth-sub strong{color:var(--gray-800);word-break:break-all}

.auth-notice{background:var(--amber-light);color:var(--amber);border-radius:var(--radius);padding:.7rem .85rem;font-size:.85rem;font-weight:500;margin-bottom:1.1rem;line-height:1.45}
.auth-notice[hidden]{display:none}
.auth-error{color:var(--red);background:var(--red-light);border-radius:var(--radius);padding:.6rem .8rem;font-size:.85rem;margin-bottom:.9rem;display:none;line-height:1.45}
.auth-error.show{display:block}
.auth-error.info{color:var(--green-mid);background:var(--green-light)}

.auth-modal .place-order-btn:disabled{opacity:.6;cursor:wait}
.auth-hint{font-size:.78rem;color:var(--gray-500);margin-top:.35rem}
.auth-code{letter-spacing:.5em;text-align:center;font-size:1.35rem !important;font-weight:600;font-variant-numeric:tabular-nums}

.auth-switch{text-align:center;font-size:.88rem;color:var(--gray-500);margin-top:1.1rem}
.auth-link{color:var(--green-600);font-weight:600;font-size:inherit}
.auth-link:hover{text-decoration:underline}
.auth-link:disabled{color:var(--gray-400);cursor:default;text-decoration:none}
.auth-row{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-top:1rem;font-size:.86rem;flex-wrap:wrap}

.checkout-account{display:flex;align-items:center;gap:.45rem;font-size:.85rem;color:var(--gray-600);background:var(--gray-50);border:1px solid var(--gray-200);border-radius:var(--radius);padding:.55rem .75rem;margin:-.75rem 0 1.4rem}
.checkout-account strong{color:var(--gray-900);font-weight:600;word-break:break-all}
.checkout-account[hidden]{display:none}

@media (max-width:480px){
  .auth-modal{padding:1.75rem 1.25rem 1.4rem}
}
/* checkout: required phone */
.field-error{font-size:.8rem;color:var(--red);margin-top:.35rem;min-height:0}
.field-error:empty{display:none}
.form-group input.invalid{border-color:var(--red);box-shadow:0 0 0 3px rgba(185,28,28,.1)}
/* sign-in: "Forgot password?" beside the label */
.label-row{display:flex;justify-content:space-between;align-items:baseline;gap:.75rem;margin-bottom:.4rem}
.label-row label{margin-bottom:0}
.auth-link.small{font-size:.8rem}
