/* =========================================================
   RetourHub — customer area (uses ../css/style.css tokens)
   ========================================================= */
/* "hidden" must always win over layout rules like display: grid */
[hidden] { display: none !important; }

.acc-body { background: var(--navy-50); min-height: 100vh; display: flex; flex-direction: column; }
.acc-main { flex: 1; padding: 28px 0 64px; }
.acc-loading { text-align: center; color: var(--muted); padding: 40px; }
.header-login.is-current { background: var(--brand-50); color: var(--brand-500); }
.site-footer { padding: 0 0 24px; }
.site-footer .footer-bottom a:hover { color: var(--white); }

.acc-demo { max-width: 620px; margin: 0 auto 20px; padding: 12px 16px; border-radius: 12px; background: var(--brand-50); border: 1px dashed var(--brand-100); font-size: 14px; color: var(--navy-900); }
.acc-demo code { background: var(--white); padding: 1px 6px; border-radius: 6px; font-size: 13px; }

/* ---------- Auth cards (login, register …) ---------- */
.acc-card { max-width: 460px; margin: 0 auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px 24px; box-shadow: var(--shadow); }
.acc-card-wide { max-width: 640px; }
@media (min-width: 600px) { .acc-card { padding: 40px; } }
.acc-card h1 { font-size: clamp(24px, 3vw, 30px); font-weight: 800; }
.acc-sub { color: var(--muted); margin-top: 8px; }
.acc-card form, .p-form { display: grid; gap: 16px; }
.acc-card form { margin-top: 24px; }
.acc-card .form-row, .p-form .form-row { display: grid; gap: 16px; }
@media (min-width: 600px) { .acc-card .form-row, .p-form .form-row { grid-template-columns: 1fr 1fr; } }
.acc-hint { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.acc-error { color: var(--red-500); font-weight: 600; font-size: 14px; }
.acc-ok { color: #13804A; font-weight: 600; font-size: 14px; }
.acc-error:empty, .acc-ok:empty { display: none; }
.acc-links { margin-top: 14px; text-align: center; font-size: 14px; }
.acc-switch { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); text-align: center; font-size: 15px; color: var(--muted); }
.acc-card a:not(.btn) { color: var(--brand-500); font-weight: 700; }
.acc-card a:not(.btn):hover { text-decoration: underline; }
.acc-center { text-align: center; }
.acc-center .btn { margin-top: 22px; }
.acc-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-500); font-size: 28px; }
.btn-outline-dark { background: var(--white); color: var(--navy-900); border-color: var(--border); }
.btn-outline-dark:hover { border-color: var(--brand-500); }
input[readonly] { color: var(--muted); cursor: not-allowed; }

/* ---------- Customer area layout ---------- */
.portal { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }

/* sidebar: light and compact, the content is the main thing */
.portal-side { min-width: 0; background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 12px; }

/* desktop: the sidebar is a full-height panel against the left edge of the screen */
@media (min-width: 960px) {
  .acc-main > .container:has(.portal:not([hidden])) { max-width: none; padding-left: 308px; padding-right: 40px; }
  .portal { max-width: 1240px; margin: 0 auto; }   /* content centred in the space next to the sidebar */
  .acc-main > .container:has(.portal:not([hidden])) > .acc-demo { max-width: 1240px; margin-bottom: 8px; }
  .portal-side {
    position: fixed; left: 0; top: var(--header-h); bottom: 0; z-index: 5; width: 264px;
    border: 0; border-right: 1px solid var(--border); border-radius: 0; padding: 26px 16px; overflow-y: auto;
  }
  .site-footer { position: relative; z-index: 10; }
}
.portal-user { display: flex; align-items: center; gap: 12px; padding: 4px 8px 16px; border-bottom: 1px solid var(--border); }
.portal-user > div { min-width: 0; }
.portal-user strong { display: block; font-size: 15.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-user small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-avatar { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-50); color: var(--brand-500); display: grid; place-items: center; font-size: 15px; font-weight: 800; flex: none; }
.portal-nav { display: grid; gap: 4px; padding: 14px 0; }
.portal-nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; font-size: 15.5px; font-weight: 600; color: var(--muted); transition: background-color .15s, color .15s; }
.portal-nav a svg { width: 20px; height: 20px; flex: none; }
.portal-nav a:hover { background: var(--navy-50); color: var(--navy-900); }
.portal-nav a.is-active { background: var(--brand-50); color: var(--brand-500); }
.portal-count { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 800; padding: 0 8px; line-height: 20px; border-radius: 999px; background: var(--navy-50); color: var(--muted); }
.portal-count:empty { display: none; }
.portal-nav a.is-active .portal-count { background: var(--white); color: var(--brand-500); }
.portal-logout { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 12px 4px; border: 0; border-top: 1px solid var(--border); background: none; color: var(--muted); font-size: 15.5px; font-weight: 600; cursor: pointer; }
.portal-logout svg { width: 20px; height: 20px; }
.portal-logout:hover { color: var(--red-500); }

/* mobile: sidebar becomes a horizontal tab bar */
@media (max-width: 959px) {
  .portal-side { padding: 12px; }
  .portal-user { padding: 2px 2px 12px; }
  .portal-nav { display: flex; overflow-x: auto; gap: 6px; padding: 12px 0 2px; scrollbar-width: none; }
  .portal-nav::-webkit-scrollbar { display: none; }
  .portal-nav a { flex: none; padding: 9px 12px; border: 1px solid var(--border); }
  .portal-logout { display: none; }
}

.portal-main { min-width: 0; }
.tab-title { font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin-bottom: 20px; }
.portal-alert { margin-bottom: 18px; padding: 14px 18px; border-radius: var(--radius); font-weight: 600; }
.portal-alert.is-info { background: var(--brand-50); color: var(--navy-900); border: 1px solid var(--brand-100); }
.portal-alert.is-danger { background: #FDEDEE; color: #9E1F25; border: 1px solid #F6C9CB; }

/* ---------- Cards, stats ---------- */
.p-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; min-width: 0; }
.p-card h2 { font-size: 18px; font-weight: 800; }
.p-card h3 { font-size: 15px; font-weight: 800; margin: 22px 0 10px; }
.p-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.p-card-head a, .p-link { font-weight: 700; color: var(--brand-500); font-size: 14px; }
.p-muted { color: var(--muted); font-size: 14px; }
.p-card .p-muted + .btn { margin-top: 16px; }
.p-big { font-size: 26px; font-weight: 800; margin: 8px 0 4px; letter-spacing: -0.02em; }
.p-link { display: inline-block; margin-top: 10px; }
.p-stack { display: grid; gap: 20px; align-content: start; }
.p-cols { display: grid; gap: 20px; margin-top: 20px; align-items: start; }
@media (min-width: 1100px) { .p-cols { grid-template-columns: 1.55fr 1fr; } }
.p-empty { color: var(--muted); padding: 24px 0; text-align: center; }
.p-note { margin-top: 14px; }

.p-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 1100px) { .p-stats { grid-template-columns: repeat(4, 1fr); } .p-stats-3 { grid-template-columns: repeat(3, 1fr); } }
.p-stats-3 { margin-bottom: 20px; }
@media (max-width: 560px) { .p-stats-3 { grid-template-columns: 1fr; } }
.p-stat { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.p-stat > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.p-stat strong { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.p-stat small { font-size: 13px; color: var(--muted); }
.p-stat-accent { background: var(--brand-500); border-color: var(--brand-500); color: var(--white); }
.p-stat-accent > span, .p-stat-accent small { color: rgba(255, 255, 255, .78); }
.p-bar { height: 6px; border-radius: 999px; background: var(--navy-50); overflow: hidden; margin: 6px 0 4px; }
.p-bar i { display: block; height: 100%; width: 0; background: var(--brand-500); border-radius: inherit; transition: width .6s cubic-bezier(.23, 1, .32, 1); }
.p-bar.is-full i { background: var(--red-500); }
.p-bar-lg { height: 10px; }

/* ---------- Parcels ---------- */
.parcel-list { display: grid; }
.parcel-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); cursor: pointer; text-align: left; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; }
.parcel-row:first-child { border-top: 0; }
.parcel-row:hover .parcel-row-title { color: var(--brand-500); }
.parcel-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--navy-50); flex: none; display: grid; place-items: center; color: var(--muted); }
.parcel-thumb svg { width: 22px; height: 22px; }
.parcel-row-main { min-width: 0; flex: 1; }
.parcel-row-title { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.parcel-row-sub { display: block; font-size: 13px; color: var(--muted); }

.p-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.p-toolbar input { flex: 1 1 240px; min-width: 0; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 15px; background: var(--white); }
.p-toolbar input:focus { outline: none; border-color: var(--brand-500); }
.p-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.p-chips button { border: 1.5px solid var(--border); background: var(--white); padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--muted); }
.p-chips button.is-active { background: var(--navy-900); border-color: var(--navy-900); color: var(--white); }

.parcel-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.parcel-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; text-align: left; padding: 0; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s cubic-bezier(.23, 1, .32, 1); }
@media (hover: hover) and (pointer: fine) { .parcel-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); } }
.parcel-card-img { position: relative; aspect-ratio: 4 / 3; background: var(--navy-50); display: grid; place-items: center; color: var(--muted); }
.parcel-card-img img { width: 100%; height: 100%; object-fit: cover; }
.parcel-card-img svg { width: 36px; height: 36px; }
.parcel-card-img .photo-count { position: absolute; right: 10px; bottom: 10px; background: rgba(7, 7, 51, .75); color: var(--white); font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.parcel-card-body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.parcel-card-body strong { font-size: 15px; }
.parcel-card-body small { color: var(--muted); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--navy-50); color: var(--navy-900); }
.chip-stored { background: var(--brand-50); color: var(--brand-500); }
.chip-reshipped { background: #E7F8EE; color: #13804A; }
.chip-returned, .chip-received { background: var(--navy-50); color: var(--muted); }
.chip-good { background: #E7F8EE; color: #13804A; }
.chip-opened { background: #FFF6DB; color: #8A5A00; }
.chip-damaged { background: #FDEDEE; color: #C62F35; }
.chip-warn { background: #FFF6DB; color: #8A5A00; }

/* ---------- Subscription ---------- */
.acc-status { padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.acc-status.s-pending, .acc-status.s-trial { background: var(--brand-50); color: var(--brand-500); }
.acc-status.s-active { background: #E7F8EE; color: #13804A; }
.acc-status.s-cancelled { background: var(--navy-50); color: var(--muted); }
.sub-plan { font-size: 30px !important; margin-top: 2px; }
.sub-price { font-size: 22px; font-weight: 800; color: var(--brand-500); }
.sub-usage { margin: 20px 0 6px; padding: 16px; border-radius: var(--radius); background: var(--navy-50); }
.sub-extra { margin: 8px 0 2px; font-size: 14px; font-weight: 700; color: var(--red-500); }
.sub-usage-head { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 14px; }
.sub-features { display: grid; gap: 10px; }
.sub-features li { position: relative; padding-left: 28px; font-size: 15px; }
.sub-features li::before { content: ""; position: absolute; left: 0; top: 2px; width: 19px; height: 19px; border-radius: 50%; background: var(--brand-500); }
.sub-features li::after { content: ""; position: absolute; left: 7px; top: 6px; width: 5px; height: 9px; border: solid var(--white); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.sub-features li.plus { padding-left: 0; color: var(--muted); font-weight: 700; font-size: 14px; }
.sub-features li.plus::before, .sub-features li.plus::after { display: none; }
.sub-options { display: grid; gap: 10px; margin-top: 14px; }
.sub-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1.5px solid var(--border); border-radius: var(--radius); }
.sub-option strong { display: block; }
.sub-option small { color: var(--muted); }
.sub-option.is-current { border-color: var(--brand-500); background: var(--brand-50); }

/* ---------- Facts / tables ---------- */
.acc-facts { margin: 18px 0 0; display: grid; }
.acc-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.acc-facts dt { color: var(--muted); font-weight: 600; font-size: 14px; }
.acc-facts dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; white-space: pre-line; }
.acc-pay { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; vertical-align: 2px; }
.acc-pay:empty { display: none; }
.acc-pay.p-ok { background: #E7F8EE; color: #13804A; }
.acc-pay.p-soon { background: #FFF6DB; color: #8A5A00; }
.acc-pay.p-overdue { background: #FDEDEE; color: #C62F35; }
.acc-address { margin: 12px 0; padding: 14px 16px; border-radius: 12px; background: var(--navy-50); line-height: 1.6; }

.p-table-wrap { overflow-x: auto; margin-top: 10px; }
.p-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.p-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.p-table td { padding: 12px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.p-table .num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Parcel dialog + gallery ---------- */
.p-dialog { width: min(980px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); color: var(--text); }
.p-dialog::backdrop { background: rgba(7, 7, 51, .6); }
.p-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--white); z-index: 1; }
.p-dialog-head h2 { font-size: 20px; font-weight: 800; }
.p-close { width: 38px; height: 38px; border: 0; border-radius: 10px; background: var(--navy-50); font-size: 24px; line-height: 1; cursor: pointer; flex: none; }
.p-dialog-body { display: grid; gap: 24px; padding: 22px; }
@media (min-width: 820px) { .p-dialog-body { grid-template-columns: 1.3fr 1fr; } }
.gallery-main { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--navy-50); aspect-ratio: 4 / 3; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: var(--shadow-sm); }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-count { position: absolute; left: 10px; bottom: 10px; background: rgba(7, 7, 51, .75); color: var(--white); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; width: 74px; height: 56px; flex: none; cursor: pointer; background: var(--navy-50); }
.gallery-thumbs button.is-active { border-color: var(--brand-500); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-reship { margin-top: 20px; padding: 16px; border-radius: var(--radius); background: var(--brand-50); display: grid; gap: 10px; }
.pd-reship .p-muted { font-size: 13.5px; }
.pd-reship[hidden], .pd-request-done[hidden] { display: none; }
.pd-request-done { margin-top: 20px; padding: 16px; border-radius: var(--radius); background: #E7F8EE; border: 1px solid #BDE8CF; display: grid; gap: 8px; justify-items: start; }
.pd-request-done strong { color: #13804A; }
.pd-request-address { white-space: pre-line; font-size: 14px; }
.pd-request-done .p-muted { font-size: 13.5px; }
.chip-request { background: #FFF4DB; color: #8A5A00; }
/* request dialog (address for re-shipping / sending back) */
.p-dialog-sm { width: min(520px, calc(100vw - 24px)); }
.p-dialog-body.rq-body { display: grid; grid-template-columns: 1fr; gap: 16px; }
.rq-body textarea { width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--navy-50); font: inherit; font-size: 16px; resize: vertical; }
.rq-body textarea:focus { outline: none; border-color: var(--brand-500); background: var(--white); box-shadow: 0 0 0 4px rgba(18, 18, 166, .15); }
.rq-body .field.invalid textarea { border-color: var(--red-500); }
.rq-body .field { margin: 0; }
.rq-body .form-row.rq-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acc-terms { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 2px; font-size: 14px; line-height: 1.45; cursor: pointer; }
.acc-terms input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--brand-500); }
.acc-terms a { font-weight: 700; color: var(--brand-500); text-decoration: underline; text-underline-offset: 3px; }
.rq-who { margin: 0; font-weight: 700; font-size: 15px; }
.rq-price { margin: -6px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--brand-50); color: var(--navy-900); font-size: 14px; }
.rq-price.is-prepay { background: #FDECEA; color: #B42318; font-weight: 600; }
.charges-card { margin-bottom: 18px; }
.charges-card > .p-muted { margin: 4px 0 12px; }
.ch-total { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--navy-50); font-weight: 700; font-size: 15px; }
.ch-total:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ch-open { color: #8A5A00; font-weight: 700; }
.ch-paid { color: #13804A; font-weight: 700; }
.rq-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.return-all { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.return-all[hidden] { display: none; }
.return-all p { margin: 4px 0 0; }

/* ---------- Home: welcome banner, three numbers, photos, activity ---------- */
.home-hero {
  position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
  margin-bottom: 20px; padding: 28px 30px; border-radius: 20px; color: var(--white);
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(80, 90, 255, .45), transparent 65%),
    radial-gradient(500px 300px at 0% 100%, rgba(18, 18, 166, .9), transparent 70%),
    var(--navy-900);
}
.home-hero h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -0.02em; }
.home-hero-text p { margin: 6px 0 0; color: rgba(255, 255, 255, .72); font-size: 15px; }
.home-hero-address { min-width: 0; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.home-hero-address > span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .6); margin-bottom: 6px; }
.home-hero-address .address-box:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.home-hero-address strong { font-size: 15px; }
.home-hero-address [data-address] { font-size: 15px; color: rgba(255, 255, 255, .9); }
.home-copy { margin-left: 6px; background: var(--white); color: var(--navy-900); }
.home-copy:hover { background: var(--brand-50); }
.home-hero-address .address-pending { margin: 0; color: rgba(255, 255, 255, .8); font-size: 14px; max-width: 320px; }

.home-block { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px 20px; }
.home-block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.home-block-head h2 { font-size: 17px; font-weight: 800; }
.home-block-head a { font-size: 14px; font-weight: 700; color: var(--brand-500); }

.home-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.home-photo { display: grid; gap: 3px; justify-items: start; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.home-photo-img { display: grid; place-items: center; width: 100%; aspect-ratio: 1; margin-bottom: 6px; border-radius: 12px; overflow: hidden; background: var(--navy-50); color: var(--muted); transition: transform .15s; }
.home-photo:hover .home-photo-img { transform: scale(1.02); }
.home-photo-img img { width: 100%; height: 100%; object-fit: cover; }
.home-photo-img svg { width: 30px; height: 30px; }
.home-photo strong { font-size: 14px; line-height: 1.3; }
.home-photo small { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }

@media (max-width: 640px) {
  .home-hero { padding: 22px 20px; }
  .home-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Invoices: two numbers, pay now ---------- */
@media (min-width: 700px) { .p-stats-2 { grid-template-columns: repeat(2, 1fr); } }
.p-stats-2 { margin-bottom: 20px; }
@media (max-width: 699px) { .p-stats-2 { grid-template-columns: 1fr; } }
.pay-now-next { justify-self: start; align-self: flex-start; width: auto; margin-top: 10px; }
.pay-now-next[hidden] { display: none; }
.p-dialog-body.pay-body { display: grid; grid-template-columns: 1fr; gap: 14px; }
.pay-amount { margin: 0; font-size: 34px; font-weight: 800; color: var(--navy-900); }
.pay-bank { padding: 14px 16px; border-radius: 12px; background: var(--navy-50); }
.pay-bank .acc-facts { margin-top: 8px; }
.pay-bank .p-muted { margin: 6px 0 0; }

/* ---------- Plan: upgrade + cancel ---------- */
.sub-notice:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #E7F8EE; color: #13804A; }
.sub-notice.is-danger { background: #FDECEA; color: #B42318; }
.sub-notice strong { font-size: 14px; }
.sub-cancel .p-muted { margin: 6px 0 14px; }
.btn-danger-outline { background: var(--white); color: #B42318; border-color: #F3B8B2; }
.btn-danger-outline:hover { background: #FDECEA; border-color: #B42318; }
.btn-danger-outline[hidden] { display: none; }

/* ---------- Settings ---------- */
.set-tabs { display: flex; gap: 6px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); }
.set-tabs::-webkit-scrollbar { display: none; }
.set-tabs button { flex: none; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer; }
.set-tabs button:hover { color: var(--navy-900); }
.set-tabs button.is-active { color: var(--brand-500); border-bottom-color: var(--brand-500); }
.set-pane { max-width: 760px; }
.set-pane[hidden] { display: none; }
.set-sub { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border); }
.set-pane textarea { width: 100%; padding: 13px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--navy-50); font: inherit; font-size: 16px; resize: vertical; }
.set-pane textarea:focus { outline: none; border-color: var(--brand-500); background: var(--white); box-shadow: 0 0 0 4px rgba(18, 18, 166, .15); }
.set-note { margin-top: 16px; }
.carrier-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 10px 0 8px; }
.carrier-opt { position: relative; cursor: pointer; }
.carrier-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.carrier-opt span { display: grid; gap: 2px; height: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--white); transition: border-color .15s, background-color .15s; }
.carrier-opt b { font-size: 15px; }
.carrier-opt small { font-size: 12.5px; color: var(--muted); }
.carrier-opt:hover span { border-color: rgba(18, 18, 166, .4); }
.carrier-opt input:checked + span { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(18, 18, 166, .12); }
.carrier-opt input:focus-visible + span { box-shadow: 0 0 0 4px rgba(18, 18, 166, .2); }
.lang-pick { margin-top: 14px; }
.pay-methods { display: grid; gap: 12px; margin-top: 14px; }
.pay-method { display: grid; gap: 4px; justify-items: start; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 12px; }
.pay-method.is-current { border-color: var(--brand-500); background: var(--brand-50); }
.pay-method .p-muted { margin: 0 0 4px; }
.rq-carrier[hidden] { display: none; }
.rq-body select { width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--navy-50); font: inherit; font-size: 16px; }

/* ---------- Returns: pick for bulk actions ---------- */
.parcel-card-wrap { position: relative; display: grid; }
.parcel-card-wrap.is-selected .parcel-card { outline: 3px solid var(--brand-500); outline-offset: -1px; }
.pc-check { position: absolute; top: 10px; left: 10px; z-index: 2; cursor: pointer; }
.pc-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pc-check span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: rgba(255, 255, 255, .92); border: 2px solid var(--border); box-shadow: 0 2px 6px rgba(7, 7, 51, .15); }
.pc-check input:checked + span { background: var(--brand-500); border-color: var(--brand-500); }
.pc-check input:checked + span::after { content: ""; width: 7px; height: 12px; margin-top: -3px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.pc-check input:focus-visible + span { box-shadow: 0 0 0 4px rgba(18, 18, 166, .25); }
.bulk-hint { margin: 0 0 12px; font-size: 13.5px; }
.bulk-bar:not([hidden]) { position: sticky; top: calc(var(--header-h) + 10px); z-index: 6; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 16px; padding: 12px 16px; border-radius: 14px; background: var(--navy-900); color: var(--white); box-shadow: 0 14px 30px -14px rgba(7, 7, 51, .6); }
.bulk-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bulk-bar .btn-outline-dark { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .35); }
.bulk-clear { background: none; color: rgba(255, 255, 255, .75); border-color: transparent; }
.p-toolbar #parcel-export { margin-left: auto; }
.chip-disposed { background: var(--navy-50); color: var(--muted); }
.btn-ghost-dark { background: none; color: var(--muted); border-color: transparent; }
.btn-ghost-dark:hover { color: var(--navy-900); background: var(--navy-50); }

/* ---------- Expected returns ---------- */
.tab-lead { margin: -8px 0 18px; max-width: 720px; }
.exp-form { margin-bottom: 18px; max-width: 760px; }

/* ---------- Return address page ---------- */
.addr-hero {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 30px; margin-bottom: 20px; padding: 26px 28px;
  border-radius: 20px; color: var(--white);
  background: radial-gradient(600px 300px at 90% 0%, rgba(80, 90, 255, .45), transparent 65%), radial-gradient(500px 300px at 0% 100%, rgba(18, 18, 166, .9), transparent 70%), var(--navy-900);
}
.addr-hero[hidden] { display: none; }
.addr-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: rgba(255, 255, 255, .6); margin-bottom: 8px; }
.addr-block { margin: 0; white-space: pre-line; font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; line-height: 1.35; }
.addr-code-note { margin: 10px 0 0; max-width: 560px; font-size: 14px; color: rgba(255, 255, 255, .78); }
.addr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.addr-print { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .4); }
.addr-print:hover { background: rgba(255, 255, 255, .1); }
.addr-langs { margin: 12px 0 10px; }
.addr-instr { width: 100%; margin-bottom: 12px; padding: 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--navy-50); font: inherit; font-size: 14.5px; line-height: 1.55; resize: vertical; }
.addr-tips { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 10px; }
.addr-tips li { line-height: 1.5; }

/* ---------- Reports ---------- */
.rep-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.rep-stat { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--white); }
.rep-stat span { font-size: 13px; font-weight: 600; color: var(--muted); }
.rep-stat strong { font-size: 26px; font-weight: 800; }
.rep-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rep-wide { grid-column: 1 / -1; }
.rep-chart { display: grid; grid-template-columns: repeat(6, 1fr); align-items: end; gap: 14px; height: 220px; margin-top: 16px; }
.rep-col { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; height: 100%; gap: 6px; }
.rep-col i { align-self: end; width: 100%; max-width: 56px; min-height: 4px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #4F5BFF, var(--brand-500)); }
.rep-n { font-weight: 800; font-size: 14px; }
.rep-col small { color: var(--muted); font-size: 13px; text-transform: capitalize; }
.rep-bars { display: grid; gap: 14px; margin-top: 14px; }
.rep-bar > div:first-child { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.rep-track { height: 10px; border-radius: 999px; background: var(--navy-50); overflow: hidden; }
.rep-track i { display: block; height: 100%; border-radius: 999px; background: #13A05B; }
.rep-opened .rep-track i { background: #E0A100; }
.rep-damaged .rep-track i { background: var(--red-500); }
.rep-top { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 10px; }
.rep-top li span { display: inline-block; min-width: 70%; }
.rep-top li b { float: right; }

/* ---------- Settings: notifications ---------- */
.notify-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); cursor: pointer; }
.notify-opt:first-of-type { border-top: 0; }
.notify-opt input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand-500); }
.notify-opt b { display: block; font-size: 15px; }
.notify-opt small { display: block; color: var(--muted); font-size: 13.5px; }

@media (max-width: 760px) {
  .rep-grid { grid-template-columns: 1fr; }
  .rep-chart { gap: 8px; height: 180px; }
  .addr-hero { padding: 22px 20px; }
  .p-toolbar #parcel-export { margin-left: 0; }
}
