/* ============================================================
   Account section — Dashboard, Orders, Order detail, Profile,
   Addresses, Password + Sign in / Sign up pages
   ============================================================ */

.account-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }

/* ---------- Sidebar ---------- */
.account-sidebar { background: #fff; border: 1.5px solid var(--border); border-radius: 18px; padding: 22px; position: sticky; top: calc(var(--topbar-height, 104px) + 20px); }
.account-user-card { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; margin-bottom: 14px; border-bottom: 1.5px solid var(--border); min-width: 0; }
.account-user-card > div:last-child { min-width: 0; }
.account-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.15rem; flex-shrink: 0; }
.account-user-name { font-weight: 700; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-user-email { font-size: 0.78rem; color: var(--gray); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.account-nav { display: flex; flex-direction: column; gap: 4px; }
.account-nav form { margin: 0; }
.account-nav a, .account-nav-logout {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 0.9rem; font-weight: 500; color: #4b5563;
  transition: var(--transition); width: 100%; text-align: start;
  background: none; border: none; cursor: pointer; font-family: inherit;
}
.account-nav a:hover, .account-nav-logout:hover { background: var(--light); color: var(--brand); }
.account-nav a.active { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(255,99,0,.28); }
.account-nav a i, .account-nav-logout i { width: 18px; text-align: center; }
.account-nav-divider { height: 1px; background: var(--border); margin: 8px 0; }
.account-nav-logout { color: #dc2626; }
.account-nav-logout:hover { background: #fef2f2; color: #dc2626; }

/* ---------- Content ---------- */
.account-content { min-width: 0; }
.account-hello { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.account-hello p { color: var(--gray); font-size: .9rem; margin-top: 4px; }
.account-welcome { font-size: 1.55rem; font-weight: 800; }
.account-section-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 20px; }
.account-section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 14px; }
.account-section-header h3 { font-size: 1.02rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.account-section-header h3 i { color: var(--brand); }
.account-section-header a { font-size: 0.84rem; font-weight: 600; color: var(--brand); white-space: nowrap; }

/* Stat cards */
.account-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.account-stat-card {
  display: flex; align-items: center; gap: 14px; background: #fff; border: 1.5px solid var(--border);
  border-radius: 16px; padding: 18px; color: var(--text); transition: var(--transition); min-width: 0;
}
a.account-stat-card:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--card-shadow); }
.asc-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.1rem; flex-shrink: 0; }
.asc-blue { background: #FFF4EC; color: var(--brand); }
.asc-orange { background: #fff4eb; color: #ea580c; }
.asc-cyan { background: #e6f9ff; color: #0891b2; }
.asc-green { background: #ecfdf5; color: #059669; }
.account-stat-card .value { font-size: 1.25rem; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.account-stat-card .label { font-size: 0.78rem; color: var(--gray); margin-top: 2px; }

/* Two columns: orders on the way + cart */
.account-two-col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.account-two-col > section { min-width: 0; }

/* Cart card */
.account-cart-card { background: #fff; border: 1.5px solid var(--border); border-radius: 18px; padding: 20px; margin-top: 30px; }
.acc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.acc-head h3 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.acc-head h3 i { color: var(--brand); }
.acc-count { font-size: .75rem; font-weight: 700; background: var(--light); color: var(--brand); padding: 3px 10px; border-radius: 50px; }
.acc-empty { color: var(--gray); font-size: .88rem; margin-bottom: 14px; }
.acc-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.acc-list li { display: flex; gap: 12px; align-items: center; }
.acc-thumb { width: 52px; height: 52px; border-radius: 12px; background: #F5F4F3; overflow: hidden; flex-shrink: 0; }
.acc-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.acc-info { display: flex; flex-direction: column; min-width: 0; }
.acc-info a { font-size: .85rem; font-weight: 600; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.acc-info a:hover { color: var(--brand); }
.acc-info small { font-size: .78rem; color: var(--gray); }
.acc-more { font-size: .8rem; color: var(--gray); margin-bottom: 10px; }
.acc-subtotal { display: flex; justify-content: space-between; padding: 12px 0; margin-bottom: 12px; border-top: 1.5px dashed var(--border); font-size: .9rem; }
.acc-link { display: block; text-align: center; font-size: .82rem; font-weight: 600; color: var(--brand); margin-top: 10px; }
.acc-mini-links { margin-top: 18px; padding-top: 14px; border-top: 1.5px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.acc-mini-links a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: .86rem; color: #4b5563; }
.acc-mini-links a i { width: 18px; text-align: center; color: var(--brand); }
.acc-mini-links a span { margin-inline-start: auto; font-weight: 700; font-size: .78rem; background: var(--light); color: var(--brand); border-radius: 50px; padding: 1px 9px; }
.acc-mini-links a:hover { background: var(--light); }

/* Empty state */
.account-empty-state { background: #fff; border: 1.5px dashed var(--border); border-radius: 16px; padding: 44px 24px; text-align: center; }
.account-empty-state.compact { padding: 30px 20px; }
.account-empty-state i { font-size: 2.2rem; color: #c7cbe6; margin-bottom: 12px; }
.account-empty-state p { color: var(--gray); margin-bottom: 16px; font-size: .9rem; }

/* ---------- Order cards ---------- */
.order-cards { display: flex; flex-direction: column; gap: 16px; }
.order-card { background: #fff; border: 1.5px solid var(--border); border-radius: 18px; padding: 18px 20px; margin-bottom: 14px; transition: var(--transition); }
.order-cards .order-card { margin-bottom: 0; }
.order-card:hover { box-shadow: var(--card-shadow); }
.oc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.oc-title { display: flex; flex-direction: column; min-width: 0; }
.oc-number { font-weight: 800; font-size: .98rem; letter-spacing: .02em; }
.oc-date { font-size: .78rem; color: var(--gray); }
.oc-items { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.oc-thumb { position: relative; width: 54px; height: 54px; border-radius: 12px; background: #F5F4F3; display: grid; place-items: center; color: #B9B7B5; overflow: hidden; flex-shrink: 0; }
.oc-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.oc-qty { position: absolute; bottom: 2px; inset-inline-end: 2px; background: var(--brand); color: #fff; font-size: .62rem; font-weight: 700; border-radius: 6px; padding: 0 4px; }
.oc-more { font-weight: 700; color: var(--brand); font-size: .85rem; }
.oc-names { font-size: .82rem; color: var(--gray); flex: 1; min-width: 140px; }
.oc-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; border-top: 1.5px solid var(--border); }
.oc-total { display: flex; flex-direction: column; }
.oc-total span { font-size: .72rem; color: var(--gray); text-transform: uppercase; letter-spacing: .05em; }
.oc-total strong { font-size: 1.05rem; }
.oc-cancelled { display: flex; align-items: center; gap: 8px; background: #fef2f2; color: #b91c1c; font-size: .85rem; font-weight: 600; padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; }

/* Delivery tracker */
.order-tracker { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: 4px 0 16px; counter-reset: step; }
.order-tracker li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.order-tracker li::before {
  content: ''; position: absolute; top: 13px; inset-inline-start: -50%; width: 100%; height: 3px; background: var(--border); z-index: 0;
}
.order-tracker li:first-child::before { display: none; }
.order-tracker li.done::before { background: linear-gradient(90deg, var(--brand), var(--brand-light)); }
.ot-dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 3px solid var(--border); display: grid; place-items: center; font-size: .65rem; color: transparent; transition: var(--transition); }
.order-tracker li.done .ot-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.order-tracker li.current .ot-dot { box-shadow: 0 0 0 5px rgba(255,99,0,.18); }
.order-tracker small { font-size: .74rem; color: var(--gray); font-weight: 500; }
.order-tracker li.done small { color: var(--text); font-weight: 600; }
.order-tracker-lg { background: #fff; border: 1.5px solid var(--border); border-radius: 18px; padding: 22px 10px 16px; margin: 18px 0 6px; }
.order-tracker-lg .ot-dot { width: 34px; height: 34px; font-size: .8rem; }
.order-tracker-lg li::before { top: 16px; }

/* Status badge */
.order-status-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.order-status-badge.status-pending { background: #e5e7eb; color: #374151; }
.order-status-badge.status-processing { background: #fef3c7; color: #92400e; }
.order-status-badge.status-shipped { background: #dbeafe; color: #1e40af; }
.order-status-badge.status-delivered { background: #d1fae5; color: #065f46; }
.order-status-badge.status-cancelled { background: #fee2e2; color: #991b1b; }

/* Filter tabs */
.order-tabs { display: flex; gap: 6px; padding: 5px; background: var(--light); border-radius: 14px; margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.order-tabs::-webkit-scrollbar { display: none; }
.order-tabs a { padding: 9px 16px; border-radius: 10px; font-size: .85rem; font-weight: 600; color: var(--gray); white-space: nowrap; }
.order-tabs a:hover { color: var(--brand); }
.order-tabs a.active { background: #fff; color: var(--brand); box-shadow: 0 2px 8px rgba(43,44,46,.12); }

/* Recent orders list */
.recent-orders-list { background: #fff; border: 1.5px solid var(--border); border-radius: 18px; overflow: hidden; }
.ro-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; color: var(--text); border-top: 1px solid var(--border); transition: background .15s; }
.ro-row:first-child { border-top: 0; }
.ro-row:hover { background: #FAFAFA; }
.ro-thumb { width: 44px; height: 44px; border-radius: 10px; background: #F5F4F3; display: grid; place-items: center; overflow: hidden; color: #B9B7B5; flex-shrink: 0; }
.ro-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.ro-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ro-main strong { font-size: .88rem; }
.ro-main small { font-size: .76rem; color: var(--gray); }
.ro-total { font-weight: 700; font-size: .88rem; white-space: nowrap; min-width: 80px; text-align: end; }
.ro-chev { color: #c7cbe6; font-size: .75rem; }
[dir="rtl"] .ro-chev { --fa: "\f053"; }

/* Table (kept for any old views) */
.account-table-wrap { background: #fff; border: 1.5px solid var(--border); border-radius: 14px; overflow: hidden; overflow-x: auto; }
.account-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.account-table th { text-align: start; padding: 14px 18px; background: #f9fafb; color: var(--gray); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }
.account-table td { padding: 14px 18px; border-top: 1px solid var(--border); }
.account-table a { color: var(--brand); font-weight: 600; }

/* Forms */
.account-form { background: #fff; border: 1.5px solid var(--border); border-radius: 16px; padding: 28px; max-width: 560px; }
.account-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.account-form .checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; margin: 8px 0 16px; }
.account-form .checkbox-label input { width: auto; }
.form-hint { display: block; font-size: .76rem; color: var(--gray); margin-top: 5px; }

/* Order detail */
.account-back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--gray); margin-bottom: 16px; }
.account-back-link:hover { color: var(--brand); }
[dir="rtl"] .account-back-link i { --fa: "\f061"; }
.order-show-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.order-show-head small { color: var(--gray); font-size: .82rem; }
.order-detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; margin-top: 18px; }
.order-items-box, .order-summary-box { background: #fff; border: 1.5px solid var(--border); border-radius: 18px; padding: 20px; }
.order-items-box h4, .order-summary-box h4 { font-size: .98rem; font-weight: 700; margin-bottom: 14px; }
.order-item-list { list-style: none; display: flex; flex-direction: column; }
.order-item-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.order-item-list li:first-child { border-top: 0; padding-top: 0; }
.oil-thumb { width: 60px; height: 60px; border-radius: 12px; background: #F5F4F3; display: grid; place-items: center; overflow: hidden; color: #B9B7B5; flex-shrink: 0; }
.oil-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.oil-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.oil-info a, .oil-info strong { font-size: .88rem; font-weight: 600; color: var(--text); }
.oil-info a:hover { color: var(--brand); }
.oil-info small { font-size: .78rem; color: var(--gray); }
.oil-total { font-size: .9rem; white-space: nowrap; }
.order-summary-row { display: flex; justify-content: space-between; font-size: 0.88rem; padding: 7px 0; color: #4b5563; }
.order-summary-row.total { border-top: 1.5px solid var(--border); margin-top: 6px; padding-top: 14px; font-weight: 800; color: var(--text); font-size: 1rem; }
.order-meta { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 0.84rem; display: flex; flex-direction: column; gap: 12px; }
.order-meta p { display: flex; gap: 10px; }
.order-meta p > i { color: var(--brand); margin-top: 3px; width: 16px; text-align: center; }
.order-meta p > span { display: flex; flex-direction: column; color: #4b5563; word-break: break-word; }
.order-meta strong { color: var(--text); font-size: .78rem; }
.order-help { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; padding: 11px; border-radius: 12px; background: var(--light); color: var(--brand); font-weight: 600; font-size: .85rem; }
.order-help:hover { background: var(--brand); color: #fff; }

/* Addresses */
.address-form-card { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.address-form-card.open { max-height: 900px; margin-bottom: 24px; }
.address-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.address-card { position: relative; background: #fff; border: 1.5px solid var(--border); border-radius: 16px; padding: 20px; }
.address-card.is-default { border-color: var(--brand); }
.address-default-badge { position: absolute; top: 14px; inset-inline-end: 14px; background: var(--brand); color: #fff; font-size: 0.68rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.address-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.address-card p { font-size: 0.85rem; color: #4b5563; margin-bottom: 4px; }
.address-delete-form { margin-top: 12px; }
.address-delete-form button { background: none; border: none; color: #dc2626; font-size: 0.8rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; }

/* ============================================================
   Sign in / Sign up / Forgot password
   ============================================================ */
.auth-page { padding: calc(var(--topbar-height, 104px) + 40px) 24px 70px; background: linear-gradient(180deg, var(--light) 0%, #fff 100%); }
.auth-shell { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: 0.9fr 1.1fr; background: #fff; border-radius: 26px; overflow: hidden; box-shadow: 0 24px 70px rgba(30,31,33,.14); }
.auth-brand { position: relative; overflow: hidden; padding: 44px 38px; color: #fff; background: linear-gradient(160deg, #1E1F21 0%, #2B2C2E 60%, #45464A 100%); display: flex; flex-direction: column; }
.auth-brand-glow { position: absolute; width: 320px; height: 320px; border-radius: 50%; inset-inline-end: -120px; bottom: -120px; background: radial-gradient(circle, rgba(255,99,0,.40), transparent 65%); }
.auth-brand > :not(.auth-brand-glow) { position: relative; }
.auth-brand-logo img { height: 34px; width: auto; }
.auth-brand h2 { font-size: 1.6rem; font-weight: 800; margin: 36px 0 20px; }
.auth-perks { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.auth-perks li { display: flex; align-items: center; gap: 12px; font-size: .92rem; color: rgba(255,255,255,.85); }
.auth-perks i { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.12); display: grid; place-items: center; color: #7fe3ff; flex-shrink: 0; }
.auth-card { padding: 44px 42px; }
.auth-card h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.auth-sub { color: var(--gray); font-size: .9rem; margin-bottom: 24px; }
.auth-form .form-group input { width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 12px; font-size: .92rem; background: #FAFAFA; outline: none; transition: var(--transition); color: var(--text); }
.auth-form .form-group input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(255,99,0,.14); }
.auth-form .input-icon { position: relative; }
.auth-form .input-icon > i { position: absolute; inset-inline-start: 15px; top: 50%; transform: translateY(-50%); color: #A9A7A5; font-size: .85rem; pointer-events: none; }
.auth-form .input-icon input { padding-inline-start: 40px; padding-inline-end: 44px; }
.auth-form .has-error input { border-color: #e11d48; }
.auth-form .form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pw-toggle { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; background: none; color: #A9A7A5; cursor: pointer; border-radius: 8px; }
.pw-toggle:hover { color: var(--brand); background: var(--light); }
.auth-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.auth-label-row a { font-size: .78rem; font-weight: 600; color: var(--brand); margin-bottom: 7px; }
.auth-check { display: flex; align-items: center; gap: 8px; font-size: .86rem; margin: 4px 0 20px; cursor: pointer; }
.auth-check input { width: 16px; height: 16px; accent-color: var(--brand); }
.auth-submit { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; border-radius: 12px; font-size: .95rem; }
.auth-alt { text-align: center; margin-top: 22px; font-size: .88rem; color: var(--gray); }
.auth-alt a { color: var(--brand); font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .account-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .account-two-col { grid-template-columns: minmax(0, 1fr); }
  .account-cart-card { margin-top: 0; }
}
@media (max-width: 900px) {
  .account-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .account-sidebar { min-width: 0; }
  .account-sidebar { position: static; padding: 16px; }
  .account-nav { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; gap: 6px; }
  .account-nav::-webkit-scrollbar { display: none; }
  .account-nav a, .account-nav-logout { width: auto; white-space: nowrap; background: var(--light); }
  .account-nav-divider { display: none; }
  .order-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { padding: 28px 26px; }
  .auth-brand h2 { margin: 18px 0 14px; font-size: 1.3rem; }
  .auth-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .auth-perks li { font-size: .8rem; }
}
@media (max-width: 600px) {
  .account-stats-grid { gap: 10px; }
  .account-stat-card { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .account-stat-card .value { font-size: 1.05rem; }
  .account-welcome { font-size: 1.25rem; }
  .account-form { padding: 20px 16px; }
  .account-form .form-row { grid-template-columns: 1fr; }
  .order-card { padding: 16px 14px; }
  .oc-foot .btn { padding: 9px 14px; }
  .order-tracker small { font-size: .66rem; }
  .ro-row { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  .ro-main { flex-basis: calc(100% - 60px); }
  .ro-row .order-status-badge { margin-inline-start: 54px; }
  .ro-total { min-width: 0; margin-inline-start: auto; }
  .ro-chev { display: none; }
  .auth-page { padding: calc(var(--topbar-height, 90px) + 20px) 14px 50px; }
  .auth-card { padding: 28px 20px; }
  .auth-form .form-row-2 { grid-template-columns: 1fr; gap: 0; }
  .auth-perks { grid-template-columns: 1fr; }
}
