/* ===== My Account (builds on shop.css tokens) ===== */
.acct-wrap{max-width:880px;margin:0 auto;padding:2.25rem 1.5rem 4rem;min-height:60vh}

.acct-head{display:flex;align-items:center;gap:1rem;margin-bottom:1.75rem}
.acct-avatar{width:56px;height:56px;border-radius:50%;background:var(--green);color:#fff;display:flex;align-items:center;justify-content:center;font-size:1.3rem;font-weight:700;flex:none;text-transform:uppercase;box-shadow:0 6px 16px rgba(20,83,45,.25)}
.acct-head h1{font-size:1.6rem;font-weight:800;letter-spacing:-.02em;color:var(--gray-900);line-height:1.2}
.acct-email{font-size:.9rem;color:var(--gray-500);margin-top:.15rem;overflow:hidden;text-overflow:ellipsis}
.acct-head-text{min-width:0}

.acct-tabs{display:flex;gap:.35rem;padding:.3rem;background:var(--white);border:1px solid var(--gray-200);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);margin-bottom:1.5rem;overflow-x:auto;scrollbar-width:none}
.acct-tabs::-webkit-scrollbar{display:none}
.acct-tab{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:.45rem;padding:.65rem 1rem;border-radius:var(--radius);font-size:.9rem;font-weight:600;color:var(--gray-500);white-space:nowrap;transition:background .15s,color .15s}
.acct-tab:hover{color:var(--gray-900);background:var(--gray-50)}
.acct-tab.active{background:var(--green);color:#fff}

.acct-panel{display:none}
.acct-panel.active{display:block;animation:fadeIn .2s ease}

.acct-card{background:var(--white);border:1px solid var(--gray-200);border-radius:var(--radius-xl);box-shadow:var(--shadow-sm);padding:1.75rem}
.acct-card h2{font-size:1.2rem;font-weight:700;color:var(--gray-900);margin-bottom:.3rem}
.acct-card .card-sub{font-size:.88rem;color:var(--gray-500);margin-bottom:1.5rem}
.acct-card input:disabled{background:var(--gray-50);color:var(--gray-500);cursor:not-allowed}
.field-hint{font-size:.75rem;color:var(--gray-400);margin-top:.3rem}
.form-error{min-height:1.2em;font-size:.85rem;color:var(--red);margin:.25rem 0 .25rem}
.form-error:empty{min-height:0;margin:0}
.acct-submit{width:auto;min-width:200px;padding:.85rem 1.6rem;min-height:48px}
.acct-submit:disabled{opacity:.6;cursor:wait}
.pw-field{position:relative}
.pw-field input{padding-right:2.75rem}
.pw-eye{position:absolute;right:.4rem;top:50%;transform:translateY(-50%);width:36px;height:36px;border-radius:6px;display:flex;align-items:center;justify-content:center;color:var(--gray-400)}
.pw-eye:hover{color:var(--gray-800);background:var(--gray-100)}
.pw-eye.on{color:var(--green)}

/* ===== Orders ===== */
.orders-list{display:flex;flex-direction:column;gap:1rem}
.order-card{background:var(--white);border:1px solid var(--gray-200);border-radius:var(--radius-xl);box-shadow:var(--shadow-sm);overflow:hidden}
.sk-card{padding:1.4rem;display:flex;flex-direction:column;gap:.7rem}
.oc-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:1.1rem 1.35rem;border-bottom:1px solid var(--gray-100)}
.oc-num{font-weight:700;color:var(--gray-900);font-size:.98rem;font-variant-numeric:tabular-nums}
.oc-date{font-size:.8rem;color:var(--gray-500);margin-top:.15rem}
.oc-body{padding:1.1rem 1.35rem}

.st-badge{display:inline-flex;align-items:center;gap:.35rem;padding:.28rem .7rem;border-radius:999px;font-size:.75rem;font-weight:700;white-space:nowrap;border:1px solid transparent}
.st-badge::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.st-pending{background:#fffbeb;color:#b45309;border-color:#fde68a}
.st-confirmed{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}
.st-shipped{background:#f5f3ff;color:#6d28d9;border-color:#ddd6fe}
.st-delivered{background:var(--green-light);color:var(--green);border-color:var(--green-100)}
.st-cancelled{background:#fef2f2;color:#b91c1c;border-color:#fecaca}

/* progress tracker */
.tracker{display:flex;align-items:flex-start;margin:.25rem 0 1.25rem}
.tr-step{flex:1;display:flex;flex-direction:column;align-items:center;gap:.4rem;position:relative;text-align:center;min-width:0}
.tr-step::before{content:"";position:absolute;top:11px;right:50%;width:100%;height:2px;background:var(--gray-200);z-index:0}
.tr-step:first-child::before{display:none}
.tr-step.done::before,.tr-step.current::before{background:var(--green-600)}
.tr-dot{position:relative;z-index:1;width:24px;height:24px;border-radius:50%;background:var(--white);border:2px solid var(--gray-300);display:flex;align-items:center;justify-content:center;color:#fff}
.tr-dot .icon{width:13px;height:13px;stroke-width:3}
.tr-step.done .tr-dot{background:var(--green-600);border-color:var(--green-600)}
.tr-step.current .tr-dot{border-color:var(--green-600);box-shadow:0 0 0 4px rgba(22,163,74,.15)}
.tr-step.current .tr-dot::after{content:"";width:8px;height:8px;border-radius:50%;background:var(--green-600)}
.tr-label{font-size:.75rem;font-weight:600;color:var(--gray-400);line-height:1.25}
.tr-step.done .tr-label,.tr-step.current .tr-label{color:var(--gray-800)}
.cancel-note{display:flex;align-items:center;gap:.5rem;font-size:.85rem;color:#b91c1c;background:#fef2f2;border:1px solid #fecaca;border-radius:var(--radius);padding:.6rem .8rem;margin-bottom:1rem}
.status-note{font-size:.84rem;color:var(--gray-600);margin:-.4rem 0 1rem;text-align:center}

.oc-items{list-style:none;display:flex;flex-direction:column}
.oc-item{display:flex;justify-content:space-between;gap:1rem;padding:.5rem 0;font-size:.9rem;border-bottom:1px dashed var(--gray-200)}
.oc-item:last-child{border-bottom:none}
.oc-item-name{color:var(--gray-800);min-width:0;overflow:hidden;text-overflow:ellipsis}
.oc-item-name small{color:var(--gray-500);font-size:.8rem;margin-left:.25rem}
.oc-item-price{font-weight:600;color:var(--gray-900);white-space:nowrap;font-variant-numeric:tabular-nums}
.oc-more{font-size:.82rem;color:var(--gray-500);padding:.4rem 0}

.oc-details{display:none;margin-top:1rem;padding:1rem;background:var(--gray-50);border:1px solid var(--gray-100);border-radius:var(--radius);font-size:.86rem;color:var(--gray-700);gap:.6rem;flex-direction:column}
.order-card.open .oc-details{display:flex}
.oc-details div{display:flex;gap:.55rem;align-items:flex-start}
.oc-details .icon{width:16px;height:16px;color:var(--gray-400);flex:none;margin-top:.1rem}

.oc-foot{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.9rem 1.35rem;background:var(--gray-50);border-top:1px solid var(--gray-100)}
.oc-total{font-size:.88rem;color:var(--gray-500)}
.oc-total b{font-size:1.1rem;color:var(--gray-900);margin-left:.35rem;font-variant-numeric:tabular-nums}
.oc-toggle{display:inline-flex;align-items:center;gap:.3rem;font-size:.85rem;font-weight:600;color:var(--green);padding:.4rem .6rem;border-radius:6px}
.oc-toggle:hover{background:var(--green-light)}
.oc-toggle .icon{width:16px;height:16px;transition:transform .2s}
.order-card.open .oc-toggle .icon{transform:rotate(180deg)}

.orders-empty{text-align:center;padding:3.5rem 1.5rem;background:var(--white);border:1px dashed var(--gray-300);border-radius:var(--radius-xl)}
.orders-empty .ico{width:56px;height:56px;border-radius:50%;background:var(--green-light);color:var(--green);display:flex;align-items:center;justify-content:center;margin:0 auto 1rem}
.orders-empty h3{font-size:1.1rem;color:var(--gray-900);margin-bottom:.35rem}
.orders-empty p{color:var(--gray-500);font-size:.9rem;margin-bottom:1.25rem}
.orders-empty a{display:inline-flex;align-items:center;gap:.4rem;background:var(--green);color:#fff;padding:.75rem 1.4rem;border-radius:var(--radius);font-weight:600;font-size:.92rem;text-decoration:none}
.orders-empty a:hover{background:var(--green-mid)}

.cancel-note small{display:block;color:#7f1d1d;opacity:.85;margin-top:.15rem;font-size:.8rem}

/* footer actions */
.oc-actions{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;justify-content:flex-end}
.oc-btn{position:relative;display:inline-flex;align-items:center;gap:.35rem;font-size:.85rem;font-weight:600;padding:.45rem .75rem;border-radius:6px;border:1px solid var(--gray-200);background:var(--white);color:var(--gray-700);transition:all .15s}
.oc-btn .icon{width:16px;height:16px}
.oc-msg:hover,.oc-msg.active{border-color:var(--green);color:var(--green);background:var(--green-light)}
.oc-cancel{color:#b91c1c}
.oc-cancel:hover{border-color:#fca5a5;background:#fef2f2}
.unread-dot{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#dc2626;color:#fff;font-size:.68rem;font-weight:700;display:inline-flex;align-items:center;justify-content:center}

/* conversation */
.oc-chat{border-top:1px solid var(--gray-100);background:#fbfcfd}
.oc-chat[hidden]{display:none}
.chat-thread{max-height:340px;overflow-y:auto;padding:1rem 1.35rem;display:flex;flex-direction:column;gap:.65rem}
.chat-empty{text-align:center;font-size:.85rem;color:var(--gray-500);padding:.75rem 0}
.msg{max-width:80%;display:flex;flex-direction:column;gap:.2rem}
.msg.mine{align-self:flex-end;align-items:flex-end}
.msg.theirs{align-self:flex-start}
.msg-meta{font-size:.7rem;color:var(--gray-400);padding:0 .25rem}
.msg-body{padding:.6rem .85rem;border-radius:14px;font-size:.9rem;line-height:1.45;white-space:pre-wrap;word-break:break-word}
.msg.mine .msg-body{background:var(--green);color:#fff;border-bottom-right-radius:4px}
.msg.theirs .msg-body{background:var(--white);border:1px solid var(--gray-200);color:var(--gray-800);border-bottom-left-radius:4px}
.chat-form{display:flex;align-items:flex-end;gap:.5rem;padding:.75rem 1.35rem 1rem;border-top:1px solid var(--gray-100)}
.chat-form textarea{flex:1;resize:none;min-height:42px;max-height:140px;padding:.65rem .85rem;border:1px solid var(--gray-300);border-radius:10px;font:inherit;font-size:.9rem;outline:none;background:var(--white)}
.chat-form textarea:focus{border-color:var(--green-600);box-shadow:0 0 0 3px rgba(22,163,74,.12)}
.chat-send{width:42px;height:42px;flex:none;border-radius:10px;background:var(--green);color:#fff;display:flex;align-items:center;justify-content:center;transition:background .15s}
.chat-send:hover{background:var(--green-mid)}
.chat-send:disabled{opacity:.5}
.chat-send .icon{width:18px;height:18px}

/* dialog */
.dialog{position:fixed;inset:0;z-index:400;display:none;align-items:center;justify-content:center;padding:1rem}
.dialog.open{display:flex}
.dialog-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.5)}
.dialog-card{position:relative;width:100%;max-width:440px;background:var(--white);border-radius:var(--radius-xl);box-shadow:var(--shadow-lg);padding:1.5rem;animation:fadeIn .15s ease}
.dialog-card h3{font-size:1.15rem;color:var(--gray-900);margin-bottom:.4rem}
.dialog-card>p{font-size:.88rem;color:var(--gray-600);margin-bottom:1rem;line-height:1.5}
.dialog-actions{display:flex;justify-content:flex-end;gap:.5rem;margin-top:.5rem}
.dialog-btn{padding:.65rem 1.1rem;border-radius:var(--radius);font-size:.9rem;font-weight:600;border:1px solid var(--gray-200);background:var(--white);color:var(--gray-700)}
.dialog-btn:hover{background:var(--gray-50)}
.dialog-btn.danger{background:#dc2626;border-color:#dc2626;color:#fff}
.dialog-btn.danger:hover{background:#b91c1c}
.dialog-btn:disabled{opacity:.6;cursor:wait}

@media (max-width:600px){
  .oc-foot{flex-direction:column;align-items:stretch}
  .oc-actions{justify-content:stretch}
  .oc-actions>*{flex:1;justify-content:center}
  .chat-thread,.chat-form{padding-left:1rem;padding-right:1rem}
  .msg{max-width:90%}
  .chat-form textarea,.dialog-card textarea{font-size:16px}
  .dialog-actions{flex-direction:column-reverse}
  .dialog-btn{width:100%}
  .acct-wrap{padding:1.5rem 1rem 3rem}
  .acct-head h1{font-size:1.3rem}
  .acct-avatar{width:48px;height:48px;font-size:1.1rem}
  .acct-tab{padding:.6rem .7rem;font-size:.85rem}
  .acct-card{padding:1.25rem}
  .acct-submit{width:100%}
  .form-row{grid-template-columns:1fr;gap:0}
  .oc-head,.oc-body,.oc-foot{padding-left:1rem;padding-right:1rem}
  .tr-label{font-size:.68rem}
  .acct-card input,.acct-card textarea{font-size:16px}
}
