:root {
  --navy: #071d49; --navy-2: #0c2d65; --blue: #1769aa; --cyan: #18a8d8; --red: #dc2847; --yellow: #ffca28;
  --ink: #162238; --muted: #6c788c; --surface: #f4f7fb; --line: #e2e8f1; --green: #0b9b69; --white: #fff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--surface); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.eyebrow { margin: 0 0 7px; color: var(--blue); font-size: 10px; font-weight: 900; letter-spacing: 1.8px; }
.eyebrow.light { color: #8dd9ff; }
.muted { color: var(--muted); }
.brand { display: block; width: 132px; }
.brand img { display: block; width: 100%; height: auto; }

.login-screen { display: grid; grid-template-columns: minmax(440px, 1.05fr) minmax(430px, .95fr); min-height: 100vh; background: white; }
.login-visual { position: relative; display: grid; place-items: center; overflow: hidden; padding: 64px; color: white; background: radial-gradient(circle at 25% 20%, #15568d 0, transparent 34%), linear-gradient(145deg, #061638 8%, #0a2e65 58%, #064e79); }
.login-visual::after { content: ""; position: absolute; inset: auto -18% -28% 8%; height: 53%; border-radius: 55% 45% 0 0; background: linear-gradient(105deg, rgba(31,169,221,.76), rgba(23,105,170,.15) 42%, rgba(219,40,71,.78)); filter: blur(1px); transform: rotate(-8deg); }
.paint-orbit { position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.paint-orbit-one { width: 560px; height: 560px; right: -220px; top: -230px; }
.paint-orbit-two { width: 360px; height: 360px; left: -180px; bottom: -80px; }
.login-message { position: relative; z-index: 2; width: min(100%, 540px); }
.login-message .brand { width: 174px; margin-bottom: 62px; }
.login-message h1 { margin: 0; font-size: clamp(44px, 5.2vw, 74px); line-height: .99; letter-spacing: -3.5px; }
.login-message > p:last-child { max-width: 460px; margin-top: 24px; color: #c9d9ec; font-size: 18px; line-height: 1.6; }
.login-panel { display: grid; place-items: center; padding: 50px; }
.login-stack { width: min(100%, 540px); }
.login-card { width: min(100%, 420px); margin-inline: auto; }
.login-card h2 { margin: 0; font-size: 38px; letter-spacing: -1.4px; }
.login-card > .muted { margin: 10px 0 34px; }
.admin-login-card > .muted { margin-bottom: 28px; line-height: 1.6; }
.admin-login-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.admin-login-tabs [role="tab"] { flex: 1; min-width: 0; min-height: 50px; border: 0; border-bottom: 3px solid transparent; border-radius: 10px 10px 0 0; padding: 12px 8px; color: var(--muted); background: transparent; font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
.admin-login-tabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--blue); color: var(--blue); background: #eef6fc; }
.admin-login-tabs [role="tab"]:hover { background: #f4f7fb; color: var(--blue); }
.admin-login-tabs [role="tab"]:focus-visible { position: relative; outline: 3px solid var(--blue); outline-offset: 2px; }
.admin-login-panel { min-height: 310px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 15px 15px; padding: 24px; }
.admin-login-form > label:first-child { margin-top: 0; }
.admin-login-form h3 { margin: 0 0 10px; font-size: 21px; letter-spacing: -.5px; }
.admin-login-help { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.admin-login-form .login-error { margin-bottom: 0; line-height: 1.5; overflow-wrap: anywhere; }
.admin-login-form .otp-back-button { min-height: 44px; line-height: 1.5; }
.admin-login-form .password-field button { top: 2px; right: 4px; min-width: 56px; min-height: 44px; }
.admin-login-form button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.admin-login-form [disabled] { cursor: wait; opacity: .65; }
.login-card label, dialog label, .record-form-view label { display: block; margin: 18px 0 8px; font-size: 12px; font-weight: 800; color: #3e4b60; }
input, select, textarea { width: 100%; min-height: 49px; border: 1px solid #cfd8e5; border-radius: 11px; padding: 0 14px; color: var(--ink); background: white; outline: none; }
textarea { padding-top: 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,170,.12); }
.password-field { position: relative; }
.password-field input { padding-right: 65px; }
.password-field button { position: absolute; right: 8px; top: 8px; height: 33px; border: 0; background: transparent; color: var(--blue); font-size: 12px; font-weight: 800; }
.primary-button { width: 100%; min-height: 50px; margin-top: 24px; border: 0; border-radius: 11px; padding: 0 18px; background: linear-gradient(100deg, var(--blue), #087cae); color: white; font-weight: 850; box-shadow: 0 10px 23px rgba(23,105,170,.2); }
.primary-button span { float: right; }
.primary-button:disabled { opacity: .6; cursor: wait; }
.primary-button.compact { width: auto; min-height: 42px; margin: 0; padding: 0 17px; box-shadow: none; }
.login-error, .form-error { min-height: 20px; color: #bd1f39; font-size: 13px; }
.login-alternative { width: 100%; margin-top: 11px; }
.mobile-brand { display: none; width: 128px; margin-bottom: 36px; }
.auth-phone-field { grid-template-columns: 145px 1fr; }
.phone-prefix { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; color: var(--ink); font-size: 12px; font-weight: 700; }
.otp-input { font-size: 25px; font-weight: 850; letter-spacing: 9px; text-align: center; }
.otp-back-button { display: block; margin: 17px auto 0; }
.profile-setup-card { width: min(100%, 540px); }
.profile-setup-card h2 { font-size: 34px; }
.profile-setup-card > .muted { margin-bottom: 20px; }
.profile-setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.profile-setup-grid .full-field { grid-column: 1 / -1; }

@media (max-width: 960px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { padding: 32px 24px; }
  .admin-login-card .mobile-brand { display: block; }
}

.admin-app { min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 255px; padding: 34px 22px 20px; color: white; background: linear-gradient(180deg, #071d49, #082656 65%, #071c43); box-shadow: 8px 0 25px rgba(7,29,73,.08); }
.sidebar > .brand { margin: -6px auto 23px; }
.workspace-label { margin: 0 15px 12px; color: #7287ab; font-size: 9px; font-weight: 900; letter-spacing: 1.6px; }
.side-module-heading { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 3px 10px; border: 1px solid rgba(154,190,229,.2); border-radius: 11px; padding: 0 12px; color: white; background: rgba(255,255,255,.055); }
.side-module-heading span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; color: #b9eaff; background: rgba(45,172,220,.16); font-size: 15px; font-weight: 900; }
.side-module-heading strong { font-size: 12px; letter-spacing: .1px; }
.side-navigation { flex: 1; min-height: 0; overflow-y: auto; padding: 0 4px 14px 0; scrollbar-width: thin; scrollbar-color: #49658c transparent; }
.side-nav-section + .side-nav-section { margin-top: 4px; }
.side-nav-section-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 41px; border: 0; border-radius: 9px; padding: 0 11px 0 13px; color: #aebbd1; background: transparent; font-size: 11px; font-weight: 850; text-align: left; transition: .15s ease; }
.side-nav-section-toggle:hover, .side-nav-section-toggle[aria-expanded="true"] { color: white; background: rgba(255,255,255,.055); }
.side-nav-section-toggle i { color: #758bab; font-size: 15px; font-style: normal; transition: transform .15s ease; }
.side-nav-section-toggle[aria-expanded="false"] i { transform: rotate(-90deg); }
.side-nav-links { display: grid; gap: 3px; padding: 3px 0 7px 9px; }
.side-nav-links[hidden] { display: none; }
.side-nav-item { position: relative; display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 7px; width: 100%; min-height: 38px; border: 0; border-radius: 9px; padding: 7px 9px; color: #93a4be; background: transparent; font-size: 10px; font-weight: 700; line-height: 1.35; text-align: left; transition: .15s ease; }
.side-nav-item > span { width: 5px; height: 5px; border-radius: 50%; background: #536b8d; }
.side-nav-item small { border: 1px solid rgba(159,180,210,.18); border-radius: 99px; padding: 2px 5px; color: #788da9; font-size: 7px; font-weight: 850; text-transform: uppercase; }
.side-nav-item:hover { color: white; background: rgba(255,255,255,.055); }
.side-nav-item.active { color: white; background: linear-gradient(90deg, #1769aa, #1684b8); box-shadow: 0 7px 18px rgba(0,0,0,.16); }
.side-nav-item.active > span { background: #bcefff; box-shadow: 0 0 0 3px rgba(188,239,255,.12); }
.side-nav-item.active small { color: #d8f4ff; border-color: rgba(216,244,255,.28); }
.sidebar-footer { display: grid; grid-template-columns: 37px 1fr 25px; gap: 9px; align-items: center; margin-top: auto; padding-top: 19px; border-top: 1px solid rgba(255,255,255,.1); }
.admin-avatar { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 11px; background: linear-gradient(135deg, #27a7d5, #145da1); font-weight: 900; }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { font-size: 12px; }
.sidebar-footer small { margin-top: 3px; color: #8192ae; font-size: 9px; }
.sidebar-footer button { border: 0; color: #8ea0bd; background: transparent; font-size: 19px; }

.workspace { min-height: 100vh; margin-left: 255px; padding: 22px clamp(25px, 4vw, 62px) 65px; }
.main-module-nav { display: flex; gap: 4px; margin: 0 0 25px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.main-module-button { position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; min-height: 52px; border: 0; padding: 0 14px; color: #69768a; background: transparent; font-size: 11px; font-weight: 850; white-space: nowrap; transition: color .15s ease, background-color .15s ease; }
.main-module-button span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: #7b899c; background: #f0f3f7; font-size: 13px; }
.main-module-button::after { content: ""; position: absolute; right: 10px; bottom: -1px; left: 10px; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.main-module-button:hover { color: var(--navy); background: #f8fafc; }
.main-module-button.active { color: var(--blue); }
.main-module-button.active span { color: white; background: linear-gradient(135deg, #1769aa, #1684b8); }
.main-module-button.active::after { background: linear-gradient(90deg, #1769aa, #1da0bd); }
.workspace-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 31px; }
.workspace-header h1 { margin: 0; font-size: clamp(26px, 3vw, 38px); letter-spacing: -1.4px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.live-indicator { padding: 9px 13px; border: 1px solid #dce8e3; border-radius: 99px; color: #3c6859; background: #f7fcfa; font-size: 11px; font-weight: 800; }
.live-indicator i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(11,155,105,.11); }
.refresh-button, .mobile-menu { display: grid; place-items: center; height: 38px; border: 1px solid var(--line); border-radius: 10px; color: var(--blue); background: white; font-weight: 850; }
.refresh-button { width: 38px; font-size: 19px; }
.mobile-menu { display: none; padding: 0 12px; }
.refresh-button.spinning { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.view { display: none; }
.view.active { display: block; }
.integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.integration-card { padding: 25px; }
.integration-card label:not(.checkbox-field) { display: block; margin: 17px 0 7px; color: #3e4b60; font-size: 11px; font-weight: 800; }
.integration-card .primary-button { margin-top: 20px; }
.integration-card .form-error { margin-bottom: 0; }
.integration-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.integration-heading h3 { margin: 0; font-size: 22px; letter-spacing: -.4px; }
.integration-status { flex: 0 0 auto; border: 1px solid #d6e0eb; border-radius: 99px; padding: 6px 9px; color: #69768a; background: #f8fafc; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.integration-status.configured { border-color: #bce4d5; color: #28725b; background: #f0fbf7; }
.integration-inline { display: grid; grid-template-columns: minmax(0, 1fr) 105px; gap: 10px; }
.placeholder-panel { display: grid; place-items: center; min-height: 410px; padding: 56px 24px; text-align: center; }
.placeholder-icon { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 20px; border: 1px solid #cfe0ec; border-radius: 20px; color: var(--blue); background: linear-gradient(145deg, #eef7fc, #e6f1f8); font-size: 29px; font-weight: 900; box-shadow: 0 10px 25px rgba(23,105,170,.1); }
.placeholder-panel .eyebrow { margin-bottom: 8px; }
.placeholder-panel h2 { margin: 0; font-size: 27px; letter-spacing: -.7px; }
.placeholder-panel > p:not(.eyebrow) { max-width: 590px; margin: 11px 0 19px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.planned-chip { display: inline-flex; align-items: center; min-height: 28px; border: 1px solid #c8dceb; border-radius: 99px; padding: 0 11px; color: #50718b; background: #f3f8fb; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.member-workspace-view { max-width: 1100px; margin: 0 auto; }
.member-action-card { max-width: 680px; margin: 0 auto; padding: 40px; text-align: center; }
.member-action-card > p:not(.eyebrow) { max-width: 520px; margin: 10px auto 28px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.member-action-card form { max-width: 500px; margin: 0 auto; text-align: left; }
.member-action-card form .primary-button { text-align: left; }
.camera-scan-button { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 2px 13px; align-items: center; width: 100%; min-height: 76px; border: 1px solid #b8d8eb; border-radius: 13px; padding: 12px 16px; color: var(--blue); background: linear-gradient(145deg,#f2f9fd,#eaf5fb); text-align: left; }
.camera-scan-button > span { grid-row: 1 / span 2; display: grid; place-items: center; width: 45px; height: 45px; border-radius: 12px; color: white; background: linear-gradient(135deg,var(--blue),var(--cyan)); font-size: 21px; }
.camera-scan-button strong { align-self: end; font-size: 14px; }.camera-scan-button small { align-self: start; color: #64778b; font-size: 10px; }
.scan-divider { display: flex; align-items: center; gap: 11px; margin: 20px 0 4px; color: #8a96a7; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.scan-divider::before, .scan-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pending-redemption-note { margin: -20px 0 24px; border: 1px solid #b8d8eb; border-radius: 11px; padding: 11px 13px; color: #245f86; background: #eef8fd; font-size: 11px; font-weight: 750; line-height: 1.5; }
.member-action-icon { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 20px; border-radius: 18px; color: var(--blue); background: #eaf4fb; font-size: 25px; font-weight: 900; }
.member-result { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 5px 16px; max-width: 500px; margin: 24px auto 0; border: 1px solid #bce4d5; border-radius: 12px; padding: 16px 18px; color: #356152; background: #f0fbf7; text-align: left; }
.member-result strong, .member-result span, .member-result small { grid-column: 1; }
.member-result b { grid-column: 2; grid-row: 1 / span 3; color: var(--green); font-size: 22px; }
.member-result small { color: #658476; }
.qr-camera-dialog { width: min(calc(100% - 24px), 560px); overflow: hidden; background: #061630; }
.qr-camera-dialog[open] { padding: 0; }
.qr-camera-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px; color: white; }
.qr-camera-heading h2 { margin: 0; font-size: 22px; }.qr-camera-heading .eyebrow { color: #8dd9ff; }
.qr-camera-heading button { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; color: white; background: rgba(255,255,255,.08); font-size: 24px; }
.qr-camera-viewport { position: relative; aspect-ratio: 3 / 4; max-height: 68vh; overflow: hidden; background: #020916; }
.qr-camera-viewport video { width: 100%; height: 100%; object-fit: cover; }
.qr-camera-target { position: absolute; inset: 50% auto auto 50%; width: min(68%,280px); aspect-ratio: 1; border: 3px solid white; border-radius: 22px; box-shadow: 0 0 0 999px rgba(2,9,22,.34); transform: translate(-50%,-50%); }
.qr-camera-target::before, .qr-camera-target::after { content: ""; position: absolute; right: 18px; left: 18px; height: 2px; background: rgba(255,255,255,.6); }.qr-camera-target::before { top: 50%; }.qr-camera-target::after { display: none; }
.qr-camera-status { min-height: 52px; margin: 0; padding: 15px 20px; color: #d9e9f7; font-size: 12px; text-align: center; }
.member-summary-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.member-panel-heading { padding: 22px 24px 15px; }
.member-referral-card { display: grid; grid-template-columns: 1fr auto; gap: 36px; align-items: center; padding: 36px; }
.member-referral-card h2 { margin: 0; font-size: 28px; }
.member-referral-card p:not(.eyebrow) { margin: 9px 0 24px; color: var(--muted); }
.copy-field { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.copy-field button { min-width: 76px; border: 1px solid var(--line); border-radius: 10px; color: var(--blue); background: white; font-size: 11px; font-weight: 850; }
.member-referral-qr { display: grid; place-items: center; width: 190px; height: 190px; border: 1px solid var(--line); border-radius: 18px; background: #f8fafc; }
.member-referral-qr img { width: 158px; height: 158px; }
.member-profile-card .record-form-body { grid-template-columns: 1fr; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 16px; }
.metric-card { position: relative; overflow: hidden; min-height: 159px; padding: 21px; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: 0 6px 22px rgba(16,35,70,.035); }
.metric-card::after { content: ""; position: absolute; width: 95px; height: 95px; right: -42px; top: -44px; border-radius: 50%; background: currentColor; opacity: .05; }
.metric-icon { display: grid; place-items: center; width: 37px; height: 37px; margin-bottom: 17px; border-radius: 10px; color: currentColor; background: currentColor; font-size: 0; }
.metric-icon::after { content: attr(data-icon); }
.metric-card .metric-icon { font-size: 16px; font-weight: 900; background: color-mix(in srgb, currentColor 11%, white); }
.metric-card p { margin: 0 0 5px; color: var(--muted); font-size: 11px; font-weight: 750; }
.metric-card > strong { display: block; color: var(--ink); font-size: 30px; letter-spacing: -1.2px; }
.metric-card small { color: #98a2b2; font-size: 10px; }
.metric-card.blue { color: var(--blue); }.metric-card.cyan { color: var(--cyan); }.metric-card.green { color: var(--green); }.metric-card.red { color: var(--red); }
.dashboard-grid { display: grid; grid-template-columns: minmax(380px, 1.45fr) minmax(320px, .85fr); gap: 17px; margin-top: 17px; }
.panel { border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: 0 6px 22px rgba(16,35,70,.035); }
.performance-panel, .quick-panel, .recent-panel { padding: 23px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.panel-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.4px; }
.period-chip { padding: 7px 10px; border-radius: 8px; color: var(--muted); background: #f4f6f9; font-size: 10px; font-weight: 750; }
.conversion-wrap { display: flex; align-items: center; gap: 36px; padding: 25px 10px 10px; }
.donut { --conversion: 0deg; display: grid; place-items: center; flex: 0 0 158px; height: 158px; border-radius: 50%; background: conic-gradient(var(--blue) 0 var(--conversion), #e8edf4 var(--conversion) 360deg); }
.donut::before { content: ""; grid-area: 1/1; width: 112px; height: 112px; border-radius: 50%; background: white; }
.donut > div { z-index: 1; grid-area: 1/1; text-align: center; }
.donut strong, .donut small { display: block; }.donut strong { font-size: 30px; }.donut small { color: var(--muted); font-size: 10px; }
.conversion-copy { flex: 1; }
.conversion-copy > div { display: grid; grid-template-columns: 9px 1fr auto; gap: 9px; align-items: center; margin: 11px 0; font-size: 11px; }
.conversion-copy > div strong { font-size: 13px; }
.legend { width: 8px; height: 8px; border-radius: 50%; }.legend.active { background: #e8edf4; }.legend.redeemed { background: var(--blue); }
.conversion-copy p { margin: 18px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.quick-panel > button { display: grid; grid-template-columns: 39px 1fr 20px; gap: 12px; align-items: center; width: 100%; padding: 14px 0; border: 0; border-top: 1px solid var(--line); color: var(--ink); background: transparent; text-align: left; }
.quick-panel > button:first-of-type { margin-top: 13px; }.quick-panel > button:hover strong { color: var(--blue); }
.quick-icon { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 10px; color: var(--blue); background: #edf5fb; font-size: 18px; }
.quick-panel button strong, .quick-panel button small { display: block; }.quick-panel button strong { font-size: 12px; }.quick-panel button small { margin-top: 4px; color: var(--muted); font-size: 9px; }.quick-panel button b { color: #a5afbd; }
.recent-panel { margin-top: 17px; }
.text-button { border: 0; color: var(--blue); background: transparent; font-size: 11px; font-weight: 800; }

.section-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.section-toolbar h2 { margin: 0; font-size: 22px; }.section-toolbar p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.breadcrumbs { margin-bottom: 12px; color: #8590a2; font-size: 10px; font-weight: 750; }.breadcrumbs span { margin: 0 5px; color: #b2bac6; }
.list-context { display: flex; align-items: center; gap: 10px; min-height: 38px; margin-bottom: 9px; color: var(--muted); font-size: 10px; }
.report-chip { padding: 6px 9px; border-radius: 7px; color: var(--blue); background: #eaf3fa; font-weight: 850; }
.toolbar-actions { display: flex; align-items: center; gap: 9px; }
#members-view .toolbar-actions { align-items: flex-end; flex-wrap: wrap; }
.list-quick-filter { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.list-quick-filter select { min-height: 42px; min-width: 150px; padding: 10px 30px 10px 12px; border-color: var(--line); font-size: 12px; }
@media (max-width: 1500px) { #members-view .section-toolbar { align-items: stretch; flex-direction: column; } #members-view .toolbar-actions { justify-content: flex-end; } }
@media (max-width: 760px) { #members-view .toolbar-actions { align-items: stretch; } .list-quick-filter select { width: 100%; } }
.search-box { position: relative; display: block; width: 250px; }
.search-box span { position: absolute; left: 13px; top: 10px; color: #8d98a8; font-size: 19px; }
.search-box input { min-height: 42px; padding-left: 40px; border-color: var(--line); font-size: 11px; }
.table-panel { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { padding: 13px 17px; color: #8691a2; background: #fafbfd; font-size: 9px; font-weight: 900; letter-spacing: .5px; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 15px 17px; border-top: 1px solid #edf0f5; color: #4e5a6d; white-space: nowrap; }
.list-view-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-height: 48px; border-bottom: 1px solid var(--line); padding: 8px 14px; background: #fff; }
.list-view-toolbar[hidden] { display: none; }
.list-view-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; border: 1px solid #cbd9e7; border-radius: 8px; padding: 0 5px 0 9px; color: #536277; background: #f9fbfd; box-shadow: 0 1px 2px rgba(16,35,70,.03); font-size: 9px; font-weight: 700; text-transform: none; }
.list-view-chip b { color: var(--navy); font-size: 8px; letter-spacing: .45px; }
.list-view-chip i { color: #178c77; font-size: 12px; font-style: normal; }
.list-view-chip button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 6px; color: #748297; background: transparent; font-size: 15px; }
.list-view-chip button:hover { color: var(--red); background: #fff0f3; }
.sort-chip i { color: var(--blue); }
.list-clear-view { min-height: 30px; margin-left: auto; border: 0; padding: 0 7px; color: var(--blue); background: transparent; font-size: 9px; font-weight: 850; }
.list-clear-view:hover { text-decoration: underline; }
.list-column-heading { display: flex; align-items: center; gap: 2px; min-height: 24px; }
.list-sort-button { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; border: 0; padding: 0; color: inherit; background: transparent; font: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; white-space: nowrap; }
.list-sort-button:hover, th[aria-sort="ascending"] .list-sort-button, th[aria-sort="descending"] .list-sort-button { color: var(--blue); }
.list-sort-indicator { min-width: 10px; color: #a4afbf; font-size: 11px; font-style: normal; letter-spacing: 0; }
th[aria-sort="ascending"] .list-sort-indicator, th[aria-sort="descending"] .list-sort-indicator { color: var(--blue); }
.list-column-menu-button { display: grid; place-items: center; width: 22px; height: 24px; border: 0; border-radius: 6px; padding: 0; color: #a4afbf; background: transparent; font-size: 12px; }
.list-column-menu-button:hover, .list-column-menu-button[aria-expanded="true"] { color: var(--blue); background: #eaf3fa; }
.list-group-badge { display: inline-grid; place-items: center; min-width: 27px; height: 20px; margin-left: 3px; border-radius: 5px; padding: 0 4px; color: #087662; background: #e6f7f2; font-size: 8px; letter-spacing: 0; }
.list-column-popover { position: fixed; z-index: 100; width: 230px; border: 1px solid #d6deea; border-radius: 11px; padding: 7px; color: var(--ink); background: white; box-shadow: 0 16px 42px rgba(7,29,73,.2); }
.list-column-popover[hidden] { display: none; }
.list-column-popover p { margin: 2px 7px 7px; color: #7c889a; font-size: 9px; font-weight: 900; letter-spacing: .45px; text-transform: uppercase; }
.list-column-popover button { display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 6px; width: 100%; min-height: 36px; border: 0; border-radius: 7px; padding: 0 9px; color: #425066; background: transparent; text-align: left; font-size: 10px; font-weight: 750; }
.list-column-popover button:hover, .list-column-popover button:focus-visible { color: var(--blue); background: #eef5fb; outline: none; }
.list-column-popover button span { color: #8794a7; font-size: 13px; text-align: center; }
.list-column-popover hr { height: 1px; margin: 5px 4px; border: 0; background: #e8edf4; }
.record-group-row th { border-top: 1px solid #dce8eb; border-bottom: 1px solid #dce8eb; padding: 10px 17px; color: #415568; background: #f0f8f7; text-align: left; text-transform: none; white-space: normal; }
.record-group-row th > div { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.record-group-value { display: inline-flex; align-items: center; gap: 6px; min-height: 27px; border: 1px solid #bbdcd7; border-radius: 7px; padding: 0 9px; color: #476174; background: #fff; font-size: 9px; font-weight: 750; letter-spacing: 0; }
.record-group-value b { color: #0b7a68; font-size: 8px; letter-spacing: .35px; text-transform: uppercase; }
td strong { color: var(--ink); }.money { color: var(--ink); font-weight: 850; }.money.positive { color: var(--green); }.money.negative { color: var(--red); }
.person-cell { display: flex; align-items: center; gap: 9px; }.person-cell > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--blue); background: #eaf3fa; font-weight: 900; }
.language-tag, .entry-tag { display: inline-block; padding: 5px 7px; border-radius: 6px; color: var(--blue); background: #eef5fb; font-size: 9px; font-weight: 850; }
.entry-tag { color: #426456; background: #eef8f4; }
.status-pill { display: inline-block; padding: 6px 9px; border-radius: 99px; font-size: 9px; font-weight: 850; }.status-pill.redeemed,.status-pill.yes { color: #08704d; background: #e8f7f1; }.status-pill.no { color: #687386; background: #f0f2f5; }
.status-select { min-height: 32px; width: 148px; border: 0; border-radius: 8px; padding: 0 9px; font-size: 9px; font-weight: 800; }.status-generated { color: #657084; background: #f0f2f5; }.status-printed { color: #735c00; background: #fff7d9; }.status-factory_activated,.status-dealer_activated { color: #075f80; background: #e6f6fb; }.status-voided { color: #9a1f35; background: #fdecef; }
code { padding: 4px 6px; border-radius: 5px; color: #40506a; background: #f3f5f8; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.table-subline { display: block; margin-top: 3px; color: var(--muted); }.empty-row { height: 110px; color: var(--muted); text-align: center; }
.record-message-row { text-align: left; }
.record-list-screen .table-wrap { container-type: inline-size; }
.record-message-content { position: sticky; left: 18px; width: min(540px, calc(100cqw - 44px)); max-width: calc(100vw - 76px); white-space: normal; line-height: 1.5; }
.record-message-content button { margin-top: 10px; }
.actions-column { position: sticky; z-index: 2; right: 0; width: 1%; min-width: max-content; background: white; text-align: right; box-shadow: -8px 0 15px rgba(16,35,70,.04); }
th.actions-column { z-index: 4; background: #fafbfd; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.row-action { min-height: 30px; border: 1px solid var(--line); border-radius: 7px; padding: 0 9px; color: var(--blue); background: white; font-size: 9px; font-weight: 850; }
.row-action:hover { border-color: #a9bdd3; background: #f5f9fc; }
.row-action.danger { color: var(--red); }
.row-action.danger:hover { border-color: #efb5bf; background: #fff5f7; }
.truncated-cell { display: block; max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
.member-table { min-width: 2700px; }
.member-table thead th { position: sticky; z-index: 3; top: 0; }
.member-table thead th:first-child,.member-table tbody td:first-child { position: sticky; z-index: 2; left: 0; background: white; }
.member-table thead th:first-child { z-index: 4; background: #fafbfd; }

.record-row { cursor: pointer; transition: background-color .15s ease, box-shadow .15s ease; }
.record-row:hover td { background: #f5f9fc; }
.record-row:focus { outline: none; }
.record-row:focus td { background: #edf5fb; box-shadow: inset 0 2px 0 #9cc6e2, inset 0 -2px 0 #9cc6e2; }
.record-row:focus td:first-child { box-shadow: inset 2px 0 0 #1684b8, inset 0 2px 0 #9cc6e2, inset 0 -2px 0 #9cc6e2; }
.record-row:focus td:last-child { box-shadow: inset -2px 0 0 #1684b8, inset 0 2px 0 #9cc6e2, inset 0 -2px 0 #9cc6e2; }

.list-pagination { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; min-height: 64px; border-top: 1px solid var(--line); padding: 10px 17px; background: #fafbfd; color: var(--muted); font-size: 10px; }
.pagination-summary { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.pagination-range { color: #97a1b0; }
.pagination-pages { display: flex; align-items: center; justify-content: center; gap: 5px; }
.pagination-button { display: grid; place-items: center; min-width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; color: #58677c; background: white; font-size: 10px; font-weight: 850; }
.pagination-button:hover:not(:disabled) { border-color: #a9bdd3; color: var(--blue); background: #f5f9fc; }
.pagination-button.active { border-color: var(--blue); color: white; background: var(--blue); }
.pagination-button:disabled { cursor: not-allowed; opacity: .4; }
.pagination-arrow { font-size: 17px; }
.pagination-ellipsis { min-width: 20px; text-align: center; }
.pagination-controls { display: flex; align-items: center; justify-content: flex-end; gap: 22px; white-space: nowrap; }
.pagination-controls label { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 10px; font-weight: 800; }
.pagination-controls select { width: 74px; min-height: 34px; border-radius: 8px; padding: 0 25px 0 10px; color: #4d5a6c; background-color: white; font-size: 10px; }
.pagination-controls strong { color: #657288; font-size: 10px; }

.record-drawer-open { overflow: hidden; }
.record-detail-backdrop { position: fixed; z-index: 80; inset: 0; background: rgba(4, 17, 39, .56); backdrop-filter: blur(2px); }
.record-detail-backdrop[hidden] { display: none; }
.record-detail-drawer { position: absolute; inset: 0 0 0 auto; display: flex; flex-direction: column; width: min(52vw, 940px); min-width: 620px; border-left: 1px solid #dbe2ec; color: var(--ink); background: #fff; box-shadow: -18px 0 55px rgba(4, 19, 45, .2); outline: none; animation: drawer-in .18s ease-out; }
@keyframes drawer-in { from { transform: translateX(24px); opacity: .75; } to { transform: translateX(0); opacity: 1; } }
.record-detail-header { position: sticky; z-index: 2; top: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; min-height: 96px; border-bottom: 1px solid var(--line); padding: 24px 28px 20px; background: linear-gradient(110deg, #fff, #f8fbfe); }
.record-detail-header h2 { max-width: 610px; margin: 3px 0 0; overflow-wrap: anywhere; font-size: 24px; letter-spacing: -.6px; }
.record-detail-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.record-detail-actions #record-detail-commands { display: flex; gap: 8px; }
.secondary-button.danger-button { color: #b42318; border-color: #f0b4b0; background: #fff7f6; min-height: 44px; }
.secondary-button.danger-button:hover { background: #fee4e2; border-color: #b42318; }
.secondary-button.danger-button:focus-visible { outline: 3px solid #b42318; outline-offset: 3px; }
dialog.record-command-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); overflow-y: auto; }
.record-command-form { padding: 28px; }
.record-command-form h2 { margin: 0 0 14px; font-size: 24px; }
.record-command-form p { line-height: 1.6; overflow-wrap: anywhere; }
.record-command-form label { display: block; margin: 24px 0 8px; font-weight: 700; }
.record-command-form textarea { display: block; width: 100%; resize: vertical; font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.record-command-form textarea:focus { outline: 2px solid var(--blue); outline-offset: 2px; }
.record-command-form .muted { font-size: 13px; }
.record-command-form .record-command-error { color: #b42318; }
.record-command-form footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.record-command-form button { min-height: 44px; }
.record-command-form [disabled] { opacity: .6; cursor: wait; }
.record-detail-content { flex: 1; overflow-y: auto; padding: 24px 28px 40px; }
.record-detail-section + .record-detail-section { margin-top: 26px; }
.record-detail-section h3 { margin: 0 0 10px; color: var(--ink); font-size: 13px; }
.record-detail-section dl { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.record-detail-section dl > div { display: grid; grid-template-columns: minmax(180px, 36%) 1fr; min-height: 49px; border-top: 1px solid var(--line); }
.record-detail-section dl > div:first-child { border-top: 0; }
.record-detail-section dt, .record-detail-section dd { display: flex; align-items: center; margin: 0; padding: 13px 15px; overflow-wrap: anywhere; white-space: normal; }
.record-detail-section dt { color: #687589; background: #f7f9fc; font-size: 10px; font-weight: 850; }
.record-detail-section dd { border-left: 1px solid var(--line); color: #3f4b5e; font-size: 11px; }
.related-list-description { font-size: 12px; line-height: 1.5; }
.related-record-list .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.related-list-workbar { display: flex; align-items: end; gap: 10px; margin: 16px 0 12px; }
.related-list-workbar label { display: grid; flex: 1; min-width: 0; gap: 6px; font-size: 12px; font-weight: 700; }
.related-list-workbar input { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; font-weight: 400; }
.related-list-workbar .secondary-button { min-height: 44px; }
.related-list-viewport { max-height: 480px; overflow: auto; position: relative; isolation: isolate; --related-context-height: 50px; --related-toolbar-height: 0px; }
.related-list-context { position: sticky; top: 0; left: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; color: var(--muted); background: #fff; border-bottom: 1px solid var(--line); font-size: 11px; }
.related-record-list .list-view-toolbar { position: sticky; top: var(--related-context-height); left: 0; z-index: 3; }
.related-record-list table { width: 100%; min-width: 860px; }
.related-record-list thead th { position: sticky; top: calc(var(--related-context-height) + var(--related-toolbar-height)); z-index: 2; background: #f7f9fc; }
.related-record-list td { min-width: 90px; max-width: 190px; white-space: normal; overflow-wrap: anywhere; font-size: 11px; }
.related-record-list .related-amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.related-record-list .list-pagination { grid-template-columns: 1fr; justify-items: stretch; gap: 12px; }
.related-record-list .pagination-controls { justify-content: space-between; }
.related-record-list .pagination-button, .related-record-list .list-sort-button, .related-record-list .list-column-menu-button { min-height: 44px; }
.related-record-list .empty-row { max-width: none; height: 110px; }
.related-record-list .empty-row button { display: block; margin: 12px auto 0; }
.related-search-chip { max-width: 100%; min-height: 32px; border: 1px solid #cee1f2; border-radius: 7px; padding: 6px 10px; background: #eef6fc; color: #205b89; overflow-wrap: anywhere; text-align: left; }
.related-search-chip[hidden] { display: none; }
.related-status { display: inline-block; padding: 4px 8px; border-radius: 6px; background: #edf3f8; color: #315477; font-weight: 650; }
.related-record-list :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (max-width: 600px) { .related-list-workbar { align-items: stretch; flex-direction: column; } .related-list-viewport { max-height: 420px; } }

dialog { width: min(calc(100% - 34px), 570px); border: 0; border-radius: 20px; padding: 0; color: var(--ink); box-shadow: 0 30px 90px rgba(4,19,45,.3); }
dialog::backdrop { background: rgba(3,17,42,.68); backdrop-filter: blur(3px); }
dialog form { padding: 28px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; }.dialog-heading h2 { margin: 0; font-size: 24px; }.dialog-heading button { width: 32px; height: 32px; border: 0; border-radius: 8px; color: var(--muted); background: #f2f4f7; font-size: 21px; }
dialog > form > .muted { margin: 8px 0 23px; font-size: 12px; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lookup-add-dialog { width: min(calc(100% - 34px), 720px); }
.lookup-add-dialog form { max-height: min(82vh, 760px); overflow-y: auto; }
.lookup-add-dialog .dialog-heading .eyebrow { margin-bottom: 6px; }
.lookup-add-dialog .dialog-heading h2 { text-transform: none; }
.lookup-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }
.lookup-modal-grid .full-field { grid-column: 1 / -1; }
.lookup-modal-grid select[multiple] { min-height: 116px; padding: 8px; }
.lookup-add-dialog .form-error { margin: 12px 0 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }.secondary-button { min-height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 17px; color: var(--ink); background: white; font-weight: 750; }
.record-form-view, .compact-form-view { width: 100%; max-width: none; margin: 0; }
.record-breadcrumbs { display: flex; align-items: center; }
.record-breadcrumbs button { border: 0; padding: 0; color: #748197; background: transparent; font-size: inherit; font-weight: 750; }
.record-breadcrumbs button:hover { color: var(--blue); text-decoration: underline; }
.record-breadcrumbs strong { color: #4a5669; font-weight: 850; }
.record-form-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 10px 32px rgba(16,35,70,.055); }
.record-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 28px 30px 24px; border-bottom: 1px solid var(--line); background: linear-gradient(110deg, #fff, #f8fbfe); }
.record-page-heading h2 { margin: 0; color: var(--ink); font-size: 25px; letter-spacing: -.7px; }
.record-page-heading .muted { max-width: 680px; margin: 7px 0 0; font-size: 12px; line-height: 1.55; }
.record-page-heading .back-button { flex: 0 0 auto; }
.record-form-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 24px 30px 30px; background: #f7f9fc; }
.compact-form-view .record-form-body { grid-template-columns: 1fr; }
.record-form-body fieldset { min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 14px; padding: 7px 20px 21px; background: white; box-shadow: 0 3px 12px rgba(16,35,70,.025); }
.record-form-body legend { padding: 0 8px; color: var(--navy); font-size: 12px; font-weight: 900; }
.record-form-body fieldset:disabled { background: #f5f7fa; }
.record-form-body :is(input, select, textarea):disabled { color: #56647a; background: #edf1f6; border-color: #d7dfeb; cursor: not-allowed; opacity: 1; -webkit-text-fill-color: #56647a; }
#operation-permission-note { margin: 4px 0 12px; padding: 9px 12px; color: #345171; border-radius: 8px; background: #e8eff7; font-size: 12px; }
#member-form .record-form-body fieldset:nth-child(4), #member-form .record-form-body fieldset:nth-child(6), #dealer-form .record-form-body fieldset { grid-column: 1 / -1; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }.full-field { grid-column: 1 / -1; }
.field-grid select[multiple] { min-height: 132px; padding: 8px; }
#entity-form .record-form-body fieldset { grid-column: 1 / -1; }
#entity-form .record-form-body fieldset:only-child { grid-column: 1 / -1; }
.phone-field { display: grid; grid-template-columns: 155px 1fr; gap: 8px; }.phone-field select { font-size: 11px; }
.checkbox-field { display: flex !important; align-items: center; gap: 10px; min-height: 49px; margin: 13px 0 0 !important; cursor: pointer; }
.checkbox-field input { flex: 0 0 auto; width: 18px; min-height: 18px; margin: 0; accent-color: var(--blue); }.checkbox-field span { line-height: 1.35; }.checkbox-field small { display: block; margin-top: 3px; color: var(--muted); font-weight: 600; }
.conditional-fields { margin-top: 3px; }
.field-label { display: block; color: #3e4b60; font-size: 12px; font-weight: 800; }.field-help { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.referral-qr-wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 112px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.referral-qr { display: flex; align-items: center; gap: 12px; }.referral-qr img { width: 92px; height: 92px; border: 1px solid var(--line); border-radius: 9px; padding: 5px; background: white; }.referral-qr .secondary-button { display: inline-grid; place-items: center; text-decoration: none; font-size: 10px; }
.related-records { margin-top: 9px; border: 1px dashed #cfd8e5; border-radius: 10px; padding: 12px; color: var(--muted); background: #fafbfd; font-size: 10px; line-height: 1.55; }
.record-form-actions { position: sticky; z-index: 5; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 78px; border-top: 1px solid var(--line); padding: 15px 30px; background: rgba(255,255,255,.96); box-shadow: 0 -8px 24px rgba(16,35,70,.045); backdrop-filter: blur(8px); }
.record-form-actions > div { display: flex; gap: 9px; }
.record-form-actions .form-error { flex: 1; margin: 0; }
.record-form-actions .primary-button { min-width: 130px; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 27px; transform: translate(-50%, 18px); min-width: 260px; padding: 13px 18px; border-radius: 10px; color: white; background: #17243a; box-shadow: 0 14px 35px rgba(7,29,73,.25); font-size: 12px; opacity: 0; pointer-events: none; transition: .2s ease; text-align: center; }.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .main-module-button { padding-inline: 11px; }
  .integration-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }.dashboard-grid { grid-template-columns: 1fr; }.quick-panel { display: none; }
}
@media (max-width: 760px) {
  .login-screen { grid-template-columns: 1fr; }.login-visual { display: none; }.login-panel { padding: 30px; }.mobile-brand { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }.menu-open .sidebar { transform: translateX(0); }.menu-open::after { content: ""; position: fixed; z-index: 15; inset: 0; background: rgba(4,19,45,.5); }
  .workspace { margin-left: 0; padding: 14px 16px 50px; }.mobile-menu { display: block; }.live-indicator { display: none; }
  .main-module-nav { margin-right: -16px; margin-bottom: 21px; margin-left: -16px; padding: 0 7px; }
  .main-module-button { min-height: 49px; padding: 0 10px; font-size: 10px; }
  .main-module-button span { width: 22px; height: 22px; }
  .workspace-header { margin-bottom: 24px; }.workspace-header h1 { font-size: 27px; }
  .metric-grid { gap: 10px; }.metric-card { min-height: 145px; padding: 17px; }.metric-card > strong { font-size: 25px; }
  .section-toolbar { align-items: stretch; flex-direction: column; }.search-box { width: 100%; }.toolbar-actions { align-items: stretch; flex-direction: column; }.primary-button.compact { min-height: 42px; }
  /* Let every master-list column remain reachable on narrow screens. Pinning
     both the first column and wide action cell can cover the entire viewport. */
  .member-table thead th:first-child, .member-table tbody td:first-child,
  .member-table .actions-column { left: auto; right: auto; }
  .conversion-wrap { gap: 20px; padding-inline: 0; }.donut { flex-basis: 125px; height: 125px; }.donut::before { width: 88px; height: 88px; }.donut strong { font-size: 24px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .lookup-modal-grid { grid-template-columns: 1fr; }
  .lookup-modal-grid .full-field { grid-column: auto; }
  .record-page-heading { padding: 22px 20px; }.record-page-heading .back-button { display: none; }.record-form-body { grid-template-columns: 1fr; padding: 20px; }.record-form-body fieldset { grid-column: 1 / -1; }.field-grid { grid-template-columns: 1fr; }.phone-field { grid-template-columns: 135px 1fr; }.referral-qr-wrap { align-items: flex-start; flex-direction: column; }.record-form-actions { align-items: stretch; flex-direction: column; padding: 14px 20px; }.record-form-actions > div { justify-content: flex-end; }
  .list-pagination { grid-template-columns: 1fr; justify-items: stretch; gap: 10px; padding: 14px; }.pagination-summary, .pagination-controls { justify-content: space-between; }.pagination-pages { order: 3; }.pagination-range { display: none; }
  .list-view-toolbar { align-items: stretch; flex-direction: column; padding: 10px; }.list-view-chip { justify-content: space-between; width: 100%; }.list-clear-view { align-self: flex-end; margin-left: 0; }
  .record-detail-drawer { width: 100%; min-width: 0; }.record-detail-header { min-height: 84px; padding: 20px 18px 16px; }.record-detail-header h2 { font-size: 20px; }.record-detail-actions { gap: 6px; }.record-detail-actions .secondary-button { min-height: 38px; padding: 0 12px; }.record-detail-content { padding: 20px 18px 32px; }.record-detail-section dl > div { grid-template-columns: 42% 1fr; }.record-detail-section dt, .record-detail-section dd { padding: 12px 11px; }
  .member-action-card { padding: 28px 20px; }.member-summary-grid { grid-template-columns: 1fr; }.member-referral-card { grid-template-columns: 1fr; padding: 25px 20px; }.member-referral-qr { width: 100%; }.auth-phone-field { grid-template-columns: 125px 1fr; }.profile-setup-grid { grid-template-columns: 1fr; }.profile-setup-grid .full-field { grid-column: auto; }
}
@media (max-width: 480px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }.metric-card { min-width: 0; }.metric-card p { min-height: 27px; }.conversion-copy p { display: none; }
}

/* Opt-in shared operational report viewport: sticky real headers, never clones. */
.record-list-screen .section-toolbar { align-items: stretch; flex-direction: column; }
.record-list-screen .toolbar-actions { flex-wrap: wrap; }
.record-list-screen .section-toolbar p { max-width: 950px; line-height: 1.6; }
.record-list-screen :is(th, td):is([data-column-type="money"], [data-column-type="decimal"], [data-column-type="number"], [data-column-type="integer"]) { text-align: right; font-variant-numeric: tabular-nums; }
.record-list-screen .primary-button { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.record-list-viewport { max-height: 66vh; overflow: auto; --list-toolbar-height: 0px; }
.record-list-viewport .list-view-toolbar { position: sticky; top: 0; left: 0; z-index: 5; min-width: 100%; }
.record-list-viewport thead th { position: sticky; top: var(--list-toolbar-height); z-index: 4; background: #f6f9fc; }
.record-list-viewport thead th.actions-column { z-index: 6; }
.record-list-viewport td[data-column-field="serial_no"] { min-width: 330px; max-width: 560px; white-space: normal; overflow-wrap: anywhere; word-break: break-word; font-family: ui-monospace, monospace; font-size: 11px; }
.record-list-viewport td[data-column-field="auto_number"] { font-variant-numeric: tabular-nums; text-align: right; }
#ready-to-print-serial-numbers-view .section-toolbar { align-items: stretch; flex-direction: column; }
#ready-to-print-serial-numbers-view .toolbar-actions { flex-wrap: wrap; justify-content: flex-end; }
#ready-to-print-serial-numbers-view .section-toolbar p { max-width: 850px; line-height: 1.6; }
.record-search-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(52vw, 850px); max-width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; border-left: 1px solid var(--line); padding: 0; color: var(--ink); background: #fff; }
.record-search-drawer::backdrop { background: #071d4966; }
.record-search-drawer form { display: flex; flex-direction: column; height: 100%; }
.record-search-drawer header,.record-search-drawer footer { display: flex; justify-content: space-between; gap: 16px; padding: 22px; border-bottom: 1px solid var(--line); }
.record-search-drawer footer { border-top: 1px solid var(--line); border-bottom: 0; margin-top: auto; }
.record-search-drawer header button { align-self: flex-start; min-width: 44px; min-height: 44px; border: 1px solid var(--line); background: white; border-radius: 12px; font-size: 22px; }
.record-search-drawer h2 { margin: 5px 0 10px; }
.record-search-drawer p { color: var(--muted); font-size: 13px; }
.record-search-body { overflow-y: auto; padding: 22px; }
.record-search-body label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; min-width: 0; }
.record-search-body input,.record-search-body select { width: 100%; min-height: 44px; min-width: 0; max-width: 100%; border: 1px solid #c9d5e4; border-radius: 10px; padding: 10px; background: #fff; color: var(--ink); }
.record-search-body fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.criterion-actions { grid-column: 1/-1; display: flex; justify-content: space-between; gap: 10px; }
.criterion-actions button { min-height: 44px; border: 0; background: none; color: #126baa; font-weight: 700; }
@media(max-width: 760px) {
  .record-search-drawer { width: 100vw; }
  .record-search-body fieldset { grid-template-columns: 1fr; }
  .record-search-drawer header,.record-search-drawer footer,.record-search-body { padding: 16px; }
  .record-list-viewport .list-view-toolbar { flex-direction: row; align-items: center; max-height: 130px; overflow-y: auto; }
  .record-list-viewport .list-view-chip { width: auto; }
}
