.account-body { background:#f5f6f8; }
.cabinet-page { display:grid; grid-template-columns:270px minmax(0,1fr) 290px; align-items:start; gap:24px; padding-top:28px; padding-bottom:80px; min-height:calc(100vh - 320px); }
.cabinet-page [hidden] { display:none !important; }
.cabinet-page a { text-decoration:none; }
.cabinet-page button,.cabinet-page input { font:inherit; }
.cabinet-page button { cursor:pointer; }
.cabinet-page :is(a,button,input):focus-visible { outline:3px solid #cf0a2c; outline-offset:4px; }
.profile-card,.account-panel { background:#fff; border-radius:14px; box-shadow:0 8px 30px rgb(20 27 42 / 3%); }
.profile-card { padding:30px 30px 25px; }
.profile-identity { display:flex; flex-direction:column; align-items:center; text-align:center; }
.profile-avatar { width:100px; height:100px; object-fit:contain; border-radius:50%; margin-bottom:24px; }
.profile-identity-text { display:flex; flex-direction:column; align-items:center; gap:10px; min-width:0; width:100%; }
.profile-name { font-size:16px; line-height:1.5; overflow-wrap:anywhere; }
.profile-phone { color:#778493; font-size:14px; font-weight:700; }
.cabinet-page .account-link { color:#cd082c; font-size:14px; font-weight:700; }
.cabinet-page .account-link:hover { color:#a30020; text-decoration:underline; }
.profile-nav { display:flex; flex-direction:column; margin-top:34px; }
.profile-nav a { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:46px; color:#202124; font-size:14px; font-weight:600; }
.profile-nav a:hover,.profile-nav a[aria-current="page"] { color:#cd082c; }
.profile-nav b { color:#84909e; font-weight:600; font-size:13px; }
.profile-nav-divider { height:1px; background:#e5e6e9; margin:12px 0; }
.profile-signout { border-top:1px solid #e5e6e9; margin-top:17px; padding-top:25px; }
.logout-button { border:0; background:none; padding:0; color:#cf0a2c; font-size:14px; font-weight:600 !important; }
.cabinet-content { min-width:0; }
.account-panel { padding:28px; }
.orders-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.account-panel h1 { margin:0; font-size:23px; line-height:1.35; font-weight:800; letter-spacing:-.5px; }
.orders-heading .account-link { white-space:nowrap; font-size:13px; }
.orders-tabs { display:flex; gap:24px; margin-top:25px; border-bottom:1px solid #e6e8ec; }
.orders-tabs button { border:0; border-bottom:2px solid transparent; border-radius:0; background:none; color:#778493; padding:0 0 13px; font-size:14px; font-weight:700; }
.orders-tabs button[aria-pressed="true"] { color:#cf0a2c; border-bottom-color:#cf0a2c; }
.orders-list { min-height:30px; }
.account-loading { color:#778493; font-size:14px; padding:30px 0 10px; margin:0; }
.account-empty-summary { color:#74808e; font-size:14px; line-height:1.7; margin:22px 0 0; }
.order-item { border-top:1px solid #e7e9ed; padding:23px 0; }
.order-item:first-child { margin-top:25px; }
.order-item:last-child { padding-bottom:5px; }
.order-item summary { list-style:none; cursor:pointer; }
.order-item summary::-webkit-details-marker { display:none; }
.order-main { display:flex; justify-content:space-between; gap:16px; font-size:14px; font-weight:800; line-height:1.55; }
.order-main b { white-space:nowrap; }
.order-products { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; color:#74808e; font-size:12px; line-height:1.7; margin:7px 0 10px; overflow-wrap:anywhere; }
.order-meta { display:flex; align-items:center; flex-wrap:wrap; gap:6px; font-size:11px; color:#74808e; line-height:1.6; }
.order-status,.payment-status { padding:4px 9px; border-radius:20px; color:#b50729; background:#fff0f3; font-weight:800; }
.payment-status { color:#996113; background:#fff5e4; }
.payment-status--paid { color:#187542; background:#eaf8ef; }
.payment-status--unpaid,.payment-status--needs_attention { color:#ad253b; background:#fff0f3; }
.order-expand { margin-left:auto; color:#8b929d; font-size:15px; transition:transform .15s; }
.order-item[open] .order-expand { transform:rotate(180deg); }
.order-detail { margin-top:18px; padding-top:8px; border-top:1px dashed #e3e6ea; }
.order-detail-row { display:flex; justify-content:space-between; gap:16px; padding:9px 0; font-size:13px; line-height:1.55; }
.order-detail-row span { overflow-wrap:anywhere; }
.order-detail-row b { flex-shrink:0; color:#74808e; font-weight:600; }
.orders-empty { padding:32px 0 14px; text-align:center; }
.orders-empty img { display:block; width:150px; height:120px; object-fit:contain; margin:0 auto 18px; }
.orders-empty h2 { margin:0 0 9px; font-size:18px; font-weight:800; }
.orders-empty p,.orders-error p { font-size:14px; line-height:1.7; color:#74808e; margin:0 0 21px; }
.account-primary { display:inline-flex; justify-content:center; align-items:center; min-height:46px; padding:12px 23px; border:1px solid #cf0a2c; border-radius:8px; background:#cf0a2c; color:#fff; font-size:14px !important; font-weight:800 !important; text-decoration:none; }
.account-primary:hover { background:#ae0626; border-color:#ae0626; }
.account-primary:disabled,.logout-button:disabled { opacity:.55; cursor:wait; }
.orders-error { padding:32px 0 12px; }
.orders-error h2 { font-size:18px; margin:0 0 10px; }
.help-card { display:block; position:relative; overflow:hidden; min-height:172px; padding:27px 25px; border-radius:14px; color:#fff; background:linear-gradient(90deg,rgba(16,16,18,.96) 0%,rgba(16,16,18,.6) 80%),url('assets/etari-diagnostics-v1.jpg') center/cover; }
.help-card h2 { font-size:23px; line-height:1.3; margin:0 0 11px; font-weight:800; letter-spacing:-.6px; }
.help-card p { font-size:13px; line-height:1.7; color:#e4e4e7; margin:0; }
.help-card > span { display:flex; align-items:center; gap:8px; font-size:12px; font-weight:700; margin-top:18px; }
.help-card:hover > span { text-decoration:underline; }
.profile-intro { margin:10px 0 25px; font-size:14px; color:#778493; line-height:1.7; }
.profile-panel fieldset { border:0; padding:0; margin:0; min-width:0; }
.profile-fields { display:grid; grid-template-columns:1fr 1fr; gap:20px 16px; }
.profile-fields label { display:flex; flex-direction:column; gap:8px; font-size:13px; font-weight:700; min-width:0; }
.profile-field-wide { grid-column:1/-1; }
.profile-fields input { width:100%; min-width:0; height:46px; padding:10px 12px; border:1px solid #dfe2e7; border-radius:7px; background:#fff; color:#24282e; font-size:14px; }
.profile-fields input[readonly] { background:#f4f5f7; color:#74808e; }
.profile-hint { font-size:12px; line-height:1.7; color:#74808e; margin:12px 0 25px; }
.profile-hint .account-link { font-size:12px; }
.account-feedback { font-size:13px; line-height:1.65; color:#74808e; margin:15px 0 0; }
.account-feedback[data-state="error"] { color:#ba1233; }
.account-feedback[data-state="success"] { color:#187542; }
.account-retry { border:0; background:none; padding:10px 0; }
@media(min-width:1500px) { .cabinet-page { grid-template-columns:288px minmax(0,1fr) 310px; gap:28px; } .profile-card { padding:30px 38px; } .account-panel { padding:30px; } }
@media(max-width:1150px) { .cabinet-page { grid-template-columns:240px minmax(0,1fr); } .help-card { grid-column:2; } .profile-card { grid-row:1/3; padding:28px 24px; } }
@media(max-width:700px) {
  .cabinet-page { display:flex; flex-direction:column; gap:16px; padding-top:18px; padding-bottom:32px; }
  .profile-card,.cabinet-content,.help-card { width:100%; }
  .profile-card { padding:20px; }
  .profile-identity { flex-direction:row; gap:16px; text-align:left; }
  .profile-avatar { width:62px; height:62px; margin:0; }
  .profile-identity-text { align-items:flex-start; gap:5px; }
  .profile-phone { font-size:13px; }
  .profile-nav { display:grid; grid-template-columns:1fr 1fr; gap:0 20px; margin-top:15px; }
  .profile-nav a { min-height:40px; font-size:13px; }
  .profile-nav-divider { grid-column:1/-1; margin:5px 0; }
  .profile-nav a[href="/cart.html"] { grid-column:1/-1; }
  .profile-signout { margin-top:10px; padding-top:15px; }
  .logout-button { font-size:13px; }
  .account-panel { padding:22px 20px; }
  .account-panel h1 { font-size:21px; }
  .orders-heading { gap:10px; }
  .orders-heading .account-link { font-size:12px; }
  .order-main { flex-wrap:wrap; gap:5px 12px; }
  .order-products { font-size:13px; }
  .order-item { padding:20px 0; }
  .order-meta { font-size:11px; }
  .help-card { min-height:160px; }
}
@media(max-width:380px) { .profile-fields { grid-template-columns:1fr; } .orders-tabs { gap:18px; } .orders-tabs button { font-size:13px; } }
@media(prefers-reduced-motion:reduce) { .order-expand { transition:none; } }
