/* ---------- Account ---------- */
.account { padding-top: 36px; padding-bottom: clamp(56px, 7vw, 96px); }
.account-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.account-content { min-width: 0; }
.account-profile { position: sticky; top: 100px; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.account-profile-top { position: relative; padding: 28px 20px 20px; text-align: center; }
.account-profile-gear { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--text-2); transition: color .2s, background-color .2s; }
.account-profile-gear:hover { color: var(--text); background: var(--bg-2); }
.account-profile-avatar { width: 96px; height: 96px; border-radius: var(--r-lg); margin: 0 auto 14px; overflow: hidden; border: 2px solid var(--line-2); }
.account-profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.account-profile-name { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.account-profile-meta { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.account-profile-info { border-top: 1px solid var(--line); }
.profile-row { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; min-width: 0; }
.profile-row span { flex: 1; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.profile-row button { flex: none; display: grid; place-items: center; width: 28px; height: 28px; background: none; border: none; cursor: pointer; color: var(--text-2); border-radius: 6px; transition: color .2s, background-color .2s; }
.profile-row button:hover { color: var(--text); background: var(--bg-2); }
.account-profile-foot { padding: 14px 16px; }
.account-profile-foot .btn { width: 100%; justify-content: center; }
.account-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin-bottom: 16px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.account-tabs a { padding: 12px 16px; text-align: center; font-weight: 600; font-size: 15px; color: var(--text-2); transition: color .2s, background-color .2s; }
.account-tabs a:hover { color: var(--text); background: var(--bg-3); }
.account-panel { display: none; padding: 24px; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg); scroll-margin-top: 150px; }
.account-panel:target, .account-panel.default { display: block; }
.account-panel:target ~ .account-panel.default { display: none; }
.account:has(#orders:target) .account-tabs a[href="#orders"],
.account:has(#settings:target) .account-tabs a[href="#settings"],
.account:not(:has(#orders:target, #settings:target)) .account-tabs a[href="#downloads"] { color: var(--text); background: var(--bg-3); }
.account-panel h2 { font-size: 24px; }
.account-sub { margin: 4px 0 24px; color: var(--text-2); font-size: 14.5px; }
.account-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.account-thumb { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: var(--r); overflow: hidden; background: var(--bg-3); border: 1px solid var(--line-2); color: var(--text-2); }
.account-thumb .art { width: 100%; height: 100%; aspect-ratio: auto; }
.account-thumb .art-win { width: 82%; }
.account-thumb .art-bar span { display: none; }
.account-thumb > svg { width: 24px; height: 24px; }
.account-info { flex: 1; min-width: 0; }
.account-info h3 { font-size: 20px; }
.account-info span { color: var(--text-2); font-size: 14px; }
.account-row .btn { flex: none; }
.account-panel .empty a { color: var(--accent-hi); font-weight: 600; }
.settings-block { padding: 20px 0; border-top: 1px solid var(--line-2); }
.settings-block h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.settings-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.settings-form input { flex: 1; min-width: 200px; height: 40px; padding: 0 12px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line-2); color: var(--text); font-size: 14px; }
.account-settings { display: grid; gap: 4px; max-width: 460px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.account-settings .sum-row span:last-child { color: var(--text-2); }
.account-settings .form { margin: 16px 0 8px; }
.account-settings .btn { justify-self: start; margin-top: 8px; }

/* ---------- Changelog ---------- */
.changelog { display: flex; flex-direction: column; gap: 0; padding-left: 16px; border-left: 2px solid var(--line); margin-top: 8px; }
.cl-entry { display: flex; gap: 20px; position: relative; padding-bottom: 28px; }
.cl-entry:last-child { padding-bottom: 0; }
.cl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line); border: 2px solid var(--bg-0); flex-shrink: 0; margin-top: 6px; margin-left: -22px; }
.cl-dot-latest { background: var(--accent); }
.cl-card { flex: 1; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 20px; }
.cl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.cl-version { font-size: 14px; font-weight: 700; color: var(--text); font-family: var(--mono, monospace); }
.cl-title { font-size: 14px; color: var(--text-2); }
.cl-date { font-size: 12px; color: var(--text-2); white-space: nowrap; flex-shrink: 0; }
.cl-notes { font-size: 13px; color: var(--text-2); line-height: 1.65; margin: 0; white-space: pre-wrap; font-family: inherit; }

/* ---------- Reviews ---------- */
.reviews-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.reviews-page-head h1 { font-size: clamp(22px,4vw,32px); font-weight: 800; letter-spacing: -.03em; }
.reviews-page-head p { color: var(--text-2); margin-top: 4px; font-size: 14px; }
.review-list { display: flex; flex-direction: column; gap: 12px; }
.review-list-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 20px; align-items: center; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 20px; }
.review-list-art { width: 64px; height: 64px; border-radius: var(--r); overflow: hidden; flex-shrink: 0; }
.review-list-art .art { width: 100%; height: 100%; border-radius: var(--r); }
.review-list-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.review-list-name { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-list-existing { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.review-list-comment { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-list-none { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.review-list-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex-shrink: 0; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 64px 24px; text-align: center; }
.empty-state-icon { font-size: 40px; color: var(--text-3); }
.empty-state h2 { font-size: 20px; font-weight: 700; }
.empty-state p { color: var(--text-2); font-size: 14px; }
.reviews-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.review-avg { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 14px; color: var(--text-2); }
.stars { color: #f59e0b; font-size: 15px; display: flex; gap: 2px; }
.stars-sm { font-size: 13px; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.review-card { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.review-mine { border-color: var(--accent); }
.review-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.review-author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.review-avatar { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.review-avatar-placeholder { display: grid; place-items: center; background: var(--bg-2); color: var(--text-2); font-size: 14px; }
.review-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-date { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.review-comment { font-size: 14px; color: var(--text-2); line-height: 1.6; margin-top: 4px; }
.star-picker { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; margin-top: 8px; }
.star-picker input { display: none; }
.star-picker label { font-size: 28px; color: var(--text-3); cursor: pointer; transition: color .1s; }
.star-picker label:hover,
.star-picker label:hover ~ label,
.star-picker input:checked + label,
.star-picker input:checked + label ~ label { color: #f59e0b; }

/* ---------- Invoice ---------- */
.inv-card { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.inv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 36px 40px 32px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-1) 60%); }
.inv-number { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -0.04em; color: var(--text); line-height: 1; }
.inv-store { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.inv-dates { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 13px; color: var(--text-2); }
.inv-parties { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-bottom: 1px solid var(--line); }
.inv-party { padding: 24px 40px; border-right: 1px solid var(--line); }
.inv-party:last-child { border-right: none; }
.inv-party-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-hi); margin-bottom: 8px; }
.inv-party-name { font-size: 16px; font-weight: 600; color: var(--text); }
.inv-party-email { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.inv-body { display: grid; grid-template-columns: minmax(0,1fr) 280px; }
.inv-items { padding: 0 40px; border-right: 1px solid var(--line); }
.inv-row { display: flex; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.inv-row span:last-child { flex-shrink: 0; }
.inv-row-head { padding: 18px 0 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); border-bottom: 1px solid var(--line); }
.inv-totals { padding: 24px 32px; background: var(--bg-2); align-self: start; }
.inv-totals .sum-row { padding: 6px 0; }
.inv-foot { padding: 16px 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--text-2); }
@media print {
  .no-print, header, footer { display: none !important; }
  body { background: #fff !important; color: #111 !important; }
  .inv-card { border: 1px solid #ddd !important; }
  .inv-top, .inv-totals { background: #f4f4f4 !important; }
  main { padding-top: 8px !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .inv-parties { grid-template-columns: 1fr 1fr; }
  .inv-party { padding: 20px 28px; }
  .inv-body { grid-template-columns: 1fr; }
  .inv-items { padding: 0 28px; border-right: none; border-bottom: 1px solid var(--line); }
  .inv-totals { padding: 20px 28px; }
  .inv-top { padding: 28px; }
  .inv-foot { padding: 14px 28px; }
  .account-layout { grid-template-columns: 1fr; gap: 20px; }
  .account-profile { position: static; }
}
@media (max-width: 620px) {
  .review-list-item { grid-template-columns: 48px 1fr; }
  .review-list-actions { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .account-row { flex-wrap: wrap; }
  .account-row .btn { flex: 1; }
  .account-panel { padding: 16px; }
  .account-tabs a { padding: 10px 8px; font-size: 13.5px; }
  .account-settings .btn { justify-self: stretch; }
}
