:root {
  color-scheme: light;
  --ink: #10251d;
  --muted: #6d7b75;
  --line: #e3eae6;
  --surface: #ffffff;
  --canvas: #f2f5f3;
  --deep: #0b2119;
  --green: #163f30;
  --lime: #c8ff3d;
  --amber: #bd7100;
  --red: #b42318;
  --shadow: 0 12px 40px rgba(17, 55, 41, 0.07);
  --radius: 20px;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { touch-action: manipulation; }

.auth-root {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 15%, rgba(200,255,61,.16), transparent 30%),
    radial-gradient(circle at 85% 85%, rgba(78,156,119,.2), transparent 34%),
    var(--deep);
}
.auth-card { width: min(440px, 100%); padding: 32px; border-radius: 26px; background: white; box-shadow: 0 30px 100px rgba(0,0,0,.32); }
.auth-loading { min-height: 220px; display: grid; place-items: center; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.auth-brand strong { display: block; font-size: 18px; }
.auth-brand span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.auth-card h1 { margin: 14px 0 8px; font-size: 27px; letter-spacing: -.04em; }
.auth-card > p { margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.auth-form { display: grid; gap: 8px; }
.auth-form label { margin-top: 6px; color: #354a42; font-size: 12px; font-weight: 800; }
.auth-submit { width: 100%; min-height: 46px; margin-top: 14px; }
.auth-note { margin-top: 20px; padding: 12px; border-radius: 12px; background: #f0f5f2; color: #60716a; font-size: 11px; line-height: 1.5; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 18px;
  background: var(--deep);
  color: white;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 30px; }
.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--lime);
  color: var(--deep);
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 10px 32px rgba(200, 255, 61, 0.24);
}
.brand strong { display: block; font-size: 18px; letter-spacing: -0.03em; }
.brand span { display: block; margin-top: 3px; font-size: 12px; color: rgba(255,255,255,.43); }

.nav-label { margin: 0 11px 9px; color: rgba(255,255,255,.3); font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.side-nav { display: grid; gap: 6px; }
.nav-button {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: rgba(255,255,255,.58);
  cursor: pointer;
  text-align: left;
  transition: .18s ease;
}
.nav-button:hover { background: rgba(255,255,255,.07); color: white; }
.nav-button.is-active { background: var(--lime); color: var(--deep); font-weight: 800; }
.nav-icon { width: 22px; font-size: 20px; text-align: center; line-height: 1; }

.account-panel { display: grid; grid-template-columns: 34px minmax(0,1fr) 30px; align-items: center; gap: 9px; margin-top: auto; padding: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(255,255,255,.04); }
.account-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--lime); color: var(--deep); font-size: 13px; font-weight: 950; }
.account-panel strong, .account-panel span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-panel strong { font-size: 12px; }
.account-panel span { margin-top: 2px; color: rgba(255,255,255,.38); font-size: 9px; }
.account-panel button { width: 30px; height: 30px; border: 0; border-radius: 9px; background: rgba(255,255,255,.08); color: white; cursor: pointer; }
.local-note { margin-top: 10px; padding: 15px; border: 1px solid rgba(255,255,255,.09); border-radius: 17px; background: rgba(255,255,255,.05); }
.local-note > div { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.local-note p { margin: 7px 0 0; color: rgba(255,255,255,.42); font-size: 11px; line-height: 1.55; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(200,255,61,.1); }

.main-area { grid-column: 2; min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 28px;
  border-bottom: 1px solid rgba(16,37,29,.06);
  background: rgba(242,245,243,.9);
  backdrop-filter: blur(16px);
}
.topbar h1 { margin: 0; font-size: 21px; letter-spacing: -0.035em; }
.topbar p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.topbar time { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: white; color: #53615b; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 3px 12px rgba(0,0,0,.03); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-logout { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); font-weight: 900; cursor: pointer; }

.content { width: min(1500px, 100%); margin: auto; padding: 27px; }
.stack { display: grid; gap: 20px; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .8fr); gap: 18px; }

.card { overflow: hidden; border: 1px solid rgba(16,37,29,.04); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card-soft { background: #e6efea; box-shadow: none; }
.card-deep { background: #123e2e; color: white; border: 0; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 21px; border-bottom: 1px solid var(--line); }
.card-header.no-line { border-bottom: 0; padding-bottom: 10px; }
.card-header h2, .card-header h3 { margin: 0; letter-spacing: -0.02em; }
.card-header h2 { font-size: 18px; }
.card-header h3 { font-size: 15px; }
.card-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 30px;
  border-radius: 28px;
  background: #123e2e;
  color: white;
  box-shadow: 0 22px 60px rgba(18,62,46,.18);
}
.hero::after { content: ""; position: absolute; right: -80px; top: -130px; width: 340px; height: 340px; border-radius: 50%; border: 55px solid rgba(200,255,61,.08); }
.hero > * { position: relative; z-index: 1; }
.eyebrow { display: inline-flex; padding: 6px 9px; border-radius: 8px; background: var(--lime); color: var(--deep); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.hero h2 { max-width: 670px; margin: 13px 0 6px; font-size: clamp(24px, 3vw, 34px); line-height: 1.13; letter-spacing: -0.045em; }
.hero p { max-width: 620px; margin: 0; color: rgba(255,255,255,.58); font-size: 13px; line-height: 1.65; }

.metric { display: flex; align-items: center; justify-content: space-between; min-height: 108px; padding: 19px; }
.metric-label { margin: 0; color: #7a8782; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.metric-value { margin: 8px 0 0; font-size: 25px; font-weight: 900; letter-spacing: -0.045em; }
.metric-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: #e2f2ea; color: #1f6b4d; font-weight: 900; }
.metric-icon.lime { background: #efffc8; color: #668600; }
.metric-icon.amber { background: #fff1d6; color: #a96500; }
.metric-icon.blue { background: #e2efff; color: #2c68a7; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toolbar-actions { display: flex; align-items: center; gap: 9px; }
.members-toolbar { flex-wrap: wrap; justify-content: flex-end; }
.filter-control select { min-width: 220px; }
.member-filter-panel { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: #f8faf9; }
.member-filter-panel > strong { margin-right: 2px; color: #53655d; font-size: 11px; }
.filter-check { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid #dbe4df; border-radius: 999px; background: white; color: #52635c; font-size: 11px; font-weight: 700; cursor: pointer; }
.filter-check:has(input:checked) { border-color: #89aa9a; background: #e5f3eb; color: #17583d; }
.filter-check input { width: 14px; min-height: 14px; margin: 0; accent-color: #176443; }
.near-days { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--muted); font-size: 11px; }
.near-days select { width: auto; min-height: 31px; padding: 5px 25px 5px 8px; border-radius: 8px; font-size: 11px; }
.search { position: relative; min-width: min(310px, 100%); }
.search::before { content: "⌕"; position: absolute; left: 12px; top: 50%; transform: translateY(-52%); color: #7c8983; font-size: 20px; }
.search input { width: 100%; padding-left: 37px; }

.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--green);
  color: white;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: .16s ease;
}
.button:hover { transform: translateY(-1px); filter: brightness(.96); }
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.button-lime { background: var(--lime); color: var(--deep); }
.button-outline { border-color: var(--line); background: white; color: var(--ink); }
.button-ghost { background: transparent; color: #496158; }
.button-small { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.button-icon { width: 35px; padding: 0; }

.badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; background: #edf1ef; color: #596a63; font-size: 10px; font-weight: 800; white-space: nowrap; }
.badge-active { background: #e1f4e9; color: #17643f; }
.badge-warning { background: #fff0d5; color: #9a5c00; }
.badge-danger { background: #fde8e5; color: #a52a20; }
.badge-visit { background: #e7ecff; color: #344fa4; }
.badge-frozen { background: #e4efff; color: #285d99; }
.badge-queued { background: #f0e7ff; color: #6543a0; }
.badge-muted { background: #ecefed; color: #68736e; }
.badge-dark { background: rgba(255,255,255,.1); color: white; }

.member-list { display: grid; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.member-row:last-child { border-bottom: 0; }
.avatar { position: relative; width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; overflow: hidden; border: 2px solid white; border-radius: 50%; background: #e7f1ec; color: #205941; font-size: 12px; font-weight: 900; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-clickable { cursor: zoom-in; transition: transform .16s ease, box-shadow .16s ease; }
.avatar-clickable:hover { transform: scale(1.06); box-shadow: 0 4px 14px rgba(0,0,0,.14); }
.avatar-clickable:focus-visible { outline: 3px solid rgba(61,131,96,.28); outline-offset: 2px; }
.member-main { min-width: 0; flex: 1; }
.member-main strong { display: block; overflow: hidden; color: #173128; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.member-main span { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.member-name-actions { display: flex; align-items: center; gap: 6px; }
.member-name-actions strong { min-width: 0; }
.member-more { width: 27px; height: 24px; display: inline-grid; place-items: center; flex: 0 0 27px; padding: 0; border: 0; border-radius: 8px; background: #eef3f0; color: #51645b; font-size: 12px; font-weight: 900; letter-spacing: -2px; cursor: pointer; }
.member-more:hover { background: #dfeae4; color: #123e2e; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { padding: 12px 14px; background: #f7f9f8; color: #66746e; font-size: 11px; font-weight: 800; text-align: left; white-space: nowrap; }
td { padding: 13px 14px; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
td:last-child, th:last-child { text-align: right; }
.table-member { display: flex; align-items: center; gap: 10px; }
.text-muted { color: var(--muted); }
.text-amber { color: var(--amber); font-weight: 750; }
.text-green { color: #137044; font-weight: 800; }

.package-card { position: relative; min-height: 245px; padding: 22px; }
.package-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--lime); }
.package-card:nth-child(3n+2)::before { background: #1b6a4d; }
.package-card:nth-child(3n+3)::before { background: #f5a623; }
.package-card.is-inactive { opacity: .58; }
.package-card h3 { margin: 15px 0 8px; font-size: 20px; }
.package-price { margin: 16px 0 10px; color: var(--green); font-size: 26px; font-weight: 950; letter-spacing: -.045em; }
.package-description { min-height: 42px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.checkin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.checkin-item { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.history { display: grid; }
.history .member-row { border-color: rgba(255,255,255,.1); }
.history .member-main strong { color: white; }
.history .member-main span { color: rgba(255,255,255,.42); }
.history time { color: var(--lime); font-size: 11px; font-weight: 800; text-align: right; }

.action-card { padding: 15px; border-radius: 16px; background: rgba(255,255,255,.8); }
.action-card p { margin: 0; color: #718079; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.action-card div { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 9px; }
.action-card strong { font-size: 22px; }
.action-card span { color: var(--muted); font-size: 11px; }

.empty { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 16px; background: #eaf2ee; color: #2a654d; font-size: 21px; }
.empty strong { font-size: 14px; }
.empty p { max-width: 390px; margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.empty .button { margin-top: 16px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(2,12,8,.58); backdrop-filter: blur(5px); }
.modal { width: min(650px, 100%); max-height: 92vh; overflow-y: auto; border-radius: 22px; background: white; box-shadow: 0 28px 90px rgba(0,0,0,.28); }
.modal-small { width: min(480px, 100%); }
.history-modal { width: min(720px, 100%); }
.modal-header { position: relative; padding: 22px 24px 15px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
.modal-header p { margin: 5px 32px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.modal-close { position: absolute; right: 17px; top: 17px; width: 34px; height: 34px; border: 0; border-radius: 10px; background: #f1f4f2; cursor: pointer; }
.modal-body { padding: 20px 24px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 24px 21px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #354a42; font-size: 12px; font-weight: 750; }
input, select, textarea { width: 100%; min-height: 39px; padding: 9px 11px; border: 1px solid #d9e2dd; border-radius: 10px; background: white; color: var(--ink); outline: none; }
textarea { min-height: 74px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #5f947b; box-shadow: 0 0 0 3px rgba(51,115,85,.12); }
.form-section { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 4px; padding: 16px; border: 1px solid #dae7e0; border-radius: 16px; background: #f5f9f7; }
.form-section-title { grid-column: 1 / -1; margin: 0; font-size: 13px; }
.check-row { display: flex; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid #dce5e0; border-radius: 11px; background: #f8faf9; color: #43564d; font-size: 12px; font-weight: 700; cursor: pointer; }
.check-row.full { grid-column: 1 / -1; }
.check-row input { width: 17px; min-height: 17px; margin: 0; accent-color: #176443; }
.check-row-strong { border-color: #b8cfbf; background: #edf7f1; color: #17583d; }
.field-output { min-height: 39px; display: flex; align-items: center; padding: 9px 11px; border: 1px solid #d9e2dd; border-radius: 10px; background: #f7f9f8; color: #17583d; font-weight: 900; }
.transfer-summary { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 14px; border-radius: 14px; background: #123e2e; color: white; }
.transfer-summary strong { font-size: 12px; }
.transfer-summary span { color: var(--lime); font-size: 19px; font-weight: 900; }
.transfer-summary small { grid-column: 1 / -1; color: rgba(255,255,255,.5); font-size: 10px; }

.bulk-member-list { max-height: 270px; display: grid; gap: 7px; overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: #f8faf9; }
.bulk-member { display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 9px; padding: 8px; border-radius: 11px; background: white; cursor: pointer; }
.bulk-member:hover { background: #eef5f1; }
.bulk-member > input { width: 16px; min-height: 16px; margin: 0; accent-color: #176443; }
.bulk-member > span { display: flex; align-items: center; gap: 9px; min-width: 0; }
.bulk-member .avatar { width: 36px; height: 36px; flex-basis: 36px; }
.bulk-member strong, .bulk-member small { display: block; }
.bulk-member strong { font-size: 12px; }
.bulk-member small { margin-top: 2px; color: var(--muted); font-size: 10px; }

.action-sheet-backdrop { align-items: center; }
.member-action-sheet { position: relative; width: min(490px, 100%); max-height: 92vh; overflow-y: auto; padding: 22px; border-radius: 22px; background: white; box-shadow: 0 28px 90px rgba(0,0,0,.28); }
.action-sheet-member { display: flex; align-items: center; gap: 12px; padding: 2px 42px 17px 2px; border-bottom: 1px solid var(--line); }
.action-sheet-member > div { min-width: 0; }
.action-sheet-member strong, .action-sheet-member span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-sheet-member strong { font-size: 16px; }
.action-sheet-member span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.action-sheet-grid { display: grid; gap: 7px; padding-top: 14px; }
.action-sheet-grid > button { width: 100%; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: white; color: var(--ink); text-align: left; cursor: pointer; }
.action-sheet-grid > button:hover { border-color: #a9c0b4; background: #f2f7f4; }
.action-sheet-grid > button > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: #e8f1ec; color: #19563e; font-size: 17px; font-weight: 900; }
.action-sheet-grid strong, .action-sheet-grid small { display: block; }
.action-sheet-grid strong { font-size: 12px; }
.action-sheet-grid small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.action-sheet-grid b { color: #809089; font-size: 20px; }

.queued-list { margin-bottom: 18px; padding: 14px; border: 1px solid #dfd3f4; border-radius: 15px; background: #f8f3ff; }
.queued-list h3 { margin: 0 0 10px; color: #624592; font-size: 12px; }
.queued-list > div { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-top: 1px solid #e8ddf7; }
.queued-list > div:first-of-type { border-top: 0; }
.queued-list strong, .queued-list small { display: block; }
.queued-list strong { font-size: 11px; }
.queued-list small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.queue-number { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 25px; border-radius: 8px; background: #6b4ba1; color: white; font-size: 10px; font-weight: 900; }
.timeline { position: relative; display: grid; }
.timeline-item { position: relative; display: grid; grid-template-columns: 18px minmax(0,1fr); gap: 9px; padding-bottom: 18px; }
.timeline-item::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: -2px; width: 1px; background: #d8e3dd; }
.timeline-item:last-child::before { display: none; }
.timeline-dot { position: relative; z-index: 1; width: 13px; height: 13px; margin-top: 3px; border: 3px solid #d8ece1; border-radius: 50%; background: #1c6b4d; }
.timeline-item > div { min-width: 0; }
.timeline-item strong { font-size: 12px; }
.timeline-item time { float: right; color: var(--muted); font-size: 10px; }
.timeline-item p { margin: 5px 0 3px; color: #52645b; font-size: 11px; line-height: 1.5; }
.timeline-item small { display: block; margin-top: 3px; color: #84918b; font-size: 9px; }

.account-list { display: grid; gap: 7px; margin-bottom: 20px; }
.account-row { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 9px; border: 1px solid var(--line); border-radius: 12px; }
.account-row .account-avatar { width: 36px; height: 36px; }
.account-row strong, .account-row small { display: block; }
.account-row strong { font-size: 12px; }
.account-row small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.account-create { padding-top: 17px; border-top: 1px solid var(--line); }
.account-create h3 { margin: 0; font-size: 13px; }
.file-label { display: flex; align-items: center; gap: 11px; min-height: 64px; padding: 11px; border: 1px dashed #adc5b8; border-radius: 14px; background: #f8fbf9; cursor: pointer; }
.file-label > span:first-child { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 40px; border-radius: 12px; background: #e2eee8; color: #286148; font-size: 19px; }
.file-label div { min-width: 0; flex: 1; }
.file-label strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.file-label small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.file-label input { display: none; }
.photo-upload-row { display: grid; grid-template-columns: 72px minmax(0,1fr); align-items: center; gap: 12px; }
.photo-preview { position: relative; width: 72px; height: 72px; display: grid; place-items: center; overflow: hidden; border: 1px solid #d4e0da; border-radius: 18px; background: #e7f1ec; color: #205941; font-size: 18px; font-weight: 900; }
.photo-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.photo-lightbox { z-index: 150; cursor: zoom-out; }
.photo-lightbox-card { position: relative; width: min(760px, 94vw); max-height: 92vh; display: grid; justify-items: center; gap: 12px; padding: 16px; border-radius: 22px; background: #08150f; color: white; cursor: default; }
.photo-lightbox-card img { display: block; max-width: 100%; max-height: calc(92vh - 75px); border-radius: 14px; object-fit: contain; }
.photo-lightbox-card strong { padding-bottom: 3px; font-size: 13px; }
.lightbox-close { z-index: 2; background: rgba(255,255,255,.14); color: white; }

.crop-overlay { z-index: 160; }
.crop-card { width: min(560px, 100%); max-height: 94vh; overflow-y: auto; border-radius: 22px; background: white; box-shadow: 0 28px 90px rgba(0,0,0,.3); }
.crop-body { display: grid; gap: 18px; justify-items: center; padding: 20px; }
.crop-stage { position: relative; width: min(360px, 82vw); aspect-ratio: 1; overflow: hidden; border-radius: 50%; background: #dce7e1; box-shadow: 0 0 0 8px #eef3f0, 0 0 0 9px #ccdad3; }
.crop-stage::after { content: ""; position: absolute; inset: 0; border: 2px solid rgba(255,255,255,.9); border-radius: 50%; pointer-events: none; }
.crop-stage canvas { width: 100%; height: 100%; display: block; opacity: 0; cursor: grab; touch-action: none; }
.crop-stage canvas.is-ready { opacity: 1; }
.crop-stage canvas.is-dragging { cursor: grabbing; }
.crop-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #62736b; font-size: 12px; }
.zoom-control { width: min(390px, 100%); display: grid; grid-template-columns: auto minmax(120px,1fr) auto; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; font-weight: 700; }
.zoom-control input { min-height: 24px; padding: 0; border: 0; box-shadow: none; }

.toast-root { position: fixed; z-index: 200; right: 18px; bottom: 18px; display: grid; gap: 9px; }
.toast { min-width: 260px; max-width: 390px; padding: 13px 15px; border-radius: 13px; background: #10251d; color: white; font-size: 12px; font-weight: 650; box-shadow: 0 14px 45px rgba(0,0,0,.23); animation: toast-in .2s ease; }
.toast.error { background: #81241d; }
.toast.warn { background: #875400; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.loading { min-height: 60vh; display: grid; place-items: center; }
.spinner { width: 32px; height: 32px; border: 3px solid #d7e1dc; border-top-color: #5e7f70; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-panel { max-width: 560px; margin: 70px auto; padding: 28px; border: 1px solid #f1cbc7; border-radius: 20px; background: #fff4f2; text-align: center; }
.error-panel strong { display: block; color: #81241d; }
.error-panel .button { margin-top: 15px; }

.mobile-nav { display: none; }

@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .auth-root { padding: 14px; }
  .auth-card { padding: 24px 20px; border-radius: 21px; }
  .auth-card h1 { font-size: 23px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main-area { min-height: 100vh; }
  .topbar { min-height: 62px; padding: 10px 15px; }
  .topbar h1 { font-size: 18px; }
  .topbar p { display: none; }
  .topbar time { padding: 8px 10px; font-size: 10px; }
  .topbar-actions { gap: 5px; }
  .topbar-logout { width: 34px; height: 34px; }
  .content { padding: 15px 15px 92px; }
  .hero { min-height: 210px; align-items: flex-start; flex-direction: column; padding: 23px; }
  .hero .button { width: 100%; }
  .grid-4, .grid-3, .grid-2, .checkin-grid { grid-template-columns: 1fr; }
  .metric { min-height: 92px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .toolbar-actions .button { width: 100%; }
  .toolbar-actions.members-toolbar { width: 100%; grid-template-columns: 1fr; }
  .member-filter-panel { align-items: stretch; padding: 11px 14px; }
  .member-filter-panel > strong { width: 100%; }
  .near-days { width: 100%; justify-content: space-between; margin-left: 0; padding-top: 3px; }
  .near-days select { flex: 1; }
  .filter-control select { min-width: 0; width: 100%; }
  .search { min-width: 0; }
  .card-header { padding: 17px; }
  .card-body { padding: 16px; }
  .form-grid, .form-section { grid-template-columns: 1fr; }
  .field.full, .form-section, .form-section-title, .check-row.full { grid-column: auto; }
  .modal-body { padding: 17px; }
  .modal-header { padding: 19px 20px 14px; }
  .modal-footer { padding: 13px 17px 17px; }
  .photo-upload-row { grid-template-columns: 60px minmax(0,1fr); }
  .photo-preview { width: 60px; height: 60px; border-radius: 15px; }
  .crop-body { padding: 18px 14px; }
  .photo-lightbox-card { padding: 10px; }
  .action-sheet-backdrop { align-items: end; padding: 0; }
  .member-action-sheet { width: 100%; max-height: 88vh; padding: 20px 15px calc(18px + env(safe-area-inset-bottom)); border-radius: 23px 23px 0 0; }
  .action-sheet-grid > button { min-height: 57px; }
  .history-modal { max-height: 94vh; }
  .timeline-item time { float: none; display: block; margin-top: 3px; }
  .account-row { grid-template-columns: 36px minmax(0,1fr); }
  .account-row > .button, .account-row > .badge { grid-column: 2; justify-self: start; }
  .mobile-nav {
    position: fixed;
    inset: auto 9px calc(9px + env(safe-area-inset-bottom)) 9px;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 6px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    background: rgba(11,33,25,.96);
    box-shadow: 0 15px 45px rgba(0,0,0,.28);
    backdrop-filter: blur(14px);
  }
  .mobile-nav-button { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 2px; border: 0; border-radius: 12px; background: transparent; color: rgba(255,255,255,.55); }
  .mobile-nav-button span { font-size: 17px; line-height: 1; }
  .mobile-nav-button small { max-width: 100%; overflow: hidden; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-nav-button.is-active { background: var(--lime); color: var(--deep); }
  .toast-root { right: 12px; bottom: 88px; left: 12px; }
  .toast { min-width: 0; max-width: none; }
}

@media (max-width: 430px) {
  .grid-4 { grid-template-columns: 1fr; }
  .metric { min-height: 80px; }
  .metric-value { font-size: 23px; }
}

.import-modal { width: min(720px, 100%); }
.import-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.import-steps > div { display: flex; align-items: center; gap: 8px; min-height: 58px; padding: 10px; border-radius: 12px; background: var(--soft); }
.import-steps span { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 999px; background: var(--deep); color: var(--lime); font-size: 11px; font-weight: 900; }
.import-steps strong { font-size: 10px; line-height: 1.35; }
.import-drop { position: relative; min-height: 155px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 22px; border: 1.5px dashed #9fb4a7; border-radius: 17px; background: #f8faf8; text-align: center; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.import-drop:hover { border-color: var(--green); background: #f1f8f4; }
.import-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.import-drop-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 13px; background: var(--deep); color: var(--lime); font-size: 22px; font-weight: 900; }
.import-drop strong { font-size: 13px; }
.import-drop small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.import-file-summary { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 9px 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 10px; }
.import-file-summary strong { color: var(--deep); }
.import-file-summary span { max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.import-options label { display: flex; align-items: flex-start; gap: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.import-options input { margin-top: 2px; accent-color: var(--green); }
.import-options strong, .import-options small { display: block; }
.import-options strong { font-size: 10px; }
.import-options small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.import-warning { margin-top: 12px; padding: 11px 12px; border-radius: 11px; background: #fff5d9; color: #745616; font-size: 10px; line-height: 1.5; }
.import-warning code { padding: 1px 4px; border-radius: 4px; background: rgba(116,86,22,.1); }
.import-progress { margin-top: 13px; padding: 13px; border-radius: 12px; background: var(--deep); color: #fff; }
.import-progress > div { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; }
.import-progress > div span { color: var(--lime); font-weight: 800; }
.import-progress progress { width: 100%; height: 8px; margin: 9px 0 5px; accent-color: var(--lime); }
.import-progress small { color: rgba(255,255,255,.62); font-size: 9px; }
.import-complete { padding: 13px 0 18px; text-align: center; }
.import-complete > span { width: 55px; height: 55px; display: grid; place-items: center; margin: auto; border-radius: 999px; background: var(--lime); color: var(--deep); font-size: 27px; font-weight: 900; }
.import-complete h3 { margin: 11px 0 4px; font-size: 19px; }
.import-complete p { margin: 0; color: var(--muted); font-size: 11px; }
.import-result-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.import-result-grid > div { padding: 12px; border-radius: 11px; background: var(--soft); text-align: center; }
.import-result-grid span, .import-result-grid strong { display: block; }
.import-result-grid span { color: var(--muted); font-size: 9px; }
.import-result-grid strong { margin-top: 3px; color: var(--deep); font-size: 20px; }
.import-errors { margin-top: 12px; padding: 10px 12px; border: 1px solid #f0c9c5; border-radius: 11px; color: #8e3b34; font-size: 10px; }
.import-errors summary { cursor: pointer; font-weight: 800; }
.import-errors ul { max-height: 150px; overflow: auto; margin: 8px 0 0; padding-left: 18px; line-height: 1.5; }

.button-danger-soft { border: 1px solid #efc3bf; background: #fff3f1; color: #a33c34; }
.membership-manager-modal { width: min(780px, 100%); }
.membership-manage-list { display: grid; gap: 10px; }
.membership-manage-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfb; }
.membership-manage-main { min-width: 0; display: grid; justify-items: start; gap: 4px; }
.membership-manage-main strong { font-size: 13px; }
.membership-manage-main small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.membership-manage-actions { flex: 0 0 auto; display: flex; gap: 7px; }

@media (max-width: 760px) {
  .import-steps { grid-template-columns: 1fr; }
  .import-steps > div { min-height: 45px; }
  .import-options { grid-template-columns: 1fr; }
  .import-file-summary { align-items: flex-start; flex-direction: column; }
  .import-file-summary span { max-width: 100%; }
  .import-result-grid { grid-template-columns: 1fr 1fr; }
  .membership-manage-row { align-items: stretch; flex-direction: column; }
  .membership-manage-actions { width: 100%; }
  .membership-manage-actions .button { flex: 1; }
}

/* ===== GN GYM CENTER Manager v2.5.0 visual refresh ===== */
:root {
  --ink: #10261e;
  --muted: #687a72;
  --line: #dde7e1;
  --surface: #ffffff;
  --soft: #f1f5f2;
  --canvas: #f2f6f3;
  --deep: #071b14;
  --green: #0f4b38;
  --green-2: #176246;
  --lime: #b9f23a;
  --lime-soft: #efffc9;
  --gold: #d6a34c;
  --red: #b23a31;
  --shadow: 0 14px 45px rgba(7, 27, 20, .075);
  --shadow-strong: 0 24px 70px rgba(7, 27, 20, .14);
  --radius: 22px;
}

body { background: linear-gradient(180deg, #f7faf8 0, var(--canvas) 45%, #edf3ef 100%); }
.ui-icon,
.nav-icon,
.topbar-icon-button svg,
.account-panel button svg,
.mobile-nav-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-icon circle[fill], .ui-icon rect[fill] { fill: currentColor; stroke: none; }

/* Branding */
.brand { gap: 11px; padding-bottom: 25px; }
.brand-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  object-fit: cover;
  border-radius: 12px;
  background: #111;
  padding: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.35), inset 0 0 0 1px rgba(214,163,76,.3);
}
.brand-copy { min-width: 0; }
.brand-copy strong { display: block; font-size: 15px; letter-spacing: .01em; }
.brand-copy span { display: block; margin-top: 3px; color: rgba(255,255,255,.48); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.studio-credit {
  margin-top: 11px;
  padding: 13px 14px;
  border: 1px solid rgba(214,163,76,.22);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(214,163,76,.11), rgba(255,255,255,.035));
}
.studio-credit strong,
.studio-credit span { display: block; }
.studio-credit strong { color: #f5d58e; font-size: 11px; letter-spacing: .08em; }
.studio-credit span { margin-top: 4px; color: rgba(255,255,255,.46); font-size: 9px; }

.sidebar { background: linear-gradient(180deg, #071b14 0%, #08241a 58%, #061810 100%); box-shadow: 12px 0 36px rgba(5,23,16,.08); }
.nav-button { height: 46px; border-radius: 14px; font-size: 13px; }
.nav-button.is-active { box-shadow: 0 9px 24px rgba(185,242,58,.15); }
.nav-icon { width: 18px; height: 18px; flex: 0 0 18px; }
.account-panel { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.055); }
.account-panel button,
.topbar-icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #29483b;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.account-panel button { width: 31px; height: 31px; border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.08); color: white; }
.account-panel button svg { width: 16px; height: 16px; }
.topbar-icon-button:hover { transform: translateY(-1px); border-color: #b9cbc1; box-shadow: 0 8px 20px rgba(7,27,20,.07); }
.topbar-icon-button svg { width: 17px; height: 17px; }
.topbar { background: rgba(247,250,248,.9); }

/* Auth / login */
.auth-root {
  place-items: stretch;
  padding: 0;
  background: #071b14;
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, .92fr) minmax(520px, 1.08fr);
  background:
    radial-gradient(circle at 18% 25%, rgba(185,242,58,.12), transparent 30%),
    linear-gradient(135deg, #071b14, #0b2b20 60%, #081d16);
}
.auth-shell .auth-card {
  align-self: center;
  justify-self: end;
  width: min(520px, calc(100% - 64px));
  margin: 34px 0;
  padding: 42px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 30px;
  box-shadow: 0 36px 120px rgba(0,0,0,.3);
}
.auth-brand { margin-bottom: 28px; }
.auth-brand img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  padding: 0;
  border: 1px solid rgba(214,163,76,.35);
  border-radius: 14px;
  background: #111;
  box-shadow: 0 10px 24px rgba(7,27,20,.18);
}
.auth-brand strong { font-size: 19px; letter-spacing: -.02em; }
.auth-brand span { color: #9b7738; font-weight: 800; }
.auth-card h1 { margin-top: 8px; font-size: 32px; line-height: 1.05; }
.auth-card > p { font-size: 13px; }
.auth-submit { min-height: 49px; margin-top: 17px; border-radius: 13px; }
.auth-footer { margin: 22px 0 0; padding-top: 17px; border-top: 1px solid var(--line); color: #8a966f; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-align: center; text-transform: uppercase; }
.auth-visual {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 60px;
}
.auth-visual::before,
.auth-visual::after { content: ""; position: absolute; border-radius: 50%; }
.auth-visual::before { width: 680px; height: 680px; border: 1px solid rgba(214,163,76,.18); box-shadow: 0 0 0 95px rgba(214,163,76,.035), 0 0 0 190px rgba(185,242,58,.018); }
.auth-visual::after { inset: 9% 6%; border: 1px solid rgba(255,255,255,.045); }
.auth-visual img { position: relative; z-index: 1; width: min(680px, 82%); max-height: 74vh; object-fit: contain; border-radius: 24px; filter: drop-shadow(0 28px 48px rgba(0,0,0,.55)); }

/* Cards and controls */
.card { border-color: rgba(15,75,56,.07); }
.card-soft { background: #e8f0eb; }
.card-deep { background: linear-gradient(145deg, #0b3325, #0f4b38); }
.button { min-height: 40px; border-radius: 12px; box-shadow: 0 5px 14px rgba(15,75,56,.08); }
.button:hover { box-shadow: 0 9px 20px rgba(15,75,56,.13); }
.button-outline { box-shadow: none; }
.button-ghost { box-shadow: none; }
input, select, textarea { min-height: 42px; border-radius: 12px; }
input:focus, select:focus, textarea:focus { border-color: #659b82; box-shadow: 0 0 0 4px rgba(23,98,70,.1); }
.search::before { content: ""; width: 16px; height: 16px; left: 14px; background: no-repeat center/16px 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23728179' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E"); }
.search input { padding-left: 40px; }

/* Dashboard */
.hero {
  min-height: 205px;
  padding: 34px 36px;
  background: linear-gradient(120deg, #0c3e2d 0%, #0f4d38 66%, #123c2d 100%);
  box-shadow: 0 25px 70px rgba(11,62,45,.18);
}
.hero::before { content: ""; position: absolute; inset: auto -4% -80% auto; width: 390px; height: 390px; border-radius: 50%; background: radial-gradient(circle, rgba(214,163,76,.13), transparent 65%); }
.hero::after { border-color: rgba(185,242,58,.07); }
.hero-logo {
  position: absolute;
  z-index: 0;
  right: 48px;
  top: 50%;
  width: 255px;
  max-height: 180px;
  object-fit: cover;
  border-radius: 16px;
  opacity: .18;
  transform: translateY(-50%);
  filter: saturate(.85) contrast(1.05);
  pointer-events: none;
}
.hero .button { position: relative; z-index: 2; }
.metric { min-height: 112px; }
.metric-icon { width: 46px; height: 46px; border-radius: 15px; }
.metric-label-light { color: rgba(255,255,255,.55); }
.metric-value-lime { color: var(--lime); }
.eyebrow-soft { background: #eaf6ef; color: #2e6a50; }
.dashboard-expiry-row .member-row-status { display: grid; justify-items: end; gap: 4px; }
.dashboard-expiry-row .member-row-status small { color: var(--muted); font-size: 10px; }
.action-summary-grid { display: grid; gap: 10px; }
.action-card-empty { color: var(--muted); text-align: center; }

/* Member tags and modern member actions */
.member-name-actions { gap: 7px; }
.member-tag-add,
.member-more,
.icon-button,
.package-edit {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid #dce7e1;
  background: #f6f9f7;
  color: #3c5a4d;
  cursor: pointer;
  transition: .16s ease;
}
.member-tag-add { width: 23px; height: 23px; border-radius: 999px; color: #176246; }
.member-more { width: 29px; height: 27px; border-radius: 9px; letter-spacing: 0; }
.member-tag-add:hover,
.member-more:hover,
.icon-button:hover,
.package-edit:hover { border-color: #a8c2b4; background: #eaf4ee; color: #0f4b38; transform: translateY(-1px); }
.member-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.member-tag {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 2px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}
.member-tag.tone-0 { background: #e4f4e9; color: #1c6947; border-color: #cfe8d8; }
.member-tag.tone-1 { background: #fff1d9; color: #8c641f; border-color: #f0dfbf; }
.member-tag.tone-2 { background: #e9eefb; color: #405d95; border-color: #d7e0f5; }
.member-tag.tone-3 { background: #f4e9f7; color: #785189; border-color: #ead8ef; }
.member-tag.tone-4 { background: #f5ece7; color: #8a5741; border-color: #ead9d0; }
.member-tag-more { background: #edf2ef; color: #65756e; }
.member-table td:first-child { min-width: 270px; }
.member-table .table-member { align-items: flex-start; }
.member-row-status .badge { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

/* Tag picker / tag manager */
.tag-picker { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.tag-option {
  display: grid;
  grid-template-columns: 30px minmax(0,1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  min-height: 67px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfb;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.tag-option:hover { border-color: #b2c9bd; background: #f5faf7; }
.tag-option.is-selected { border-color: #86b79e; background: #edf8f1; box-shadow: inset 0 0 0 1px rgba(23,98,70,.05); }
.tag-option-check { grid-row: 1 / 3; width: 30px; height: 30px; display: grid; place-items: center; align-self: center; border-radius: 10px; background: #edf2ef; color: #176246; }
.tag-option.is-selected .tag-option-check { background: #176246; color: white; }
.tag-option strong { align-self: end; font-size: 12px; }
.tag-option small { align-self: start; margin-top: 3px; color: var(--muted); font-size: 9px; }
.tag-modal-footer { justify-content: space-between; }
.tag-manage-list { display: grid; gap: 8px; }
.tag-manage-row { display: grid; grid-template-columns: 12px minmax(0,1fr) 34px 34px; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfb; }
.tag-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(214,163,76,.11); }
.tag-manage-row input { min-height: 35px; }
.icon-button { width: 34px; height: 34px; border-radius: 10px; }
.icon-button.danger { color: #aa4439; background: #fff6f4; border-color: #f0d4cf; }
.tag-create-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.compact-empty { min-height: 120px; grid-column: 1 / -1; }

/* Packages */
.package-card {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  padding: 23px;
  border: 1px solid rgba(15,75,56,.08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.package-card:hover { transform: translateY(-2px); border-color: rgba(15,75,56,.16); box-shadow: var(--shadow-strong); }
.package-card::before { height: 5px; }
.package-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.package-edit { width: 35px; height: 35px; border-radius: 11px; }
.package-card h3 { margin-top: 14px; }
.package-price { margin-top: 10px; }
.package-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.package-meta span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 9px; background: #f2f6f3; color: #62736b; font-size: 10px; font-weight: 700; }
.package-card-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 17px; }
.package-card-actions .button:first-child { flex: 1; }
.section-title { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.form-hint { grid-column: 1 / -1; margin: -2px 0 0; padding: 10px 12px; border-radius: 11px; background: #f1f7f4; color: #53675e; font-size: 10px; line-height: 1.5; }
.visit-expiry-days-field small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }

/* Revenue filters */
.revenue-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 22px 24px; overflow: visible; }
.revenue-toolbar h2 { margin: 8px 0 4px; font-size: 20px; letter-spacing: -.03em; }
.revenue-toolbar p { margin: 0; color: var(--muted); font-size: 11px; }
.period-filter { display: grid; justify-items: end; gap: 10px; }
.period-segmented { display: inline-flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: #f3f7f4; }
.period-button { min-height: 33px; padding: 6px 12px; border: 0; border-radius: 9px; background: transparent; color: #65766e; font-size: 11px; font-weight: 800; cursor: pointer; }
.period-button:hover { color: #174c39; }
.period-button.is-active { background: #fff; color: #0f4b38; box-shadow: 0 4px 14px rgba(7,27,20,.09); }
.custom-date-range { display: flex; align-items: end; gap: 8px; }
.custom-date-range label { display: grid; gap: 4px; color: #66776f; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.custom-date-range input { min-width: 142px; min-height: 35px; padding: 6px 8px; font-size: 11px; }
.custom-date-range > span { padding-bottom: 9px; color: #97a49e; }
.debt-list { display: grid; gap: 2px; }
.revenue-table td:last-child { font-weight: 850; }

/* Check-in */
.checkin-item { min-height: 74px; border-radius: 16px; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.checkin-item:hover { transform: translateY(-1px); border-color: #bdd0c6; box-shadow: 0 8px 20px rgba(7,27,20,.055); }
.checkin-item .button { white-space: nowrap; }

/* Action sheet */
.member-action-sheet { border: 1px solid rgba(15,75,56,.08); }
.action-sheet-grid > button { border-radius: 15px; }
.action-sheet-grid > button > span { background: #ecf4ef; }
.action-sheet-grid > button:hover > span { background: #dceee4; }

/* Mobile table/card treatment */
.mobile-nav-button svg { width: 19px; height: 19px; }

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: minmax(360px, .95fr) minmax(360px, 1.05fr); }
  .auth-shell .auth-card { width: calc(100% - 36px); padding: 34px; }
  .auth-visual { padding: 35px; }
}

@media (max-width: 760px) {
  .auth-root { padding: 0; }
  .auth-shell { min-height: 100svh; display: grid; grid-template-columns: 1fr; place-items: center; padding: 18px 14px; }
  .auth-shell .auth-card { justify-self: stretch; width: 100%; max-width: 510px; margin: 0; padding: 27px 21px; border-radius: 24px; }
  .auth-visual { display: none; }
  .auth-brand { margin-bottom: 23px; }
  .auth-brand img { width: 54px; height: 54px; border-radius: 12px; }
  .auth-card h1 { font-size: 27px; }

  .topbar-icon-button { width: 35px; height: 35px; }
  .topbar time { display: none; }
  .content { padding: 14px 12px 94px; }
  .hero { min-height: 235px; padding: 24px 20px; border-radius: 23px; }
  .hero h2 { max-width: 88%; font-size: 26px; }
  .hero p { max-width: 82%; }
  .hero-logo { right: -15px; top: 52%; width: 185px; max-height: 160px; opacity: .13; }
  .metric { min-height: 88px; }
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric { padding: 15px; }
  .metric-value { font-size: 21px; }
  .metric-icon { width: 39px; height: 39px; border-radius: 12px; }

  .tag-picker { grid-template-columns: 1fr; }
  .tag-modal-footer { align-items: stretch; flex-direction: column-reverse; }
  .tag-modal-footer .button { width: 100%; }
  .tag-create-form { grid-template-columns: 1fr; }
  .tag-create-form .button { width: 100%; }

  .package-card { min-height: 0; }
  .package-card-actions { align-items: stretch; flex-direction: column; }
  .package-card-actions .button { width: 100%; }

  .revenue-toolbar { align-items: stretch; flex-direction: column; padding: 18px; }
  .period-filter { justify-items: stretch; }
  .period-segmented { display: grid; grid-template-columns: repeat(4,1fr); width: 100%; }
  .period-button { padding-inline: 5px; }
  .custom-date-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .custom-date-range > span { display: none; }
  .custom-date-range label { min-width: 0; }
  .custom-date-range input { min-width: 0; width: 100%; }

  .member-table { border-collapse: separate; border-spacing: 0 10px; }
  .member-table thead { display: none; }
  .member-table tbody { display: grid; gap: 10px; padding: 10px; }
  .member-table tr { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 5px 16px rgba(7,27,20,.035); }
  .member-table td { min-width: 0 !important; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-top: 1px solid #edf2ef; white-space: normal; text-align: right; }
  .member-table td::before { content: attr(data-label); flex: 0 0 auto; color: #7a8982; font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
  .member-table td:first-child { grid-column: 1 / -1; display: block; padding: 13px; border-top: 0; text-align: left; }
  .member-table td:first-child::before { display: none; }
  .member-table td:last-child { grid-column: 1 / -1; justify-content: flex-end; }
  .member-table .table-member { width: 100%; }
  .member-table .member-main { overflow: hidden; }
  .member-table .member-name-actions strong { white-space: normal; }
  .member-table .member-tags { justify-content: flex-start; }
  .member-table td .badge { max-width: 100%; }
  .member-table td:nth-last-child(2) { border-left: 1px solid #edf2ef; }

  .mobile-nav { border-color: rgba(255,255,255,.1); background: rgba(7,27,20,.96); }
  .mobile-nav-button { cursor: pointer; }
  .mobile-nav-button.is-active { box-shadow: 0 4px 12px rgba(185,242,58,.12); }
}

@media (max-width: 430px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .metric-label { font-size: 8px; }
  .metric-value { font-size: 19px; }
  .metric-icon { width: 34px; height: 34px; }
  .member-table tr { grid-template-columns: 1fr; }
  .member-table td { grid-column: 1 !important; border-left: 0 !important; }
  .member-table td:last-child { justify-content: space-between; }
  .member-table td:last-child::before { display: inline; }
}
.auth-visual > div {
  position: absolute;
  z-index: 2;
  right: 10%;
  bottom: 7%;
  left: 10%;
  display: grid;
  gap: 6px;
  color: white;
  text-align: center;
}
.auth-visual > div span { color: #e7bd69; font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.auth-visual > div strong { font-size: 16px; font-weight: 650; line-height: 1.4; }
.card-deep .card-header h3 { display: flex; align-items: center; gap: 7px; }

/* GN GYM CENTER Manager v2.5.0 */
.quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.quick-action { min-height: 84px; display: grid; grid-template-columns: 40px minmax(0,1fr); grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; box-shadow: 0 6px 20px rgba(7,27,20,.04); }
.quick-action > span { grid-row: 1 / 3; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #eaf3ee; color: var(--green); }
.quick-action strong { align-self: end; font-size: 13px; }
.quick-action small { align-self: start; margin-top: 2px; color: var(--muted); font-size: 10px; }
.quick-action:hover { border-color: #bdd0c6; transform: translateY(-1px); }

.revenue-split-card { display: grid; grid-template-columns: 1.4fr repeat(3,1fr); align-items: center; gap: 0; padding: 0; }
.revenue-split-card > div { min-width: 0; display: grid; gap: 3px; padding: 16px 18px; border-left: 1px solid var(--line); }
.revenue-split-card > div:first-child { border-left: 0; background: #0b2b20; color: white; }
.revenue-split-card span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.revenue-split-card > div:first-child span { color: rgba(255,255,255,.55); }
.revenue-split-card strong { color: var(--lime); font-size: 22px; }
.revenue-split-card b { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }

.pagination-bar { display: grid; grid-template-columns: minmax(150px,1fr) auto minmax(150px,1fr); align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--line); background: #fbfcfb; }
.pagination-summary { color: var(--muted); font-size: 11px; }
.pagination-controls { display: flex; align-items: center; justify-content: center; gap: 5px; }
.page-button { min-width: 34px; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 10px; background: white; color: #42564d; font-size: 11px; font-weight: 800; cursor: pointer; }
.page-button:hover:not(:disabled), .page-button.is-active { border-color: #2b644d; background: #163f30; color: white; }
.page-button:disabled { opacity: .38; cursor: default; }
.page-nav { min-width: 66px; }
.pagination-ellipsis { color: var(--muted); font-size: 13px; }
.page-size-label { justify-self: end; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.page-size-label select { width: 70px; min-height: 34px; padding: 0 8px; }

.staff-readonly-note { margin-top: auto; padding-top: 14px; color: var(--muted); font-size: 10px; }
.button-danger-soft { border: 1px solid #f0c8c4; background: #fff4f2; color: #a7352d; }
.button-danger-soft:hover { background: #fee8e5; }
.package-admin-actions { flex-wrap: wrap; }
.package-admin-actions .button { flex: 1 1 auto !important; }

.checkin-search-box { margin-top: 14px; max-width: none !important; }
.checkin-results { overflow: hidden; padding: 0 !important; }
.checkin-mobile-list { display: none; }
.checkin-table-wrap { width: 100%; overflow-x: auto; }
.checkin-table { width: 100%; border-collapse: collapse; }
.checkin-table th, .checkin-table td { padding: 12px 13px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.checkin-table th { border-top: 0; background: #f7faf8; color: #6c7c74; font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.checkin-table td { font-size: 11px; }
.checkin-action-cell { width: 1%; text-align: right !important; white-space: nowrap; }
.checkin-mobile-card { display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 5px 14px rgba(7,27,20,.035); }
.checkin-mobile-card .avatar { grid-row: 1; }
.checkin-mobile-card .member-main span { white-space: normal; }
.checkin-term { display: inline-flex; margin-top: 6px; color: #466056; font-size: 10px; font-weight: 800; }
.checkin-onehand { grid-column: 1 / -1; width: 100%; min-height: 44px; justify-content: center; }

.pos-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px; }
.pos-hero h2 { margin: 5px 0; }
.pos-hero p { max-width: 720px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.pos-table { width: 100%; border-collapse: collapse; }
.pos-table th, .pos-table td { padding: 12px 14px; border-top: 1px solid var(--line); text-align: left; font-size: 11px; }
.pos-table th { border-top: 0; background: #f7faf8; color: #6c7c74; font-size: 9px; text-transform: uppercase; }
.pos-table .is-muted { opacity: .55; }
.pos-row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stock-pill { min-width: 36px; display: inline-flex; justify-content: center; padding: 5px 8px; border-radius: 999px; background: #e6f3eb; color: #1c6847; font-weight: 900; }
.stock-pill.is-low { background: #fff0dd; color: #a25b00; }
.sale-history { display: grid; gap: 0; }
.sale-history-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.sale-history-row:last-child { border-bottom: 0; }
.sale-history-row strong, .sale-history-row span { display: block; }
.sale-history-row strong { font-size: 12px; }
.sale-history-row span, .sale-history-row time { margin-top: 3px; color: var(--muted); font-size: 10px; }
.pos-cart-list { max-height: 330px; display: grid; gap: 7px; overflow-y: auto; padding: 3px; }
.pos-cart-row { display: grid; grid-template-columns: minmax(0,1fr) 82px; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfb; }
.pos-cart-row strong, .pos-cart-row span { display: block; }
.pos-cart-row strong { font-size: 12px; }
.pos-cart-row span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.pos-cart-row input { min-height: 38px; text-align: center; }
.pos-total { display: flex; align-items: center; justify-content: space-between; margin: 14px 0; padding: 14px 15px; border-radius: 14px; background: #0d2b20; color: white; }
.pos-total span { font-size: 11px; }
.pos-total strong { color: var(--lime); font-size: 22px; }

.audit-list { display: grid; gap: 10px; max-height: 58vh; overflow-y: auto; padding: 2px; }
.audit-entry { padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfb; }
.audit-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.audit-head strong { font-size: 12px; }
.audit-head time, .audit-entry p { color: var(--muted); font-size: 10px; }
.audit-entry p { margin: 5px 0 0; }
.audit-entry ul { margin: 8px 0 0; padding-left: 18px; color: #41564d; font-size: 10px; line-height: 1.6; }
.empty-inline { padding: 20px; color: var(--muted); text-align: center; font-size: 12px; }

@media (min-width: 761px) and (max-width: 980px) {
  .checkin-table .checkin-contact, .checkin-table .checkin-count { display: none; }
  .checkin-table th, .checkin-table td { padding: 10px; }
}

@media (max-width: 760px) {
  .mobile-nav { grid-template-columns: repeat(6, 1fr); }
  .mobile-nav:has(> [data-admin-only][hidden]) { grid-template-columns: repeat(5, 1fr); }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .quick-action { min-height: 72px; padding: 10px; }
  .revenue-split-card { grid-template-columns: 1fr 1fr; }
  .revenue-split-card > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .revenue-split-card > div:nth-child(4) { border-top: 1px solid var(--line); }
  .pagination-bar { grid-template-columns: 1fr; justify-items: stretch; padding: 12px; }
  .pagination-summary, .page-size-label { justify-self: center; }
  .pagination-controls { max-width: 100%; overflow-x: auto; justify-content: flex-start; padding-bottom: 2px; }
  .page-button { flex: 0 0 auto; }
  .checkin-table-wrap { display: none; }
  .checkin-mobile-list { display: grid; gap: 10px; padding: 10px; }
  .checkin-results { background: #f6f9f7; }
  .checkin-mobile-card .member-main strong { font-size: 13px; white-space: normal; }
  .checkin-onehand { position: relative; left: 0; right: 0; }
  .pos-hero { align-items: stretch; flex-direction: column; }
  .pos-hero .toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .pos-hero .toolbar-actions .button { width: 100%; justify-content: center; }
  .pos-table { min-width: 620px; }
  .revenue-source-grid { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 430px) {
  .mobile-nav { inset-inline: 5px; gap: 1px; padding: 5px; }
  .mobile-nav-button { padding-inline: 1px; }
  .mobile-nav-button small { font-size: 8px; }
  .quick-actions { gap: 8px; }
  .quick-action { grid-template-columns: 34px minmax(0,1fr); column-gap: 8px; }
  .quick-action > span { width: 34px; height: 34px; }
  .pagination-controls .page-button:not(.is-active):not(.page-nav) { min-width: 32px; padding-inline: 6px; }
  .revenue-split-card > div { padding: 13px; }
  .pos-cart-row { grid-template-columns: minmax(0,1fr) 68px; }
}

/* ===== GN GYM CENTER Manager v2.5.3 ===== */
/* Desktop login: keep the form comfortably away from the viewport edge. */
@media (min-width: 761px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1.22fr) minmax(430px, .78fr);
    gap: clamp(28px, 3.2vw, 68px);
    padding: 0 clamp(32px, 4.5vw, 82px) 0 clamp(24px, 2.5vw, 48px);
  }
  .auth-shell .auth-card {
    justify-self: center;
    width: min(520px, 100%);
    margin: 34px 0;
  }
  .auth-visual {
    min-width: 0;
    padding: clamp(36px, 4vw, 72px);
  }
}

@media (min-width: 761px) and (max-width: 1120px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr) minmax(390px, .9fr);
    gap: 24px;
    padding-inline: 24px;
  }
  .auth-shell .auth-card { width: min(500px, 100%); }
}

/* Product photos */
.product-table-cell,
.pos-cart-product {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.product-table-cell > div,
.pos-cart-product > div { min-width: 0; }
.product-table-cell strong,
.product-table-cell small,
.pos-cart-product strong,
.pos-cart-product span { display: block; }
.product-table-cell small { margin-top: 3px; }
.product-thumb {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  overflow: hidden;
  border: 1px solid #d7e3dd;
  border-radius: 13px;
  background: #edf4f0;
  color: #35614f;
}
.product-thumb.is-compact {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border-radius: 11px;
}
.product-thumb.is-clickable { cursor: zoom-in; }
.product-thumb > span { display: grid; place-items: center; }
.product-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-photo-preview { border-radius: 16px; }
.product-photo-preview > span { display: grid; place-items: center; color: #35614f; }
.crop-overlay.crop-square .crop-stage,
.crop-overlay.crop-square .crop-stage::after { border-radius: 18px; }

/* Expiry notification center */
.notification-button { position: relative; overflow: visible; }
.notification-badge {
  position: absolute;
  top: -6px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid #f7faf8;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(180,35,24,.2);
}
.expiry-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 9px;
  margin-bottom: 14px;
}
.expiry-summary-grid > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8fbf9;
}
.expiry-summary-grid span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.expiry-summary-grid strong { font-size: 22px; }
.notification-settings-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  padding: 13px;
  border: 1px solid #d7e6de;
  border-radius: 14px;
  background: #edf7f1;
}
.notification-settings-card > div:first-child { min-width: 0; }
.notification-settings-card strong { font-size: 12px; }
.notification-settings-card p { margin: 4px 0 0; color: #587066; font-size: 10px; line-height: 1.45; }
.notification-settings-card label { display: grid; gap: 4px; color: #536b60; font-size: 9px; font-weight: 800; white-space: nowrap; }
.notification-settings-card select { min-width: 105px; min-height: 37px; }
.notification-setting-actions { display: flex; justify-content: flex-end; }
.notification-https-hint {
  grid-column: 1 / -1;
  display: block;
  padding-top: 9px;
  border-top: 1px solid #d5e4dc;
  color: #805700;
  font-size: 9px;
  line-height: 1.5;
}
.expiry-alert-list {
  max-height: 46vh;
  display: grid;
  gap: 7px;
  overflow-y: auto;
  padding: 2px;
}
.expiry-alert-row {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfb;
}
.expiry-alert-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #fff0db;
  color: #996000;
}
.expiry-alert-row.expired .expiry-alert-icon { background: #fde9e6; color: #aa342c; }
.expiry-row-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.expiry-row-avatar.expired {
  box-shadow: 0 0 0 2px #f4a59d, 0 2px 8px rgba(0,0,0,.08);
}
.expiry-row-avatar.today {
  box-shadow: 0 0 0 2px #f6c880, 0 2px 8px rgba(0,0,0,.08);
}
.expiry-row-avatar.expiring {
  box-shadow: 0 0 0 2px #e3cca0, 0 2px 8px rgba(0,0,0,.08);
}
.expiry-avatar-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid white;
  display: grid;
  place-items: center;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.expiry-avatar-badge.expired {
  background: #d93829;
  color: white;
}
.expiry-avatar-badge.today {
  background: #e68a00;
  color: white;
}
.expiry-avatar-badge.expiring {
  background: #d48806;
  color: white;
}
.member-name-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: #16382b;
  cursor: pointer;
  text-align: left;
  display: inline;
  transition: color .15s ease, text-decoration .15s ease;
}
.member-name-btn:hover {
  color: var(--primary, #1e6648);
  text-decoration: underline;
}
.expiry-alert-row > div:nth-child(2) { min-width: 0; }
.expiry-alert-row strong,
.expiry-alert-row span { display: block; }
.expiry-alert-row strong { font-size: 12px; }
.expiry-alert-row > div:nth-child(2) span { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.expiry-alert-status { display: grid; justify-items: end; gap: 2px; text-align: right; }
.expiry-alert-status b { font-size: 10px; }
.expiry-alert-status small { color: var(--muted); font-size: 9px; }

/* Member Detail Modal Styles */
.member-detail-modal { width: min(780px, 100%); }
.member-detail-loading { display: grid; place-items: center; gap: 12px; padding: 40px 16px; color: var(--muted); font-size: 13px; }
.member-detail-shell { display: grid; gap: 16px; }
.member-detail-hero { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 16px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, #f3f8f5 0%, #eaf3ed 100%); border: 1px solid #dbe8e0; }
.member-detail-avatar-box { position: relative; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; border: 3px solid white; box-shadow: 0 4px 14px rgba(0,0,0,.12); display: grid; place-items: center; background: #e7f1ec; color: #205941; font-size: 24px; font-weight: 900; }
.member-detail-avatar-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.member-detail-avatar-box .avatar-zoom-hint { position: absolute; inset: auto 0 0 0; padding: 3px 0 4px; background: rgba(8, 21, 15, 0.75); color: white; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 3px; opacity: 0; transition: opacity .18s ease; }
.member-detail-avatar-box:hover .avatar-zoom-hint { opacity: 1; }
.member-detail-hero-info { display: grid; gap: 6px; min-width: 0; }
.member-detail-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.member-detail-name { margin: 0; font-size: 20px; font-weight: 800; color: #112d22; letter-spacing: -.02em; }
.member-detail-meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #40574c; }
.member-detail-phone { display: inline-flex; align-items: center; gap: 5px; color: #176246; font-weight: 700; text-decoration: none; padding: 2px 8px; border-radius: 6px; background: #def0e6; transition: background .15s ease; }
.member-detail-phone:hover { background: #cce8d9; }
.member-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.member-detail-stat-card { padding: 11px 13px; border-radius: 12px; background: #fbfcfb; border: 1px solid var(--line); display: grid; gap: 3px; }
.member-detail-stat-card span { color: var(--muted); font-size: 11px; }
.member-detail-stat-card strong { font-size: 13px; color: #1c362a; }
.member-detail-note-card { padding: 12px 14px; border-radius: 12px; border: 1px solid #e5dcce; background: #fdfaf4; display: grid; gap: 5px; }
.member-detail-note-card.empty-note { border-color: var(--line); background: #fafbf9; color: var(--muted); }
.member-detail-note-card .note-label { display: flex; align-items: center; gap: 6px; color: #8c6820; font-size: 12px; }
.member-detail-note-card.empty-note .note-label { color: var(--muted); }
.member-detail-note-card p { margin: 0; font-size: 13px; line-height: 1.5; color: #2a342e; white-space: pre-wrap; }
.member-detail-section { display: grid; gap: 9px; }
.member-detail-section-title { margin: 0; font-size: 14px; font-weight: 800; color: #243e33; display: flex; align-items: center; justify-content: space-between; }
.member-detail-packages-list { display: grid; gap: 8px; max-height: 280px; overflow-y: auto; padding-right: 2px; }
.member-package-card { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #ffffff; display: grid; gap: 6px; }
.member-package-card.active { border-color: #a7dcc4; background: #f5fbf8; }
.member-package-card.expired { border-color: #edd1cc; background: #fdf8f7; }
.member-package-card.frozen { border-color: #d2e4f0; background: #f6fafe; }
.member-package-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.member-package-header strong { font-size: 13px; color: #173b2b; }
.member-package-header small { display: block; font-size: 10px; }
.member-package-meta { display: grid; gap: 3px; font-size: 11px; color: #496355; }
.member-package-meta .meta-label { color: var(--muted); margin-right: 4px; }
.member-detail-timeline { display: grid; gap: 8px; max-height: 200px; overflow-y: auto; padding: 2px 2px 2px 8px; }
.detail-timeline-row { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; position: relative; }
.detail-timeline-row::before { content: ""; position: absolute; left: 4px; top: 12px; bottom: -8px; width: 2px; background: #e1eae4; }
.detail-timeline-row:last-child::before { display: none; }
.detail-timeline-row .timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: #176246; margin-top: 3px; }
.detail-timeline-content { display: grid; gap: 2px; padding-bottom: 8px; }
.detail-timeline-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.detail-timeline-top strong { font-size: 12px; color: #1a3c2e; }
.detail-timeline-top time { font-size: 10px; color: var(--muted); }
.detail-timeline-content p { margin: 0; font-size: 11px; color: #3b5247; }
.member-detail-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.member-detail-footer .footer-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

@media (max-width: 760px) {
  .product-thumb { width: 42px; height: 42px; flex-basis: 42px; }
  .notification-settings-card { grid-template-columns: 1fr; align-items: stretch; }
  .notification-settings-card label { grid-template-columns: 1fr auto; align-items: center; }
  .notification-setting-actions .button { width: 100%; justify-content: center; }
  .expiry-alert-row { grid-template-columns: 40px minmax(0,1fr); }
  .expiry-row-avatar { width: 40px; height: 40px; flex-basis: 40px; }
  .expiry-alert-icon { width: 34px; height: 34px; }
  .expiry-alert-status { grid-column: 2; justify-items: start; text-align: left; }
  .member-detail-hero { grid-template-columns: 60px minmax(0,1fr); gap: 12px; padding: 12px; }
  .member-detail-avatar-box { width: 60px; height: 60px; font-size: 18px; }
  .member-detail-grid { grid-template-columns: 1fr 1fr; }
  .member-detail-footer { flex-direction: column-reverse; align-items: stretch; }
  .member-detail-footer .footer-right { width: 100%; flex-direction: column; margin-left: 0; }
  .member-detail-footer .footer-right .button { width: 100%; justify-content: center; }
  .member-detail-footer .footer-left { width: 100%; }
  .member-detail-footer .footer-left .button { width: 100%; justify-content: center; }
}

@media (max-width: 430px) {
  .expiry-summary-grid { gap: 6px; }
  .expiry-summary-grid > div { padding: 10px 8px; }
  .expiry-summary-grid strong { font-size: 19px; }
}

/* v2.5.3 - duplicate phone guard */
.phone-duplicate-status {
  display: grid;
  gap: 8px;
  margin-top: -4px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  font-size: 10px;
  line-height: 1.45;
}
.phone-duplicate-status[hidden] { display: none; }
.phone-duplicate-status.is-clear {
  grid-template-columns: auto 1fr;
  align-items: center;
  border-color: #b9dfc8;
  background: #edf9f1;
  color: #245e3d;
}
.phone-duplicate-status.is-duplicate {
  border-color: #efb4ac;
  background: #fff3f1;
  color: #7d241d;
}
.phone-duplicate-title {
  display: flex;
  align-items: center;
  gap: 7px;
}
.phone-match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid rgba(180, 35, 24, .15);
  border-radius: 10px;
  background: rgba(255, 255, 255, .72);
}
.phone-match-card > div { min-width: 0; }
.phone-match-card > div:last-child { text-align: right; }
.phone-match-card strong,
.phone-match-card span,
.phone-match-card small { display: block; }
.phone-match-card span,
.phone-match-card small { margin-top: 2px; color: #6f554f; font-size: 9px; }

@media (max-width: 560px) {
  .phone-match-card { grid-template-columns: 1fr; gap: 5px; }
  .phone-match-card > div:last-child { text-align: left; }
}

/* v2.5.3 - precise expiry filters and member sorting */
.filter-divider {
  width: 1px;
  height: 25px;
  margin: 0 2px;
  background: #dbe4df;
}
.member-sort-label { margin-left: 0; }
.member-sort-label select { min-width: 178px; }
.member-filter-hint {
  flex: 1 0 100%;
  color: #77867f;
  font-size: 9px;
  line-height: 1.45;
}
.expiry-alert-section { display: grid; gap: 7px; }
.expiry-alert-section + .expiry-alert-section { margin-top: 7px; padding-top: 10px; border-top: 1px solid var(--line); }
.expiry-alert-section h4 { margin: 0 2px 1px; color: #52655c; font-size: 10px; letter-spacing: .02em; }

@media (max-width: 760px) {
  .filter-divider { display: none; }
  .member-sort-label { margin-left: 0; }
  .member-filter-hint { width: 100%; }
}
