.header { background: #075069 !important; box-shadow: 0 2px 12px rgba(11, 54, 70, .16); }
.partner-portal { min-height: 760px; padding: 122px 0 70px; color: #263c45; background: #f4f7f8; }
.portal-container { width: 1200px; margin: 0 auto; }
.prototype-notice { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; padding: 11px 16px; border: 1px solid #e7d8ad; border-radius: 6px; color: #79632f; background: #fffaf0; font-size: 13px; }
.prototype-notice[hidden] { display: none; }
.prototype-notice strong { padding: 3px 8px; border-radius: 3px; color: #fff; background: #b98723; font-size: 11px; }
.portal-title-row, .admin-page-title { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.portal-kicker { margin: 0 0 6px; color: #087489; font-size: 11px; letter-spacing: 2px; }
.portal-title-row h1, .admin-page-title h1 { margin: 0 0 8px; color: #173b48; font-size: 32px; }
.portal-title-row p:last-child, .admin-page-title p:last-child { margin: 0; color: #7b8a90; font-size: 13px; }
.portal-actions { display: flex; align-items: center; gap: 10px; }
.primary-action, .secondary-action, .user-action, .logout-action { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 38px; padding: 0 17px; border: 0; border-radius: 5px; font-size: 13px; line-height: 1.4; text-decoration: none; cursor: pointer; }
.primary-action { color: #fff; background: #087489; }
.secondary-action { border: 1px solid #cad7db; color: #45616a; background: #fff; }
.user-action { color: #31515c; background: #e9f1f3; }
.logout-action { padding: 0 8px; color: #79868c; background: transparent; }
.summary-grid { display: grid; gap: 18px; margin-bottom: 24px; }
.records-summary { grid-template-columns: repeat(3, 1fr); }
.summary-grid article, .summary-grid > button { position: relative; min-height: 130px; box-sizing: border-box; padding: 24px 26px; border: 1px solid #e3e9eb; border-radius: 9px; color: #36535d; background: #fff; box-shadow: 0 8px 24px rgba(30, 65, 76, .05); text-align: left; }
.summary-grid span { display: block; color: #738288; font-size: 13px; }
.summary-grid span i { display: inline-block; width: 15px; height: 15px; border-radius: 50%; color: #fff; background: #9ba8ad; font-size: 10px; font-style: normal; line-height: 15px; text-align: center; }
.summary-grid article > span { position: relative; }
.reward-help { cursor: help; }
.reward-tooltip { visibility: hidden; position: absolute; z-index: 2; bottom: calc(100% + 8px); left: 76px; width: max-content; padding: 6px 9px; border-radius: 4px; color: #fff; background: #31515c; box-shadow: 0 5px 14px rgba(18, 54, 66, .18); font-size: 11px; font-style: normal; line-height: 1.4; opacity: 0; transition: opacity .15s ease; }
.reward-tooltip::after { position: absolute; top: 100%; left: 12px; border: 5px solid transparent; border-top-color: #31515c; content: ''; }
.reward-help:hover + .reward-tooltip, .reward-help:focus + .reward-tooltip { visibility: visible; opacity: 1; }
.summary-grid strong { display: block; margin-top: 10px; color: #153f4d; font-size: 31px; }
.summary-grid strong small { color: #8a989d; font-size: 20px; font-weight: normal; }
.summary-grid p { margin: 8px 0 0; color: #9aa5a9; font-size: 11px; }
.summary-grid .available-reward { color: #fff; background: linear-gradient(135deg, #087489, #075069); }
.summary-grid .available-reward span, .summary-grid .available-reward strong { color: #fff; }
.summary-grid .available-reward button { position: absolute; right: 24px; bottom: 25px; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 4px; color: #fff; background: transparent; font-size: 12px; line-height: 1.4; cursor: pointer; }
.summary-grid .available-reward button.is-disabled { opacity: .55; cursor: not-allowed; }
.portal-panel { overflow: hidden; border: 1px solid #e2e8ea; border-radius: 10px; background: #fff; box-shadow: 0 8px 25px rgba(30, 65, 76, .04); }
.record-tabs { display: flex; gap: 34px; padding: 0 24px; border-bottom: 1px solid #e8edef; background: #fbfcfc; }
.record-tabs button { position: relative; min-width: 94px; height: 58px; padding: 0; border: 0; color: #71838a; background: transparent; font-size: 14px; cursor: pointer; }
.record-tabs button::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: transparent; content: ''; }
.record-tabs button.active { color: #087489; font-weight: bold; }
.record-tabs button.active::after { background: #087489; }
.record-tabs button span { display: inline-block; min-width: 18px; margin-left: 6px; padding: 1px 5px; border-radius: 9px; color: #84949a; background: #e9eef0; font-size: 10px; font-weight: normal; line-height: 16px; }
.record-tabs button.active span { color: #087489; background: #e3f1f3; }
.record-tab-panel[hidden] { display: none; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; border-bottom: 1px solid #e8edef; }
.panel-heading h2 { margin: 0 0 5px; color: #23434e; font-size: 18px; }
.panel-heading p { margin: 0; color: #919da1; font-size: 11px; }
.record-filters { display: flex; gap: 10px; }
.record-filters input, .record-filters select, .compact-filter select, .report-filters input, .report-filters select { height: 36px; box-sizing: border-box; padding: 0 11px; border: 1px solid #d8e0e3; border-radius: 4px; color: #415a63; background: #fff; font-size: 12px; outline: 0; }
.record-filters input { width: 240px; }
.record-filters select:first-child { width: 112px; }
.portal-table-wrap { overflow-x: auto; }
.portal-table { width: 100%; min-width: 850px; border-collapse: collapse; font-size: 13px; }
.portal-table th, .portal-table td { padding: 10px 18px; border-bottom: 1px solid #edf0f1; line-height: 1.5; text-align: left; vertical-align: middle; }
.portal-table thead th { color: #6b7e85; background: #fafcfc; font-weight: normal; white-space: nowrap; }
.portal-table tbody tr:hover { background: #fbfdfd; }
.portal-table td strong, .portal-table td small, .portal-table td font { display: block;  font-size: 12px;}
.portal-table td small, .portal-table td font { margin-top: 4px; color: #97a3a7; font-size: 12px; }
.portal-table .money { color: #a56a12; font-size: 15px; }
.portal-table .negative-money { color: #ad4d4d; font-size: 15px; }
.referral-detail-table { min-width: 1180px; }
.reward-ledger-table { min-width: 1000px; }
.date-cell { color: #687b82; white-space: nowrap; }
.record-pagination { display: flex; min-height: 58px; box-sizing: border-box; align-items: center; justify-content: space-between; padding: 10px 20px; border-top: 1px solid #edf0f1; color: #7a8b91; font-size: 12px; }
.pagination-controls { display: flex; align-items: center; gap: 6px; }
.pagination-pages { display: flex; gap: 6px; }
.pagination-controls button { min-width: 34px; height: 32px; padding: 0 10px; border: 1px solid #d9e1e4; border-radius: 4px; color: #526a73; background: #fff; font-size: 12px; cursor: pointer; }
.pagination-controls button[data-page] { padding: 0; }
.pagination-controls button.active { border-color: #087489; color: #fff; background: #087489; }
.pagination-controls button:disabled { color: #b4bec2; background: #f6f8f9; cursor: not-allowed; }
.type-tag { display: inline-block; padding: 4px 9px; border-radius: 3px; font-size: 11px; white-space: nowrap; }
.type-tag.cooperation { color: #356aa2; background: #e8f1fa; }
.type-tag.referral { color: #7d5a19; background: #fff3d9; }
.status-tag { display: inline-block; box-sizing: border-box; padding: 4px 9px 3px; border: 1px solid transparent; border-radius: 4px; font-size: 11px; line-height: 16px; white-space: nowrap; }
.status-tag.pending { color: #409eff; background: #ecf5ff; border-color: #d9ecff; }
.status-tag.success { color: #f56c6c; background: #fef0f0; border-color: #fde2e2; }
.status-tag.failed { color: #909399; background: #f4f4f5; border-color: #e9e9eb; }
.status-tag.processing { color: #e6a23c; background: #fdf6ec; border-color: #faecd8; }
.status-tag.paid { color: #67c23a; background: #f0f9eb; border-color: #e1f3d8; }
.failure-text { color: #b65a5a !important; }
.empty-state { display: none; padding: 55px; color: #9aa6aa; font-size: 14px; line-height: 1.5; text-align: center; }
.withdraw-amount { margin: 18px 0 22px; padding: 14px; border-radius: 5px; color: #65777e; background: #f4f8f9; font-size: 13px; line-height: 1.5; text-align: center; }
.withdraw-amount strong { margin-left: 8px; color: #a66b11; font-size: 22px; }
.form-hint { color: #9aa5a9; font-size: 11px; line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

.admin-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; padding-top: 76px; color: #29434d; background: #f4f7f8; }
.admin-sidebar { display: flex; position: sticky; top: 76px; height: calc(100vh - 76px); box-sizing: border-box; flex-direction: column; padding: 26px 18px; border-right: 1px solid #dfe7e9; background: #fff; }
.admin-brand { display: flex; align-items: center; gap: 11px; margin: 0 8px 32px; color: #244752; text-decoration: none; }
.admin-brand > span { display: grid; width: 37px; height: 37px; border-radius: 8px; color: #fff; background: #087489; font-size: 21px; font-weight: bold; place-items: center; }
.admin-brand strong { font-size: 15px; }
.admin-brand small { display: block; margin-top: 3px; color: #93a0a4; font-size: 10px; font-weight: normal; }
.admin-sidebar nav a { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; padding: 12px 13px; border-radius: 5px; color: #5b7179; text-decoration: none; }
.admin-sidebar nav a.active { color: #087489; background: #eaf4f5; font-weight: bold; }
.admin-sidebar nav a i { width: 18px; font-style: normal; text-align: center; }
.admin-sidebar nav a span { margin-left: auto; padding: 1px 7px; border-radius: 8px; color: #fff; background: #d18a25; font-size: 10px; }
.admin-sidebar-foot { margin-top: auto; padding: 15px 8px 0; border-top: 1px solid #edf0f1; }
.admin-sidebar-foot p { margin: 0 0 4px; color: #415d66; font-size: 13px; }
.admin-sidebar-foot .logout-action { min-height: 28px; padding: 0; font-size: 11px; }
.admin-content { min-width: 0; padding: 30px 34px 60px; }
.admin-view { display: none; }
body[data-admin-view="todo"] .admin-view[data-admin-section="todo"], body[data-admin-view="report"] .admin-view[data-admin-section="report"] { display: block; }
body[data-admin-view="todo"] [data-admin-nav="todo"], body[data-admin-view="report"] [data-admin-nav="report"] { color: #087489; background: #eaf4f5; font-weight: bold; }
.admin-page-title { align-items: center; }
.admin-page-title .primary-action { border: 0; cursor: pointer; }
.admin-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-summary > button { cursor: pointer; }
.admin-summary > button:last-child strong { color: #d98700; }
.admin-summary strong { position: static; }
.compact-filter { display: flex; align-items: center; gap: 9px; color: #6f8188; font-size: 12px; }
.todo-panel-heading { padding: 20px 24px 12px; border-bottom: 0; }
.todo-panel-heading h2 { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.todo-panel-heading h2 small { color: #98a4a9; font-size: 12px; font-weight: normal; }
.todo-search input { width: 300px; height: 36px; box-sizing: border-box; padding: 0 12px; border: 1px solid #d8e0e3; border-radius: 4px; color: #415a63; background: #fff; font-size: 12px; outline: 0; }
.todo-status-tabs { display: flex; gap: 12px; padding: 0 24px 12px; border-bottom: 1px solid #e8edef; }
.todo-status-tabs button { min-width: 72px; height: 34px; padding: 0 14px; border: 0; border-radius: 18px; color: #617780; background: transparent; font-size: 13px; cursor: pointer; }
.todo-status-tabs button.active { color: #087489; background: #eaf6f8; font-weight: bold; }
.admin-table { min-width: 1120px; }
.admin-table th, .admin-table td { padding: 14px 13px; }
#todo-table { min-width: 2140px; }
#todo-table th:nth-child(1), #todo-table td:nth-child(1) { min-width: 155px; }
#todo-table th:nth-child(2), #todo-table td:nth-child(2) { min-width: 160px; }
#todo-table th:nth-child(3), #todo-table td:nth-child(3) { min-width: 100px; }
#todo-table th:nth-child(4), #todo-table td:nth-child(4) { min-width: 125px; }
#todo-table th:nth-child(5), #todo-table td:nth-child(5) { min-width: 190px; }
#todo-table th:nth-child(6), #todo-table td:nth-child(6) { min-width: 220px; }
#todo-table th:nth-child(7), #todo-table td:nth-child(7) { min-width: 100px; }
#todo-table th:nth-child(8), #todo-table td:nth-child(8) { min-width: 220px; }
#todo-table th:nth-child(9), #todo-table td:nth-child(9) { min-width: 110px; }
#todo-table th:nth-child(10), #todo-table td:nth-child(10) { min-width: 100px; }
#todo-table th:nth-child(11), #todo-table td:nth-child(11) { min-width: 230px; }
#todo-table th:nth-child(12), #todo-table td:nth-child(12) { min-width: 90px; }
#todo-table th:nth-child(13), #todo-table td:nth-child(13) { min-width: 150px; }
#todo-table th:nth-child(1),
#todo-table td:nth-child(1),
#todo-table th:nth-child(3),
#todo-table td:nth-child(3),
#todo-table th:nth-child(4),
#todo-table td:nth-child(4),
#todo-table th:nth-child(7),
#todo-table td:nth-child(7),
#todo-table th:nth-child(9),
#todo-table td:nth-child(9),
#todo-table th:nth-child(10),
#todo-table td:nth-child(10),
#todo-table th:nth-child(11),
#todo-table td:nth-child(11),
#todo-table th:nth-child(12),
#todo-table td:nth-child(12),
#todo-table th:nth-child(13),
#todo-table td:nth-child(13) { white-space: nowrap; }
#todo-table th:last-child, #todo-table td:last-child, #report-table th:last-child, #report-table td:last-child { position: sticky; right: 0; z-index: 1; background: #fff; box-shadow: -9px 0 12px -12px rgba(23, 59, 72, .55); }
#todo-table th:last-child, #todo-table td:last-child { min-width: 72px; text-align: center; vertical-align: middle; }
#report-table th:last-child, #report-table td:last-child { width: 190px; box-sizing: border-box; padding-right: 8px; padding-left: 8px; text-align: center; vertical-align: middle; }
#todo-table thead th:last-child, #report-table thead th:last-child { z-index: 2; background: #fafcfc; }
#todo-table tbody tr:hover td:last-child, #report-table tbody tr:hover td:last-child { background: #fbfdfd; }
.table-action { padding: 6px 11px; border: 1px solid #b9d2d7; border-radius: 4px; color: #087489; background: #fff; font-size: 11px; cursor: pointer; white-space: nowrap; }
#report-table .table-actions { display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
#report-table .table-action { padding-right: 6px; padding-left: 6px; }
.report-filters { display: grid; grid-template-columns: 1.5fr 1fr 1fr auto; gap: 12px; margin-bottom: 20px; padding: 18px; border: 1px solid #e2e8ea; border-radius: 8px; background: #fff; }
.report-filters label > span { display: block; margin-bottom: 6px; color: #75878e; font-size: 11px; }
.report-filters input, .report-filters select { width: 100%; }
.report-filter-actions { display: flex; align-items: flex-end; gap: 8px; white-space: nowrap; }
.report-filter-actions .primary-action, .report-filter-actions .secondary-action { min-height: 36px; }
.report-search-action { align-self: end; width: 80px; order: 4; }
.report-summary { grid-template-columns: repeat(4, 1fr); }
.report-summary article { min-height: 98px; padding: 20px 22px; }
.report-summary strong { font-size: 27px; }
.todo-detail-table { min-width: 1500px; }
.report-panel .admin-table { min-width: 2100px; }
.report-detail-table th:nth-child(2), .report-detail-table td:nth-child(2), .report-detail-table th:nth-child(7), .report-detail-table td:nth-child(7) { display: none; }
.follow-up-drawer { display: none; position: fixed; z-index: 11000; inset: 0; }
.follow-up-drawer.open { display: block; }
.drawer-mask { position: absolute; inset: 0; background: rgba(7, 34, 44, .45); }
.follow-up-drawer > section { position: absolute; top: 0; right: 0; width: 560px; max-width: 92%; height: 100%; overflow-y: auto; box-sizing: border-box; background: #fff; box-shadow: -12px 0 42px rgba(4, 32, 43, .18); }
.follow-up-drawer header { display: flex; position: relative; align-items: flex-start; justify-content: space-between; padding: 26px 30px 20px; border-bottom: 1px solid #e8edef; }
.follow-up-drawer header h2 { margin: 4px 0; color: #244650; font-size: 22px; }
.follow-up-drawer header span { display: block; color: #92a0a5; font-size: 11px; line-height: 16px; }
.drawer-body { padding: 25px 30px 40px; }
.drawer-body h3, .contact-groups h3 { margin: 0 0 13px; color: #31535e; font-size: 14px; }
.drawer-body dl { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 0 0 28px; }
.drawer-body dl div { padding: 11px 12px; border-radius: 5px; background: #f6f8f9; }
.drawer-body dt { margin-bottom: 4px; color: #95a1a5; font-size: 10px; }
.drawer-body dd { margin: 0; color: #405b65; font-size: 12px; }
.drawer-body form { padding-top: 22px; border-top: 6px solid #f4f7f8; }
.drawer-body form > label { display: block; margin-bottom: 15px; color: #5f747c; font-size: 12px; }
.drawer-body form > label > span { display: block; margin-bottom: 6px; }
.drawer-body .login-submit { display: block; }
.follow-section-title, .follow-field-title { display: flex !important; align-items: center; justify-content: space-between; width: 100%; box-sizing: border-box; }
.follow-section-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.follow-section-actions .payment-status-sync { flex: 0 0 auto; }
.follow-section-title .field-error, .follow-field-title .field-error { margin-left: 12px; font-size: 11px; font-weight: 400; text-align: right; }
.drawer-body select, .drawer-body input, .drawer-body textarea { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid #d7e0e3; border-radius: 4px; background: #fff; }
.drawer-body [hidden] { display: none !important; }
.drawer-body fieldset { margin: 0 0 15px; padding: 0; border: 0; color: #5f747c; font-size: 12px; }
.drawer-body fieldset legend { margin-bottom: 6px; }
.reward-options > div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.reward-options label { display: block; cursor: pointer; }
.reward-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.reward-options > div span { display: block; padding: 9px 4px; border: 1px solid #d7e0e3; border-radius: 4px; text-align: center; }
.reward-options > div input:checked + span { border-color: #087489; color: #087489; background: #eef8fa; box-shadow: 0 0 0 1px #087489; }
.drawer-body :disabled { cursor: not-allowed; opacity: .65; }
.portal-message { position: fixed; z-index: 12000; top: 24px; left: 50%; min-width: 260px; max-width: min(520px, calc(100% - 32px)); padding: 12px 18px; transform: translateX(-50%); border-radius: 5px; color: #fff; background: #31535e; box-shadow: 0 8px 24px rgba(4, 32, 43, .2); text-align: center; font-size: 13px; }
.portal-message[hidden] { display: none; }
.portal-message.success { background: #167a62; }
.portal-message.error { background: #b84f4f; }
.contact-dialog { width: 800px; }
.follow-up-history-dialog { position: relative; z-index: 1; width: 680px; max-width: 100%; max-height: 88vh; overflow-y: auto; box-sizing: border-box; padding: 34px 38px; border-radius: 12px; background: #fff; box-shadow: 0 24px 70px rgba(6, 41, 53, .3); }
.follow-up-history-dialog h2 { margin: 7px 0 8px; color: #153a47; font-size: 27px; }
.follow-up-history-list { position: relative; margin-top: 24px; padding-left: 22px; }
.follow-up-history-list::before { position: absolute; top: 8px; bottom: 8px; left: 6px; width: 1px; background: #d9e5e8; content: ''; }
.follow-up-history-item { position: relative; margin-bottom: 18px; padding: 16px 18px; border: 1px solid #e1e9eb; border-radius: 7px; background: #fbfcfc; }
.follow-up-history-item:last-child { margin-bottom: 0; }
.follow-up-history-dot { position: absolute; top: 20px; left: -22px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #087489; box-shadow: 0 0 0 1px #8ab8c1; }
.follow-up-history-item header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.follow-up-history-item header strong { color: #284b57; font-size: 14px; }
.follow-up-history-item header time { color: #8b9a9f; font-size: 11px; }
.follow-up-history-operator { margin: 7px 0 10px; color: #819096; font-size: 11px; }
.follow-up-history-item p { margin: 7px 0 0; color: #49626b; font-size: 12px; line-height: 1.6; }
.follow-up-history-item p span { display: inline-block; min-width: 72px; color: #8a999e; }
.follow-up-status-change { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.follow-up-status-change i { flex: 0 0 auto; color: #9aabad; font-family: Arial, sans-serif; font-size: 22px; font-style: normal; line-height: 1; }
.follow-up-history-loading, .follow-up-history-error { margin-top: 24px; padding: 18px; border-radius: 6px; color: #75878e; background: #f4f7f8; text-align: center; font-size: 12px; }
.follow-up-history-error { color: #bd4b4b; background: #fff1f1; }
.follow-up-history-empty { margin-top: 24px; }
.admin-referral-dialog { position: relative; z-index: 1; width: 760px; max-width: 100%; max-height: 92vh; overflow-y: auto; box-sizing: border-box; padding: 34px 38px; border-radius: 12px; background: #fff; box-shadow: 0 24px 70px rgba(6, 41, 53, .3); }
.admin-referral-dialog h2 { margin: 7px 0 8px; color: #153a47; font-size: 27px; }
.customer-referral-dialog { width: 700px; }
.modal-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 20px; }
.modal-form-grid label { color: #526a73; font-size: 12px; }
.modal-form-grid label > span { display: block; margin-bottom: 6px; }
.modal-form-grid .field-label { display: flex; align-items: center; }
.required-mark { margin-right: 3px; color: #d94f4f; font-style: normal; }
.field-error { margin-left: auto; color: #d94f4f; font-style: normal; }
.modal-form-grid input, .modal-form-grid select, .modal-form-grid textarea { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid #d7e0e3; border-radius: 4px; color: #36515b; background: #fff; }
.modal-form-grid input:focus, .modal-form-grid select:focus, .modal-form-grid textarea:focus { border-color: #087489; outline: 0; box-shadow: 0 0 0 3px rgba(8, 116, 137, .08); }
.admin-shell input:not([type="radio"]):not([type="checkbox"]):focus, .admin-shell select:focus, .admin-shell textarea:focus, .partner-modal input:not([type="radio"]):not([type="checkbox"]):focus, .partner-modal select:focus, .partner-modal textarea:focus, .follow-up-drawer input:not([type="radio"]):not([type="checkbox"]):focus, .follow-up-drawer select:focus, .follow-up-drawer textarea:focus { border-color: #087489; outline: 0; box-shadow: 0 0 0 3px rgba(8, 116, 137, .08); }
.modal-form-grid .full { grid-column: 1 / -1; }
.assignment-preview { padding: 10px 12px; border-radius: 4px; color: #637981; background: #f1f7f8; font-size: 12px; }
.assignment-preview strong { color: #087489; }
.contact-groups { margin-top: 24px; }
.contact-groups article + article { margin-top: 26px; }
.contact-detail-table { width: 100%; border-collapse: collapse; table-layout: fixed; color: #4b5157; font-size: 14px; }
.contact-detail-table th, .contact-detail-table td { padding: 12px 13px; border: 1px solid #e1e6ec; text-align: left; overflow-wrap: anywhere; }
.contact-detail-table th { width: 76px; color: #60656c; background: #f3f5f8; font-weight: 600; }
.contact-detail-table td { background: #fff; font-weight: 400; }

@media screen and (min-width: 769px) and (max-width: 1200px) {
    .portal-container { width: auto; margin: 0 20px; }
    .admin-content { padding: 26px 22px 50px; }
    .report-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 14px; }
    .admin-page-title h1 { font-size: 28px; }
}

@media screen and (max-width: 768px) {
    .partner-portal { padding: 92px 0 40px; }
    .portal-container { width: auto; margin: 0 12px; }
    .portal-title-row, .admin-page-title { align-items: flex-start; flex-direction: column; gap: 16px; }
    .portal-title-row h1, .admin-page-title h1 { font-size: 26px; }
    .portal-actions { width: 100%; flex-wrap: wrap; }
    .records-summary, .admin-summary, .report-summary { grid-template-columns: 1fr; }
    .summary-grid article, .summary-grid > button { min-height: 112px; }
    .panel-heading { align-items: flex-start; flex-direction: column; gap: 14px; padding: 17px 15px; }
    .record-tabs { gap: 0; justify-content: space-between; padding: 0 10px; }
    .record-tabs button { min-width: 0; height: 52px; padding: 0 7px; font-size: 12px; }
    .record-tabs button span { margin-left: 3px; }
    .record-filters { width: 100%; flex-direction: column; }
    .record-filters label { display: block; width: 100%; font-size: 0; line-height: 0; }
    .record-filters input, .record-filters select { width: 100%; }
    .portal-table th, .portal-table td { padding: 10px 12px; }
    .record-pagination { align-items: flex-start; flex-direction: column; gap: 10px; padding: 12px 15px; }
    .pagination-controls { width: 100%; justify-content: flex-end; }
    .admin-shell { display: block; padding-top: 78px; }
    .admin-sidebar { position: static; width: auto; height: auto; padding: 8px 12px; border-right: 0; border-bottom: 1px solid #dfe7e9; }
    .admin-brand { display: none; }
    .admin-sidebar nav { display: flex; gap: 8px; }
    .admin-sidebar nav a { min-width: 0; min-height: 44px; flex: 1; justify-content: center; margin: 0; padding: 0 12px; font-size: 14px; line-height: 1; white-space: nowrap; }
    .admin-sidebar nav a i { width: auto; font-size: 15px; line-height: 1; }
    .admin-sidebar nav a span { flex: none; margin-left: 2px; }
    .admin-sidebar-foot { display: none; }
    .admin-content { padding: 18px 12px 45px; }
    .admin-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .admin-summary > button { min-height: 110px; padding: 18px; }
    .todo-search { display: block; width: 100%; font-size: 0; line-height: 0; }
    .todo-search input { width: 100%; }
    .todo-status-tabs { gap: 0; justify-content: space-between; overflow: visible; padding: 0 10px 10px; }
    .todo-status-tabs button { min-width: 0; flex: 1; padding: 0 5px; font-size: 12px; outline: 0; white-space: nowrap; }
    .todo-status-tabs button:focus-visible { box-shadow: 0 0 0 2px rgba(8, 116, 137, .18); }
    #todo-empty { padding: 32px 15px; white-space: nowrap; }
    #todo-pagination { min-height: 54px; align-items: center; flex-direction: row; gap: 8px; padding: 10px 14px; }
    #todo-pagination .pagination-controls { width: auto; }
    #report-table th:last-child, #report-table td:last-child { position: static; right: auto; z-index: auto; box-shadow: none; }
    .report-filters { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; padding: 14px; }
    .report-filters label { font-size: 0; line-height: 0; }
    .report-filters label > span { line-height: 16px; }
    .report-filter-actions .primary-action, .report-filter-actions .secondary-action { padding: 0 10px; font-size: 12px; }
    .report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .contact-groups { grid-template-columns: 1fr; }
    .contact-dialog { max-height: 90vh; overflow-y: auto; }
    .contact-detail-table, .contact-detail-table tbody { display: block; }
    .contact-detail-table tr { display: grid; grid-template-columns: 92px minmax(0, 1fr); }
    .contact-detail-table th, .contact-detail-table td { width: auto; min-width: 0; box-sizing: border-box; padding: 10px 12px; }
    .contact-detail-table td { margin-left: -1px; overflow-wrap: break-word; }
    .contact-detail-table tr > :nth-child(n + 3), .contact-detail-table tr + tr { margin-top: -1px; }
    .contact-detail-table td[colspan] { grid-column: auto; }
    .admin-referral-dialog { padding: 28px 20px; }
    .modal-form-grid { grid-template-columns: 1fr; }
    .modal-form-grid .full { grid-column: auto; }
}
