/* Customer authentication */
.auth-page {
  min-height: 660px;
  padding-bottom: 64px;
  background:
    radial-gradient(circle at 10% 15%, rgba(49, 191, 194, .08), transparent 28%),
    linear-gradient(180deg, #f5f8fc 0%, #fff 72%);
}

.auth-page > .container { max-width: 1180px; }
.auth-page .breadcrumb { margin-bottom: 24px; }
.auth-layout { display: grid; grid-template-columns: minmax(300px, .82fr) minmax(420px, 1fr); align-items: stretch; overflow: hidden; border: 1px solid #dbe4ef; border-radius: 22px; background: #fff; box-shadow: 0 18px 55px rgba(15, 43, 82, .11); }
.auth-layout-register { grid-template-columns: minmax(300px, .68fr) minmax(560px, 1.32fr); }
.auth-intro { position: relative; overflow: hidden; padding: 52px 46px; color: #fff; background: linear-gradient(145deg, #05275f 0%, var(--blue) 56%, #0757a8 100%); }
.auth-intro::before { content: ""; position: absolute; width: 320px; height: 320px; right: -160px; top: -130px; border: 55px solid rgba(255, 255, 255, .055); border-radius: 50%; }
.auth-intro::after { content: ""; position: absolute; width: 230px; height: 230px; left: -130px; bottom: -125px; border-radius: 50%; background: rgba(49, 191, 194, .16); }
.auth-intro > * { position: relative; z-index: 1; }
.auth-intro-badge { display: inline-flex; padding: 7px 11px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; color: #bfe7ff; background: rgba(255, 255, 255, .08); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.auth-intro h1 { max-width: 440px; margin: 22px 0 14px; color: #fff; font-size: clamp(30px, 3.2vw, 43px); line-height: 1.08; letter-spacing: -1.2px; }
.auth-intro > p { max-width: 470px; margin: 0; color: #cbdbf1; font-size: 14px; line-height: 1.75; }
.auth-benefits { display: grid; gap: 19px; margin-top: 38px; }
.auth-benefits > div { display: grid; grid-template-columns: 31px 1fr; column-gap: 12px; align-items: center; }
.auth-benefits > div > span { grid-row: 1 / 3; display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; color: #fff; background: rgba(49, 191, 194, .85); font-size: 13px; font-weight: 900; }
.auth-benefits strong { color: #fff; font-size: 13.5px; }
.auth-benefits small { margin-top: 2px; color: #aec3dd; font-size: 11.5px; }
.auth-trust { display: flex; align-items: center; gap: 9px; margin-top: 42px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .13); color: #b9cbe1; font-size: 11.5px; }
.auth-card { align-self: center; width: 100%; max-width: 520px; margin: 0 auto; padding: 46px 54px; }
.auth-card-wide { max-width: 720px; padding-block: 38px; }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 28px; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: #f3f6fa; }
.auth-switch a { padding: 11px 14px; border-radius: 7px; color: #64748b; font-size: 13px; font-weight: 800; text-align: center; }
.auth-switch a.active { color: var(--blue); background: #fff; box-shadow: 0 3px 12px rgba(13, 45, 90, .1); }
.auth-heading { margin-bottom: 24px; }
.auth-heading h2 { margin: 7px 0 7px; color: #0f2647; font-size: clamp(25px, 3vw, 32px); line-height: 1.15; letter-spacing: -.6px; }
.auth-heading p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.auth-form .form-group { align-content: start; }
.auth-form .form-control { min-height: 48px; color: var(--ink); font: inherit; }
.auth-form .form-group label b { color: #d43b3b; }
.auth-form .form-group label small { color: #8794a6; font-weight: 500; }
.auth-address { min-height: 86px !important; }
.auth-fieldset { min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
.auth-fieldset + .auth-fieldset { padding-top: 20px; border-top: 1px solid #e9eef5; }
.auth-fieldset legend { display: flex; align-items: center; gap: 9px; width: 100%; margin-bottom: 15px; color: #1e3555; font-size: 13px; font-weight: 850; }
.auth-fieldset legend span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #fff; background: var(--blue); font-size: 11px; }
.auth-check { display: flex; align-items: flex-start; gap: 9px; color: #5c6b7e; cursor: pointer; font-size: 12px; line-height: 1.55; }
.auth-check input { flex: 0 0 auto; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--blue); }
.auth-terms { margin-top: 2px; }
.auth-submit { min-height: 50px; margin-top: 19px; border: 0; font-weight: 850; }
.auth-submit span { transition: transform .2s ease; }
.auth-submit:hover span { transform: translateX(3px); }
.auth-footnote { margin: 18px 0 0; color: #788697; font-size: 12px; text-align: center; }
.auth-footnote a { color: var(--blue); font-weight: 800; }

/* Shared validation */
.field-error { display: block; min-height: 15px; color: #b42318; font-size: 11px; font-weight: 650; }
.field-validation-valid { min-height: 0; }
.terms-error { margin-top: 5px; }
.input-validation-error { border-color: #df7770 !important; background: #fffafa !important; }
.form-alert.validation-summary-valid { display: none; }
.form-alert.validation-summary-errors { margin-bottom: 18px; padding: 12px 14px; border: 1px solid #efb5b0; border-radius: 9px; color: #9d2019; background: #fff5f4; font-size: 12px; line-height: 1.5; }
.form-alert ul { margin: 0; padding-left: 18px; }

/* Customer account */
.account-page { padding-bottom: 70px; background: #f4f7fb; scroll-behavior: smooth; }
.account-page > .container { max-width: 1320px; }
.account-page .breadcrumb { margin-bottom: 17px; }
.account-page section { scroll-margin-top: 22px; }
.account-hero { display: grid; grid-template-columns: auto 1fr minmax(240px, 310px); gap: 20px; align-items: center; margin-bottom: 22px; padding: 27px 31px; border: 1px solid #dce5f0; border-radius: 17px; background: #fff; box-shadow: 0 7px 25px rgba(24, 54, 91, .055); }
.account-avatar { display: grid; width: 64px; height: 64px; place-items: center; border-radius: 17px; color: #fff; background: linear-gradient(145deg, var(--blue), #0b66bd); box-shadow: 0 8px 18px rgba(6, 56, 141, .2); font-size: 21px; font-weight: 850; letter-spacing: .03em; }
.account-hero-copy h1 { margin: 4px 0 2px; color: #102744; font-size: 25px; letter-spacing: -.5px; }
.account-hero-copy p { margin: 0; color: #718096; font-size: 12px; }
.account-completion { padding-left: 25px; border-left: 1px solid var(--line); }
.account-completion > div:first-child { display: flex; justify-content: space-between; gap: 12px; color: #48596e; font-size: 11.5px; }
.account-completion > div strong { font-weight: 750; }
.account-completion > div span { color: var(--blue); font-weight: 850; }
.account-completion-bar { overflow: hidden; height: 7px; margin: 9px 0 7px; border-radius: 99px; background: #e9eef5; }
.account-completion-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--blue)); }
.account-completion a { color: var(--blue); font-size: 10.5px; font-weight: 750; }
.account-completion small { color: #668174; font-size: 10.5px; }
.account-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.account-sidebar { position: sticky; top: 18px; overflow: hidden; padding: 8px; border: 1px solid #dce5f0; border-radius: 14px; background: #fff; box-shadow: 0 5px 20px rgba(24, 54, 91, .045); }
.account-sidebar a, .account-sidebar button { display: flex; align-items: center; width: 100%; min-height: 45px; padding: 0 12px; border: 0; border-radius: 9px; color: #59697c; background: transparent; font-size: 12.5px; font-weight: 700; text-align: left; }
.account-sidebar a:hover, .account-sidebar a.active { color: var(--blue); background: #edf5ff; }
.account-sidebar a span, .account-sidebar button span { width: 25px; color: #7990ab; font-size: 15px; }
.account-sidebar a.active span { color: var(--blue); }
.account-sidebar a b { min-width: 23px; margin-left: auto; padding: 2px 6px; border-radius: 99px; color: var(--blue); background: #dbeaff; font-size: 10px; text-align: center; }
.account-sidebar form { margin-top: 7px; padding-top: 7px; border-top: 1px solid #edf1f5; }
.account-sidebar button { color: #a53d38; cursor: pointer; }
.account-sidebar button:hover { background: #fff3f2; }
.account-main { display: grid; gap: 20px; min-width: 0; }
.account-section { padding: 26px; border: 1px solid #dce5f0; border-radius: 15px; background: #fff; box-shadow: 0 5px 20px rgba(24, 54, 91, .04); }
.account-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.account-section-heading h2 { margin: 3px 0 0; color: #132945; font-size: 20px; letter-spacing: -.35px; }
.account-section-heading > a { color: var(--blue); font-size: 11.5px; font-weight: 750; }
.account-section-count, .account-section-note { color: #8491a1; font-size: 11px; }
.account-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.account-stats article { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 15px; border: 1px solid #e4eaf1; border-radius: 11px; background: #fbfcfe; }
.account-stat-icon { display: grid; flex: 0 0 auto; width: 38px; height: 38px; place-items: center; border-radius: 10px; font-size: 15px; font-weight: 850; }
.account-stat-icon.blue { color: #1556a5; background: #e8f2ff; }
.account-stat-icon.orange { color: #c76200; background: #fff0df; }
.account-stat-icon.green { color: #087d59; background: #e2f8f0; }
.account-stat-icon.cyan { color: #087e81; background: #e1f8f8; }
.account-stats strong { display: block; overflow: hidden; color: #172b45; font-size: 19px; line-height: 1.1; text-overflow: ellipsis; }
.account-stats small { display: block; margin-top: 4px; color: #7c8999; font-size: 10.5px; white-space: nowrap; }
.account-alert { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border: 1px solid #a7dfc9; border-radius: 10px; color: #146b50; background: #effbf6; font-size: 12.5px; font-weight: 700; }
.account-alert span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; background: #15966b; }
.account-form-alert { margin: 0 !important; }
.account-empty { padding: 38px 20px; border: 1px dashed #cbd7e5; border-radius: 12px; background: #fbfdff; text-align: center; }
.account-empty > span { display: grid; width: 50px; height: 50px; margin: 0 auto 11px; place-items: center; border-radius: 50%; color: var(--blue); background: #eaf3ff; font-size: 20px; }
.account-empty h3 { margin: 0 0 7px; color: #1a304c; font-size: 16px; }
.account-empty p { max-width: 500px; margin: 0 auto 19px; color: #738194; font-size: 11.5px; line-height: 1.6; }
.account-orders { display: grid; gap: 11px; }
.account-order-card { overflow: hidden; border: 1px solid #e1e8f0; border-radius: 11px; background: #fff; }
.account-order-card[open] { border-color: #b8cbe3; box-shadow: 0 5px 16px rgba(20, 56, 98, .06); }
.account-order-card summary { display: grid; grid-template-columns: 1.35fr .85fr .75fr .9fr; gap: 15px; align-items: center; padding: 16px 17px; list-style: none; cursor: pointer; }
.account-order-card summary::-webkit-details-marker { display: none; }
.account-order-card summary::after { content: "+"; display: none; color: var(--blue); font-size: 20px; }
.account-order-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.account-status-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 4px #f1f5f9; }
.account-status-dot.pending { background: #e9a029; box-shadow: 0 0 0 4px #fff5df; }
.account-status-dot.processing { background: #3182ce; box-shadow: 0 0 0 4px #e7f2ff; }
.account-status-dot.shipped { background: #7755c6; box-shadow: 0 0 0 4px #f0ebff; }
.account-status-dot.delivered { background: #0f9b6f; box-shadow: 0 0 0 4px #e2f8f0; }
.account-status-dot.cancelled { background: #d24b43; box-shadow: 0 0 0 4px #ffebe9; }
.account-order-card small { display: block; color: #8a97a7; font-size: 9.5px; }
.account-order-card strong { display: block; overflow: hidden; margin-top: 2px; color: #263a54; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.account-order-state { text-align: right; }
.account-order-state > span { display: inline-flex; padding: 5px 8px; border-radius: 99px; color: #56667a; background: #f1f4f7; font-size: 10px; font-weight: 800; }
.account-order-state > span.pending { color: #9b5c00; background: #fff3da; }
.account-order-state > span.processing { color: #15599d; background: #e7f2ff; }
.account-order-state > span.shipped { color: #6542af; background: #f0ebff; }
.account-order-state > span.delivered { color: #087553; background: #e2f8f0; }
.account-order-state > span.cancelled { color: #a9312b; background: #ffebe9; }
.account-order-state small { margin-top: 4px; }
.account-order-details { padding: 0 17px 18px; border-top: 1px solid #edf1f5; }
.account-order-progress { display: grid; grid-template-columns: minmax(180px, .8fr) 1.2fr; gap: 25px; align-items: center; padding: 16px 0; }
.account-order-progress strong { font-size: 12px; }
.account-order-progress span { display: block; margin-top: 3px; color: #778699; font-size: 10.5px; }
.order-progress-track { overflow: hidden; height: 7px; border-radius: 99px; background: #edf1f5; }
.order-progress-track i { display: block; height: 100%; border-radius: inherit; background: #3182ce; }
.order-progress-track i.pending { background: #e9a029; }
.order-progress-track i.shipped { background: #7755c6; }
.order-progress-track i.delivered { background: #0f9b6f; }
.order-progress-track i.cancelled { background: #d24b43; }
.account-order-products { display: grid; gap: 7px; padding: 12px; border-radius: 9px; background: #f8fafc; }
.account-order-product { display: grid; grid-template-columns: 43px 1fr auto; gap: 10px; align-items: center; }
.account-order-image { display: grid; width: 43px; height: 43px; place-items: center; overflow: hidden; border: 1px solid #e3e9f0; border-radius: 7px; color: #9aabba; background: #fff; }
.account-order-image img { width: 100%; height: 100%; object-fit: contain; }
.account-order-product strong { white-space: normal; }
.account-order-product em { color: #273a53; font-size: 11px; font-style: normal; font-weight: 800; }
.account-order-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0 0; }
.account-order-info div { min-width: 0; }
.account-order-info dt { color: #8b97a6; font-size: 9.5px; }
.account-order-info dd { overflow: hidden; margin: 3px 0 0; color: #405168; font-size: 10.5px; text-overflow: ellipsis; }
.account-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.account-form-full { grid-column: 1 / -1; }
.account-form .form-control { min-height: 45px; }
.account-form textarea.form-control { min-height: 82px; }
.account-form .form-control.readonly { color: #718096; background: #f5f7fa; cursor: not-allowed; }
.account-subsection { margin-top: 11px; padding-top: 23px; border-top: 1px solid #e7edf4; scroll-margin-top: 22px; }
.account-subsection-title { margin-bottom: 17px; }
.account-subsection-title > div { display: flex; gap: 10px; align-items: center; }
.account-subsection-title > div > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 9px; color: var(--blue); background: #eaf3ff; }
.account-subsection h3 { margin: 0; color: #203650; font-size: 14px; }
.account-subsection p { margin: 2px 0 0; color: #8491a1; font-size: 10.5px; }
.account-form-actions { display: flex; justify-content: flex-end; margin-top: 5px; padding-top: 17px; border-top: 1px solid #edf1f5; }
.account-form-actions .btn { min-width: 160px; }
.account-security-badge { padding: 6px 9px; border-radius: 99px; color: #127253; background: #e7f8f1; font-size: 10px; font-weight: 750; }
.account-password-grid { grid-template-columns: repeat(3, 1fr); }
.account-privacy-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 21px; padding: 13px 14px; border: 1px solid #dbe6f1; border-radius: 9px; background: #f7faff; }
.account-privacy-note > span { display: grid; flex: 0 0 auto; width: 21px; height: 21px; place-items: center; border-radius: 50%; color: #fff; background: var(--blue); font-size: 11px; font-weight: 850; }
.account-privacy-note p { margin: 0; color: #78879a; font-size: 10.5px; }
.account-privacy-note strong { display: block; margin-bottom: 2px; color: #38506d; font-size: 11.5px; }

@media (max-width: 1040px) {
  .auth-layout, .auth-layout-register { grid-template-columns: minmax(270px, .7fr) minmax(430px, 1.3fr); }
  .auth-intro { padding: 42px 32px; }
  .auth-card, .auth-card-wide { padding-inline: 38px; }
  .account-stats { grid-template-columns: 1fr 1fr; }
  .account-password-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .auth-layout, .auth-layout-register { display: block; max-width: 690px; margin-inline: auto; }
  .auth-intro { padding: 35px 38px; }
  .auth-intro h1 { max-width: 560px; font-size: 32px; }
  .auth-benefits { grid-template-columns: repeat(3, 1fr); gap: 13px; margin-top: 26px; }
  .auth-benefits > div { grid-template-columns: 28px 1fr; }
  .auth-benefits > div > span { width: 28px; height: 28px; }
  .auth-benefits small { display: none; }
  .auth-trust { margin-top: 25px; padding-top: 16px; }
  .auth-card, .auth-card-wide { max-width: 100%; }
  .account-hero { grid-template-columns: auto 1fr; }
  .account-completion { grid-column: 1 / -1; padding: 17px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .account-layout { grid-template-columns: 1fr; }
  .account-sidebar { position: static; display: flex; gap: 5px; overflow-x: auto; padding: 6px; scrollbar-width: thin; }
  .account-sidebar a, .account-sidebar button { min-width: max-content; padding-inline: 11px; }
  .account-sidebar form { margin: 0 0 0 auto; padding: 0 0 0 5px; border-top: 0; border-left: 1px solid #edf1f5; }
}

@media (max-width: 640px) {
  .auth-page { padding-top: 16px; padding-bottom: 35px; }
  .auth-page .breadcrumb { margin-bottom: 16px; }
  .auth-layout, .auth-layout-register { border-radius: 16px; }
  .auth-intro { padding: 29px 23px; }
  .auth-intro h1 { margin-top: 17px; font-size: 28px; }
  .auth-intro > p { font-size: 12.5px; }
  .auth-benefits { grid-template-columns: 1fr; margin-top: 22px; }
  .auth-benefits small { display: block; }
  .auth-trust { margin-top: 22px; }
  .auth-card, .auth-card-wide { padding: 27px 20px 30px; }
  .auth-switch { margin-bottom: 23px; }
  .auth-heading { margin-bottom: 20px; }
  .auth-heading h2 { font-size: 25px; }
  .auth-form .form-row { grid-template-columns: 1fr; gap: 0; }
  .auth-fieldset { margin-bottom: 16px; }
  .account-page { padding-top: 16px; padding-bottom: 38px; }
  .account-hero { grid-template-columns: 49px 1fr; gap: 13px; padding: 19px 17px; border-radius: 13px; }
  .account-avatar { width: 49px; height: 49px; border-radius: 13px; font-size: 17px; }
  .account-hero-copy h1 { font-size: 19px; }
  .account-hero-copy p { overflow: hidden; max-width: 100%; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .account-sidebar a span, .account-sidebar button span { width: 20px; }
  .account-sidebar a b { display: none; }
  .account-section { padding: 19px 16px; border-radius: 13px; }
  .account-section-heading { align-items: flex-start; margin-bottom: 16px; }
  .account-section-heading h2 { font-size: 17px; }
  .account-section-note { display: none; }
  .account-stats { gap: 8px; }
  .account-stats article { gap: 9px; padding: 12px 10px; }
  .account-stat-icon { width: 33px; height: 33px; }
  .account-stats strong { font-size: 15px; }
  .account-stats small { font-size: 9px; }
  .account-order-card summary { position: relative; grid-template-columns: 1fr auto; gap: 10px; padding: 14px; }
  .account-order-card summary::after { display: block; }
  .account-order-meta { display: none; }
  .account-order-state { padding-right: 5px; }
  .account-order-state small { display: none; }
  .account-order-details { padding-inline: 14px; }
  .account-order-progress { grid-template-columns: 1fr; gap: 9px; }
  .account-order-product { grid-template-columns: 39px 1fr; }
  .account-order-image { width: 39px; height: 39px; }
  .account-order-product em { grid-column: 2; }
  .account-order-info { grid-template-columns: 1fr; gap: 8px; }
  .account-form-grid, .account-password-grid { grid-template-columns: 1fr; }
  .account-form-full { grid-column: auto; }
  .account-form-actions { justify-content: stretch; }
  .account-form-actions .btn { width: 100%; }
}

@media (max-width: 380px) {
  .account-stats { grid-template-columns: 1fr; }
}
