/* NOREM - panel klienta WooCommerce. Wspólne style pozostają w styles.css. */

.account-page {
  --account-panel: #fff;
  --account-warm: #f7f4f0;
  --account-warm-strong: #efeae4;
  --account-success: #187a58;
  --account-danger: #a33b35;
  --account-link: #1f6098;
}

.account-page .main-nav {
  gap: 38px;
  transform: translateX(-64px);
}

.account-page .main-nav a:first-child::after {
  display: none;
}

.account-page .header-action--account[aria-current="page"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.account-page .header-action--account[aria-current="page"]:hover {
  background: #10283d;
}

.account-page .header-action--cart {
  border-color: transparent;
  background: transparent;
  color: var(--ink);
}

.account-page .header-action--cart:hover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.account-page .header-action--cart .cart-count {
  background: var(--ink);
  color: #fff;
}

.account-main {
  background: var(--page);
}

.account-intro {
  padding-block: 62px 38px;
}

.account-intro__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
}

.account-intro h1 {
  font-size: clamp(42px, 4.3vw, 62px);
  line-height: 1;
}

.account-intro__inner > div:first-child > p {
  max-width: 54ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.account-identity {
  min-width: 270px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px 12px 12px;
  border-radius: 14px;
  background: var(--account-warm);
}

.account-identity > span:first-child,
.account-sidebar__profile > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.account-identity > span:first-child {
  width: 45px;
  height: 45px;
  font-size: 13px;
}

.account-identity strong,
.account-identity small,
.account-sidebar__profile strong,
.account-sidebar__profile small {
  display: block;
}

.account-identity strong {
  font-size: 14px;
}

.account-identity small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.account-section {
  padding-bottom: 78px;
}

.account-workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: stretch;
  min-height: 710px;
}

.account-workspace[hidden],
.account-auth[hidden],
.account-view[hidden],
.address-edit-form[hidden] {
  display: none !important;
}

.account-sidebar {
  position: relative;
  z-index: 1;
  padding: 28px 20px;
  border-radius: 16px 0 0 16px;
  background: var(--ink);
  color: #fff;
}

.account-sidebar__profile {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 8px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.account-sidebar__profile > span {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.13);
  font-size: 13px;
}

.account-sidebar__profile strong {
  color: #fff;
  font-size: 14px;
}

.account-sidebar__profile small {
  margin-top: 2px;
  color: #b8c2ca;
  font-size: 12px;
}

.account-nav {
  display: grid;
  gap: 4px;
  margin-top: 22px;
}

.account-nav a,
.account-nav button {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cad2d8;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.account-nav a:hover,
.account-nav button:hover,
.account-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.account-nav a:hover,
.account-nav button:hover {
  transform: translateX(2px);
}

.account-nav svg {
  width: 19px;
  height: 19px;
}

.account-nav small {
  min-width: 22px;
  min-height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 11px;
}

.account-nav button {
  margin-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0;
  color: #f0c1bd;
}

.account-mobile-label,
.account-mobile-nav,
.account-mobile-logout {
  display: none;
}

.account-content {
  min-width: 0;
  padding: clamp(28px, 4vw, 56px);
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 16px 16px 0;
  background: var(--account-panel);
  box-shadow: var(--shadow);
}

.account-demo-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 12px;
}

.account-demo-note svg {
  width: 15px;
  height: 15px;
}

.account-view {
  animation: account-view-in 0.38s var(--ease) both;
}

@keyframes account-view-in {
  from {
    opacity: 0.72;
    transform: translateY(8px);
    filter: blur(2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-view {
    animation: none;
  }
}

.account-view__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.account-view__header h2 {
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.035em;
}

.account-view__header p {
  max-width: 60ch;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.account-text-link,
.account-view__header > a {
  flex: 0 0 auto;
  padding-block: 8px;
  color: var(--account-link);
  font-size: 13px;
  font-weight: 700;
}

.latest-order {
  border-radius: 14px;
  background: var(--account-warm);
}

.latest-order > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid #e3ded8;
}

.latest-order > header h3 {
  font-size: 21px;
}

.latest-order > header > a,
.account-support a,
.account-empty-state > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.latest-order > header > a svg,
.account-support a svg,
.account-empty-state > a svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s var(--ease);
}

.latest-order > header > a:hover svg,
.account-support a:hover svg,
.account-empty-state > a:hover svg {
  transform: translateX(3px);
}

.latest-order__body {
  display: grid;
  grid-template-columns: 126px minmax(180px, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 26px 24px;
}

.latest-order__image {
  height: 84px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
}

.latest-order__image img {
  width: 110px;
  height: 74px;
  object-fit: contain;
}

.latest-order__product strong,
.latest-order__product small {
  display: block;
}

.latest-order__product strong {
  font-size: 15px;
}

.latest-order__product small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.latest-order__meta {
  display: flex;
  gap: 38px;
  margin: 0;
}

.latest-order__meta dt {
  color: var(--muted);
  font-size: 11px;
}

.latest-order__meta dd {
  margin: 5px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.account-dashboard-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.8fr);
  gap: 22px;
  margin-top: 22px;
}

.account-address-preview,
.account-support {
  min-height: 210px;
  padding: 25px;
  border-radius: 14px;
}

.account-address-preview {
  border: 1px solid var(--line);
}

.account-address-preview > header,
.address-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.account-address-preview h3,
.account-support h3,
.address-card h3,
.account-empty-state h3 {
  font-size: 19px;
}

.account-address-preview p,
.account-support p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.account-address-preview > header a,
.address-card > header button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: var(--account-link);
  font-size: 12px;
  font-weight: 700;
}

.account-address-preview > header svg {
  width: 14px;
  height: 14px;
}

.account-address-preview address,
.address-card address {
  margin-top: 25px;
  color: var(--ink-soft);
  font-size: 14px;
  font-style: normal;
  line-height: 1.7;
}

.account-support {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-content: center;
  gap: 18px;
  background: var(--ink);
  color: #fff;
}

.account-support > svg {
  width: 38px;
  height: 38px;
  color: #fff;
  stroke-width: 1.35;
}

.account-support h3,
.account-support a {
  color: #fff;
}

.account-support p {
  color: #bec7ce;
  line-height: 1.5;
}

.account-support a {
  margin-top: 20px;
}

.orders-list {
  display: grid;
  gap: 14px;
}

.order-row {
  display: grid;
  grid-template-columns: 0.8fr 1.1fr 0.75fr auto;
  align-items: center;
  gap: 20px;
  padding: 21px 22px;
  border-radius: 12px;
  background: var(--account-warm);
}

.order-row div > small,
.order-row div > strong {
  display: block;
}

.order-row div > small {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
}

.order-row div > strong {
  font-size: 13px;
}

.order-row button,
.saved-payment > button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.account-empty-state {
  min-height: 390px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 48px 24px;
  text-align: center;
}

.account-empty-state > span {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--account-warm);
}

.account-empty-state > span svg {
  width: 30px;
  height: 30px;
}

.account-empty-state p {
  max-width: 48ch;
  margin: 10px auto 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.address-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.address-card {
  min-height: 275px;
  padding: 25px;
  border-radius: 14px;
  background: var(--account-warm);
}

.address-card > header > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.address-card > header svg {
  width: 19px;
  height: 19px;
}

.address-card address a {
  color: var(--account-link);
}

.account-form {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.account-form > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.account-form > header h3 {
  font-size: 22px;
}

.account-form > header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.account-form > header > button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.account-form > header > button svg {
  width: 18px;
  height: 18px;
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.account-form label,
.account-login-form > label,
.password-fields > label,
.password-fields > .account-form-grid > label {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.account-form label > span:first-child,
.account-login-form > label > span:first-child,
.password-fields label > span:first-child {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.account-form label.is-wide {
  grid-column: 1 / -1;
}

.account-form input,
.account-login-form input {
  width: 100%;
  min-height: 50px;
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.account-form input:focus,
.account-login-form input:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 123, 199, 0.13);
}

.account-form input[aria-invalid="true"],
.account-login-form input[aria-invalid="true"] {
  border-color: var(--account-danger);
}

.account-form label small {
  color: var(--muted);
  font-size: 11px;
}

.account-primary-button,
.account-secondary-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  padding: 13px 20px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
}

.account-primary-button {
  position: relative;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.account-primary-button:hover {
  background: #10283d;
}

.account-primary-button.is-loading {
  color: transparent;
  cursor: wait;
}

.account-primary-button.is-loading svg {
  opacity: 0;
}

.account-primary-button.is-loading::after {
  content: attr(data-loading-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
}

.account-primary-button:disabled,
.order-row button:disabled,
.saved-payment > button:disabled {
  opacity: 0.72;
}

.order-row button.is-loading,
.saved-payment > button.is-loading {
  cursor: wait;
}

.account-primary-button svg,
.account-secondary-button svg {
  width: 17px;
  height: 17px;
}

.account-secondary-button {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.password-fields {
  display: grid;
  gap: 18px;
  margin: 32px 0 0;
  padding: 28px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.password-fields legend {
  margin-bottom: 20px;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
}

.saved-payment {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 20px;
  padding: 22px;
  border-radius: 12px;
  background: var(--account-warm);
}

.saved-payment__brand {
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
}

.saved-payment__brand img {
  width: 54px;
  height: 36px;
  object-fit: contain;
}

.saved-payment > div strong,
.saved-payment > div small {
  display: block;
}

.saved-payment > div strong {
  font-size: 14px;
}

.saved-payment > div small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.saved-payment__default {
  padding: 6px 9px;
  border-radius: 999px;
  background: #e5f3ed;
  color: #146447;
  font-size: 11px;
  font-weight: 700;
}

.account-status {
  min-height: 22px;
  margin-top: 20px;
  color: var(--account-success);
  font-size: 13px;
  font-weight: 650;
}

.account-status[data-state="error"] {
  color: var(--account-danger);
}

.account-auth {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(380px, 1.15fr);
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.account-auth__copy {
  display: grid;
  align-content: center;
  padding: clamp(36px, 5vw, 76px);
  background: var(--ink);
  color: #fff;
}

.account-auth__copy > span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.account-auth__copy > span svg {
  width: 27px;
  height: 27px;
}

.account-auth__copy h2 {
  color: #fff;
  font-size: clamp(30px, 3vw, 42px);
}

.account-auth__copy > p {
  max-width: 44ch;
  margin-top: 15px;
  color: #c2cbd2;
  line-height: 1.6;
}

.account-auth__copy ul {
  display: grid;
  gap: 13px;
  margin-top: 32px;
}

.account-auth__copy li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #e5e9ec;
  font-size: 14px;
}

.account-auth__copy li svg {
  width: 17px;
  height: 17px;
  color: #8ad1b8;
}

.account-login-form {
  display: grid;
  align-content: center;
  padding: clamp(36px, 5vw, 76px);
}

.account-login-form h2 {
  margin-bottom: 28px;
  font-size: 32px;
}

.account-login-form > label + label {
  margin-top: 18px;
}

.password-input {
  position: relative;
}

.password-input input {
  padding-right: 50px;
}

.password-input button {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
}

.password-input button svg {
  width: 18px;
  height: 18px;
}

.account-field-error {
  min-height: 16px;
  color: var(--account-danger);
  font-size: 12px;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  font-size: 13px;
}

.login-options label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-options input {
  width: 17px;
  min-height: 17px;
  accent-color: var(--ink);
}

.login-options a,
.account-login-form > p a {
  color: var(--account-link);
  font-weight: 650;
}

.account-login-form .account-primary-button {
  width: 100%;
}

.account-login-form > .account-auth-status {
  min-height: 18px;
  margin-top: 14px;
  color: var(--account-link);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}

.account-login-form > p {
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.cart-footer {
  border-top: 1px solid var(--line);
}

@media (max-width: 1180px) {
  .account-page .main-nav {
    gap: 26px;
    transform: translateX(-20px);
  }

  .account-workspace {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .latest-order__body {
    grid-template-columns: 110px minmax(160px, 1fr);
  }

  .latest-order__meta {
    grid-column: 2;
  }

  .order-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .order-row button {
    grid-column: 1 / -1;
    width: max-content;
  }
}

@media (max-width: 1080px) and (min-width: 761px) {
  .account-page .main-nav {
    gap: 20px;
    transform: none;
  }

  .account-page .header-action {
    width: 42px;
    padding-inline: 0;
  }

  .account-page .header-action > span:not(.cart-count) {
    display: none;
  }
}

@media (max-width: 940px) {
  .account-intro {
    padding-block: 40px 28px;
  }

  .account-workspace {
    grid-template-columns: 1fr;
  }

  .account-sidebar {
    padding: 18px;
    border-radius: 14px 14px 0 0;
  }

  .account-sidebar__profile,
  .account-nav {
    display: none;
  }

  .account-mobile-label {
    display: block;
    margin-bottom: 7px;
    color: #d9e0e5;
    font-size: 12px;
    font-weight: 700;
  }

  .account-mobile-nav {
    width: 100%;
    min-height: 48px;
    display: block;
    padding: 10px 42px 10px 13px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: #10283d;
    color: #fff;
    font: inherit;
    font-size: 16px;
  }

  .account-mobile-logout {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 9px 2px;
    border: 0;
    background: transparent;
    color: #f0c1bd;
    font-size: 13px;
    font-weight: 700;
  }

  .account-mobile-logout svg {
    width: 17px;
    height: 17px;
  }

  .account-content {
    border-top: 0;
    border-left: 1px solid var(--line);
    border-radius: 0 0 14px 14px;
  }

  .account-dashboard-lower {
    grid-template-columns: 1fr;
  }

  .account-auth {
    grid-template-columns: 1fr;
  }

  .account-auth__copy,
  .account-login-form {
    padding: 42px;
  }
}

@media (max-width: 760px) {
  .account-page .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .account-intro__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .account-identity {
    width: 100%;
  }

  .latest-order__body {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    padding: 20px;
  }

  .latest-order__meta {
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: 20px;
    padding-top: 18px;
    border-top: 1px solid #e3ded8;
  }

  .order-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .address-grid,
  .account-form-grid {
    grid-template-columns: 1fr;
  }

  .account-form label.is-wide {
    grid-column: auto;
  }

  .saved-payment {
    grid-template-columns: 64px minmax(0, 1fr) auto;
  }

  .saved-payment > button {
    grid-column: 1 / -1;
    width: max-content;
  }
}

@media (max-width: 620px) {
  .account-page {
    --container-gutter: 12px;
  }

  .account-page .site-header {
    padding-block: 10px;
  }

  .account-page .header-actions {
    gap: 4px;
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .account-page .header-action {
    width: 42px;
    min-height: 42px;
    padding: 0;
  }

  .account-page .header-action > span:not(.cart-count) {
    display: none;
  }

  .account-page .brand-name {
    font-size: 22px;
  }

  .account-page .brand-mark {
    width: 58px;
  }

  .account-intro {
    padding-block: 30px 22px;
  }

  .account-intro h1 {
    font-size: 36px;
  }

  .account-intro__inner > div:first-child > p {
    margin-top: 11px;
    font-size: 15px;
  }

  .account-section {
    padding-bottom: 42px;
  }

  .account-sidebar {
    padding: 15px;
  }

  .account-content {
    padding: 25px 20px 30px;
  }

  .account-demo-note {
    margin-bottom: 21px;
  }

  .account-view__header {
    display: block;
    margin-bottom: 24px;
  }

  .account-view__header h2 {
    font-size: 29px;
  }

  .account-view__header > a {
    display: inline-block;
    margin-top: 9px;
  }

  .latest-order > header {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px;
  }

  .latest-order__body {
    grid-template-columns: 76px minmax(0, 1fr);
    padding: 18px;
  }

  .latest-order__image {
    height: 70px;
  }

  .latest-order__image img {
    width: 74px;
    height: 55px;
  }

  .latest-order__product strong {
    font-size: 14px;
  }

  .account-address-preview,
  .account-support,
  .address-card {
    padding: 21px;
  }

  .order-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .order-row button {
    grid-column: auto;
  }

  .saved-payment {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
  }

  .saved-payment__default,
  .saved-payment > button {
    grid-column: 1 / -1;
  }

  .account-auth__copy,
  .account-login-form {
    padding: 32px 22px;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-primary-button,
  .account-secondary-button {
    width: 100%;
  }
}
