@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #f4f5f7;
  --surface: #fff;
  --surface-2: #fafafa;
  --ink: #151515;
  --muted: #667085;
  --line: #e4e7ec;
  --red: #c90000;
  --red-dark: #980000;
  --red-soft: #fff1f1;
  --gold: #c99424;
  --gold-dark: #8a5d00;
  --gold-soft: #fff8e8;
  --black: #111;
  --green: #087a55;
  --green-soft: #eaf8f2;
  --blue: #2878d0;
  --blue-soft: #eef6ff;
  --teal: #008c7a;
  --teal-soft: #e8f8f5;
  --indigo: #5657a8;
  --indigo-soft: #f0f0ff;
  --orange: #d56a12;
  --orange-soft: #fff3e8;
  --gray: #667085;
  --gray-soft: #f2f4f7;
  --shadow: 0 12px 32px rgba(16,24,40,.08);
  --radius: 8px;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; background: var(--bg); }
body { margin: 0; color: var(--ink); font-family: "Kanit", "Leelawadee UI", Tahoma, sans-serif; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 42px; line-height: 1.16; }
h2 { font-size: 22px; line-height: 1.3; }
h3 { font-size: 18px; line-height: 1.35; }
p { color: var(--muted); line-height: 1.6; }
.portal-bg::before { display: none; }
.hub, .page { width: min(1240px,calc(100% - 40px)); margin: 0 auto; padding: 28px 0 88px; }

.hub { min-height: 100vh; display: grid; align-content: center; gap: 26px; }
.hub-hero { display: grid; grid-template-columns: 80px minmax(0,1fr); gap: 20px; align-items: center; max-width: 920px; }
.hub-logo { width: 80px; height: 80px; object-fit: contain; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.hub-hero .eyebrow { grid-column: 2; margin-bottom: -12px; }
.hub-hero h1, .hub-hero .lead { grid-column: 2; }
.eyebrow { display: inline-flex; align-items: center; width: fit-content; margin-bottom: 8px; color: var(--red); font-size: 13px; font-weight: 900; text-transform: uppercase; }
.lead { margin-top: 8px; font-size: 17px; max-width: 760px; }
.hub-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.entry-card { min-height: 240px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: 28px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .18s ease,border-color .18s ease; }
.entry-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.entry-card.admin { background: var(--black); color: #fff; border-color: var(--gold); }
.entry-card.admin p { color: #c5c7cc; }
.entry-icon, .icon-box { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; border-radius: var(--radius); background: var(--red-soft); color: var(--red); font-size: 19px; }
.entry-card.admin .entry-icon, .icon-box { background: var(--gold-soft); color: var(--gold-dark); }
.entry-action { display: inline-flex; align-items: center; gap: 10px; width: fit-content; color: var(--red); font-weight: 900; }
.admin .entry-action { color: var(--gold); }
.power { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 20; padding: 7px 16px; border: 1px solid #dfe3ea; border-radius: 999px; background: rgba(255,255,255,.96); box-shadow: 0 6px 18px rgba(0,0,0,.08); color: #475467; font-size: 11px; font-weight: 900; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 22px; }
.brand-mini { display: flex; align-items: center; gap: 14px; }
.brand-mini img { width: 58px; height: 58px; object-fit: contain; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.actions { display: flex; gap: 9px; flex-wrap: wrap; }
.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border: 1px solid #cfd4dc; border-radius: var(--radius); background: #fff; color: var(--ink); font-weight: 800; cursor: pointer; transition: background .15s ease,border-color .15s ease; }
.btn:hover { background: var(--surface-2); border-color: #98a2b3; }
.btn.black { background: var(--black); color: #fff; border-color: var(--black); }
.btn.red { background: var(--red); color: #fff; border-color: var(--red); }
.btn.gold { background: var(--gold); color: #111; border-color: var(--gold); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.title-lockup { display: flex; align-items: center; gap: 12px; }
.content { padding: 20px; }

.login-layout { min-height: calc(100vh - 60px); display: grid; grid-template-columns: minmax(360px,.78fr) minmax(440px,1fr); gap: 0; align-items: stretch; padding-top: 30px; }
.login-art { position: relative; min-height: 650px; overflow: hidden; padding: 46px; color: #fff; background: var(--black); border-radius: var(--radius) 0 0 var(--radius); border-top: 6px solid var(--gold); }
.login-art::after { content: ""; position: absolute; left: 46px; bottom: 46px; width: 68px; height: 6px; background: var(--red); }
.login-art img { position: absolute; right: 36px; bottom: 36px; width: 150px; opacity: .16; }
.login-art .eyebrow { color: var(--gold); }
.login-art h1 { color: #fff; max-width: 560px; font-size: 52px; }
.login-art p { color: #c8cbd0; font-size: 17px; max-width: 560px; margin-top: 16px; }
.login-card { display: grid; align-content: center; padding: 54px; border-radius: 0 var(--radius) var(--radius) 0; box-shadow: none; }
.login-logo { width: 112px; height: 112px; object-fit: contain; margin: 0 auto 26px; }
.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field label { font-weight: 800; }
.input { width: 100%; min-height: 50px; border: 1px solid #d0d5dd; border-radius: var(--radius); padding: 11px 14px; background: #fff; color: var(--ink); outline: none; font-size: 16px; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,148,36,.16); }
.notice { display: flex; gap: 11px; align-items: flex-start; padding: 13px 14px; border: 1px solid #eccb7e; border-radius: var(--radius); background: var(--gold-soft); color: #6b4700; font-weight: 700; line-height: 1.55; margin: 6px 0 16px; }
.check-list { display: grid; gap: 8px; margin-top: 18px; }
.check-list div { display: flex; gap: 9px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted); }
.check-list i { color: var(--green); }

.dashboard-grid { width: min(1380px,calc(100% - 36px)); display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 18px; }
.dashboard-main { min-width: 0; }
.sidebar { position: sticky; top: 20px; align-self: start; min-height: calc(100vh - 116px); padding: 20px 16px; background: var(--black); color: #fff; border-top: 5px solid var(--red); border-radius: var(--radius); box-shadow: var(--shadow); }
.member-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.sidebar img { width: 48px; height: 48px; object-fit: contain; padding: 5px; background: #fff; border-radius: var(--radius); }
.sidebar h3 { color: #fff; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar p { color: #aeb3bc; font-size: 13px; }
.menu { margin-top: 24px; display: grid; gap: 6px; }
.menu a { display: flex; align-items: center; gap: 10px; min-height: 43px; padding: 10px 12px; border-radius: var(--radius); color: #c4c7cc; font-weight: 800; }
.menu a:hover { background: #222; color: #fff; }
.menu a.active { background: var(--gold); color: #111; }
.welcome-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; padding: 8px 2px 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
.welcome-panel h1 { color: var(--ink); font-size: 30px; }
.welcome-panel p { margin-top: 3px; }
.welcome-panel .eyebrow { margin-bottom: 3px; color: var(--muted); text-transform: none; }
.welcome-actions { display: flex; align-items: center; gap: 9px; }
.icon-button, .avatar-button { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; }
.icon-button span { position: absolute; top: -3px; right: -2px; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--bg); border-radius: 999px; background: var(--red); color: #fff; font-size: 9px; font-weight: 900; }
.avatar-button, .profile-avatar { background: var(--black); color: #fff; border-color: var(--black); font-weight: 900; }
.quick-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.quick-link { width: 100%; display: flex; align-items: center; gap: 11px; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); font-weight: 850; text-align: left; cursor: pointer; }
.quick-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: var(--radius); background: var(--red-soft); color: var(--red); font-size: 17px; }
.quick-arrow { margin-left: auto; color: #a4aab3; font-size: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.stat { position: relative; min-height: 112px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.stat-icon { position: absolute; top: 13px; right: 13px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 13px; }
.stat small { display: block; padding-right: 35px; color: var(--muted); font-weight: 700; }
.stat strong { display: block; margin-top: 11px; font-size: 28px; line-height: 1.1; }
.stat p { margin-top: 4px; font-size: 12px; }
.stat.accent { background: var(--red); border-color: var(--red); color: #fff; }
.stat.accent small, .stat.accent p { color: rgba(255,255,255,.8); }
.stat.accent .stat-icon { background: rgba(255,255,255,.16); color: #fff; }
.stat.credit-stat { border-color: #a6d9c3; background: #f2fbf7; }
.stat.credit-stat strong, .stat.credit-stat .stat-icon { color: #067647; }
.credit-wallet-lines { display: grid; gap: 2px; margin-top: 4px; }
.credit-wallet-lines strong { font-size: 17px; line-height: 1.25; }
.split { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(330px,.8fr); gap: 16px; margin-top: 16px; }
.status-flow { display: grid; grid-template-columns: repeat(5,minmax(110px,1fr)); gap: 0; }
.step { position: relative; padding: 14px 12px; border: 0; border-right: 1px solid var(--line); background: #fff; }
.step:last-child { border-right: 0; }
.step::before { content: ""; display: block; width: 10px; height: 10px; margin-bottom: 10px; border: 2px solid #b7bdc6; border-radius: 50%; background: #fff; }
.step.done::before { border-color: var(--green); background: var(--green); }
.step.active::before { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.step i { display: none; }
.step b { display: block; margin-bottom: 3px; font-size: 14px; }
.step p { font-size: 12px; }
.text-link { color: var(--red); font-size: 13px; font-weight: 900; white-space: nowrap; }
.next-action .content { display: grid; gap: 10px; }
.red-icon { background: var(--red-soft); color: var(--red); }
.bill-label { color: var(--muted); font-size: 13px; }
.amount { display: block; font-size: 30px; line-height: 1.1; }
.amount small { font-size: 14px; }
.full { width: 100%; }
.profile-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.profile-item { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); overflow-wrap: anywhere; }
.profile-item small { display: block; color: var(--muted); margin-bottom: 5px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: 13px; font-weight: 900; white-space: nowrap; }
.badge.gold { background: var(--gold-soft); color: var(--gold-dark); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.teal { background: var(--teal-soft); color: var(--teal); }
.badge.indigo { background: var(--indigo-soft); color: var(--indigo); }
.badge.orange { background: var(--orange-soft); color: var(--orange); }
.badge.gray { background: var(--gray-soft); color: var(--gray); }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th { background: var(--black); color: #fff; text-align: left; padding: 13px 14px; white-space: nowrap; font-size: 13px; }
td { border-bottom: 1px solid var(--line); padding: 13px 14px; background: #fff; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fffaf1; }
.search-row { display: grid; grid-template-columns: minmax(0,1fr) 200px 130px; gap: 9px; margin-bottom: 16px; }
.bill { max-width: 1040px; margin: 0 auto; }
.bill-total { color: var(--red); font-size: 40px; font-weight: 950; }
.red-note { background: var(--red-soft); border-color: #f2b8b8; color: var(--red-dark); }
.summary-box { text-align: right; align-self: start; }
.summary-box p { display: flex; justify-content: space-between; gap: 18px; color: var(--ink); border-bottom: 1px solid var(--line); padding: 8px 0; }
.summary-box h2 { margin-top: 10px; font-size: 20px; }
.summary-box h2 span { display: block; color: var(--red); font-size: 30px; margin-top: 5px; }
.admin-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.mobile-bottom-nav { display: none; }
.modal-backdrop[hidden] { display: none; }
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; background: rgba(17,17,17,.58); }
.member-modal { width: min(520px,100%); overflow: hidden; border-radius: var(--radius); background: #fff; box-shadow: 0 24px 70px rgba(0,0,0,.24); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); }
.profile-avatar { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; }
.modal-profile { padding: 18px; }
.profile-item.wide { grid-column: 1/-1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 0 18px 18px; }
.modal-actions .full { width: auto; min-width: 180px; }
.modal-open { overflow: hidden; }

/* Member tracking */
.member-page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.member-page-head h1 { font-size: 34px; }
.member-page-head .eyebrow { margin-bottom: 2px; color: var(--muted); text-transform: none; }
.mobile-back { display: none; }
.tracking-search { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; margin-bottom: 12px; }
.tracking-filter { grid-template-columns: minmax(260px,1fr) auto auto; align-items: stretch; }
.date-filter { display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #ccd1d9; border-radius: var(--radius); background: #fff; }
.date-filter label { display: flex; align-items: center; gap: 7px; }
.date-filter input { width: 125px; min-height: 50px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.date-filter > i { color: #98a2b3; font-size: 10px; }
.tracking-filter-actions { display: flex; justify-content: flex-end; gap: 8px; }
.tracking-filter-actions .icon-button { width: 52px; height: 52px; border-radius: var(--radius); }
.range-presets { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin: -2px 0 10px; color: var(--muted); font-size: 12px; }
.range-presets span { margin-right: 3px; }
.range-presets a { min-height: 30px; display: inline-flex; align-items: center; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 700; }
.range-presets a.active { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.search-box { min-height: 52px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid #ccd1d9; border-radius: var(--radius); background: #fff; }
.search-box:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,148,36,.14); }
.search-box > i { color: var(--red); }
.search-box input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.search-box button, .copy-button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.filter-button { min-width: 118px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--black); border-radius: var(--radius); background: var(--black); color: #fff; font-weight: 700; cursor: pointer; }
.status-tabs { display: flex; gap: 5px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.status-tabs::-webkit-scrollbar { display: none; }
.status-tabs button { min-height: 38px; flex: 0 0 auto; padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-weight: 600; cursor: pointer; }
.status-tabs button b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: 11px; }
.status-tabs button.active { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.status-tabs button.active b { background: var(--red); color: #fff; }
.tracking-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-bottom: 18px; }
.tracking-summary > div { min-height: 72px; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.summary-icon, .product-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border-radius: var(--radius); background: var(--gold-soft); color: var(--gold-dark); }
.tracking-summary p { font-size: 12px; line-height: 1.35; }
.tracking-summary strong { display: block; color: var(--ink); font-size: 22px; line-height: 1.1; }
.gold-bg { background: var(--gold-soft); color: var(--gold-dark); }
.green-bg { background: var(--green-soft); color: var(--green); }
.red-bg { background: var(--red-soft); color: var(--red); }
.blue-bg { background: var(--blue-soft); color: var(--blue); }
.teal-bg { background: var(--teal-soft); color: var(--teal); }
.indigo-bg { background: var(--indigo-soft); color: var(--indigo); }
.orange-bg { background: var(--orange-soft); color: var(--orange); }
.gray-bg { background: var(--gray-soft); color: var(--gray); }
.shipment-section { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.section-heading { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-heading h2 { font-size: 20px; }
.section-heading p { font-size: 12px; }
.shipment-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 7px 22px rgba(16,24,40,.05); }
.shipment-card.featured { border-top: 3px solid var(--gold); }
.shipment-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px; }
.shipment-label { color: var(--muted); font-size: 12px; }
.shipment-card h3 { display: flex; align-items: center; gap: 3px; margin-top: 2px; font-size: 19px; }
.copy-button { display: inline-grid; width: 28px; height: 28px; color: var(--red); vertical-align: middle; }
.shipment-product { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; margin: 0 16px; padding: 13px; border-radius: var(--radius); background: var(--surface-2); }
.shipment-product div { min-width: 0; }
.shipment-product b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.shipment-product p { font-size: 12px; }
.shipment-product > i { color: #a1a7b0; font-size: 12px; }
.journey { display: grid; grid-template-columns: auto minmax(22px,1fr) auto minmax(22px,1fr) auto minmax(22px,1fr) auto; align-items: start; padding: 20px 16px 14px; }
.journey-step { display: grid; justify-items: center; gap: 6px; width: 66px; color: #a3a9b2; text-align: center; }
.journey-step span { width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid #d6dae0; border-radius: 50%; background: #fff; font-size: 11px; }
.journey-step b { font-size: 10px; white-space: nowrap; }
.journey-step.done { color: var(--green); }
.journey-step.done span { border-color: var(--green); background: var(--green-soft); }
.journey-step.active { color: var(--gold-dark); }
.journey-step.active span { border-color: var(--gold); background: var(--gold-soft); }
.journey-line { height: 2px; margin-top: 14px; background: #dfe2e7; }
.journey-line.done { background: var(--green); }
.journey-line.active { background: var(--gold); }
.shipment-card > footer { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 11px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.detail-button { min-height: 34px; padding: 5px 10px; border: 1px solid var(--red); border-radius: var(--radius); background: #fff; color: var(--red); font-weight: 700; cursor: pointer; }
.shipment-detail-list { display: grid; padding: 8px 18px 18px; }
.shipment-detail-list div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.shipment-detail-list span { color: var(--muted); }
.shipment-detail-list b { text-align: right; }

/* Login */
.login-body { min-height: 100vh; background: #fff; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(480px,1.15fr) minmax(430px,.85fr); }
.login-scene { position: relative; min-height: 100vh; overflow: hidden; padding: 44px 54px; background: var(--black); color: #fff; border-right: 5px solid var(--red); }
.scene-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; color: #fff; font-size: 13px; font-weight: 700; }
.scene-brand img { width: 56px; height: 56px; object-fit: contain; padding: 6px; border-radius: var(--radius); background: #fff; }
.scene-copy { position: relative; z-index: 2; max-width: 620px; margin-top: 16vh; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; padding: 7px 11px; border: 1px solid #4a4a4a; border-radius: 999px; color: #d8dade; font-size: 12px; }
.live-pill i { color: #32c48d; font-size: 8px; animation: livePulse 1.8s ease-in-out infinite; }
.scene-copy h1 { color: #fff; font-size: 58px; line-height: 1.12; }
.scene-copy p { max-width: 480px; margin-top: 16px; color: #b8bdc6; font-size: 17px; }
.tech-grid { position: absolute; inset: 0; overflow: hidden; opacity: .17; }
.tech-grid::before, .tech-grid::after { content: ""; position: absolute; background: #fff; }
.tech-grid::before { top: 0; bottom: 0; left: 12%; width: 1px; box-shadow: 96px 0 #fff,192px 0 #fff,288px 0 #fff,384px 0 #fff,480px 0 #fff,576px 0 #fff,672px 0 #fff; }
.tech-grid::after { left: 0; right: 0; top: 14%; height: 1px; box-shadow: 0 96px #fff,0 192px #fff,0 288px #fff,0 384px #fff,0 480px #fff,0 576px #fff,0 672px #fff; }
.signal { position: absolute; width: 420px; height: 420px; border: 1px solid rgba(201,148,36,.28); border-radius: 50%; animation: signalWave 5s ease-in-out infinite; }
.signal::before, .signal::after { content: ""; position: absolute; border: 1px solid rgba(201,148,36,.2); border-radius: 50%; }
.signal::before { inset: 52px; }
.signal::after { inset: 108px; }
.signal-one { right: -130px; top: -100px; }
.signal-two { left: -210px; bottom: -240px; animation-delay: -2.5s; }
.route-visual { position: absolute; z-index: 2; left: 54px; right: 54px; bottom: 72px; display: grid; grid-template-columns: 42px minmax(100px,1fr) 42px; align-items: center; }
.route-node { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #5b5b5b; border-radius: 50%; background: #1d1d1d; color: var(--gold); }
.route-track { position: relative; height: 2px; background: #4e4e4e; }
.route-track::before { content: ""; position: absolute; left: 0; top: 0; width: 62%; height: 2px; background: var(--red); }
.route-track i { position: absolute; top: 50%; left: 58%; width: 32px; height: 32px; display: grid; place-items: center; transform: translate(-50%,-50%); border-radius: 50%; background: var(--red); color: #fff; animation: parcelMove 4s ease-in-out infinite; }
.login-form-panel { position: relative; min-height: 100vh; display: grid; align-content: center; padding: 64px max(42px,8vw); background: #fff; }
.login-form-wrap { width: min(440px,100%); margin: auto; }
.mobile-login-logo { display: none; }
.login-form-wrap > h2 { font-size: 32px; }
.login-intro { margin-top: 5px; }
.modern-login-form { display: grid; gap: 15px; margin-top: 28px; }
.modern-field { display: grid; gap: 7px; font-size: 13px; font-weight: 600; }
.field-control { min-height: 52px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 0 14px; border: 1px solid #ccd1d9; border-radius: var(--radius); background: #fff; }
.field-control:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(201,0,0,.1); }
.field-control > i { color: var(--muted); }
.field-control input { min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; }
.field-control button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.login-row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.login-row a, .forgot-link { color: var(--red); font-weight: 600; }
.forgot-link { padding: 0; border: 0; background: transparent; cursor: pointer; }
.remember { display: flex; align-items: center; gap: 6px; }
.remember input { accent-color: var(--red); }
.login-submit { min-height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border: 0; border-radius: var(--radius); background: var(--red); color: #fff; font-weight: 700; cursor: pointer; box-shadow: 0 12px 25px rgba(201,0,0,.2); }
.login-submit:hover i { transform: translateX(4px); }
.login-submit i { transition: transform .18s ease; }
.first-login-note { display: flex; align-items: center; gap: 11px; margin-top: 18px; padding: 12px; border: 1px solid #ead39d; border-radius: var(--radius); background: var(--gold-soft); }
.first-login-note > span { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #fff; color: var(--gold-dark); }
.first-login-note p { color: #725216; font-size: 12px; line-height: 1.5; }
.support-link { margin-top: 22px; text-align: center; font-size: 12px; }
.support-link a { color: var(--red); font-weight: 600; }
.login-back { position: absolute; left: 28px; top: 28px; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.login-footer { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; font-size: 11px; }
.forgot-modal { max-height: min(760px,calc(100vh - 36px)); overflow: auto; }
.red-avatar { background: var(--red); border-color: var(--red); }
.forgot-form { display: grid; gap: 14px; padding: 18px; }
.forgot-guide { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border-radius: var(--radius); background: var(--gold-soft); color: var(--gold-dark); }
.forgot-guide i { margin-top: 4px; }
.forgot-guide p { color: inherit; font-size: 12px; line-height: 1.55; }
.forgot-result { padding: 24px 18px 18px; text-align: center; }
.forgot-result[hidden] { display: none; }
.result-check { width: 50px; height: 50px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 20px; }
.forgot-result > p { margin-top: 4px; font-size: 13px; }
.request-message { margin: 16px 0 12px; padding: 13px; border: 1px dashed #b7bdc6; border-radius: var(--radius); background: var(--surface-2); color: var(--ink); text-align: left; white-space: pre-line; font-size: 13px; line-height: 1.65; }
.text-button { margin-top: 12px; padding: 4px; border: 0; background: transparent; color: var(--red); font-weight: 600; cursor: pointer; }
.forgot-footer { display: flex; align-items: flex-start; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 11px; }

@keyframes livePulse { 50% { opacity: .35; transform: scale(.72); } }
@keyframes signalWave { 50% { transform: scale(1.08); opacity: .45; } }
@keyframes parcelMove { 0%,100% { left: 28%; } 50% { left: 72%; } }

@media (max-width:1100px) {
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .status-flow { grid-template-columns: repeat(3,minmax(120px,1fr)); }
  .step { border-bottom: 1px solid var(--line); }
}
@media (max-width:900px) {
  .hub-grid, .login-layout, .dashboard-grid, .split { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-card { max-width: 620px; width: 100%; margin: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
  .dashboard-grid { width: min(100% - 24px,1240px); }
  .sidebar { position: static; min-height: auto; padding: 10px 12px; border-top: 0; border-left: 4px solid var(--red); }
  .sidebar .menu { display: none; }
  .quick-actions { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .mobile-bottom-nav { position: fixed; left: 12px; right: 12px; bottom: 10px; z-index: 40; display: grid; grid-template-columns: repeat(4,1fr); min-height: 64px; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.97); box-shadow: 0 12px 32px rgba(0,0,0,.16); }
  .mobile-bottom-nav a, .mobile-bottom-nav button { display: grid; place-items: center; align-content: center; gap: 3px; border: 0; border-radius: 6px; background: transparent; color: #737984; font-size: 11px; font-weight: 800; cursor: pointer; }
  .mobile-bottom-nav i { font-size: 18px; }
  .mobile-bottom-nav .active { color: var(--red); background: var(--red-soft); }
  .power { display: none; }
  .search-row { grid-template-columns: 1fr; }
  .shipment-section { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: minmax(0,1fr); }
  .login-scene { min-height: 240px; padding: 24px; border-right: 0; border-bottom: 4px solid var(--red); }
  .scene-copy { margin-top: 34px; }
  .scene-copy h1 { font-size: 38px; }
  .scene-copy p { display: none; }
  .route-visual { left: 24px; right: 24px; bottom: 24px; }
  .login-form-panel { min-height: auto; padding: 54px 24px 74px; }
}
@media (max-width:640px) {
  body { padding-bottom: 78px; }
  body.login-body { padding-bottom: 0; }
  .hub, .page { width: min(100% - 20px,1240px); padding-top: 10px; padding-bottom: 24px; }
  .hub { align-content: start; padding-top: 28px; }
  .hub-hero { grid-template-columns: 58px minmax(0,1fr); gap: 12px; }
  .hub-logo { width: 58px; height: 58px; }
  .hub-grid, .profile-list { grid-template-columns: 1fr; }
  .entry-card { min-height: 210px; padding: 22px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head h1 { font-size: 30px; }
  .login-card { padding: 24px 18px; }
  .login-logo { width: 88px; height: 88px; }
  .dashboard-grid { width: 100%; padding: 0 10px 22px; gap: 10px; }
  .sidebar { margin: 0 -10px; border-radius: 0 0 8px 8px; box-shadow: none; }
  .member-brand div { min-width: 0; }
  .welcome-panel { padding: 8px 2px 12px; margin-bottom: 10px; }
  .welcome-panel h1 { font-size: 24px; }
  .welcome-panel p { font-size: 13px; }
  .welcome-panel .eyebrow { display: none; }
  .welcome-actions .icon-button { display: none; }
  .quick-actions { gap: 7px; margin-bottom: 10px; }
  .quick-link { min-height: 76px; flex-direction: column; justify-content: center; gap: 5px; padding: 7px 5px; text-align: center; font-size: 12px; }
  .quick-icon { width: 34px; height: 34px; }
  .quick-arrow { display: none; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .stat { min-height: 96px; padding: 12px; }
  .stat strong { margin-top: 8px; font-size: 25px; }
  .stat p { font-size: 11px; }
  .stat-icon { top: 10px; right: 10px; }
  .content { padding: 14px; }
  .card-head { align-items: flex-start; padding: 15px; }
  .split { gap: 10px; margin-top: 10px; }
  .status-flow { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px; }
  .step { min-width: 145px; padding: 12px; border-right: 1px solid var(--line); border-bottom: 0; scroll-snap-align: start; }
  .step::before { position: static; }
  .modal-backdrop { align-items: end; padding: 0; }
  .member-modal { max-height: 88vh; overflow: auto; border-radius: 8px 8px 0 0; }
  .modal-actions { grid-template-columns: 1fr; }
  .bill { width: 100%; }
  .bill .card-head { flex-direction: column; }
  .bill-table table { min-width: 720px; }
  .bill-total { font-size: 30px; }
  .summary-box { text-align: left; }
  .actions { width: 100%; }
  .actions .btn { flex: 1; }
  .tracking-page { padding-top: 0; }
  .tracking-page .sidebar { display: none; }
  .member-page-head { position: sticky; top: 0; z-index: 12; min-height: 66px; margin: 0 -10px 12px; padding: 9px 12px; background: rgba(255,255,255,.97); }
  .member-page-head > div { display: grid; grid-template-columns: 38px 1fr; align-items: center; }
  .member-page-head .mobile-back { grid-row: 1/3; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; }
  .member-page-head .eyebrow { grid-column: 2; font-size: 10px; }
  .member-page-head h1 { grid-column: 2; font-size: 22px; }
  .member-page-head .avatar-button { width: 38px; height: 38px; font-size: 12px; }
  .tracking-search { grid-template-columns: minmax(0,1fr) 48px; }
  .filter-button { min-width: 48px; }
  .filter-button span { display: none; }
  .tracking-summary { gap: 6px; }
  .tracking-summary > div { min-height: 88px; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; }
  .summary-icon { width: 32px; height: 32px; }
  .tracking-summary strong { font-size: 19px; }
  .shipment-card > header { padding: 13px; }
  .shipment-card .badge { font-size: 11px; }
  .shipment-product { margin: 0 13px; }
  .journey { padding-inline: 8px; }
  .journey-step { width: 57px; }
  .journey-step b { font-size: 9px; }
  .shipment-card > footer { padding-inline: 13px; }
  .login-scene { min-height: 178px; padding: 18px; }
  .scene-brand img { width: 44px; height: 44px; }
  .scene-copy { margin-top: 26px; }
  .scene-copy .live-pill, .scene-copy p { display: none; }
  .scene-copy h1 { font-size: 30px; }
  .route-visual { display: none; }
  .signal { width: 240px; height: 240px; }
  .login-form-panel { padding: 38px 18px 56px; }
  .login-form-wrap > h2 { font-size: 26px; }
  .login-back { top: 18px; left: auto; right: 18px; color: var(--red); z-index: 5; }
  .login-back span { display: none; }
  .login-footer { bottom: 12px; }
}

@media (max-width:380px) {
  .quick-link { font-size: 11px; }
  .stat small { font-size: 11px; }
  .stat strong { font-size: 22px; }
  .mobile-bottom-nav { left: 6px; right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Connected member preview */
.member-alert { display:flex; align-items:flex-start; gap:10px; margin:0 0 14px; padding:12px 14px; border:1px solid var(--line); border-radius:8px; font-weight:700; line-height:1.45; }
.member-alert.error { color:#9f1010; background:#fff1f1; border-color:#ffcaca; }
.member-alert.success { color:#087a58; background:#ebfaf4; border-color:#bdebd9; }
.preview-chip { display:inline-flex; align-items:center; gap:7px; padding:8px 11px; border:1px solid #e8d7ad; border-radius:999px; background:#fff8e6; color:#8a5b00; font-size:12px; font-weight:800; }
.preview-readonly { display:flex; align-items:center; gap:8px; margin:0 22px 18px; padding:11px 12px; border-radius:8px; background:#fff8e6; color:#8a5b00; font-size:13px; font-weight:700; }
.dashboard-latest { display:flex; align-items:center; gap:14px; min-height:120px; }
.dashboard-latest h3 { margin:3px 0; font-size:22px; }
.dashboard-latest p,.dashboard-latest small { margin:0; color:var(--muted); }
.empty-state { display:grid; place-items:center; gap:8px; padding:24px; text-align:center; color:var(--muted); }
.empty-state.large { min-height:260px; margin-top:18px; }
.empty-state i { font-size:30px; color:#b4bbc7; }
.empty-state h2,.empty-state h3,.empty-state p { margin:0; }
.status-tabs a { min-height:38px; flex:0 0 auto; display:inline-flex; align-items:center; padding:6px 13px; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--muted); font-weight:700; text-decoration:none; }
.status-tabs a b { display:inline-grid; place-items:center; min-width:20px; height:20px; margin-left:6px; border-radius:999px; background:var(--surface-2); color:var(--ink); font-size:11px; }
.status-tabs a.active { border-color:var(--red); background:var(--red-soft); color:var(--red); }
.status-tabs a.active b { background:var(--red); color:#fff; }
.search-box a { display:grid; place-items:center; width:38px; height:38px; color:var(--muted); text-decoration:none; }
.shipment-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.shipment-grid .shipment-card.featured { grid-column:span 1; }
.password-card { max-width:860px; margin:20px auto 0; }
.password-card .content { display:grid; gap:18px; }
.password-rules { display:grid; gap:0; }
.password-rules p { margin:0; padding:12px 8px; border-bottom:1px solid var(--line); color:var(--muted); }
.password-rules i { margin-right:8px; color:#07865f; }
.install-panel { position:fixed; z-index:1200; left:50%; bottom:18px; width:min(620px,calc(100% - 28px)); min-height:68px; transform:translateX(-50%); display:grid; grid-template-columns:44px minmax(0,1fr) auto 34px; align-items:center; gap:11px; padding:10px 10px 10px 12px; border:1px solid #d0d5dd; border-radius:8px; background:#fff; box-shadow:0 18px 48px rgba(16,24,40,.2); }
.install-panel[hidden] { display:none; }
.install-panel img { width:44px; height:44px; object-fit:contain; border:1px solid var(--line); border-radius:7px; }
.install-panel div { min-width:0; display:grid; gap:2px; }
.install-panel strong { font-size:14px; color:var(--ink); }
.install-panel span { overflow:hidden; color:var(--muted); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.install-action { min-height:38px; padding:0 14px; border:0; border-radius:7px; background:var(--ink); color:#fff; font-weight:700; cursor:pointer; }
.install-action i { margin-right:5px; }
.install-dismiss { width:32px; height:32px; padding:0; border:0; border-radius:50%; background:transparent; color:var(--muted); cursor:pointer; }
.install-guide { max-width:520px; }
.install-steps { display:grid; gap:10px; margin:0; padding:20px 28px 8px 48px; color:var(--ink); }
.install-steps li { padding-left:4px; line-height:1.55; }
.install-guide-actions { display:flex; justify-content:flex-end; gap:8px; padding:14px 20px 20px; }
.preview-only-button { justify-self:start; border-color:#d8b45e; background:#fff8e6; color:#7a4d00; }
.bill-tabs { display:flex; gap:10px; margin:10px 0 18px; padding-bottom:4px; overflow-x:auto; }
.bill-tabs a { min-width:180px; display:grid; gap:3px; padding:12px 14px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); text-decoration:none; }
.bill-tabs a.active { border-color:var(--red); box-shadow:inset 4px 0 0 var(--red); }
.bill-tabs small,.bill-tabs span { color:var(--muted); }

@media (max-width:900px) {
  .shipment-grid { grid-template-columns:1fr; }
  .preview-chip { display:none; }
}

@media (max-width:640px) {
  .password-page .page-head { align-items:flex-start; }
  .password-page .brand-mini h1 { font-size:20px; }
  .password-card { margin-top:12px; }
  .shipment-grid { gap:10px; }
  .preview-readonly { margin:0 14px 14px; }
  .bill-tabs a { min-width:155px; }
  .bill-table table { min-width:0; }
  .bill-table thead { display:none; }
  .bill-table tbody,.bill-table tr { display:grid; gap:0; }
  .bill-table tr { grid-template-columns:repeat(2,minmax(0,1fr)); margin-bottom:12px; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
  .bill-table td { display:grid; gap:3px; border:0; border-bottom:1px solid var(--line); padding:10px !important; }
  .bill-table td::before { content:attr(data-label); color:var(--muted); font-size:11px; font-weight:700; }
  .bill-table td:nth-child(3) { grid-column:1/-1; background:#fffaf0; }
}

/* Production-ready member experience */
html { min-height: 100%; background: #f2f4f7; }
body { min-height: 100dvh; }
.hub, .page { width: min(1720px,calc(100% - 48px)); }
.dashboard-grid { width: min(1720px,calc(100% - 48px)); grid-template-columns: 240px minmax(0,1fr); }
.sidebar { min-height: calc(100dvh - 56px); background: #101827; }
.menu a:hover { background: #1c2738; }
.bill { max-width: 1320px; }
.login-row-end { justify-content: flex-end; }
.login-intro i, .welcome-panel p i, .section-heading p i { margin-right: 5px; color: var(--red); }
.profile-item small i { width: 17px; color: var(--red); text-align: center; }
.text-link { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; }

.login-scene {
  isolation: isolate;
  background:
    linear-gradient(100deg,rgba(8,28,50,.92) 0%,rgba(8,28,50,.76) 42%,rgba(8,28,50,.28) 100%),
    url('../aunzath/img/images/serve01.png') center/cover no-repeat;
  animation: sceneDrift 18s ease-in-out infinite alternate;
}
.login-scene::after { content:""; position:absolute; inset:auto 0 0; z-index:0; height:42%; background:linear-gradient(0deg,rgba(5,15,28,.72),transparent); pointer-events:none; }
.tech-grid { z-index: 0; opacity: .09; mix-blend-mode: screen; }
.signal { z-index: 0; border-color: rgba(255,255,255,.22); }
.signal::before, .signal::after { border-color: rgba(255,255,255,.14); }
.scene-copy { z-index: 3; max-width: 54%; }
.scene-copy h1 { text-shadow: 0 4px 28px rgba(0,0,0,.34); }
.scene-copy p { display: flex; align-items: center; gap: 8px; color: #eef4fb; }
.scene-visual { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.scene-courier { position: absolute; right: -2%; bottom: -5%; height: 68%; max-width: 52%; object-fit: contain; object-position: right bottom; filter: drop-shadow(0 20px 35px rgba(0,0,0,.3)); animation: courierFloat 6s ease-in-out infinite; }
.scene-container { position: absolute; right: 25%; bottom: 4%; width: 36%; opacity: .82; filter: drop-shadow(0 18px 26px rgba(0,0,0,.28)); animation: containerFloat 8s ease-in-out infinite; }
.route-visual { z-index: 4; }
.scene-brand { z-index: 4; }
.live-pill { border-color: rgba(255,255,255,.35); background: rgba(5,15,28,.34); color: #fff; backdrop-filter: blur(8px); }
.login-form-panel { padding-inline: clamp(40px,7vw,120px); }
.login-form-wrap { width: min(500px,100%); }
.first-login-note p { line-height: 1.45; }

.member-loader { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: #f7f8fa; opacity: 1; visibility: visible; transition: opacity .28s ease,visibility .28s ease; }
.member-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-core { position: relative; display: grid; place-items: center; gap: 16px; }
.loader-core img { width: 86px; height: 86px; padding: 13px; object-fit: contain; border-radius: 18px; background: #fff; box-shadow: 0 16px 46px rgba(16,24,40,.13); animation: loaderPulse 1.35s ease-in-out infinite; }
.loader-core small { color: #344054; font-size: 12px; font-weight: 800; }
.loader-ring { position: absolute; top: -13px; width: 112px; height: 112px; border: 3px solid #e7eaf0; border-top-color: var(--red); border-right-color: var(--gold); border-radius: 50%; animation: loaderSpin .9s linear infinite; }

@keyframes sceneDrift { from { background-position: 48% center; } to { background-position: 54% center; } }
@keyframes courierFloat { 50% { transform: translateY(-10px); } }
@keyframes containerFloat { 50% { transform: translate(-6px,-4px); } }
@keyframes loaderPulse { 50% { transform: scale(.96); } }
@keyframes loaderSpin { to { transform: rotate(360deg); } }

@media (max-width:1280px) {
  .scene-courier { height: 58%; opacity: .9; }
  .scene-container { width: 32%; }
  .scene-copy { max-width: 62%; }
  .scene-copy h1 { font-size: 50px; }
}

@media (max-width:900px) {
  .hub, .page, .dashboard-grid { width: min(100% - 28px,1720px); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; }
  .login-scene { min-height: 250px; background-position: center 42%; }
  .scene-copy { max-width: 60%; margin-top: 34px; }
  .scene-courier { right: 2%; height: 86%; max-width: 42%; }
  .scene-container { display: none; }
}

@media (max-width:640px) {
  body { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  body.login-body, body.password-page { padding-bottom: 0; }
  .hub, .page { width: 100%; padding-inline: 12px; }
  .dashboard-grid { width: 100%; padding-inline: 10px; }
  .sidebar { margin-inline: -10px; padding-top: calc(10px + env(safe-area-inset-top)); }
  .mobile-bottom-nav { bottom: max(8px,env(safe-area-inset-bottom)); }
  .login-shell { min-height: 100dvh; }
  .login-scene { min-height: 205px; padding: calc(16px + env(safe-area-inset-top)) 18px 16px; background-position: 55% center; }
  .scene-copy { max-width: 66%; margin-top: 24px; }
  .scene-copy h1 { font-size: 29px; }
  .scene-courier { right: -7%; bottom: -11%; height: 82%; max-width: 48%; opacity: .9; }
  .scene-brand span { font-size: 11px; }
  .login-form-panel { min-height: calc(100dvh - 205px); align-content: start; padding: 46px 18px calc(52px + env(safe-area-inset-bottom)); }
  .modern-login-form { margin-top: 22px; }
  .field-control { min-height: 50px; }
  .first-login-note { padding: 10px; }
  .password-rules { grid-template-columns: 1fr; }
  .page-head { padding-top: env(safe-area-inset-top); }
}

@media (max-width:380px) {
  .login-scene { min-height: 185px; }
  .login-form-panel { min-height: calc(100dvh - 185px); padding-top: 38px; }
  .scene-copy h1 { font-size: 26px; }
  .scene-courier { height: 75%; }
}

@media (prefers-reduced-motion: reduce) {
  .login-scene, .scene-courier, .scene-container, .loader-core img, .loader-ring { animation: none !important; }
}

/* Full-screen member workspace */
.dashboard-grid { width: 100%; min-height: 100dvh; margin: 0; padding: 0; grid-template-columns: 260px minmax(0,1fr); gap: 0; }
.dashboard-grid .dashboard-main { padding: 28px 30px 96px; }
.dashboard-grid .sidebar { top: 0; min-height: 100dvh; padding: 28px 20px; border: 0; border-left: 5px solid var(--red); border-radius: 0; box-shadow: none; }
.sidebar .member-brand { padding: 0 6px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar .menu { gap: 8px; }
.sidebar .menu a { min-height: 50px; padding: 11px 14px; }
.sidebar .menu a i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: rgba(255,255,255,.07); }
.sidebar .menu a.active { background: #d39a1f; box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.sidebar .menu a.active i { background: rgba(255,255,255,.28); }

/* Login background without foreground cutouts or route bar */
.login-scene {
  background:
    linear-gradient(100deg,rgba(5,21,40,.91) 0%,rgba(5,21,40,.72) 45%,rgba(5,21,40,.2) 100%),
    url('/user/assets/member-login-logistics-v2.png') center/cover no-repeat;
}
.scene-visual, .route-visual { display: none !important; }
.scene-copy { max-width: 58%; }
.login-scene::after { height: 30%; }

/* Tracking cards fill the available workspace */
.tracking-page .dashboard-main { min-width: 0; }
.shipment-section { grid-template-columns: 1fr; gap: 14px; }
.shipment-grid { grid-column: 1/-1; width: 100%; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.shipment-card { border-top: 3px solid transparent; box-shadow: 0 10px 28px rgba(16,24,40,.07); }
.shipment-card.featured { border-top-color: var(--gold); }
.shipment-card.status-green { border-top-color: var(--green); }
.shipment-card.status-red { border-top-color: var(--red); }
.status-tabs a.status-green { color: var(--green); }
.status-tabs a.status-green b { background: var(--green-soft); color: var(--green); }
.status-tabs a.status-green.active { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.status-tabs a.status-green.active b { background: var(--green); color: #fff; }
.shipment-card.status-green .detail-button { border-color: var(--green); color: var(--green); }
.shipment-card > header { min-height: 84px; }
.shipment-card h3 { font-size: clamp(17px,1.35vw,23px); overflow-wrap: anywhere; }
.shipment-card-date { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.shipment-card-date i { color: var(--status); }
.shipment-product { min-height: 74px; }

/* Status language: one color and icon per logistics stage */
.status-blue { --status: var(--blue); --status-soft: var(--blue-soft); }
.status-teal { --status: var(--teal); --status-soft: var(--teal-soft); }
.status-gold { --status: var(--gold-dark); --status-soft: var(--gold-soft); }
.status-indigo { --status: var(--indigo); --status-soft: var(--indigo-soft); }
.status-orange { --status: var(--orange); --status-soft: var(--orange-soft); }
.status-green { --status: var(--green); --status-soft: var(--green-soft); }
.status-gray { --status: var(--gray); --status-soft: var(--gray-soft); }
.status-red { --status: var(--red); --status-soft: var(--red-soft); }
.shipment-card.status-blue,
.shipment-card.status-teal,
.shipment-card.status-gold,
.shipment-card.status-indigo,
.shipment-card.status-orange,
.shipment-card.status-green,
.shipment-card.status-gray { border-top-color: var(--status); }
.shipment-card[class*="status-"] .detail-button { border-color: var(--status); color: var(--status); }
.status-tabs a[class*="status-"] { color: var(--status); }
.status-tabs a[class*="status-"] b { background: var(--status-soft); color: var(--status); }
.status-tabs a[class*="status-"].active { border-color: var(--status); background: var(--status-soft); color: var(--status); }
.status-tabs a[class*="status-"].active b { background: var(--status); color: #fff; }

.status-legend { min-width: 0; display: flex; align-items: center; gap: 7px; margin: -3px 0 16px; padding: 7px 9px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.72); color: var(--muted); scrollbar-width: none; }
.status-legend::-webkit-scrollbar { display: none; }
.status-legend strong, .status-legend span { min-height: 26px; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; font-size: 11px; white-space: nowrap; }
.status-legend strong { padding-right: 8px; border-right: 1px solid var(--line); color: var(--ink); }
.status-legend span { padding: 4px 8px; border-radius: 999px; background: var(--status-soft); color: var(--status); font-weight: 700; }

.member-timeline { min-width: 0; display: grid; grid-template-columns: 52px minmax(12px,1fr) 52px minmax(12px,1fr) 52px minmax(12px,1fr) 52px minmax(12px,1fr) 52px; align-items: start; padding: 18px 20px 16px; }
.timeline-step { min-width: 0; display: grid; justify-items: center; gap: 7px; color: #98a2b3; text-align: center; }
.timeline-step > span { width: 32px; height: 32px; display: grid; place-items: center; border: 2px solid #d5dae1; border-radius: 50%; background: #fff; font-size: 11px; }
.timeline-step b { max-width: 58px; color: inherit; font-size: 10px; line-height: 1.25; white-space: nowrap; }
.timeline-step.done, .timeline-step.active { color: var(--status); }
.timeline-step.done > span { border-color: var(--status); background: var(--status-soft); }
.timeline-step.active > span { border-color: var(--status); background: var(--status-soft); box-shadow: 0 0 0 4px color-mix(in srgb,var(--status) 15%,transparent); }
.timeline-line { height: 2px; margin-top: 15px; background: #dfe3e8; }
.timeline-line.done { background: #98a2b3; }
.member-timeline.compact { margin: 14px 16px 0; padding: 14px 0 2px; border-top: 1px solid var(--line); }
.member-timeline.compact .timeline-step > span { width: 28px; height: 28px; font-size: 10px; }
.member-timeline.compact .timeline-line { margin-top: 13px; }
.member-timeline.compact .timeline-step b { font-size: 9px; }
.member-timeline-alert { display: flex; align-items: center; gap: 10px; margin: 14px 16px 0; padding: 12px 14px; border: 1px solid var(--status); border-radius: var(--radius); background: var(--status-soft); color: var(--status); }
.member-timeline-alert > i { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #fff; }
.member-timeline-alert > div { min-width: 0; display: grid; gap: 2px; }
.member-timeline-alert b { font-size: 12px; }
.member-timeline-alert span { overflow-wrap: anywhere; font-size: 11px; font-weight: 600; }

/* Bill selector and printable detail */
.billing-filter-panel { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px 16px; margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 6px 20px rgba(16,24,40,.04); }
.billing-filter-panel form { display: flex; align-items: center; gap: 10px; min-width: 0; }
.billing-filter-panel form > div { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #ccd1d9; border-radius: var(--radius); }
.billing-filter-panel .filter-label { display: inline-flex; align-items: center; gap: 6px; padding-right: 10px; border-right: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.billing-filter-panel label { min-width: 0; }
.billing-filter-panel input { width: 125px; min-height: 40px; border: 0; outline: 0; background: transparent; color: var(--ink); }
.billing-filter-panel form > div > i { color: #98a2b3; font-size: 10px; }
.billing-filter-panel .btn { min-height: 44px; white-space: nowrap; }
.billing-filter-panel > p { grid-column: 1; margin: 0; color: var(--muted); font-size: 12px; }
.billing-presets { grid-column: 2; grid-row: 1/3; display: flex; align-items: center; gap: 6px; }
.billing-presets a { min-height: 32px; display: inline-flex; align-items: center; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 12px; font-weight: 700; }
.billing-presets a.active { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.billing-layout { display: grid; grid-template-columns: 290px minmax(0,1fr); align-items: start; gap: 18px; }
.bill-picker { position: sticky; top: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.bill-picker-title { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 800; }
.bill-picker-title span { display: flex; align-items: center; gap: 9px; }
.bill-picker-title i { color: var(--red); }
.bill-picker-title b { min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: #fff; font-size: 12px; }
.bill-tabs { display: grid; gap: 0; margin: 0; padding: 6px; overflow: visible; }
.bill-tabs a { min-width: 0; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 12px 10px; border: 0; border-bottom: 1px solid var(--line); border-radius: 6px; box-shadow: none; }
.bill-tabs a:last-child { border-bottom: 0; }
.bill-tabs a.active { border: 0; background: var(--red-soft); box-shadow: inset 4px 0 0 var(--red); }
.bill-tab-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; background: var(--surface-2); color: var(--red); }
.bill-tab-copy { min-width: 0; display: grid; }
.bill-tab-copy small, .bill-tab-copy b, .bill-tab-copy em, .bill-tab-date { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bill-tab-date { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 600; }
.bill-tab-copy em { color: var(--red); font-size: 12px; font-style: normal; font-weight: 700; }
.bill-tabs a > .fa-chevron-right { color: #98a2b3; font-size: 11px; }
.bill-detail, .bill-detail .bill { min-width: 0; width: 100%; max-width: none; }
.member-bill-frame { display: block; width: 100%; min-height: 920px; border: 0; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }

@media (max-width:1100px) {
  .dashboard-grid { grid-template-columns: 220px minmax(0,1fr); }
  .dashboard-grid .dashboard-main { padding-inline: 22px; }
  .billing-layout { grid-template-columns: 240px minmax(0,1fr); }
  .tracking-filter { grid-template-columns: minmax(0,1fr) auto; }
  .tracking-filter .date-filter { grid-column: 1/-1; grid-row: 2; }
}

@media (max-width:900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid .dashboard-main { padding: 0 14px 94px; }
  .dashboard-grid .sidebar { min-height: auto; padding: 10px 14px; border-left: 4px solid var(--red); }
  .sidebar .member-brand { padding: 0; border-bottom: 0; }
  .shipment-grid { grid-template-columns: 1fr; }
  .billing-layout { grid-template-columns: 1fr; }
  .bill-picker { position: static; }
  .bill-picker-title { min-height: 50px; }
  .bill-tabs { display: flex; gap: 8px; padding: 8px; overflow-x: auto; }
  .bill-tabs a { min-width: 220px; border: 1px solid var(--line); }
  .bill-tabs a:last-child { border-bottom: 1px solid var(--line); }
  .billing-filter-panel { grid-template-columns: 1fr; }
  .billing-presets { grid-column: 1; grid-row: auto; justify-content: flex-start; }
}

@media (max-width:640px) {
  .dashboard-grid { padding: 0; }
  .dashboard-grid .dashboard-main { padding-inline: 10px; }
  .dashboard-grid .sidebar { margin: 0 -10px; border-radius: 0; }
  .tracking-page .dashboard-main { padding-top: 0; }
  .shipment-grid { gap: 10px; }
  .bill-picker { margin-inline: -2px; }
  .bill-picker-title { padding-inline: 12px; }
  .bill-tabs a { min-width: 200px; }
  .billing-filter-panel { padding: 10px; }
  .billing-filter-panel form { align-items: stretch; flex-direction: column; }
  .billing-filter-panel form > div { width: 100%; }
  .billing-filter-panel .filter-label { display: none; }
  .billing-filter-panel label { flex: 1; }
  .billing-filter-panel input { width: 100%; min-width: 0; }
  .billing-filter-panel form .btn { width: 100%; }
  .billing-presets { overflow-x: auto; }
  .tracking-filter { grid-template-columns: 1fr auto; }
  .tracking-filter .date-filter { min-width: 0; grid-column: 1/-1; padding-inline: 8px; }
  .date-filter label { min-width: 0; flex: 1; }
  .date-filter input { width: 100%; min-width: 0; }
  .tracking-filter-actions .icon-button { display: none; }
  .tracking-filter-actions .filter-button { min-width: 52px; }
  .tracking-filter-actions .filter-button span { display: none; }
  .range-presets { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .range-presets::-webkit-scrollbar { display: none; }
  .modal-actions .full { width: 100%; }
  .member-bill-frame { min-height: 1100px; border-radius: 0; box-shadow: none; }
  .status-legend { margin-bottom: 12px; }
  .member-timeline { grid-template-columns: 46px minmax(8px,1fr) 46px minmax(8px,1fr) 46px minmax(8px,1fr) 46px minmax(8px,1fr) 46px; padding-inline: 8px; }
  .member-timeline.compact { margin-inline: 12px; padding-inline: 0; }
  .timeline-step > span { width: 28px; height: 28px; }
  .timeline-step b { max-width: 48px; font-size: 9px; }
  .timeline-line { margin-top: 13px; }
  .install-panel { bottom:calc(10px + env(safe-area-inset-bottom)); grid-template-columns:40px minmax(0,1fr) auto 30px; width:calc(100% - 20px); }
  .install-panel img { width:40px; height:40px; }
  .install-action { min-width:42px; padding-inline:10px; font-size:12px; }
  .install-guide-actions { display:grid; grid-template-columns:1fr 1fr; }
}

@media print {
  @page { size: A4 portrait; margin: 10mm; }
  html, body { width: 100%; min-height: auto; background: #fff !important; }
  body { padding: 0 !important; color: #000; }
  .member-loader, .page-head, .bill-picker, .mobile-bottom-nav, .power { display: none !important; }
  .page { width: 100% !important; margin: 0 !important; padding: 0 !important; }
  .billing-layout { display: block !important; }
  .bill-detail, .bill { width: 100% !important; max-width: none !important; }
  .bill { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; overflow: visible !important; }
  .bill .card-head { padding: 0 0 12px !important; }
  .bill .content { padding: 12px 0 0 !important; }
  .bill-total { font-size: 26px !important; }
  .notice { break-inside: avoid; }
  .table-wrap { overflow: visible !important; }
  .bill-table table { min-width: 0 !important; font-size: 9px; }
  .bill-table th, .bill-table td { padding: 7px 6px !important; }
  .profile-list, .split, .summary-box { break-inside: avoid; }
  a { text-decoration: none !important; }
}
