/* ===== ACCOUNT PAGE ===== */
/* Loaded only by account.html. Shares @keyframes fadeIn with css/style.css. */

/* Hero */
.account-hero { background:linear-gradient(135deg,#0a0a0c 0%,var(--primary) 100%); padding:52px 0 44px; }
.account-hero-inner { display:flex; align-items:center; gap:24px; }
.account-avatar { width:72px; height:72px; border-radius:50%; background:var(--accent); color:var(--white); display:flex; align-items:center; justify-content:center; font-size:1.7rem; font-weight:800; letter-spacing:-.02em; flex-shrink:0; box-shadow:0 0 0 4px rgba(255,255,255,.1); }
.account-hero-name { font-size:clamp(1.35rem,3vw,1.9rem); font-weight:800; color:var(--white); letter-spacing:-.04em; margin-bottom:4px; }
.account-hero-meta { font-size:.875rem; color:rgba(255,255,255,.5); }
.account-hero-actions { margin-top:16px; display:flex; gap:10px; flex-wrap:wrap; }

/* Page */
.account-section { background:var(--off-white); min-height:60vh; padding:36px 0 80px; }
.account-layout { display:grid; grid-template-columns:230px 1fr; gap:28px; align-items:start; }

/* ── Sidebar ── */
.account-sidebar { background:var(--white); border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); overflow:hidden; position:sticky; top:90px; }
.account-sidebar-section { padding:8px; }
.account-sidebar-label { font-size:.68rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--mid-grey); padding:14px 14px 6px; display:block; }
.account-nav-item { display:flex; align-items:center; gap:11px; padding:10px 14px; border-radius:var(--radius); font-size:.9rem; font-weight:500; color:var(--dark-grey); background:none; border:none; cursor:pointer; width:100%; text-align:left; font-family:var(--font); transition:all var(--transition); text-decoration:none; margin-bottom:1px; }
.account-nav-item svg { width:17px; height:17px; flex-shrink:0; color:var(--mid-grey); transition:color var(--transition); }
.account-nav-item:hover { background:var(--off-white); color:var(--text); }
.account-nav-item:hover svg { color:var(--accent); }
.account-nav-item.active { background:rgba(230,57,70,.08); color:var(--accent); font-weight:600; }
.account-nav-item.active svg { color:var(--accent); }
.account-sidebar-divider { height:1px; background:var(--border); margin:4px 0; }
.account-nav-link { color:var(--mid-grey); font-size:.875rem; }

/* ── Content panels ── */
.account-main { display:block; }
.account-tab-panel { display:none; }
.account-tab-panel.active { display:block; animation:fadeIn .2s ease; }
.account-panel-header { margin-bottom:24px; }
.account-panel-header h2 { font-size:1.4rem; letter-spacing:-.03em; margin-bottom:5px; }
.account-panel-sub { font-size:.875rem; color:var(--mid-grey); margin:0; max-width:52ch; }
.account-subheader { display:flex; align-items:center; justify-content:space-between; margin:32px 0 14px; }
.account-subheader h3 { font-size:.95rem; font-weight:700; }
.account-view-all { background:none; border:none; color:var(--accent); font-size:.82rem; font-weight:600; cursor:pointer; font-family:var(--font); transition:color var(--transition); }
.account-view-all:hover { color:var(--accent-dark); }

/* ── Stats grid ── */
.account-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:32px; }
.stat-card { background:var(--white); border-radius:var(--radius-lg); padding:20px 18px; box-shadow:var(--shadow-sm); position:relative; overflow:hidden; }
.stat-card::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; opacity:0; transition:opacity var(--transition); }
.stat-card:nth-child(1)::before { background:var(--accent); }
.stat-card:nth-child(2)::before { background:#d97706; }
.stat-card:nth-child(3)::before { background:#2563eb; }
.stat-card:nth-child(4)::before { background:#16a34a; }
.stat-card:hover::before { opacity:1; }
.stat-icon { width:42px; height:42px; border-radius:var(--radius); display:flex; align-items:center; justify-content:center; margin-bottom:14px; }
.stat-value { font-size:1.9rem; font-weight:800; letter-spacing:-.05em; color:var(--text); line-height:1; margin-bottom:5px; }
.stat-label { font-size:.72rem; font-weight:700; color:var(--mid-grey); text-transform:uppercase; letter-spacing:.06em; }

/* ── Order list ── */
.order-list { display:flex; flex-direction:column; gap:8px; }
.order-card { background:var(--white); border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); padding:18px 20px; cursor:pointer; transition:all var(--transition); display:flex; align-items:center; gap:16px; border-left:3px solid transparent; }
.order-card:hover { box-shadow:var(--shadow-md); transform:translateY(-2px); border-left-color:var(--accent); }
.order-card-ref { flex-shrink:0; min-width:96px; }
.order-ref-num { font-size:.9rem; font-weight:700; letter-spacing:.03em; color:var(--text); margin-bottom:3px; }
.order-card-date { font-size:.75rem; color:var(--mid-grey); }
.order-card-desc { flex:1; min-width:0; }
.order-qty { font-size:.82rem; font-weight:600; color:var(--dark-grey); display:block; margin-bottom:2px; }
.order-names { font-size:.78rem; color:var(--mid-grey); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; }
.order-card-meta { flex-shrink:0; text-align:right; min-width:110px; }
.order-total-val { font-size:1rem; font-weight:700; margin-bottom:5px; color:var(--text); }
.order-status-badge { display:inline-block; padding:4px 10px; border-radius:100px; font-size:.68rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; white-space:nowrap; }
.order-card-actions { flex-shrink:0; display:flex; align-items:center; gap:8px; }
.order-card-chevron { width:18px; height:18px; color:var(--mid-grey); flex-shrink:0; }

/* ── Empty state ── */
.account-empty { text-align:center; padding:72px 24px; background:var(--white); border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); }
.account-empty h3 { font-size:1.1rem; margin-bottom:8px; }

/* ── Details form ── */
.details-card { background:var(--white); border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); padding:32px; }
.details-section-title { font-size:.72rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--mid-grey); margin-bottom:18px; padding-bottom:10px; border-bottom:1px solid var(--border); }
.details-card .form-group label { font-size:.82rem; }
.details-save-row { margin-top:28px; display:flex; align-items:center; gap:16px; flex-wrap:wrap; padding-top:24px; border-top:1px solid var(--border); }
.details-save-hint { font-size:.78rem; color:var(--mid-grey); margin:0; }

/* ===== ORDER MODAL ===== */
.order-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:3000; display:flex; align-items:flex-end; justify-content:center; opacity:0; pointer-events:none; transition:opacity .25s; }
.order-modal-overlay.open { opacity:1; pointer-events:all; }
@media (min-width:640px) { .order-modal-overlay { align-items:center; padding:24px; } }
.order-modal { background:var(--white); border-radius:var(--radius-lg) var(--radius-lg) 0 0; width:100%; max-width:640px; max-height:92vh; display:flex; flex-direction:column; transform:translateY(100%); transition:transform .35s cubic-bezier(.4,0,.2,1); }
@media (min-width:640px) { .order-modal { border-radius:var(--radius-lg); transform:scale(.96) translateY(12px); } }
.order-modal-overlay.open .order-modal { transform:translateY(0); }
@media (min-width:640px) { .order-modal-overlay.open .order-modal { transform:scale(1) translateY(0); } }
.order-modal-header { display:flex; align-items:center; justify-content:space-between; padding:16px 22px; border-bottom:1px solid var(--border); flex-shrink:0; }
.order-modal-header span { font-size:.75rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--mid-grey); }
.modal-close-btn { width:30px; height:30px; border-radius:50%; background:var(--off-white); border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background var(--transition); color:var(--dark-grey); }
.modal-close-btn:hover { background:var(--border); }
.order-modal-body { padding:24px; overflow-y:auto; flex:1; overscroll-behavior:contain; }
.modal-order-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:24px; padding-bottom:20px; border-bottom:1px solid var(--border); }

/* Progress */
.order-progress { margin-bottom:28px; }
.order-progress-track { height:4px; background:var(--border); border-radius:2px; margin-bottom:16px; }
.order-progress-fill { height:100%; background:linear-gradient(90deg,var(--accent-dark),var(--accent)); border-radius:2px; transition:width .7s cubic-bezier(.4,0,.2,1); }
.order-progress-steps { display:flex; justify-content:space-between; }
.progress-step { display:flex; flex-direction:column; align-items:center; gap:7px; flex:1; min-width:0; }
.progress-dot { width:22px; height:22px; border-radius:50%; background:var(--white); border:2px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:.6rem; font-weight:700; color:var(--mid-grey); transition:all .3s; flex-shrink:0; }
.progress-step.done .progress-dot { background:var(--accent); border-color:var(--accent); color:var(--white); box-shadow:0 0 0 3px rgba(230,57,70,.15); }
.progress-step.current .progress-dot { background:var(--accent); border-color:var(--accent); color:var(--white); box-shadow:0 0 0 5px rgba(230,57,70,.2); transform:scale(1.18); }
.progress-label { font-size:.62rem; font-weight:600; color:var(--mid-grey); text-align:center; line-height:1.3; }
.progress-step.done .progress-label, .progress-step.current .progress-label { color:var(--accent); }

/* Modal sections */
.modal-section { margin-bottom:22px; padding-bottom:22px; border-bottom:1px solid var(--border); }
.modal-section:last-of-type { border-bottom:none; margin-bottom:0; padding-bottom:0; }
.modal-section-title { font-size:.72rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--mid-grey); margin-bottom:14px; display:flex; align-items:center; gap:7px; }
.modal-section-title svg { width:14px; height:14px; }

/* Modal item rows */
.modal-item { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--border); }
.modal-item:last-of-type { border-bottom:none; }
.modal-item-swatch { width:30px; height:30px; border-radius:8px; flex-shrink:0; border:1px solid rgba(0,0,0,.07); }
.modal-item-info { flex:1; min-width:0; }
.modal-item-name { font-size:.875rem; font-weight:600; margin-bottom:2px; }
.modal-item-meta { font-size:.75rem; color:var(--mid-grey); }
.modal-item-qty { font-size:.82rem; color:var(--mid-grey); flex-shrink:0; padding-right:4px; }
.modal-item-price { font-size:.9rem; font-weight:700; flex-shrink:0; }
.modal-order-total { display:flex; justify-content:space-between; align-items:center; padding:14px 0 0; margin-top:6px; border-top:2px solid var(--border); }
.modal-order-total span { font-size:.875rem; color:var(--mid-grey); }
.modal-order-total strong { font-size:1.15rem; font-weight:800; }

/* Proof notice */
.proof-notice { background:#eff6ff; border:1.5px solid #bfdbfe; border-radius:var(--radius); padding:16px 18px; }
.proof-notice strong { display:block; font-size:.9rem; color:#1e40af; margin-bottom:6px; }
.proof-notice p { font-size:.82rem; color:#3b82f6; margin:0 0 5px; max-width:100%; }
.proof-hint { color:#6b7280 !important; font-size:.78rem !important; }
.proof-hint a { color:#2563eb; text-decoration:underline; }

/* Tracking */
.tracking-table { border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.tracking-row { display:flex; justify-content:space-between; align-items:center; padding:11px 16px; border-bottom:1px solid var(--border); font-size:.875rem; background:var(--white); }
.tracking-row:nth-child(even) { background:var(--off-white); }
.tracking-row:last-child { border-bottom:none; }
.tracking-row > span:first-child { color:var(--mid-grey); font-size:.82rem; }
.tracking-num { font-family:monospace; letter-spacing:.04em; font-size:.9rem; }

/* Delivery address */
.delivery-address-text { font-size:.875rem; line-height:1.9; color:var(--dark-grey); background:var(--off-white); padding:14px 16px; border-radius:var(--radius); border:1px solid var(--border); }

/* Modal actions */
.modal-actions { display:flex; gap:10px; flex-wrap:wrap; padding-top:16px; border-top:1px solid var(--border); margin-top:4px; }

/* ===== ACCOUNT — RESPONSIVE ===== */
@media (max-width:960px) {
  .account-layout { grid-template-columns:1fr; gap:0; }
  .account-sidebar { position:static; border-radius:0; box-shadow:none; border-bottom:1px solid var(--border); }
  .account-sidebar-section { padding:0; }
  .account-sidebar-label { display:none; }
  .account-sidebar .account-nav-item { display:inline-flex; width:auto; border-radius:0; padding:14px 18px; font-size:.85rem; border-bottom:2px solid transparent; margin-bottom:0; }
  .account-sidebar { display:flex; flex-direction:row; overflow-x:auto; -webkit-overflow-scrolling:touch; flex-wrap:nowrap; gap:0; }
  .account-sidebar .account-nav-item.active { background:none; border-bottom-color:var(--accent); color:var(--accent); }
  .account-sidebar .account-nav-item:hover { background:var(--off-white); }
  .account-sidebar-divider { display:none; }
  .account-nav-link { display:none; }
  .account-main { margin-top:24px; }
  .account-stats { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:600px) {
  .account-hero { padding:32px 0 28px; }
  .account-avatar { width:56px; height:56px; font-size:1.35rem; }
  .account-stats { grid-template-columns:repeat(2,1fr); gap:10px; }
  .account-section { padding:24px 0 60px; }
  .order-card { flex-wrap:wrap; gap:10px; }
  .order-card-actions .btn { display:none; }
  .modal-actions { flex-direction:column; }
  .modal-actions .btn { width:100%; }
  .details-card { padding:20px 16px; }
}
