:root {
    --ref-navy: #1a253c;
    --ref-deep: #0f1728;
    --ref-red: #f6374f;
    --ref-red-deep: #d81f39;
    --ref-ink: #172033;
    --ref-muted: #6b7280;
    --ref-line: #d9e0eb;
    --ref-paper: #ffffff;
    --ref-field: #f7f8fb;
    --ref-success: #126235;
}

* { box-sizing: border-box; }
body.referral-page { margin: 0; color: var(--ref-ink); background: var(--ref-field); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.ref-shell { min-height: 100vh; }
.ref-wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.ref-nav { position: sticky; top: 0; z-index: 10; background: rgba(15, 23, 40, .97); border-bottom: 1px solid rgba(255,255,255,.1); }
.ref-nav-inner { min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.ref-logo { display: inline-flex; padding: 7px 10px; border-radius: 9px; background: #fff; box-shadow: 0 8px 18px rgba(0,0,0,.18); }
.ref-logo img { display: block; height: 34px; width: auto; }
.ref-nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; color: rgba(255,255,255,.78); font-size: 14px; }
.ref-nav-links a { text-decoration: none; font-weight: 650; }
.ref-nav-links a:hover { color: #fff; }
.ref-button { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; border: 0; border-radius: 8px; padding: 11px 18px; color: #fff !important; background: var(--ref-red); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; box-shadow: 0 10px 20px rgba(246,55,79,.22); }
.ref-button:hover { background: var(--ref-red-deep); }
.ref-button-outline { background: transparent; border: 1px solid rgba(255,255,255,.3); box-shadow: none; }
.ref-button-secondary { background: #fff; color: var(--ref-navy) !important; border: 1px solid var(--ref-line); box-shadow: none; }
.ref-button-secondary:hover { color: var(--ref-red-deep) !important; border-color: var(--ref-red); background: #fff; }
.ref-hero { color: #fff; background: radial-gradient(720px 400px at 92% 0%, rgba(246,55,79,.2), transparent 60%), linear-gradient(145deg, var(--ref-navy), var(--ref-deep)); padding: 92px 0; }
.ref-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 58px; }
.ref-kicker { color: var(--ref-red); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; }
.ref-hero h1 { max-width: 700px; margin: 14px 0 18px; font-size: clamp(38px, 5vw, 58px); line-height: 1.04; letter-spacing: -.04em; }
.ref-hero h1 em { color: var(--ref-red); font-style: normal; }
.ref-hero p { max-width: 58ch; color: rgba(255,255,255,.72); font-size: 17px; line-height: 1.7; }
.ref-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.ref-steps-card { padding: 28px; border: 1px solid rgba(255,255,255,.13); border-radius: 18px; background: rgba(255,255,255,.06); backdrop-filter: blur(8px); }
.ref-steps-card h2 { margin: 0 0 18px; font-size: 18px; }
.ref-steps { display: grid; gap: 15px; padding: 0; margin: 0; list-style: none; }
.ref-steps li { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.82); }
.ref-step-number { display: grid; place-items: center; min-width: 30px; height: 30px; border-radius: 50%; background: var(--ref-red); color: #fff; font-weight: 800; font-size: 13px; }
.ref-section { padding: 76px 0; }
.ref-section h2 { margin: 0 0 12px; font-size: clamp(28px, 3.4vw, 39px); letter-spacing: -.03em; }
.ref-section-lede { max-width: 65ch; margin: 0; color: var(--ref-muted); font-size: 16px; line-height: 1.65; }
.ref-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 34px; }
.ref-card { padding: 25px; border: 1px solid var(--ref-line); border-radius: 14px; background: var(--ref-paper); box-shadow: 0 4px 18px rgba(15,23,40,.04); }
.ref-card-number { color: var(--ref-red); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.ref-card h3 { margin: 12px 0 8px; font-size: 19px; }
.ref-card p { margin: 0; color: var(--ref-muted); line-height: 1.6; }
.ref-auth { display: grid; grid-template-columns: minmax(300px,.82fr) minmax(360px,1.18fr); min-height: calc(100vh - 72px); }
.ref-auth-aside { padding: 68px clamp(28px,5vw,76px); color: #fff; background: radial-gradient(520px 360px at 10% 0%, rgba(246,55,79,.18), transparent 65%), linear-gradient(145deg, var(--ref-navy), var(--ref-deep)); }
.ref-auth-aside h1 { max-width: 420px; margin: 32px 0 14px; font-size: clamp(32px,4vw,47px); line-height: 1.08; letter-spacing: -.035em; }
.ref-auth-aside p { max-width: 42ch; color: rgba(255,255,255,.7); line-height: 1.7; }
.ref-process { display: grid; gap: 12px; margin-top: 32px; max-width: 420px; }
.ref-process-item { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.06); }
.ref-process-badge { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ref-red); color: #fff; font-size: 13px; font-weight: 900; }
.ref-process-item strong { display: block; margin-bottom: 3px; font-size: 14px; color: #fff; }
.ref-process-item span { display: block; color: rgba(255,255,255,.72); font-size: 13px; line-height: 1.5; }
.ref-auth-main { display: flex; align-items: center; justify-content: center; padding: 50px 28px; background: #fff; }
.ref-form-card { width: min(100%, 500px); }
.ref-form-card h1 { margin: 0 0 9px; font-size: 34px; letter-spacing: -.03em; }
.ref-form-card > p { margin: 0 0 30px; color: var(--ref-muted); line-height: 1.6; }
.ref-field { margin-bottom: 17px; }
.ref-field label { display: block; margin-bottom: 7px; color: var(--ref-ink); font-size: 13px; font-weight: 750; }
.ref-field input, .ref-field textarea { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--ref-line); border-radius: 8px; color: var(--ref-ink); background: var(--ref-field); font: inherit; }
.ref-field textarea { min-height: 105px; resize: vertical; }
.ref-field input:focus, .ref-field textarea:focus { outline: 0; border-color: var(--ref-red); background: #fff; box-shadow: 0 0 0 3px rgba(246,55,79,.12); }
.ref-field small, .ref-help { color: var(--ref-muted); font-size: 12px; line-height: 1.5; }
.ref-check { display: flex; align-items: flex-start; gap: 9px; margin: 19px 0; color: var(--ref-muted); font-size: 13px; line-height: 1.45; }
.ref-check input { margin-top: 3px; }
.ref-alert { margin: 0 0 20px; padding: 13px 15px; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.ref-alert-success { color: var(--ref-success); background: #eefbf2; border: 1px solid #b7e6c7; }
.ref-alert-error { color: #a51d32; background: #fff1f3; border: 1px solid #ffc7cf; }
.ref-form-footer { margin-top: 24px; color: var(--ref-muted); font-size: 14px; }
.ref-form-footer a { color: var(--ref-red-deep); font-weight: 750; }
.ref-verification-help { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--ref-line); }
.ref-verification-help strong { display: block; margin-bottom: 12px; color: var(--ref-navy); font-size: 14px; }
.ref-verification-help .ref-field { margin-bottom: 10px; }
.ref-verification-help .ref-button { width: 100%; }
.ref-dashboard { padding: 42px 0 80px; }
.ref-dashboard-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 22px; margin-bottom: 24px; }
.ref-dashboard-hero-copy, .ref-share-panel, .ref-admin-panel { position: relative; }
.ref-dashboard-hero h1 { margin: 0 0 10px; font-size: clamp(32px, 4vw, 44px); letter-spacing: -.03em; }
.ref-dashboard-hero .ref-section-lede { margin-top: 0; }
.ref-dashboard-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 28px; }
.ref-dashboard-head h1 { margin: 0 0 8px; font-size: 34px; letter-spacing: -.03em; }
.ref-dashboard-head p { margin: 0; color: var(--ref-muted); }
.ref-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-bottom: 24px; }
.ref-settings-card-wide { grid-column: 1 / -1; }
.ref-readonly-field input { color: var(--ref-muted); background: #eef1f6; }
.ref-readonly-field small { display: block; margin-top: 6px; }
.ref-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.ref-panel-head h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.ref-panel-head span, .ref-panel-head p { margin: 0; color: var(--ref-muted); font-size: 13px; line-height: 1.5; }
.ref-pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ref-pill { display: inline-flex; align-items: center; min-height: 34px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--ref-line); background: var(--ref-field); color: var(--ref-ink); font-size: 12.5px; font-weight: 750; }
.ref-copy-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ref-link-box { max-width: 460px; margin-bottom: 28px; padding: 16px 18px; border-radius: 10px; color: #fff; background: var(--ref-navy); }
.ref-link-box-compact { max-width: none; margin-bottom: 0; }
.ref-link-box small { display: block; margin-bottom: 5px; color: rgba(255,255,255,.62); }
.ref-link-box code { color: #fff; font-size: 13px; word-break: break-all; }
.ref-metric-grid, .ref-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.ref-stat { padding: 20px; border: 1px solid var(--ref-line); border-radius: 12px; background: #fff; }
.ref-stat span { display: block; color: var(--ref-muted); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.ref-stat strong { display: block; margin-top: 9px; color: var(--ref-navy); font-size: 28px; }
.ref-metric-card { padding: 20px; border: 1px solid var(--ref-line); border-radius: 12px; background: #fff; }
.ref-metric-card .label { display: block; color: var(--ref-muted); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.ref-metric-card .value { display: block; margin-top: 10px; color: var(--ref-navy); font-size: 28px; font-weight: 800; }
.ref-metric-card .sub { display: block; margin-top: 6px; color: var(--ref-muted); font-size: 13px; line-height: 1.45; }
.ref-dashboard-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; margin-bottom: 24px; }
.ref-chart-card { overflow: hidden; }
.ref-chart { display: flex; align-items: flex-end; gap: 12px; min-height: 220px; padding-top: 10px; }
.ref-chart-column { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ref-chart-bars { width: 100%; height: 180px; display: flex; align-items: flex-end; justify-content: center; gap: 6px; padding: 0 4px; border-bottom: 1px solid var(--ref-line); background: linear-gradient(180deg, rgba(247,248,251,0) 0%, rgba(247,248,251,0.92) 100%); border-radius: 10px 10px 0 0; }
.ref-chart-bar { width: 22px; border-radius: 8px 8px 2px 2px; min-height: 6px; }
.ref-chart-bar-primary { background: linear-gradient(180deg, #f6374f, #d81f39); }
.ref-chart-bar-secondary { background: linear-gradient(180deg, #7c8bb2, #51607f); }
.ref-chart-bar-success { background: linear-gradient(180deg, #46b97c, #126235); }
.ref-chart-bar-muted { background: linear-gradient(180deg, #c5cfdf, #8b96ab); }
.ref-chart-label { font-size: 12px; font-weight: 800; color: var(--ref-ink); }
.ref-chart-column small { color: var(--ref-muted); font-size: 11px; text-align: center; line-height: 1.35; }
.ref-chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; color: var(--ref-muted); font-size: 12px; font-weight: 700; }
.ref-chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-primary { background: var(--ref-red); }
.dot-secondary { background: #7c8bb2; }
.dot-success { background: #126235; }
.dot-muted { background: #8b96ab; }
.ref-activity-list { display: grid; gap: 12px; }
.ref-activity-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--ref-line); }
.ref-activity-item:last-child { border-bottom: 0; padding-bottom: 0; }
.ref-activity-dot { width: 12px; height: 12px; flex: 0 0 12px; border-radius: 50%; margin-top: 5px; background: var(--ref-red); box-shadow: 0 0 0 4px rgba(246,55,79,.12); }
.ref-activity-body { min-width: 0; }
.ref-activity-body strong { display: block; margin-bottom: 4px; font-size: 14px; }
.ref-wallet-credit { color: var(--ref-success); }
.ref-wallet-debit { color: var(--ref-red-deep); }
.ref-activity-body p { margin: 0; color: var(--ref-muted); font-size: 13px; line-height: 1.5; }
.ref-activity-meta { display: block; margin-top: 6px; color: var(--ref-muted); font-size: 12px; }
.ref-snapshot-list { display: grid; grid-template-columns: 150px 1fr; gap: 10px 14px; margin: 0; }
.ref-snapshot-list dt { margin: 0; color: var(--ref-muted); font-size: 13px; font-weight: 700; }
.ref-snapshot-list dd { margin: 0; overflow-wrap: anywhere; }
.ref-mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
.ref-mini-card { padding: 14px; border: 1px solid var(--ref-line); border-radius: 10px; background: var(--ref-field); }
.ref-mini-card span { display: block; color: var(--ref-muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.ref-mini-card strong { display: block; margin-top: 6px; color: var(--ref-navy); font-size: 18px; }
.ref-progress-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 18px; }
.ref-progress-step { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--ref-line); background: var(--ref-field); color: var(--ref-muted); font-size: 12px; font-weight: 750; text-align: center; }
.ref-progress-step.is-active { background: #fff; color: var(--ref-navy); border-color: var(--ref-red); box-shadow: 0 0 0 3px rgba(246,55,79,.1); }
.ref-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.ref-form-grid .ref-field { margin-bottom: 0; }
.ref-form-grid .ref-field input, .ref-form-grid .ref-field textarea, .ref-form-grid .ref-field select { width: 100%; }
.ref-table-wrap { overflow-x: auto; border: 1px solid var(--ref-line); border-radius: 12px; background: #fff; }
.ref-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.ref-table th, .ref-table td { padding: 15px 17px; border-bottom: 1px solid var(--ref-line); text-align: left; font-size: 14px; }
.ref-table th { color: var(--ref-muted); background: var(--ref-field); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.ref-table td small { color: var(--ref-muted); }
.ref-table details summary { cursor: pointer; color: var(--ref-red-deep); font-weight: 700; }
.ref-table details pre { max-width: 360px; max-height: 220px; overflow: auto; margin: 8px 0 0; padding: 10px; border-radius: 8px; background: var(--ref-field); color: var(--ref-ink); font-size: 11px; white-space: pre-wrap; }
.ref-status { display: inline-flex; padding: 5px 8px; border-radius: 99px; color: var(--ref-navy); background: #eaf0fa; font-size: 12px; font-weight: 800; }
.ref-status-system-delivered, .ref-status-commission-available, .ref-status-paid { color: var(--ref-success); background: #eefbf2; }
.ref-status-rejected, .ref-status-cancelled { color: #a51d32; background: #fff1f3; }
.ref-status-submitted, .ref-status-qualified { color: #1d4ed8; background: #eaf2ff; }
.ref-status-pending, .ref-status-under-review { color: #854d0e; background: #fff7e6; }
.ref-status-processing { color: #1d4ed8; background: #eaf2ff; }
.ref-admin-page { min-height: 100vh; background: var(--ref-field); }
.ref-admin-nav { background: var(--ref-deep); }
.ref-admin-nav .ref-nav-inner { min-height: 62px; }
.ref-app-shell { display: flex; min-height: 100vh; }
.ref-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; width: 252px; flex-direction: column; color: rgba(255,255,255,.78); background: linear-gradient(180deg, #101a30 0%, #0b1222 100%); box-shadow: 14px 0 34px rgba(15,23,40,.08); }
.ref-sidebar-brand { display: flex; align-items: center; gap: 12px; min-height: 82px; padding: 18px 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.ref-sidebar-brand .ref-logo { flex: 0 0 auto; padding: 6px 8px; border-radius: 8px; }
.ref-sidebar-brand .ref-logo img { height: 31px; }
.ref-sidebar-brand > span { color: rgba(255,255,255,.58); font-size: 11px; font-weight: 800; letter-spacing: .08em; line-height: 1.3; text-transform: uppercase; }
.ref-sidebar-nav { overflow-y: auto; padding: 24px 13px; }
.ref-sidebar-label { display: block; margin: 0 11px 8px; color: rgba(255,255,255,.38); font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.ref-sidebar-label:not(:first-child) { margin-top: 25px; }
.ref-sidebar-link, .ref-sidebar-group summary { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 43px; padding: 10px 11px; border-radius: 8px; color: rgba(255,255,255,.72); font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.ref-sidebar-link { justify-content: flex-start; }
.ref-sidebar-link:hover, .ref-sidebar-group summary:hover, .ref-sidebar-link.is-active { color: #fff; background: rgba(255,255,255,.09); }
.ref-sidebar-link.is-active { box-shadow: inset 3px 0 0 var(--ref-red); }
.ref-sidebar-icon { display: inline-grid; place-items: center; width: 20px; color: var(--ref-red); font-size: 15px; font-weight: 900; }
.ref-sidebar-badge { min-width: 22px; padding: 3px 6px; border-radius: 999px; color: #fff; background: var(--ref-red); font-size: 10px; line-height: 1.2; text-align: center; }
.ref-sidebar-group { margin: 2px 0; }
.ref-sidebar-group summary { list-style: none; }
.ref-sidebar-group summary::-webkit-details-marker { display: none; }
.ref-sidebar-group summary > span:first-child { display: inline-flex; align-items: center; gap: 9px; }
.ref-sidebar-chevron { color: rgba(255,255,255,.4); font-size: 16px; transition: transform .15s ease; }
.ref-sidebar-group[open] .ref-sidebar-chevron { transform: rotate(180deg); }
.ref-sidebar-sublink { display: block; margin: 2px 0 2px 40px; padding: 8px 9px; border-left: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.55); font-size: 12px; text-decoration: none; }
.ref-sidebar-sublink:hover, .ref-sidebar-sublink:focus { color: #fff; border-left-color: var(--ref-red); }
.ref-sidebar-footer { margin-top: auto; padding: 16px 18px 20px; border-top: 1px solid rgba(255,255,255,.08); }
.ref-sidebar-user { display: flex; align-items: center; gap: 10px; min-width: 0; margin-bottom: 14px; }
.ref-sidebar-user > span:last-child { min-width: 0; }
.ref-sidebar-user strong, .ref-sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-sidebar-user strong { color: #fff; font-size: 12px; }
.ref-sidebar-user small { margin-top: 3px; color: rgba(255,255,255,.48); font-size: 11px; }
.ref-avatar { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 31px; border-radius: 50%; color: #fff; background: var(--ref-red); font-size: 12px; font-weight: 900; }
.ref-sidebar-signout { width: 100%; padding: 8px 10px; border: 1px solid rgba(255,255,255,.15); border-radius: 7px; color: rgba(255,255,255,.7); background: transparent; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.ref-sidebar-signout:hover { color: #fff; border-color: var(--ref-red); background: rgba(246,55,79,.12); }
.ref-app-content { width: calc(100% - 252px); min-width: 0; margin-left: 252px; }
.ref-app-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; padding: 12px clamp(20px, 3vw, 42px); border-bottom: 1px solid var(--ref-line); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.ref-app-topbar > div { display: grid; gap: 3px; min-width: 0; }
.ref-app-topbar strong { overflow: hidden; color: var(--ref-navy); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.ref-topbar-kicker { color: var(--ref-muted); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.ref-topbar-link { color: var(--ref-red-deep); font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.ref-topbar-link:hover { text-decoration: underline; }
.ref-sidebar-toggle { display: none; width: 38px; height: 36px; border: 1px solid var(--ref-line); border-radius: 7px; color: var(--ref-navy); background: #fff; font-size: 18px; cursor: pointer; }
.ref-admin-main { width: min(1440px, 100%); margin: 0 auto; padding: 36px clamp(20px, 3vw, 42px) 70px; }
.ref-app-main { min-width: 0; padding: 0 clamp(16px, 2.8vw, 40px); }
.ref-app-main > .ref-dashboard { width: min(100%, 1120px); margin-inline: auto; }
.ref-partner-shell .ref-sidebar-brand { background: rgba(246,55,79,.03); }
.ref-partner-shell .ref-sidebar { background: linear-gradient(180deg, #101a30 0%, #0b1222 100%); }
.ref-admin-main h1 { margin: 0 0 8px; font-size: 31px; letter-spacing: -.03em; }
.ref-admin-main h2 { margin: 28px 0 14px; font-size: 21px; }
.ref-admin-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; margin-bottom: 24px; }
.ref-admin-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.ref-admin-toolbar form { display: flex; flex-wrap: wrap; gap: 8px; }
.ref-admin-toolbar input, .ref-admin-toolbar select, .ref-admin-form select { min-height: 40px; padding: 8px 10px; border: 1px solid var(--ref-line); border-radius: 7px; background: #fff; }
.ref-admin-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 24px; }
.ref-admin-panel { padding: 24px; border: 1px solid var(--ref-line); border-radius: 12px; background: #fff; }
.ref-panel-intro { margin-bottom: 24px; }
.ref-pagination { margin-top: 18px; }
.ref-dashboard [id] { scroll-margin-top: 92px; }
.ref-notification-list { display: grid; gap: 12px; }
.ref-notification-card { display: flex; gap: 14px; padding: 20px; border: 1px solid var(--ref-line); border-radius: 12px; background: #fff; box-shadow: 0 4px 18px rgba(15,23,40,.03); }
.ref-notification-card.is-unread { border-color: rgba(246,55,79,.38); box-shadow: 0 5px 20px rgba(246,55,79,.08); }
.ref-notification-mark { width: 10px; height: 10px; flex: 0 0 10px; margin-top: 7px; border-radius: 50%; background: #cbd3df; }
.ref-notification-card.is-unread .ref-notification-mark { background: var(--ref-red); box-shadow: 0 0 0 4px rgba(246,55,79,.12); }
.ref-notification-body { min-width: 0; flex: 1; }
.ref-notification-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ref-notification-head h2 { margin: 0; color: var(--ref-navy); font-size: 17px; }
.ref-notification-head time { flex: 0 0 auto; color: var(--ref-muted); font-size: 11px; }
.ref-notification-body > p { margin: 8px 0 0; color: var(--ref-muted); font-size: 14px; line-height: 1.6; }
.ref-notification-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.ref-notification-actions .ref-button { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.ref-link-button { padding: 0; border: 0; color: var(--ref-red-deep); background: transparent; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.ref-link-button:hover { text-decoration: underline; }
.ref-admin-panel dl { display: grid; grid-template-columns: 145px 1fr; gap: 10px 14px; margin: 0; }
.ref-admin-panel dt { color: var(--ref-muted); font-size: 13px; font-weight: 700; }
.ref-admin-panel dd { margin: 0; overflow-wrap: anywhere; }
.ref-admin-panel ul { margin: 0; padding-left: 18px; color: var(--ref-ink); }
.ref-admin-panel li + li { margin-top: 8px; }
.ref-admin-form .ref-field { margin-bottom: 14px; }
.ref-admin-form .ref-button { width: 100%; }
.ref-withdrawal-form { display: block; }
.ref-withdrawal-grid { display: grid; grid-template-columns: minmax(140px, .9fr) minmax(160px, 1fr) minmax(180px, 1.2fr) auto; gap: 10px; align-items: end; }
.ref-withdrawal-field { margin-bottom: 0; }
.ref-withdrawal-field label { font-size: 12px; }
.ref-withdrawal-field input, .ref-withdrawal-field select { width: 100%; min-height: 40px; }
.ref-withdrawal-wide { min-width: 0; }
.ref-withdrawal-actions { display: flex; align-items: end; }
.ref-withdrawal-actions .ref-button { min-height: 40px; padding-inline: 16px; }
.ref-alert ul { margin: 8px 0 0; padding-left: 18px; }
.ref-alert li + li { margin-top: 5px; }
@media (max-width: 900px) {
    .ref-sidebar { width: 232px; }
    .ref-app-content { width: calc(100% - 232px); margin-left: 232px; }
    .ref-admin-main { padding-inline: 24px; }
    .ref-dashboard-hero,
    .ref-dashboard-grid,
    .ref-settings-grid,
    .ref-admin-hero,
    .ref-admin-grid { grid-template-columns: 1fr; }
    .ref-progress-bar { grid-template-columns: 1fr 1fr; }
    .ref-chart { flex-direction: column; align-items: stretch; }
    .ref-chart-column { width: 100%; }
    .ref-chart-bars { min-height: 160px; }
    .ref-withdrawal-grid { grid-template-columns: 1fr 1fr; }
    .ref-withdrawal-wide, .ref-withdrawal-actions { grid-column: 1 / -1; }
}
@media (max-width: 800px) {
    .ref-sidebar { width: min(280px, 86vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 18px 0 40px rgba(15,23,40,.22); }
    .ref-sidebar.is-open { transform: translateX(0); }
    .ref-app-content { width: 100%; margin-left: 0; }
    .ref-app-topbar { padding-inline: 16px; }
    .ref-sidebar-toggle { display: inline-grid; place-items: center; }
    .ref-app-topbar > div { flex: 1; }
    .ref-admin-main { padding: 28px 16px 55px; }
    .ref-hero-grid, .ref-auth { grid-template-columns: 1fr; }
    .ref-hero { padding: 66px 0; }
    .ref-auth-aside { padding: 38px 24px; }
    .ref-grid-3 { grid-template-columns: 1fr; }
    .ref-stats { grid-template-columns: repeat(2, 1fr); }
    .ref-process { max-width: none; }
    .ref-form-grid { grid-template-columns: 1fr; }
    .ref-withdrawal-grid { grid-template-columns: 1fr; }
    .ref-withdrawal-wide, .ref-withdrawal-actions { grid-column: auto; }
    .ref-withdrawal-actions .ref-button { width: 100%; }
    .ref-chart { gap: 16px; }
}
@media (max-width: 540px) {
    .ref-wrap { width: min(100% - 28px, 1120px); }
    .ref-nav-inner { min-height: 62px; }
    .ref-logo img { height: 28px; }
    .ref-nav-links { gap: 10px; font-size: 12px; }
    .ref-nav-links a:not(.ref-button) { display: none; }
    .ref-topbar-link { display: none; }
    .ref-hero h1 { font-size: 38px; }
    .ref-auth-main { padding: 38px 20px; }
    .ref-dashboard-head { display: block; }
    .ref-stats { grid-template-columns: 1fr 1fr; }
    .ref-metric-grid { grid-template-columns: 1fr 1fr; }
    .ref-snapshot-list { grid-template-columns: 1fr; }
    .ref-mini-grid { grid-template-columns: 1fr; }
}
