/* ============================================================
   PROFILE.CSS — User Profile & Auth Pages
   ============================================================ */

.profile-page {
  background: var(--surface-sunken);
  min-height: 100vh;
  padding-block: var(--space-10);
}

/* ── Auth Panels ─────────────────────────────────────────── */
.auth-wrap {
  max-width: 440px;
  margin-inline: auto;
}
.auth-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.auth-header {
  padding: var(--space-6) var(--space-6) var(--space-5);
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.auth-logo {
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 18px;
  margin: 0 auto var(--space-3);
  line-height: 0;
}
.auth-title {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-1);
}
.auth-subtitle { font-size: var(--text-sm); color: var(--text-muted); }
.auth-body { padding: var(--space-6); }
.auth-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  background: var(--surface-sunken);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-block: var(--space-5);
  font-size: var(--text-xs);
  color: var(--text-faint);
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: 0.65em 1.25em;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  font-family: var(--font-family);
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.btn-google:hover { background: var(--surface-sunken); border-color: var(--neutral-400); }
.btn-google-icon { font-size: 1.2rem; }

/* ── Profile Layout ──────────────────────────────────────── */
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-6);
  align-items: start;
}

/* ── Profile Sidebar ──────────────────────────────────────── */
.profile-sidebar {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  position: sticky;
  top: 80px;
}
.profile-sidebar-header {
  padding: var(--space-6);
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--brand-50), var(--brand-100));
}
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--brand-200);
  border: 3px solid var(--surface-raised);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-inline: auto;
  margin-bottom: var(--space-3);
  position: relative;
  overflow: hidden;
}
.profile-name {
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  color: var(--text);
  margin-bottom: var(--space-1);
}
.profile-id {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.profile-verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  color: var(--color-success);
  margin-top: var(--space-2);
}

.profile-nav { padding: var(--space-3); }
.profile-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: right;
}
.profile-nav-link:hover { background: var(--surface-sunken); color: var(--text); }
.profile-nav-link.active { background: var(--brand-50); color: var(--color-primary); }
.profile-nav-icon { font-size: 1.1rem; }

/* ── Profile Content ──────────────────────────────────────── */
.profile-content {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
}
.profile-section-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.profile-section-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
}
.profile-section-body { padding: var(--space-6); }

/* ── Role Selector ────────────────────────────────────────── */
.role-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.role-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  background: none;
  text-align: right;
  font-family: var(--font-family);
}
.role-card:hover { border-color: var(--brand-400); background: var(--brand-50); }
.role-card.selected { border-color: var(--brand-600); background: var(--brand-50); }
.role-card-icon { font-size: 1.5rem; }
.role-card-name { font-size: var(--text-sm); font-weight: var(--font-weight-semibold); color: var(--text); }
.role-card-desc { font-size: var(--text-xs); color: var(--text-muted); }

/* ── Referral Stats ───────────────────────────────────────── */
.referral-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.referral-stat-card {
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-5);
  text-align: center;
}
.referral-stat-value {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  display: block;
  margin-bottom: var(--space-1);
}
.referral-stat-label { font-size: var(--text-xs); color: var(--text-muted); }

/* Commission tiers */
.commission-tiers {
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-5);
}
.commission-tier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
}
.commission-tier-row:last-child { border-bottom: none; }
.commission-tier-row.active-tier {
  background: var(--brand-50);
  border-right: 3px solid var(--brand-600);
}

/* Referral link row */
.referral-link-row {
  display: flex;
  gap: var(--space-2);
  align-items: stretch;
  margin-bottom: var(--space-4);
}
.referral-link-input {
  flex: 1;
  padding: 0.55em 0.9em;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  font-family: var(--font-family);
  font-size: var(--text-sm);
  color: var(--text-muted);
  direction: ltr;
  text-align: right;
}

/* ── Auth OTP (auth.html) ─────────────────────────────────── */
.auth-tabs{display:flex;gap:var(--space-2);margin-bottom:var(--space-6);background:var(--surface-raised);border:1px solid var(--border);border-radius:var(--radius-full);padding:4px;max-width:440px;margin-inline:auto}
.auth-tab{flex:1;padding:10px;border-radius:999px;font-size:var(--text-sm);font-weight:600;color:var(--text-muted);cursor:pointer;border:none;background:none;font-family:var(--font-family);transition:all var(--transition-fast)}
.auth-tab.active{background:var(--brand-600);color:#fff;box-shadow:var(--shadow-sm)}
.auth-subtabs{display:flex;gap:6px;margin-bottom:var(--space-5);background:var(--surface-sunken);border-radius:999px;padding:3px}
.auth-subtab{flex:1;padding:8px 10px;border-radius:999px;font-size:var(--text-xs);font-weight:600;color:var(--text-muted);border:none;background:none;cursor:pointer;font-family:var(--font-family)}
.auth-subtab.active{background:var(--surface-raised);color:var(--brand-700);box-shadow:0 1px 4px rgba(0,0,0,.08);border:1px solid var(--border)}
/* ── Dashboard overhaul (TASK 4) ──────────────────────────── */
.profile-role-chip{margin-top:8px;font-size:11px;font-weight:700;background:rgba(255,255,255,.55);border:1px solid rgba(255,255,255,.6);color:var(--brand-800);border-radius:var(--radius-full);padding:4px 10px;display:inline-block}
.profile-upline{margin-top:8px;font-size:10.5px;line-height:1.8;color:var(--brand-800);background:linear-gradient(135deg,#ecfdf5,#f7fdf9);border:1px solid #a7f3d0;border-radius:var(--radius-md);padding:7px 9px;text-align:right}
.profile-mini-preview{display:flex;flex-wrap:wrap;gap:6px}
.profile-footnote{font-size:11px;color:var(--text-muted);line-height:2;margin-top:14px;border-top:1px dashed var(--border);padding-top:10px}
.subset-h{font-size:13px;font-weight:800;margin:18px 0 10px;padding-inline-start:10px;border-inline-start:3px solid var(--brand-500)}
.role-cards--3{grid-template-columns:repeat(3,1fr)!important}
.role-card.is-selected{border-color:var(--brand-600);background:var(--brand-50);box-shadow:0 0 0 3px rgba(46,142,46,.12)}
.role-card.is-locked{opacity:.5;cursor:not-allowed;position:relative}
.role-card.is-locked::after{content:"🔒";position:absolute;top:8px;inset-inline-end:8px;font-size:12px}
.producer-lock{margin:10px 0;font-size:11.5px;line-height:1.9;font-weight:700;color:#92400e;background:#fffbeb;border:1px solid #fde68a;border-radius:var(--radius-md);padding:10px 12px}
.intro-box{background:var(--surface-sunken);border:1px solid var(--border);border-radius:var(--radius-lg);padding:14px}
.tier-progress{margin-top:14px}
.tier-progress-bar{height:10px;border-radius:999px;background:var(--surface-sunken);overflow:hidden;border:1px solid var(--border)}
.tier-progress-bar>span{display:block;height:100%;width:0;background:linear-gradient(90deg,#059669,#10b981);transition:width .4s}
.tier-progress-meta{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:11px;color:var(--text-muted);margin-top:6px}
.downline-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:var(--radius-lg)}
.downline-table{width:100%;border-collapse:collapse;font-size:12px;min-width:640px}
.downline-table th{background:var(--surface-sunken);padding:9px;text-align:right;font-weight:700;white-space:nowrap}
.downline-table td{padding:9px;border-top:1px solid var(--border);vertical-align:middle}
.downline-table tr:hover td{background:var(--brand-50)}
@media (max-width:640px){.role-cards--3{grid-template-columns:1fr!important}}

/* ── Auth OTP (auth.html) ─────────────────────────────────── */
.otp-row{display:flex;gap:6px;justify-content:center;direction:ltr;margin-block:var(--space-3)}
.otp-input{width:44px;height:48px;text-align:center;font-size:1.25rem;font-weight:700;border:1.5px solid var(--border);border-radius:var(--radius-lg);background:var(--surface-raised);font-family:var(--font-family);font-variant-numeric:tabular-nums;transition:border-color var(--transition-fast),box-shadow var(--transition-fast)}
.otp-input:focus{outline:none;border-color:var(--brand-500);box-shadow:var(--shadow-focus)}
.otp-input.error{border-color:var(--color-danger);background:var(--color-danger-bg)}
.field-error{font-size:var(--text-xs);color:var(--color-danger);margin-top:6px;display:none}
.field-error.visible{display:block}
.otp-meta{display:flex;align-items:center;justify-content:space-between;font-size:var(--text-xs);color:var(--text-muted);margin-top:var(--space-2)}
.otp-timer{font-variant-numeric:tabular-nums;font-weight:700;color:var(--brand-700)}
.btn-resend{font-size:var(--text-xs);color:var(--brand-700);font-weight:600;background:none;border:none;cursor:pointer;font-family:var(--font-family)}
.btn-resend:disabled{opacity:.45;cursor:not-allowed}
.reg-steps{display:flex;gap:6px;margin-bottom:var(--space-5)}
.reg-step{flex:1;height:4px;border-radius:999px;background:var(--border)}
.reg-step.done{background:var(--brand-500)}
.reg-step.active{background:var(--brand-600)}


/* ---- wallet ---- */
.wallet-balance-card{background:linear-gradient(135deg,var(--brand-600),var(--brand-700));color:#fff;border-radius:16px;padding:18px;margin-bottom:12px;box-shadow:0 10px 24px rgba(46,142,46,.22)}
.wallet-balance-label{font-size:12px;opacity:.9}
.wallet-balance-value{font-size:30px;font-weight:900;letter-spacing:.02em;margin-top:4px;font-variant-numeric:tabular-nums}
.wallet-balance-value small{font-size:14px;font-weight:700}
.wallet-balance-meta{display:flex;gap:16px;flex-wrap:wrap;font-size:11.5px;opacity:.95;margin-top:10px;border-top:1px solid rgba(255,255,255,.25);padding-top:10px}
.wallet-balance-meta strong{font-weight:800}
.wallet-form-box{background:var(--surface-sunken);border:1px solid var(--border);border-radius:14px;padding:14px;margin-bottom:8px}
.wallet-form-box .form-group{margin-bottom:10px}
.wallet-form-box .btn{margin-top:2px}
.wallet-bank-account{background:var(--surface-sunken);border:1px solid var(--border);border-radius:14px;padding:14px;margin-bottom:8px}
.wallet-bank-account [hidden]{display:none!important}
.wallet-bank-view{background:var(--surface-raised);border:1px solid var(--border);border-radius:12px;padding:13px}
.wallet-bank-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.wallet-bank-title{font-size:12.5px;font-weight:800;color:var(--brand-800)}
.wallet-bank-owner{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11.5px;color:var(--text-muted);padding-bottom:9px;margin-bottom:9px;border-bottom:1px dashed var(--border)}
.wallet-bank-owner strong{font-size:12.5px;color:var(--text);font-weight:800}
.wallet-bank-rows{display:grid;gap:7px;margin-bottom:11px}
.wallet-bank-row{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11.5px;color:var(--text-muted)}
.wallet-bank-row strong{font-size:12px;color:var(--text);font-weight:800;letter-spacing:.02em;direction:ltr;text-align:left}
.wallet-bank-warning{font-size:11px;line-height:1.9;font-weight:700;color:#92400e;background:#fffbeb;border:1px solid #fde68a;border-radius:10px;padding:8px 10px;margin:0 0 10px}
.wallet-bank-note{font-size:11.5px;line-height:2;color:var(--text-muted);margin:0 0 10px}
.wallet-bank-note strong{color:var(--brand-800)}
.wallet-bank-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.wallet-bank-actions .btn{margin-top:0}
.wallet-bank-form .form-control[readonly]{background:var(--surface-sunken);color:var(--text-muted);cursor:not-allowed}
.wallet-payout-target{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:11.5px;line-height:1.9;color:var(--brand-800);background:var(--brand-50);border:1px solid var(--brand-100,#d9f0d9);border-radius:10px;padding:8px 10px;margin-bottom:10px}
.wallet-payout-target strong{font-weight:800;direction:ltr}
.wallet-withdraw-lock{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:11.5px;line-height:1.9;font-weight:700;color:#92400e;background:#fffbeb;border:1px solid #fde68a;border-radius:10px;padding:9px 11px;margin-bottom:10px}
.wallet-withdraw-lock[hidden]{display:none!important}
.wallet-withdraw-lock .btn{margin-top:0}

/* ── Orders: cards, tracking, invoice & course downloads ─────── */
.ord-list-hint{display:flex;align-items:flex-start;gap:8px;margin-bottom:12px;padding:10px 12px;border:1px dashed #cfe7cf;border-radius:12px;background:#f4fbf2;color:#3f6b43;font-size:11px;line-height:1.9}
.ord-list-hint svg{flex:none;width:16px;height:16px;margin-top:2px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;color:var(--brand-600)}
.ord-card{position:relative;display:block;width:100%;margin-bottom:10px;padding:15px 16px;border:1px solid #e6dfd0;border-radius:16px;background:linear-gradient(160deg,#fffdf7,#fffaf0);box-shadow:0 6px 18px -16px rgba(42,64,32,.5);cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.ord-card:hover,.ord-card:focus-visible{border-color:#a8d6a5;box-shadow:0 14px 30px -20px rgba(24,74,33,.4);transform:translateY(-1px)}
.ord-card:focus-visible{outline:2px solid var(--brand-500);outline-offset:3px}
.ord-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.ord-order-id{display:inline-flex;align-items:center;gap:7px;color:var(--brand-900,#12351b);font-size:13px;font-weight:800}
.ord-order-id svg{width:19px;height:19px;fill:none;stroke:var(--brand-600);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ord-card .badge{font-size:9.5px;padding:4px 8px}
.ord-card-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:6px;color:#8a8172;font-size:10.5px}
.ord-dot{width:3px;height:3px;border-radius:50%;background:#c9c0ae}
.ord-mini-progress{height:7px;margin-top:11px;border-radius:3px;background:#eee6d6;overflow:hidden;box-shadow:inset 0 1px 1px rgba(40,40,20,.06)}
.ord-mini-progress>span{display:block;height:100%;border-radius:2px;background:linear-gradient(90deg,#d99a00,#f5c34d);transition:width .25s ease}
.ord-loc{display:flex;align-items:flex-start;gap:5px;margin-top:9px;color:#58634f;font-size:10.5px;line-height:1.8}
.ord-loc svg{flex:none;width:14px;height:14px;margin-top:2px;fill:none;stroke:#b77900;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ord-chips{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-top:9px}
.ord-chip{display:inline-flex;align-items:center;gap:4px;max-width:100%;padding:4px 7px;border:1px solid #dcead8;border-radius:6px;background:#f3faf1;color:#39633d;font-size:9px;font-weight:700;line-height:1.5}
.ord-chip svg{flex:none;width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ord-chip-code{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:190px;letter-spacing:.02em}
.ord-chip--track{background:#fff9eb;border-color:#f3dfae;color:#8a5a00}
.ord-chip--course{background:#eef8ff;border-color:#cbe5f7;color:#1e5d82}
.ord-chip--invoice{background:#f4f7ff;border-color:#d8def3;color:#44518a}
.ord-card-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:11px;padding-top:10px;border-top:1px dashed #e9e1d3}
.ord-items{display:inline-flex;align-items:flex-start;gap:5px;min-width:0;color:#7a7161;font-size:10.5px;line-height:1.8}
.ord-items svg{flex:none;width:13px;height:13px;margin-top:2px;fill:none;stroke:#9b8e78;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ord-items>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ord-card-cta{flex:none;display:inline-flex;align-items:center;gap:2px;color:var(--brand-700);font-size:10.5px;font-weight:800}
.ord-card-cta svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* Modal */
body.order-modal-open{overflow:hidden}
.order-modal{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:22px;opacity:1}
.order-modal.is-open{opacity:1}
.order-modal[hidden]{display:none!important}
.order-modal__backdrop{position:absolute;inset:0;background:rgba(5,25,13,.58);backdrop-filter:blur(4px)}
.order-modal__panel{position:relative;z-index:1;display:flex;flex-direction:column;width:min(780px,100%);max-height:88vh;overflow:hidden;border:1px solid #ded6c4;border-radius:22px;background:#fffdf7;box-shadow:0 34px 90px -28px rgba(4,20,11,.7);transform:none}
.order-modal.is-open .order-modal__panel{transform:none}
.order-modal__head{display:flex;align-items:center;justify-content:space-between;gap:14px;flex:none;padding:16px 20px;border-bottom:1px solid #e9e1d2;background:linear-gradient(135deg,#f4fbf2,#fff9ec)}
.order-modal__kicker{display:block;color:#8a7b63;font-size:10px;letter-spacing:normal}
.order-modal__title{margin:2px 0 0;color:#173a22;font-size:17px;font-weight:800}
.order-modal__close{flex:none;display:grid;place-items:center;width:34px;height:34px;border:1px solid #ded6c4;border-radius:50%;background:#fffdf7;color:#59664f;font-family:inherit;font-size:22px;line-height:1;cursor:pointer;transition:background .15s ease,border-color .15s ease,color .15s ease}
.order-modal__close:hover{background:#fff2cf;border-color:#e7c477;color:#6b4300}
.order-modal__close:focus-visible{outline:2px solid var(--brand-500);outline-offset:3px}
.order-modal__close svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.order-modal__body{padding:18px 20px 22px;overflow-y:auto;overscroll-behavior:contain}
.ord-detail{display:grid;gap:15px}
.ord-status-panel{position:relative;overflow:hidden;padding:19px 20px 17px;border-radius:18px;background:radial-gradient(120% 150% at 93% 0%,rgba(255,196,77,.24),transparent 44%),linear-gradient(135deg,#0a351c,#14532d 62%,#1e6a3a);color:#fff;box-shadow:0 16px 34px -24px rgba(10,53,28,.8)}
.ord-status-panel::after{content:"";position:absolute;inset-inline-start:-30px;bottom:-70px;width:190px;height:190px;border-radius:50%;border:1px solid rgba(255,255,255,.12);pointer-events:none}
.ord-status-panel.is-cancelled{background:linear-gradient(135deg,#4c1d1d,#7f1d1d)}
.ord-status-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.ord-status-kicker{color:#bff0c5;font-size:10px;font-weight:700;letter-spacing:normal}
.ord-status-badge{padding:4px 8px;border:1px solid rgba(255,255,255,.23);border-radius:5px;background:rgba(255,255,255,.13);color:#ffe4aa;font-size:9.5px;font-weight:700;backdrop-filter:blur(4px)}
.ord-status-title{margin:11px 0 7px;color:#fff;font-size:19px;font-weight:800;line-height:1.5}
.ord-status-location{display:flex;align-items:flex-start;gap:6px;margin:0;color:#d8f3d9;font-size:11.5px;line-height:1.9}
.ord-status-location svg{flex:none;width:15px;height:15px;margin-top:3px;fill:none;stroke:#ffd066;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ord-progress{height:9px;margin-top:14px;border-radius:3px;background:rgba(255,255,255,.17);box-shadow:inset 0 1px 2px rgba(0,0,0,.25);overflow:hidden}
.ord-progress>span{display:block;height:100%;border-radius:2px;background:linear-gradient(90deg,#d99a00,#ffd066);box-shadow:0 0 10px rgba(255,208,102,.3)}
.ord-status-meta{display:flex;align-items:center;gap:8px 14px;flex-wrap:wrap;margin-top:9px;color:#a9d5af;font-size:9.5px}
.ord-status-meta span+span{position:relative}
.ord-status-meta span+span::before{content:"";position:absolute;inset-inline-start:-8px;top:50%;width:3px;height:3px;border-radius:50%;background:#7faf86;transform:translateY(-50%)}
.ord-section{display:grid;gap:11px}
.ord-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.ord-section-head h4{display:flex;align-items:center;gap:6px;margin:0;color:#173a22;font-size:12.5px;font-weight:800}
.ord-section-head h4 svg{width:15px;height:15px;fill:none;stroke:var(--brand-600);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ord-section-head>span{color:#93866f;font-size:9.5px}
.ord-timeline{display:grid;gap:0;margin:0;padding:2px 2px 0;list-style:none}
.ord-step{position:relative;display:flex;gap:11px;padding-bottom:17px}
.ord-step:last-child{padding-bottom:0}
.ord-step:not(:last-child)::before{content:"";position:absolute;top:27px;bottom:0;inset-inline-start:11px;width:2px;border-radius:2px;background:#e8e2d6}
.ord-step--done:not(:last-child)::before{background:#b7dcb2}
.ord-step-dot{position:relative;z-index:1;flex:none;display:grid;place-items:center;width:24px;height:24px;border:1px solid #e5ddcd;border-radius:8px;background:#faf7ef;color:#9d927f}
.ord-step-dot svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ord-step--done .ord-step-dot{border-color:#b9dfb4;background:#effaec;color:var(--brand-700)}
.ord-step--current .ord-step-dot{border-color:#e7bf67;background:#fff6dc;color:#a46a00;box-shadow:0 0 0 4px rgba(255,196,77,.14)}
.ord-step--cancelled .ord-step-dot{border-color:#f3b4b4;background:#fff0f0;color:#b91c1c}
.ord-step-main{flex:1;min-width:0;padding-top:1px}
.ord-step-head{display:flex;align-items:baseline;justify-content:flex-start;gap:10px;flex-wrap:wrap}
.ord-step-title{color:#263e2c;font-size:11.5px;font-weight:800}
.ord-step--pending .ord-step-title{color:#8f8574;font-weight:700}
.ord-step--current .ord-step-title{color:#8a5a00}
.ord-step-date{color:#a19684;font-size:9px;font-variant-numeric:tabular-nums;white-space:nowrap}
.ord-step-main p{margin:4px 0 0;color:#7d7465;font-size:10.5px;line-height:1.9}
.ord-step--current .ord-step-main p{color:#6b5b3b}
.ord-track-card{padding:14px;border:1px solid #a7f3d0;border-radius:16px;background:linear-gradient(140deg,#f0fdf4,#fffdf6);box-shadow:0 10px 24px -22px rgba(6,78,59,.5)}
.ord-track-card.is-delivered{border-color:#bbf7d0;background:linear-gradient(140deg,#ecfdf5,#f7fdf9)}
.ord-track-card--empty{display:flex;align-items:flex-start;gap:10px;border-style:dashed;background:#fffdf7;color:#7a7161;font-size:10.5px;line-height:1.9}
.ord-track-card--empty svg{flex:none;width:22px;height:22px;fill:none;stroke:#b08a3a;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.ord-track-card--empty p{margin:4px 0 0}
.ord-track-top{display:flex;align-items:center;gap:10px}
.ord-track-icon{flex:none;display:grid;place-items:center;width:38px;height:38px;border:1px solid #bbf7d0;border-radius:11px;background:#dcfce7;color:#166534}
.ord-track-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ord-track-main{flex:1;min-width:0}
.ord-track-main b{display:block;color:#14532d;font-size:12px;font-weight:800}
.ord-track-main span{display:block;margin-top:2px;color:#6b806d;font-size:9.5px}
.ord-track-state{flex:none;padding:4px 7px;border:1px solid #86efac;border-radius:5px;background:#dcfce7;color:#166534;font-size:8.5px;font-weight:800}
.ord-track-code{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:11px;padding:8px 10px;border:1px dashed #86bf8a;border-radius:9px;background:#fff}
.ord-track-code>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#14532d;font-size:13px;font-weight:800;letter-spacing:.06em;font-variant-numeric:tabular-nums}
.ord-copy-btn{flex:none;display:inline-flex;align-items:center;gap:4px;padding:5px 7px;border:1px solid #bbf7d0;border-radius:6px;background:#f0fdf4;color:#166534;font-family:inherit;font-size:9px;font-weight:700;cursor:pointer}
.ord-copy-btn:hover{background:#dcfce7}
.ord-copy-btn:focus-visible{outline:2px solid var(--brand-500);outline-offset:2px}
.ord-copy-btn svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ord-track-note{margin:9px 0 0;color:#5f6f60;font-size:10.5px;line-height:1.9}
.ord-track-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:9px;padding-top:8px;border-top:1px dashed #cce8ce;color:#829184;font-size:9px}
.ord-track-link{color:#166534;font-weight:800;text-decoration:none;font-size:9.5px}
.ord-track-link:hover{text-decoration:underline}
.ord-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.ord-actions--single{grid-template-columns:1fr}
.ord-action-card{display:flex;align-items:center;gap:10px;max-width:100%;padding:11px;border:1px solid #e7dfcf;border-radius:14px;background:#fffdf8}
.ord-action-card--course{border-color:#f0dcb0;background:linear-gradient(140deg,#fffdf6,#fff8e8)}
.ord-action-card.is-locked{border-style:dashed;background:#fbf9f3;opacity:.78}
.ord-action-icon{flex:none;display:grid;place-items:center;width:36px;height:36px;border:1px solid #e7dfcf;border-radius:10px;background:#f7f2e7;color:#8a5a00}
.ord-action-card--course .ord-action-icon{background:#fff2cf;border-color:#f3dfae}
.ord-action-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ord-action-main{flex:1;min-width:0}
.ord-action-main b{display:block;color:#263e2c;font-size:11px;font-weight:800}
.ord-action-main span{display:block;margin-top:2px;color:#8b8272;font-size:9px;line-height:1.7}
.ord-action-card .btn{flex:none;margin:0;padding:7px 9px;font-size:9.5px;white-space:nowrap}
.ord-lock{flex:none;display:inline-flex;align-items:center;gap:4px;padding:4px 6px;border-radius:5px;background:#f1ece0;color:#9a8f7b;font-size:9px;font-weight:700}
.ord-lock svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ord-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.ord-detail-card{padding:13px;border:1px solid #e7dfcf;border-radius:14px;background:#fffdf8}
.ord-detail-card h4{display:flex;align-items:center;gap:6px;margin:0 0 10px;color:#173a22;font-size:11.5px;font-weight:800}
.ord-detail-card h4 svg{width:14px;height:14px;fill:none;stroke:var(--brand-600);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ord-kv{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:5px 0;border-bottom:1px dashed #eee7da;color:#8b8272;font-size:10px}
.ord-kv:last-child{border-bottom:0;padding-bottom:0}
.ord-kv b{color:#344a39;font-size:10.5px;font-weight:700;text-align:left}
.ord-kv--stack{display:block}
.ord-kv--stack b{display:block;margin-top:4px;text-align:right;line-height:1.9;font-weight:600}
.ord-pay-state{display:inline-flex;padding:3px 6px;border-radius:4px;font-size:8.5px;font-weight:800}
.ord-pay-state--ok{background:#dcfce7;color:#166534}
.ord-pay-state--wait{background:#fef3c7;color:#92400e}
.ord-pay-state--bad{background:#fee2e2;color:#b91c1c}
.ord-items-card{padding:13px;border:1px solid #e7dfcf;border-radius:14px;background:#fffdf8}
.ord-item-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:8px 0;border-bottom:1px dashed #eee7da;color:#4d5c4e;font-size:10.5px}
.ord-item-name{min-width:0;line-height:1.7}
.ord-item-name small{display:block;margin-top:2px;color:#9a917f;font-size:8.5px}
.ord-item-qty{color:#7d7465;white-space:nowrap;font-size:10px}
.ord-item-price{color:#14532d;font-weight:800;white-space:nowrap;font-size:10px}
.ord-total-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:10px;color:#7d7465;font-size:11px}
.ord-total-row strong{color:#14532d;font-size:14px;font-weight:900}
.ord-empty-row{padding:10px;border:1px dashed #e7dfcf;border-radius:8px;color:#9a917f;font-size:10px;text-align:center}
.ord-demo-note{display:flex;align-items:flex-start;gap:6px;margin:0;padding-top:3px;color:#9a917f;font-size:9px;line-height:1.8}
.ord-demo-note svg{flex:none;width:13px;height:13px;margin-top:2px;fill:none;stroke:#b08a3a;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

@media (max-width:640px){
  .order-modal{padding:10px;align-items:end}
  .order-modal__panel{width:100%;max-height:92vh;border-radius:20px 20px 0 0}
  .order-modal__head{padding:14px 15px}
  .order-modal__body{padding:14px 14px 18px}
  .ord-status-panel{padding:16px}
  .ord-status-title{font-size:17px}
  .ord-actions,.ord-detail-grid{grid-template-columns:1fr}
  .ord-action-card{flex-wrap:wrap}
  .ord-action-main{flex:1 1 150px}
  .ord-action-card .btn{margin-inline-start:auto}
  .ord-item-row{grid-template-columns:minmax(0,1fr) auto;gap:6px 8px}
  .ord-item-price{grid-column:2;justify-self:end}
  .ord-card{padding:13px}
  .ord-card-bottom{align-items:flex-start}
}

@media (prefers-reduced-motion:reduce){
  .order-modal,.order-modal__panel,.ord-card,.ord-mini-progress>span{transition:none}
}

/* ── Admin-controlled dashboard blocks ───────────────────────── */
.ud-announce {
  margin: 0 0 14px; padding: 11px 14px; border-radius: 13px;
  background: linear-gradient(135deg, #fff7d6, #fffdf8); border: 1px solid #f0d9a0;
  color: #7a4e00;
}
.ud-announce b { display: block; font-size: 10px; color: #a86a12; margin-bottom: 2px; }
.ud-announce p { margin: 0; font-size: 12px; line-height: 1.9; }
.ud-welcome { margin-bottom: 15px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(140deg, var(--brand-50), #fffdf8); border: 1px solid #d9ebdc; }
.ud-welcome h3 { margin: 0 0 4px; font-size: 15px; letter-spacing: -.01em; }
.ud-welcome p { margin: 0; color: var(--text-muted); font-size: 11.5px; line-height: 1.9; }
.ud-support-note { margin: 0 0 13px; padding: 10px 12px; border-radius: 11px; background: #f8faf6; border: 1px dashed #d9e5d7; color: var(--text-muted); font-size: 11px; line-height: 1.9; }

/* ── Order share link in invoice/detail ──────────────────────── */
.ord-share-card{padding:13px;border:1px solid #e7dfcf;border-radius:14px;background:#fffdf8}
.ord-share-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:10px}
.ord-share-url{flex:1;min-width:220px;padding:8px 10px;border:1px solid var(--border);border-radius:10px;background:var(--surface-sunken);font-size:11px;direction:ltr;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ord-share-hint{display:flex;gap:6px;align-items:flex-start;margin-top:8px;color:var(--text-muted);font-size:10.5px;line-height:1.9}
.ord-share-hint svg{width:14px;height:14px;flex:none;margin-top:2px;fill:none;stroke:var(--brand-600);stroke-width:1.7}


/* Order receipt upload */
.ord-action-card--receipt{align-items:flex-start;border-color:#dbeafe;background:linear-gradient(140deg,#f8fbff,#eef6ff)}
.ord-receipt-done{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:4px;font-size:11px;color:#1e40af}
.ord-receipt-done b{font-size:11.5px;color:#1e3a8a}.ord-receipt-done span{color:#64748b}
.ord-receipt-form{display:grid;gap:7px;margin-top:7px;max-width:520px}
.ord-receipt-form label{font-size:11px;font-weight:800;color:#1e3a8a}
.ord-receipt-form input[type=file]{width:100%;padding:7px;border:1px dashed #93c5fd;border-radius:9px;background:#fff;font:inherit;font-size:11px;color:#475569}
.ord-receipt-form input[type=text]{width:100%;padding:8px 9px;border:1px solid #bfdbfe;border-radius:9px;background:#fff;font:inherit;font-size:11.5px}
.ord-receipt-form .btn{justify-self:start}

/* Smooth, responsive dashboard section changes */
[data-profile-section-panel]{animation:profilePanelIn .28s ease both}
.profile-nav-link{transition:background .18s,color .18s,transform .18s}
.profile-nav-link:hover{transform:translateX(-2px)}
.profile-nav-link.active{transform:translateX(-3px)}
@keyframes profilePanelIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (max-width:640px){
  .profile-sidebar{position:static;border-radius:16px}
  .profile-nav{display:flex;gap:6px;overflow-x:auto;padding:8px;scrollbar-width:none}
  .profile-nav::-webkit-scrollbar{display:none}
  .profile-nav-link{width:auto;flex:0 0 auto;padding:8px 10px;font-size:10.5px;white-space:nowrap}
  .profile-nav-icon{font-size:13px}
  .profile-section-header{padding:13px 14px}
  .profile-section-body{padding:14px}
}
@media (prefers-reduced-motion:reduce){
  [data-profile-section-panel]{animation:none}
  .profile-nav-link{transition:none}
}

/* Unified customer order progress */
.ord-flow{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;margin-top:12px;padding:12px 10px;border:1px solid var(--border);border-radius:14px;background:var(--surface-raised)}
.ord-flow-step{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0;position:relative;color:#8c9a8e;font-size:9px;text-align:center}
.ord-flow-step:not(:last-child):after{content:"";position:absolute;top:11px;inset-inline-start:55%;width:90%;height:2px;background:#e5ece6;z-index:0}
.ord-flow-step i{position:relative;z-index:1;width:23px;height:23px;border-radius:50%;display:grid;place-items:center;border:1px solid #dbe6dd;background:#f8fbf8;color:#829287;font-style:normal;font-size:9px;font-weight:800}
.ord-flow-step.is-done{color:#366a45}.ord-flow-step.is-done i{background:#eaf7ec;border-color:#b8dfbf;color:#237a39}.ord-flow-step.is-current{color:#8a5a00;font-weight:800}.ord-flow-step.is-current i{background:#fff7e4;border-color:#e9c46c;color:#a56800;box-shadow:0 0 0 3px #e9c46c22}
.ord-flow-step.is-done:not(:last-child):after{background:#b8dfbf}
@media(max-width:640px){.ord-flow{grid-template-columns:repeat(3,1fr);row-gap:9px}.ord-flow-step:nth-child(3):after{display:none}}

.ord-action-summary{margin-top:10px;padding:11px 14px;border:1px solid #e7dfc9;border-radius:12px;background:linear-gradient(135deg,#fffaf0,#fff);display:flex;gap:8px;align-items:flex-start;flex-wrap:wrap}
.ord-action-kicker{font-size:9.5px;font-weight:800;color:#8a5a00;background:#fff0c9;border-radius:99px;padding:3px 8px;white-space:nowrap}.ord-action-summary p{margin:0;font-size:11px;line-height:1.9;color:#6c5d43;flex:1;min-width:180px}

/* Profile dashboard navigation: thin-line icon system */
.profile-nav{display:grid;gap:4px}
.profile-nav-link{position:relative;border:1px solid transparent;outline:none}
.profile-nav-icon{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;flex:none;background:var(--surface-sunken);color:#718477;transition:background .18s,color .18s,box-shadow .18s}
.profile-nav-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}
.profile-nav-link:hover .profile-nav-icon{background:var(--brand-50);color:var(--brand-700)}
.profile-nav-link.active{border-color:var(--brand-100);background:linear-gradient(135deg,var(--brand-50),rgba(255,255,255,.7));color:var(--brand-800);box-shadow:0 8px 20px -18px rgba(22,101,52,.55)}
.profile-nav-link.active .profile-nav-icon{background:var(--brand-600);color:#fff;box-shadow:0 7px 14px -10px rgba(22,101,52,.65)}
.profile-nav-link:focus-visible{box-shadow:0 0 0 3px rgba(47,158,86,.25);border-color:var(--brand-300)}
.profile-nav-label{min-width:0;line-height:1.5}

@media (max-width:900px){
  .profile-layout{grid-template-columns:minmax(0,1fr);gap:14px}
  .profile-sidebar{position:static;border-radius:18px}
  .profile-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;padding:8px;overflow:visible;background:linear-gradient(150deg,rgba(255,255,255,.86),rgba(240,253,244,.7))}
  .profile-nav-link{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:auto;min-height:64px;padding:7px 3px;border:1px solid transparent;border-radius:12px;text-align:center;white-space:normal;transform:none;font-size:10px;line-height:1.4}
  .profile-nav-link:hover{transform:translateY(-1px);background:rgba(255,255,255,.75)}
  .profile-nav-link.active{transform:translateY(-1px);box-shadow:0 8px 18px -15px rgba(22,101,52,.6)}
  .profile-nav-label{font-size:9.5px;line-height:1.35;max-width:100%;white-space:normal;overflow-wrap:anywhere}
  .profile-nav-icon{width:29px;height:29px;border-radius:9px}
  .profile-nav-icon svg{width:17px;height:17px}
  .profile-section-header{padding:13px 14px}
  .profile-section-body{padding:14px}
}
@media (max-width:380px){
  .profile-nav{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:6px}
  .profile-nav-link{min-height:58px;padding:6px 2px}
  .profile-nav-label{font-size:8.5px}
  .profile-nav-icon{width:26px;height:26px}
  .profile-nav-icon svg{width:15px;height:15px}
}
@media (prefers-reduced-motion:reduce){
  .profile-nav-link,.profile-nav-icon{transition:none}
}
