
:root {
  color-scheme: light;
  --ink: #533619;
  --deep: #4a2b13;
  --muted: #6f5944;
  --gold: #ad7738;
  --gold-dark: #815221;
  --cream: #fffaf3;
  --line: #e7d9c8;
  --shadow: 0 5px 13px #64432417, 0 2px 3px #70532f0c;
  --display: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", Georgia, serif;
  font: 16px/1.5 "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 56% 20%, #fffaf3 12%, #f5ebe0 74%) fixed; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .64; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #a56629; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { color: var(--deep); font-family: var(--display); line-height: 1.22; font-weight: 900; }
[hidden] { display: none !important; }
.icon { width: 1.22em; height: 1.22em; flex: 0 0 auto; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.loading { text-align: center; padding: 4rem 1rem; }
.muted, .field-note { color: var(--muted); }
.muted { font-size: .93rem; }
.field-note { font-size: .83rem; }
.panel {
  border: 1px solid #fffdf8; border-radius: 21px;
  background: linear-gradient(147deg,#fffdf9, #fcf5ec); box-shadow: var(--shadow), inset 0 1px #fff;
}
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; padding: .64rem 1.15rem; border-radius: 30px; border: 1px solid transparent;
  font-weight: 800; text-align: center; line-height: 1.15; transition: filter .15s, transform .15s;
}
.button:hover { filter: brightness(1.04); }
.button:active { transform: translateY(1px); }
.full { width: 100%; }
.primary-button {
  color: #fffdf8; border-color: #a36c35;
  background: linear-gradient(162deg,#c49656,#ad7638 50%,#8a511e 100%);
  text-shadow: 0 1px 1px #71451d; box-shadow: inset 0 1px #fff6d875, 0 3px 6px #6642212b;
}
.pale-button, .light-button { color: var(--deep); background: linear-gradient(#fffdf7,#f5e8d7); border-color: #e5d5bf; }
.danger-button { color: #922e28; background: #fff1ed; border-color: #efc7ba; }
.icon-button {
  display: inline-grid; place-items: center; min-width: 43px; min-height: 43px; border-radius: 50%;
  border: 1px solid #fff; color: var(--gold-dark); background: linear-gradient(#fffdfa,#f8ecdc); box-shadow: 0 3px 7px #654b2424;
}
.text-link { display: inline-flex; align-items: center; gap: .28rem; color: var(--gold-dark); font-weight: 800; font-size: .88rem; border: 0; background: transparent; padding: 0; }
.text-link:hover { text-decoration: underline; text-underline-offset: .2em; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .82rem; }
.section-head :is(h1,h2) { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.section-head h1 { font-size: clamp(1.55rem,4vw,2rem); }
.section-head h2 { font-size: clamp(1.15rem,3.4vw,1.5rem); }
.section-head :is(h1,h2) .icon { color: var(--gold-dark); }
.section-head h2 img { width: 39px; height: 39px; object-fit: contain; }
.member-page {
  --member-gutter: clamp(1rem, 4.5vw, 2rem);
  --member-gap: clamp(.9rem, 3.8vw, 1.35rem);
  --member-width: 1040px;
  --member-border: #e9e0d4;
  --member-muted: #6d6052;
  background: #f8f5ef;
}
.member-header { padding-top: env(safe-area-inset-top); background: #fdfaf5; border-bottom: 1px solid var(--member-border); }
.header-inner, .member-main, .member-footer { width: min(calc(100% - 2 * var(--member-gutter)), var(--member-width)); margin-inline: auto; }
.header-inner { display: flex; align-items: center; min-height: 62px; gap: .75rem; justify-content: space-between; }
.member-brand { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.03rem; color: #4f3925; font-weight: 700; white-space: nowrap; }
.member-brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: #f3e7d6; }
.member-brand-mark img { width: 24px; height: 23px; object-fit: contain; }
.desktop-nav { display: flex; gap: .2rem; justify-content: center; flex: 1; }
.header-actions { display: flex; flex-shrink: 0; gap: .15rem; }
.member-header .icon-button {
  min-width: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 9px; background: transparent;
  box-shadow: none; color: #6d5136;
}
.member-header .icon-button:hover, .nav-item:hover { background: #f1e8dc; }
.nav-item {
  display: flex; align-items: center; justify-content: center; gap: .42rem; min-height: 38px; border-radius: 8px;
  padding: .35rem .6rem; font-size: .86rem; font-weight: 500; color: #6d5b47; white-space: nowrap;
}
.nav-item.selected { color: #5b3c22; background: #f0e5d5; font-weight: 650; }
.member-header .icon, .bottom-nav .icon { stroke-width: 1.65; }
.member-main {
  display: grid; grid-template-columns: minmax(0,1fr); gap: var(--member-gap);
  margin-block: clamp(1.55rem, 4.2vw, 3rem) 2rem;
}
.member-main.slim { max-width: 730px; }
.member-footer { display: flex; justify-content: space-between; gap: 1rem; margin-block: 1.3rem; font-size: .82rem; color: var(--member-muted); }
.member-footer a:hover { text-decoration: underline; }
.bottom-nav { display: none; }
.home-intro { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-block: .15rem .18rem; }
.home-intro .member-status { min-width: 0; }
.member-page-title { padding-block: .15rem .18rem; }
.home-intro h1, .member-page-title h1 { color: #3e3023; font-size: clamp(1.75rem, 4.3vw, 2.65rem); line-height: 1.17; font-weight: 700; letter-spacing: .015em; }
.home-intro p, .member-page-title p { margin-top: .45rem; color: var(--member-muted); font-size: .875rem; line-height: 1.45; overflow-wrap: anywhere; }
.home-account-actions { display: flex; flex: 0 0 auto; align-items: center; gap: .44rem; }
.member-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .32rem;
  min-height: 40px; padding: .47rem .78rem; border: 1px solid transparent; border-radius: 9px;
  color: #60442e; background: transparent; font-size: .875rem; line-height: 1.18; font-weight: 600; white-space: nowrap;
}
.member-button .icon { stroke-width: 1.65; }
.member-button-primary { color: #fffdf9; background: #7b5939; }
.member-button-primary:hover { background: #68482e; }
.member-button-soft { background: #f1e7da; border-color: #eee0ce; }
.member-button-soft:hover, .member-button-plain:hover { background: #ebdecb; }
.home-summary, .home-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--member-gap); }
.member-card {
  min-width: 0; padding: clamp(.9rem, 3.7vw, 1.45rem); border: 1px solid var(--member-border); border-radius: 16px;
  background: #fffdf9; box-shadow: 0 2px 6px #5b42220a;
}
.home-balance, .home-score { display: grid; grid-template-rows: auto 1fr auto; justify-items: start; gap: .38rem; }
.home-metric-head { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 32px; gap: .25rem; }
.home-metric-head h2, .home-offers h2, .home-section-head h2 {
  font-family: inherit; font-weight: 650; line-height: 1.35; color: #493623;
}
.home-metric-head h2 { font-size: clamp(.9rem, 3.75vw, 1.03rem); }
.home-metric-head img { width: 30px; height: 29px; flex: 0 0 auto; object-fit: contain; }
.home-metric-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: .12rem .3rem; min-width: 0; color: #5e3e24; }
.home-metric-value strong {
  font: 600 clamp(1.62rem, 7.1vw, 2.8rem)/1.12 Georgia, var(--display); letter-spacing: -.025em;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0;
}
.home-metric-value > span { color: #71604d; font-size: .86rem; font-weight: 600; }
.home-score-display { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .25rem; }
.gauge { width: min(48%, 102px); height: auto; flex: 0 1 auto; }
.member-text-link {
  display: inline-flex; align-items: center; gap: .27rem; min-height: 32px; padding: 0; color: #765636;
  background: transparent; border: 0; font-size: .84rem; font-weight: 550; text-align: start; white-space: nowrap;
}
.member-text-link:hover { color: #4f3420; text-decoration: underline; text-underline-offset: .24em; }
.member-text-link .icon { stroke-width: 1.6; }
.home-offers { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .72rem; }
.home-offer-art { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 12px; background: #f8ecdc; }
.home-offer-art img { width: 77%; height: 83%; object-fit: contain; }
.home-offers h2, .home-section-head h2 { font-size: clamp(.99rem, 4.2vw, 1.14rem); }
.home-offers p, .home-empty-note { font-size: .84rem; color: var(--member-muted); line-height: 1.5; }
.home-offers p { margin-top: .29rem; }
.home-section-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.home-empty-note { margin-top: .55rem; }
.home-announcements .notices { margin-top: .45rem; }
.home-announcements .notice-row strong { font-size: .9rem; font-weight: 650; }
.home-announcements .notice-row small { font-size: .8rem; }
.tier-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .45rem; margin-top: .6rem; }
.tier {
  display: grid; justify-items: center; align-content: start; gap: .38rem; padding: .62rem .28rem; min-width: 0; text-align: center;
  border: 1px solid transparent; border-radius: 10px; background: transparent; color: #5e472f;
}
.tier:hover { background: #f7efe4; }
.tier > span:not(.tier-emblem) { font-size: .88rem; font-weight: 600; }
.tier small { color: var(--member-muted); font-size: .79rem; line-height: 1.25; overflow-wrap: anywhere; }
.tier-current { border-color: #e8dac6; background: #f5ecdf; }
.tier-emblem {
  width: 48px; height: 48px; border-radius: 50%; display: inline-grid; place-items: center; flex: 0 0 auto;
  color: #92612d; border: 1px solid #e2c28e; background: linear-gradient(#fffaf0,#f5e3bf); box-shadow: inset 0 0 0 2px #fff7e9;
}
.tier-emblem.silver { color: #746254; background: linear-gradient(#fffbf4,#e9e0d4); border-color: #cfc3b6; }
.tier-emblem.vip { color: #765027; background: linear-gradient(#fff1d5,#efd095); border-color: #ba914e; }
.tier .tier-emblem { width: 35px; height: 35px; border-color: #e4d5bf; box-shadow: none; background: #f7edde; color: #795633; }
.tier .tier-emblem.silver { background: #f1ebe4; color: #6e6255; }
.tier .tier-emblem.vip { background: #f4e6cb; }
.notices { display: grid; }
.notice-row { display: flex; align-items: center; gap: .6rem; padding: .5rem .15rem; text-align: left; color: var(--ink); min-height: 52px; border: 0; border-top: 1px solid #eee0d0; background: transparent; }
.notice-row strong, .notice-row small { display: block; overflow-wrap: anywhere; }
.notice-row small { color: var(--muted); }
.notice-icon { padding: .44em; border-radius: 50%; color: var(--gold-dark); background: #f5e7d3; }
.unread { margin-left: auto; width: .52rem; height: .52rem; border-radius: 50%; background: #b57339; flex-shrink: 0; }
.empty-state { display: grid; justify-items: center; gap: .25rem; padding: 1.1rem .5rem; border: 1px dashed #ead9c5; border-radius: 12px; color: var(--muted); text-align: center; }
.empty-state .icon { width: 1.35rem; height: 1.35rem; color: #a2774b; }
.empty-state p { font-size: .85rem; }
.page-panel { width: min(100%,730px); min-width: 0; margin-inline: auto; padding: clamp(.95rem,4vw,2rem); }
.page-panel > .button { margin-top: 1rem; }
.offer-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .65rem; margin-top: 1rem; }
.offer-tile {
  min-width: 0; min-height: 44px; padding: .42rem .38rem; color: #705c47; background: #f6f1e9;
  border: 1px solid var(--member-border); border-radius: 9px; font-size: .88rem; white-space: nowrap;
}
.offer-tile:hover { background: #f0e8db; }
.offer-tile .icon { margin-right: .23rem; stroke-width: 1.65; }
.offer-tile strong { font-weight: 600; }
.member-main.slim h2, .auth-service h2 { font-family: inherit; font-size: 1.06rem; font-weight: 650; color: #493623; }
.member-muted-note, .member-rules > p { color: var(--member-muted); font-size: .88rem; line-height: 1.55; }
:is(h2,.member-balance) + .member-muted-note, .member-rules h2 + p { margin-top: .55rem; }
.member-card > .member-button { margin-top: 1rem; }
.member-signin-prompt p { font-size: .9rem; color: var(--member-muted); }
.member-balance { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.member-balance > div { min-width: 0; }
.member-balance strong {
  display: block; color: #67482d; font: 600 clamp(1.65rem, 6vw, 2.55rem)/1.2 Georgia, var(--display);
  margin-top: .42rem; overflow-wrap: anywhere;
}
.member-balance img { width: 60px; height: 59px; object-fit: contain; flex-shrink: 0; }
.wallet-stats {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem;
  border-top: 1px solid var(--member-border); margin: 1.1rem 0 0; padding-top: .85rem; font-size: .85rem;
}
.wallet-stats dt { color: var(--member-muted); }
.wallet-stats dd { margin: .25rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
.member-transactions .table-wrap { margin-top: .85rem; border-color: var(--member-border); }
.member-transactions th { background: #f5eee4; }
.member-transactions th, .member-transactions td { white-space: normal; overflow-wrap: anywhere; text-align: start; }
.member-transactions :is(th,td):nth-child(2), .member-transactions :is(th,td):nth-child(3) { white-space: nowrap; }
.member-profile-card .profile-summary { gap: .8rem; }
.member-profile-card .profile-summary p { margin-top: .27rem; font-size: .86rem; color: var(--member-muted); }
.member-profile-card .profile-summary h2 { overflow-wrap: anywhere; }
.member-profile-card .profile-list { margin-bottom: 0; font-size: .9rem; }
.member-profile-card .profile-list > div { padding-block: .68rem; }
.member-profile-card .profile-list > div:last-child { border-bottom: 0; }
.member-profile-card .profile-list dd, .member-rules .rule-list strong { font-weight: 600; }
.member-service-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; margin-top: .8rem; }
.member-service-grid .member-button { justify-content: start; min-height: 44px; padding-inline: .67rem; }
.member-account-footer { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .85rem; margin-top: .85rem; }
.member-logout { margin-left: auto; color: #8c4539; }
.member-announcement-list .notice-row:first-child { border-top: 0; }
.member-announcement-list .notice-row:hover { background: #f8f1e8; }

.auth-main { max-width: 485px; margin-bottom: 1rem; }
.auth-card { padding: clamp(1rem,4vw,1.5rem); }
.auth-tabs {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .22rem; border-radius: 11px;
  padding: .22rem; margin-bottom: 1.15rem; background: #f3ece2; border: 1px solid #eee3d6;
}
.auth-tabs a {
  display: grid; place-items: center; min-height: 38px; padding: .3rem;
  color: #76614d; font-size: .9rem; font-weight: 550; border-radius: 8px;
}
.auth-tabs [aria-current] { color: #5a3e25; background: #fffdf8; box-shadow: 0 1px 4px #54371912; font-weight: 650; }
.auth-field { display: grid; gap: .4rem; min-width: 0; }
.auth-field label { font-size: .9rem; font-weight: 600; }
.auth-input {
  display: flex; align-items: center; gap: .62rem; min-height: 47px; padding: 0 .73rem;
  background: #fffdf9; border: 1px solid #ded3c3; border-radius: 9px;
}
.auth-input:focus-within { border-color: #a57646; box-shadow: 0 0 0 2px #e9d7be; }
.auth-input .icon { width: 18px; height: 18px; color: #8a6947; stroke-width: 1.65; }
form .auth-input input:not([type=checkbox]) {
  min-width: 0; min-height: 45px; padding: 0; border: 0; background: transparent; color: var(--ink);
  outline: 0; font-size: 1rem;
}
#member-auth { display: grid; gap: .92rem; }
#member-auth > .member-button { min-height: 44px; margin-top: .13rem; }
.auth-consent { color: var(--member-muted); font-size: .8rem; line-height: 1.58; }
.auth-consent .member-text-link { display: inline; min-height: 0; font-size: inherit; text-decoration: underline; text-underline-offset: .16em; }
.auth-service {
  display: flex; align-items: center; gap: .72rem; width: 100%; text-align: start;
  min-height: 55px; font-size: .9rem; font-weight: 600; color: #60442e;
}
.auth-service img { width: 39px; height: 40px; object-fit: contain; flex: 0 0 auto; }
.auth-service div { min-width: 0; }
.auth-service strong { margin-left: auto; color: #79512e; font: 600 clamp(1rem,4.2vw,1.38rem)/1 Georgia,var(--display); white-space: nowrap; }
.auth-service p { margin-top: .22rem; font-size: .79rem; color: var(--member-muted); font-weight: 400; }
button.auth-service:hover { background: #f9f1e7; }
.auth-footer { display: flex; justify-content: center; align-items: center; gap: .4rem; color: var(--member-muted); padding-bottom: max(1rem,env(safe-area-inset-bottom)); }
form label { color: var(--ink); font-weight: 800; font-size: .92rem; }
form label .icon { margin-right: .26rem; color: var(--gold-dark); }
form input:not([type=checkbox]), form textarea, form select {
  width: 100%; min-height: 44px; padding: .61rem .7rem; border: 1px solid #d9c8b0; border-radius: 12px; background: #fffdf8; color: var(--ink);
}
form input::placeholder { color: #786752; }
form textarea { min-height: 83px; resize: vertical; }
:where(#admin-auth,#admin-adjust,#announcement-form) { display: grid; gap: .5rem; }
:where(#admin-auth,#admin-adjust,#announcement-form) > label:not(:first-child) { margin-top: .23rem; }
:where(#admin-auth,#admin-adjust,#announcement-form) .button[type=submit] { margin-top: .3rem; }
.otp-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: .42rem; }
.otp-row .member-button { min-height: 47px; }
.otp-row button { font-size: .79rem; padding-inline: .54rem; }
.consents { display: grid; gap: .13rem; padding: .2rem 0; }
.consents label, .check-label { display: flex; align-items: center; gap: .4rem; min-height: 33px; }
input[type=checkbox] { accent-color: #966331; width: 1rem; height: 1rem; flex-shrink: 0; }
.form-error { padding: .56rem .7rem; border: 1px solid #edc8ba; border-radius: 10px; background: #fff0e9; color: #992f29; font-size: .86rem; }
.rule-list, .profile-list { list-style: none; padding: 0; margin: .65rem 0; }
.rule-list li, .profile-list > div { display: flex; align-items: center; justify-content: space-between; gap: .55rem; border-bottom: 1px solid #ecdfd0; padding: .52rem .12rem; }
.profile-list dd, .rule-list strong { color: #654217; margin: 0; text-align: end; font-weight: 850; overflow-wrap: anywhere; }
.profile-summary { display: flex; align-items: center; gap: .62rem; margin-bottom: .6rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .85rem 0 .32rem; }

.notice-content, .preview-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-note { border: 1px solid #e5d7c7; background: #fbefe1; border-radius: 10px; padding: .65rem; }
dialog { width: min(100% - 1.35rem,590px); max-height: calc(100dvh - 1.8rem); overflow: auto; border: 1px solid #e3c89f; border-radius: 20px; background: #fffbf3; color: var(--ink); padding: 1.1rem; box-shadow: 0 18px 60px #41290f61; }
dialog::backdrop { background: #3e2b1b7a; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: .55rem; margin-bottom: .85rem; }
.modal-head h2 { font-size: 1.25rem; overflow-wrap: anywhere; }
.close-button { font-size: 1.44rem; }
dialog > p + p, dialog > .section-head { margin-top: .85rem; }
.toast { position: fixed; z-index: 12; right: 1rem; bottom: 1rem; max-width: min(91vw,385px); border: 1px solid #d7c395; border-radius: 13px; color: #5d492b; background: #fff7e5; padding: .65rem .95rem; box-shadow: var(--shadow); font-weight: 800; }
.toast.error { background: #fff0e9; color: #8d342b; border-color: #edaf9d; }
.load-error { margin: 2rem auto; }
.admin-shell { --sidebar: 246px; min-height: 100dvh; }
.admin-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); overflow-y: auto; z-index: 5; padding: 1rem .74rem;
  color: #fff5e6; background: radial-gradient(ellipse at 0% 0%,#8b6039,transparent 51%), linear-gradient(156deg,#704925,#4a311f 78%);
  border-right: 1px solid #a77f50; box-shadow: 5px 0 18px #50372225;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid #e3c699; background: #fff2d8; }
.brand-mark img { width: 34px; height: 29px; object-fit: contain; }
.brand-copy { display: grid; line-height: 1.12; gap: .16rem; }
.brand-copy strong { font-size: 1.09rem; font-weight: 950; letter-spacing: .06em; }
.brand-copy span { font-size: .78rem; font-weight: 800; }
.admin-brand { width: 100%; padding: .42rem .4rem .9rem; border-bottom: 1px solid #f6d6a64b; }
.admin-sidebar nav { display: grid; gap: .16rem; margin-top: .7rem; }
.side-link { display: flex; align-items: center; gap: .65rem; padding: .46rem .65rem; min-height: 42px; color: #fff3de; font-size: .9rem; font-weight: 760; border: 1px solid transparent; border-radius: 11px; white-space: nowrap; }
.side-link .icon { color: #edca8c; }
.side-link.active, a.side-link:hover { background: #ffffff21; border-color: #edcc9890; }
.side-link.unavailable { color: #e7d0b9; }
.side-link small { margin-left: auto; color: #ead5bc; font-size: .68rem; }
.sidebar-bottom { border-top: 1px solid #f6d6a64b; margin-top: .65rem; padding-top: .45rem; }
.admin-workspace { padding-left: var(--sidebar); min-width: 0; }
.admin-top { display: flex; align-items: center; gap: .6rem; min-height: 70px; padding: .5rem clamp(1rem,3vw,2rem); background: #fffaf4; border-bottom: 1px solid #eadccc; }
.top-label { flex: 1; color: #684525; font-weight: 900; }
.admin-menu { display: none; }
.admin-user { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.admin-user strong, .admin-user small { display: block; line-height: 1.25; overflow-wrap: anywhere; }
.admin-user small { color: var(--muted); }
.admin-avatar { display: grid; place-items: center; min-width: 35px; height: 35px; color: #945e2c; background: #f6e6ce; border: 1px solid #e8d0ab; border-radius: 50%; }
.logout-admin { color: #694f32; background: #f9efe1; border-color: #ecdac5; min-height: 37px; padding: .38rem .66rem; }
.admin-main { width: min(100%,1610px); margin: auto; padding: clamp(.75rem,2.5vw,2rem); min-width: 0; }
.admin-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.05rem; }
.admin-title h1 { font-size: clamp(1.55rem,2.6vw,2.25rem); margin-bottom: .24rem; }
.admin-title p { color: var(--muted); }
.admin-hero {
  position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; min-height: 164px;
  border-radius: 21px; border: 1px solid #fffdf6; padding: clamp(1rem,3vw,2.5rem);
  background: radial-gradient(ellipse at 80% 46%,#f5d9aa,#fcf2e4 64%,#fffaf2); box-shadow: var(--shadow);
}
.admin-hero::after { position: absolute; content: ""; z-index: -1; left: 35%; top: 59%; width: 80%; height: 106%; transform: rotate(-8deg); border-radius: 50%; border: 1px solid #fffaf0; background: #e7c69a45; }
.admin-hero > div { z-index: 1; }
.admin-hero h2 { font-size: clamp(1.35rem,2.8vw,2.6rem); margin-bottom: .38rem; }
.admin-hero p { color: #755333; font-weight: 750; }
.admin-hero-emblem { position: absolute; width: min(26%,238px); height: 81%; right: 9%; bottom: 9%; object-fit: contain; filter: drop-shadow(0 10px 8px #7a4f2640); }
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: .46rem .65rem; margin: 0 0 .8rem; }
.dashboard-filter { margin: 1rem 0 .8rem; }
.filter :is(input,select) { width: auto; max-width: 100%; min-height: 38px; padding: .36rem .53rem; }
.filter input[type=number] { width: 80px; }
.filter .button { min-height: 37px; padding: .39rem .74rem; }
.custom-dates { display: flex; flex-wrap: wrap; gap: .46rem; }
.metrics-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .8rem; margin: .78rem 0 1rem; }
.metric { display: flex; align-items: center; min-width: 0; gap: .58rem; padding: clamp(.6rem,1.4vw,1.2rem); }
.metric > div { min-width: 0; }
.metric > div > span { display: block; color: var(--muted); font-size: .85rem; font-weight: 750; overflow-wrap: anywhere; }
.metric strong { color: #6d421f; font: 700 clamp(1.06rem,1.75vw,1.55rem)/1.16 Georgia,var(--display); white-space: nowrap; }
.metric-icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border: 1px solid #e9d4ad; border-radius: 13px; color: #8e5d2e; background: #f7e8cb; box-shadow: inset 0 1px #fff; }
.metric-icon .icon { width: 21px; height: 21px; }
.metric-icon.green { background: #e7ece0; border-color: #d9e1ce; color: #556749; }
.metric-icon.rose { background: #f4e4da; border-color: #ead6c7; color: #8d5740; }
.metric-icon.violet { background: #eee6e1; border-color: #e3d5ce; color: #795e50; }
.admin-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: .95rem; }
.admin-panel { padding: clamp(.77rem,2vw,1.3rem); min-width: 0; }
.admin-panel > .field-note { margin-top: .55rem; }
.member-distribution { display: grid; gap: .16rem; }
.member-distribution > div { display: flex; align-items: center; gap: .5rem; padding: .27rem 0; border-bottom: 1px solid #ede0d0; }
.member-distribution .tier-emblem { width: 28px; height: 28px; font-size: .83rem; }
.member-distribution strong { margin-left: auto; }
.table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid #eadccb; border-radius: 12px; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .84rem; }
th, td { white-space: nowrap; vertical-align: middle; padding: .53rem .63rem; }
th { background: #f3e6d5; color: #68492a; }
td { border-top: 1px solid #ebdfd0; background: #fffdf8; }
.status-pill { display: inline-block; padding: .16rem .44rem; border-radius: 99px; color: #7e552c; background: #f8ecd9; font-size: .78rem; font-weight: 850; }
.status-pill.okay { color: #4e6543; background: #eaf0e2; }
.status-pill.inactive { color: #8e433b; background: #f7e6de; }
.pagination { display: flex; align-items: center; gap: .45rem; margin-top: .82rem; }
.pagination span { margin-right: auto; color: var(--muted); }
.schedule-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .48rem; }
.admin-login-page { min-height: 100dvh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(ellipse at 38% 21%,#fff9ed,#e8d4bf); }
.admin-login-card { width: min(100%,465px); padding: clamp(1.2rem,6vw,2.2rem); }
.admin-login-heading { display: flex; align-items: center; gap: .65rem; margin: 1.45rem 0 .9rem; }
.admin-login-heading h1 { font-size: 1.7rem; }
.admin-login-heading p { color: var(--muted); }
.admin-login-card > .text-link { margin-top: 1.2rem; }
@media (max-width: 910px) {
  .desktop-nav { display: none; }

  .bottom-nav {
    display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); position: fixed; z-index: 8;
    inset-inline: max(.78rem,env(safe-area-inset-left)) max(.78rem,env(safe-area-inset-right));
    bottom: max(.62rem,calc(env(safe-area-inset-bottom) + .32rem)); max-width: 540px; margin-inline: auto;
    padding: .24rem; border: 1px solid #e9ddcc; border-radius: 999px;
    background: #fffbf5f7; box-shadow: 0 3px 14px #5b422218; backdrop-filter: blur(8px);
  }
  .bottom-nav .nav-item { flex-direction: column; gap: .14rem; padding: .22rem .03rem; min-height: 44px; font-size: .75rem; line-height: 1.2; border-radius: 999px; }
  .bottom-nav .nav-item.selected { background: #f3e6d2; color: #68482c; }
  .bottom-nav .icon { width: 19px; height: 19px; }
  .member-footer { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
  .member-page:has(.bottom-nav) .toast { bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
  .admin-shell { --sidebar: 209px; }
  .metrics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 650px) {
  .header-inner { min-height: 56px; }
  .panel { border-radius: 17px; }
  .section-head h2 img { width: 30px; height: 30px; }
  .offer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .member-transactions :is(th,td) { padding: .5rem .33rem; }
  .auth-service strong { font-size: clamp(.96rem,4vw,1.28rem); }
  .admin-workspace { padding-left: 0; }
  .admin-menu { display: inline-grid; }
  .admin-sidebar { transform: translateX(-101%); visibility: hidden; top: 58px; transition: transform .17s,visibility .17s; }
  .admin-sidebar.sidebar-open { transform: translateX(0); visibility: visible; }
  .admin-top { min-height: 58px; }
  .admin-grid { grid-template-columns: minmax(0,1fr); }
  .admin-hero { min-height: 130px; }
  .admin-hero p { font-size: .79rem; }
  .metrics-grid { gap: .46rem; }
  .metric { gap: .35rem; }
  .metric-icon { width: 34px; height: 34px; border-radius: 10px; }
  .metric-icon .icon { width: 16px; height: 16px; }
  .metric > div > span { font-size: .72rem; }
  .metric strong { font-size: clamp(.91rem,4.3vw,1.19rem); }
  .home-intro { gap: .5rem; }
  .home-account-actions { gap: .14rem; }
  .home-intro .member-button, .home-offers .member-button { min-height: 37px; padding-inline: .54rem; font-size: .81rem; }
  .home-details { grid-template-columns: minmax(0,1fr); }
  .home-offer-art { width: 43px; height: 43px; }
  .home-offers { column-gap: .6rem; }
  .tier-grid { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: .52rem; }
  .tier {
    grid-template-columns: auto minmax(0,1fr) auto; align-items: center; justify-items: start; text-align: start;
    gap: .65rem; min-height: 47px; padding: .24rem .36rem; border-bottom-color: var(--member-border); border-radius: 0;
  }
  .tier:last-child { border-bottom-color: transparent; }
  .tier-current { border-color: #e8dac6; border-radius: 8px; }
  .tier .tier-emblem { width: 29px; height: 29px; font-size: .83rem; }
  .tier small { text-align: end; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
