:root {
    --bg: #ffffff;
    --card: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --line: #d6d3d1;
    --accent: #1353a5;
    --accent-2: #0f4590;
    --warn: #b91c1c;
    --accrual: #166534;
    --redemption: #b45309;
    --action-blue: #1353a5;
    --action-blue-hover: #0f4590;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--ink);
    background: var(--bg);
    display: block;
}

.shell {
    width: 90vw;
    max-width: none;
    margin: 20px auto 30px;
    display: grid;
    gap: 14px;
}

.shell > * {
    min-width: 0;
}

.top-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.top-actions .quick-lookup,
.top-actions form.quick-lookup {
    margin-left: auto;
}

.quick-lookup {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.quick-lookup-label {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: #374151;
}

.quick-lookup select,
.quick-lookup input {
    height: 36px;
}

.quick-lookup select {
    width: 112px;
}

.quick-lookup input {
    width: min(360px, 48vw);
}

.quick-lookup button {
    height: 36px;
    border-radius: 8px;
}

.shell-landing {
    min-height: calc(75vh - 30px);
    align-content: start;
}

.shell-report {
    align-content: start;
    width: 90vw;
    max-width: none;
    margin-inline: auto;
}

.card {
    background: var(--card);
    border: 1px solid #d7dbe3;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.hero {
    position: relative;
}

.hero.hero-report,
.hero.hero-dashboard,
.hero:has(> .help-guide-btn),
.hero:has(> .banner-right) {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.hero-copy {
    min-width: 0;
    flex: 1;
}

.banner-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

.banner-anker-logo {
    display: block;
    width: auto;
    height: 48px;
    max-width: 200px;
    max-height: 48px;
    object-fit: contain;
}

.banner-property-logo {
    display: block;
    width: auto;
    height: 48px;
    max-width: 160px;
    max-height: 48px;
    object-fit: contain;
}

.banner-property-logo.hidden,
.banner-property-logo[hidden] {
    display: none !important;
}

/* Property logo left of Ankerdata; Help stays on the right */
.banner-right .banner-property-logo {
    order: 0;
}

.banner-right .banner-anker-logo {
    order: 1;
}

.banner-right .ai-assist-btn {
    order: 2;
}

.banner-right .help-guide-btn {
    order: 3;
}

.hero .help-guide-btn {
    flex-shrink: 0;
    margin: 0;
}

.hero h1 {
    margin: 0;
    font-size: 2.6rem;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 1rem;
}

.hero-report h1 {
    font-size: 1.9rem;
    letter-spacing: -0.01em;
}

.hero-report p {
    font-size: 0.96rem;
}

.nav-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: stretch;
}

.nav-tile {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    text-align: left;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    padding: 14px 14px 16px;
    min-height: 138px;
    cursor: pointer;
    color: #0f172a;
    position: relative;
}

button.nav-tile {
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: #eff4ff;
    font-size: 16px;
    margin-bottom: 8px;
}

.nav-tile h2 {
    margin: 0;
    font-size: 1.08rem;
}

.nav-tile p {
    margin: 6px 0 0;
    color: #4b5563;
    font-size: 0.94rem;
}

.nav-tile:hover {
    border-color: #9ca3af;
}

.nav-tile-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 1120px) {
    .shell-report {
        width: calc(100vw - 24px);
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }
}

.profile-grid h2 {
    margin: 0 0 10px;
    color: #0f3c96;
}

.detail-table,
.membership-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table th,
.detail-table td,
.membership-table th,
.membership-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 9px 8px;
    font-size: 0.9rem;
}

.detail-table th {
    width: 130px;
    color: #6b7280;
    text-align: left;
    font-weight: 700;
}

.membership-table th {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.75rem;
    color: #0f3c96;
    background: #f7f8fb;
}

.top-actions .secondary {
    height: 36px;
    border-radius: 8px;
    padding: 0 12px;
}

.compact-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.controls-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
}

.report-actions {
    display: inline-flex;
    gap: 8px;
    justify-self: end;
    align-self: end;
}

.action-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

.action-button:hover,
.action-button:focus-visible {
    background: #e5e7eb;
    color: #111827;
    border-color: #9ca3af;
}

.inline-action {
    align-self: end;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1;
    background: #0f3c96;
    color: #ffffff;
    border: 1px solid transparent;
    transition: background 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.icon-button:hover,
.icon-button:focus-visible {
    background: #0b3273;
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.icon-button svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}

.grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

label {
    display: grid;
    gap: 6px;
}

label span {
    font-size: 0.85rem;
    color: #374151;
    font-weight: 700;
}

input,
select,
button {
    font: inherit;
}

input,
select {
    height: 40px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 0 10px;
    background: #fff;
}

.actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

button {
    border: 0;
    border-radius: 10px;
    height: 40px;
    padding: 0 14px;
    cursor: pointer;
    font-weight: 700;
}

.primary,
button.primary,
a.primary,
#quickLookupSubmit,
#loadReport,
#applyFilters,
#dashFilterSubmit,
#refreshPending {
    background: var(--action-blue);
    color: #fff;
    border: 0;
}

.primary:hover,
button.primary:hover,
a.primary:hover,
#quickLookupSubmit:hover,
#quickLookupSubmit:focus-visible,
#loadReport:hover,
#loadReport:focus-visible,
#applyFilters:hover,
#dashFilterSubmit:hover,
#refreshPending:hover {
    background: var(--action-blue-hover);
    color: #fff;
}

.secondary {
    background: #f3f4f6;
    color: #111827;
    border: 1px solid #d1d5db;
}

.status {
    margin: 10px 0 0;
    color: var(--muted);
    min-height: 1.1em;
}

.status.error {
    color: var(--warn);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 12px;
}

.table-search {
    flex: 0 1 280px;
    min-width: 180px;
    max-width: 320px;
    margin: 0;
}

.table-search input {
    width: 100%;
}

.table-export-actions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-left: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.profile-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.profile-scope-indicator {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #f59e0b;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    animation: profileScopePulse 1.6s infinite;
}

.profile-scope-indicator.hidden {
    display: none;
}

@keyframes profileScopePulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.65);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

.accruals-analysis-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.accruals-analysis-btn.has-pms-attention {
    border-color: #2563eb;
    color: #1e3a8a;
    background: #eff6ff;
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45);
    animation: accrualsAnalysisBtnPulse 1.5s ease-out infinite;
}

.accruals-analysis-pulse {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #2563eb;
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.65);
    animation: profileScopePulse 1.6s infinite;
    flex: 0 0 auto;
}

.accruals-analysis-pulse.hidden {
    display: none;
}

#openAccrualsAnalysisBtn.has-pms-attention {
    border-color: #2563eb;
    color: #1e3a8a;
    background: #eff6ff;
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45);
    animation: accrualsAnalysisBtnPulse 1.5s ease-out infinite;
}

@keyframes accrualsAnalysisBtnPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .accruals-analysis-btn.has-pms-attention,
    #openAccrualsAnalysisBtn.has-pms-attention {
        animation: none;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
    }
    .accruals-analysis-pulse {
        animation: none;
    }
}

.analysis-retry-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    margin: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f3c96;
    cursor: pointer;
}

.analysis-retry-btn:hover,
.analysis-retry-btn:focus-visible {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #0b2c6e;
    outline: none;
}

.analysis-retry-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}

.analysis-retry-btn svg {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.analysis-retry-btn.is-spinning svg {
    animation: analysis-retry-spin 0.8s linear infinite;
}

@keyframes analysis-retry-spin {
    to {
        transform: rotate(360deg);
    }
}

.analysis-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
}

.analysis-table-toolbar .tx-search-input {
    flex: 1 1 220px;
    min-width: 180px;
    max-width: 360px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

.table-wrap table {
    width: max-content;
    min-width: 100%;
}

th,
td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.92rem;
    white-space: nowrap;
}

th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #374151;
    background: #f7f8fb;
}

th.sortable {
    cursor: pointer;
    user-select: none;
}

th.sort-asc,
th.sort-desc {
    color: #0f3c96;
}

.num {
    text-align: right;
    white-space: nowrap;
}

.receipt-link {
    color: #0f3c96;
    text-decoration: underline;
    font-weight: 700;
}

.receipt-link:hover,
.receipt-link:focus-visible {
    color: #0b2c6e;
}

.receipt-link-btn {
    border: 0;
    background: none;
    padding: 0;
    margin: 0;
    color: #0f3c96;
    text-decoration: underline;
    font-weight: 700;
    font: inherit;
    cursor: pointer;
}

.receipt-link-btn:hover,
.receipt-link-btn:focus-visible {
    color: #0b2c6e;
}

.receipt-dialog.hidden {
    display: none;
}

.receipt-dialog {
    position: fixed;
    inset: 0;
    z-index: 60;
}

.receipt-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
}

.receipt-dialog-panel {
    position: relative;
    width: min(820px, calc(100vw - 24px));
    max-height: calc(100vh - 36px);
    overflow: auto;
    margin: 18px auto;
    background: #fff;
    border: 1px solid #d7dbe3;
    border-radius: 12px;
    box-shadow: 0 24px 40px rgba(15, 23, 42, 0.22);
}

.receipt-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.receipt-dialog-header h2 {
    margin: 0;
    color: #0f3c96;
    font-size: 1.1rem;
}

.receipt-dialog-body {
    padding: 14px 16px 18px;
}

.receipt-dialog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
}

.receipt-dialog-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
    padding: 10px;
}

.receipt-dialog-label {
    color: #6b7280;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.receipt-dialog-value {
    margin-top: 4px;
    font-size: 0.96rem;
    font-weight: 600;
    word-break: break-word;
}

.receipt-dialog-note {
    margin-top: 12px;
    color: #6b7280;
    font-size: 0.9rem;
}

@media (max-width: 720px) {
    .receipt-dialog-grid {
        grid-template-columns: 1fr;
    }
}

.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.tag.accrual {
    color: var(--accrual);
    background: #dcfce7;
}

.tag.redemption {
    color: var(--redemption);
    background: #ffedd5;
}

.tag.refund {
    color: #1d4ed8;
    background: #dbeafe;
}

.tag.status-success {
    color: var(--accrual);
    background: #dcfce7;
}

.tag.status-failed {
    color: #b91c1c;
    background: #fee2e2;
}

.tag.status-unknown {
    color: #374151;
    background: #e5e7eb;
}

.status-icon-col,
.status-badge-col {
    text-align: center;
    width: 5.5rem;
}

.status-icon-cell,
.status-badge-cell {
    text-align: center;
    vertical-align: middle;
}

.status-badge-cell .tag {
    min-width: 4.4rem;
}

/* Failure tooltip on failed status tags */
.tag.has-tooltip {
    position: relative;
    cursor: help;
}

.failure-tooltip {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    white-space: normal;
    max-width: 320px;
    min-width: 160px;
    background: #1f2937;
    color: #f9fafb;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.45;
    border-radius: 6px;
    padding: 6px 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 200;
    text-align: left;
    transition: opacity 0.15s ease;
}

.failure-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
}

.tag.has-tooltip:hover .failure-tooltip,
.tag.has-tooltip:focus .failure-tooltip {
    visibility: visible;
    opacity: 1;
}

.table-footer {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.page-info {
    color: #4b5563;
    font-size: 0.86rem;
}

.pager-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rows-label {
    margin: 0;
    color: #4b5563;
    font-size: 0.85rem;
    font-weight: 700;
}

.pager-controls select {
    width: 88px;
}

.pager-controls button {
    height: 36px;
    border-radius: 8px;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 680px) {
    .shell {
        width: 96vw;
    }
    .shell-report {
        width: calc(100vw - 16px);
    }
    .card {
        border-radius: 10px;
        padding: 12px;
    }

    .controls-layout {
        grid-template-columns: 1fr;
    }

    .report-actions {
        justify-self: start;
    }

    .table-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-lookup {
        width: 100%;
        flex-wrap: wrap;
        margin-left: 0;
    }

    .quick-lookup input {
        width: 100%;
        min-width: 220px;
    }
}

/* Icon close button for dialogs */
.icon-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.icon-close:hover,
.icon-close:focus-visible {
    background: #f3f4f6;
    color: #111827;
}

.icon-close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* F&B Redemption Modal */
.fnb-redemption-modal.hidden {
    display: none;
}

.fnb-redemption-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fnb-redemption-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    cursor: pointer;
}

.fnb-redemption-panel {
    position: relative;
    width: 85vw;
    height: 85vh;
    max-width: 1400px;
    max-height: calc(85vh - 60px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 40px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fnb-redemption-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.fnb-redemption-header h2 {
    margin: 0;
    color: #0f3c96;
    font-size: 1.1rem;
}

.fnb-redemption-iframe {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 12px 12px;
    min-height: 0;
}

/* Profile Selection Dialog */
.profile-selection-dialog.hidden {
    display: none;
}

.profile-selection-dialog {
    position: fixed;
    inset: 0;
    z-index: 70;
}

.profile-selection-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
}

.profile-selection-panel {
    position: relative;
    width: min(500px, calc(100vw - 24px));
    max-height: calc(100vh - 36px);
    overflow: auto;
    margin: 18px auto;
    background: #fff;
    border: 1px solid #d7dbe3;
    border-radius: 12px;
    box-shadow: 0 24px 40px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
}

.profile-selection-header {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.profile-selection-header h2 {
    margin: 0;
    color: #0f3c96;
    font-size: 1.1rem;
}

.profile-selection-body {
    padding: 14px 16px;
    flex: 1 1 auto;
    overflow-y: auto;
}

.profile-selection-body p {
    margin: 0 0 14px;
    color: #6b7280;
    font-size: 0.92rem;
}

.profile-selection-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-selection-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-selection-item:hover {
    background: #f3f4f6;
    border-color: #0f3c96;
}

.profile-selection-item:focus-within {
    outline: 2px solid #0f3c96;
    outline-offset: 2px;
}

.profile-selection-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.profile-selection-item-id {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    font-weight: 700;
}

.profile-selection-item-name {
    font-size: 0.96rem;
    font-weight: 600;
    color: #111827;
    word-break: break-word;
}

.profile-selection-detail {
    display: grid;
    gap: 4px;
    margin-top: 4px;
    font-size: 0.88rem;
    color: #4b5563;
}

.profile-selection-detail div {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 8px;
}

.profile-selection-detail .detail-label {
    color: #6b7280;
    font-weight: 600;
}

.profile-selection-item button {
    padding: 8px 16px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid #0f3c96;
    background: #0f3c96;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.profile-selection-item button:hover {
    background: #0b2c6e;
    border-color: #0b2c6e;
}

.profile-selection-footer {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.profile-selection-footer button {
    height: 36px;
    padding: 0 16px;
    border-radius: 6px;
}

#profileSelectionAll.hidden {
    display: none;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 10mm;
    }

    body {
        background: #fff;
    }

    .top-actions,
    .controls,
    .table-footer,
    .table-toolbar {
        display: none !important;
    }

    .shell,
    .shell-report {
        width: 100% !important;
        margin: 0;
    }

    .card {
        border: 0;
        box-shadow: none;
        padding: 0;
    }

    .hero {
        margin-bottom: 8px;
    }

    .table-wrap {
        overflow: visible;
    }

    th,
    td {
        font-size: 0.65rem;
        padding: 4px;
    }

    .fnb-redemption-panel {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .fnb-redemption-iframe {
        border-radius: 0;
    }
}

/* BI Reporting iframe improvements */
#biReportingIframe {
    width: 100%;
    height: 100%;
    min-height: 85vh;
    border: none;
    border-radius: 8px;
}

.warning-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    max-width: min(420px, calc(100vw - 40px));
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.warning-toast.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.loyalty-export-toast {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 10050;
    width: min(360px, calc(100vw - 40px));
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    font-family: Manrope, system-ui, sans-serif;
    overflow: hidden;
    opacity: 0;
    transform: translateX(16px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
}

.loyalty-export-toast.visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.loyalty-export-toast.is-error {
    border-color: #fecaca;
    background: #fef2f2;
}

.loyalty-export-toast.is-warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.loyalty-export-toast__accent {
    height: 3px;
    background: linear-gradient(90deg, #1353a5, #0f766e);
}

.loyalty-export-toast.is-error .loyalty-export-toast__accent {
    background: #dc2626;
}

.loyalty-export-toast.is-warning .loyalty-export-toast__accent {
    background: #d97706;
}

.loyalty-export-toast__body {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 14px 12px;
}

.loyalty-export-toast__icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ecfdf5;
    color: #0f766e;
}

.loyalty-export-toast.is-error .loyalty-export-toast__icon {
    background: #fee2e2;
    color: #b91c1c;
}

.loyalty-export-toast.is-warning .loyalty-export-toast__icon {
    background: #fef3c7;
    color: #b45309;
}

.loyalty-export-toast__content {
    flex: 1;
    min-width: 0;
    padding-right: 20px;
}

.loyalty-export-toast__title {
    margin: 0 0 4px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.3;
}

.loyalty-export-toast__message {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.45;
    color: #4b5563;
}

.loyalty-export-toast__filename {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #1353a5;
    word-break: break-all;
}

.loyalty-export-toast__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.loyalty-export-toast__close:hover {
    background: #f3f4f6;
    color: #374151;
}

.admin-settings-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    background: #fff;
    text-decoration: none;
    margin-left: auto;
}

.admin-settings-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.admin-settings-link svg {
    width: 18px;
    height: 18px;
}

.admin-settings-link.hidden {
    display: none;
}

.shell-landing .admin-settings-link {
    position: absolute;
    top: 20px;
    right: calc((100vw - min(1400px, 90vw)) / 2);
}

.shell-landing {
    position: relative;
}

.shell-admin {
    width: 90vw;
    max-width: none;
    gap: 16px;
}

.shell-dashboard {
    width: 90vw;
    max-width: none;
}

.admin-user-label {
    margin: 0 0 0 auto;
    color: var(--muted);
    font-size: 0.9rem;
}

.admin-settings-hub {
    margin-top: 0;
}

/* Four Settings modules: same central-tile chrome as Loyalty Central, 2×2 on desktop. */
.admin-settings-hub.central-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 560px) {
    .admin-settings-hub.central-grid {
        grid-template-columns: 1fr;
    }
}

.admin-property-picker-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.admin-property-picker-field {
    flex: 1;
    min-width: 0;
}

.admin-field-label,
.admin-form label span,
.admin-dialog-body label span {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 4px;
}

.admin-select,
.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-dialog-body input,
.admin-dialog-body textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
}

.admin-content {
    display: grid;
    gap: 14px;
    min-width: 0;
    max-width: 100%;
}

.shell-admin > .card,
.shell-admin .admin-section {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e7edf5;
}

.admin-section-header h2 {
    margin: 0;
    font-size: 1.15rem;
    color: #0f3c96;
}

.admin-save-btn,
.admin-icon-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    position: relative;
    background: var(--action-blue);
    border-color: transparent;
}

.admin-save-btn:hover,
.admin-save-btn:focus-visible,
.admin-icon-btn:hover,
.admin-icon-btn:focus-visible {
    background: var(--action-blue-hover);
}

.admin-save-btn.is-disabled,
.admin-save-btn:disabled {
    background: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
    transform: none;
}

.admin-save-btn svg,
.admin-icon-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-save-btn[data-tooltip]:hover::after,
.admin-save-btn[data-tooltip]:focus-visible::after,
.admin-icon-btn[data-tooltip]:hover::after,
.admin-icon-btn[data-tooltip]:focus-visible::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #111827;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 20;
}

.admin-form {
    display: grid;
    gap: 12px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.admin-toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding: 8px 0 2px;
    border-top: 2px solid #0f6c95;
    border-bottom: 2px solid #0f6c95;
}

.admin-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 0;
}

.admin-switch input {
    display: none;
}

.admin-switch-track {
    width: 38px;
    height: 22px;
    background: #d1d5db;
    border-radius: 999px;
    position: relative;
    transition: background 0.2s ease;
}

.admin-switch-track::after {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 3px;
    left: 3px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.35);
    transition: transform 0.2s ease;
}

.admin-switch input:checked + .admin-switch-track {
    background: #0f6c95;
}

.admin-switch input:checked + .admin-switch-track::after {
    transform: translateX(16px);
}

.admin-switch-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1f2937;
}

.admin-json-field {
    display: block;
}

.admin-json-field textarea {
    min-height: 96px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.85rem;
    background: #fbfdff;
}

.admin-checkbox {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    font-weight: 600;
    color: #334155;
}

.admin-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    border: 1.5px solid #94a3b8;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: none;
}

.admin-checkbox input[type="checkbox"]:checked {
    background-color: var(--accent);
    border-color: var(--accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
    background-size: 12px 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.admin-checkbox input[type="checkbox"]:focus-visible {
    outline: 2px solid rgba(19, 83, 165, 0.35);
    outline-offset: 2px;
}

.admin-token-row {
    display: flex;
    gap: 8px;
}

.admin-token-row input {
    flex: 1;
}

.admin-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.82rem;
    color: #64748b;
}

.admin-config-section {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.admin-config-section legend {
    padding: 0 6px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-section-help {
    margin: 0 0 12px;
    font-size: 0.84rem;
    line-height: 1.45;
    color: #64748b;
}

.admin-form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-table-wrap {
    overflow-x: auto;
    max-width: 100%;
    min-width: 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.admin-table th,
.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 0.9rem;
    vertical-align: top;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.admin-table th {
    background: #f1f6fd;
    font-weight: 700;
    color: #1f3b66;
}

/* Roles list column proportions within banner width */
#section-roles .admin-table th:nth-child(1),
#section-roles .admin-table td:nth-child(1) {
    width: 14%;
}

#section-roles .admin-table th:nth-child(2),
#section-roles .admin-table td:nth-child(2) {
    width: 14%;
}

#section-roles .admin-table th:nth-child(3),
#section-roles .admin-table td:nth-child(3) {
    width: 28%;
}

#section-roles .admin-table th:nth-child(4),
#section-roles .admin-table td:nth-child(4) {
    width: 26%;
}

#section-roles .admin-table th:nth-child(5),
#section-roles .admin-table td:nth-child(5) {
    width: 8%;
}

#section-roles .admin-table th:nth-child(6),
#section-roles .admin-table td:nth-child(6) {
    width: 18%;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

/* Users list: balanced cols, single-line email/name with ellipsis */
#section-users .admin-table th,
#section-users .admin-table td {
    vertical-align: middle;
    padding: 8px 10px;
}

#section-users .admin-table th:nth-child(1),
#section-users .admin-table td:nth-child(1) {
    width: 28%;
    max-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

#section-users .admin-table th:nth-child(2),
#section-users .admin-table td:nth-child(2) {
    width: 18%;
    max-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

#section-users .admin-table th:nth-child(3),
#section-users .admin-table td:nth-child(3) {
    width: 14%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

#section-users .admin-table th:nth-child(4),
#section-users .admin-table td:nth-child(4) {
    width: 14%;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

#section-users .admin-table th:nth-child(5),
#section-users .admin-table td:nth-child(5) {
    width: 8%;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

#section-users .admin-table th:nth-child(6),
#section-users .admin-table td:nth-child(6) {
    width: 18%;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

#section-users .admin-table td.admin-table-actions {
    display: table-cell;
}

#section-users .admin-table td.admin-table-actions .admin-table-actions-inner {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    width: 100%;
    white-space: nowrap;
}

.admin-table-btn {
    padding: 4px 10px;
    font-size: 0.82rem;
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
}

.admin-table-actions {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    width: 100%;
    white-space: nowrap;
}

.admin-table-btn--danger,
.admin-dialog-btn--danger {
    color: #9f1239;
    border-color: #fda4af;
    background: #fff1f2;
}

.admin-table-btn--danger:hover,
.admin-table-btn--danger:focus,
.admin-dialog-btn--danger:hover,
.admin-dialog-btn--danger:focus {
    color: #881337;
    border-color: #fb7185;
    background: #ffe4e6;
}

.admin-dialog {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-dialog.hidden {
    display: none;
}

#addUserPropertyDialog {
    z-index: 1210;
}

.admin-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.admin-dialog-panel {
    position: relative;
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #d7dbe3;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    z-index: 1;
    overflow: hidden;
}

.admin-dialog-panel--wide {
    width: min(65vw, calc(100vw - 32px));
}

.admin-dialog-panel--user {
    width: min(75vw, calc(100vw - 32px));
}

.admin-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.admin-dialog-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.admin-dialog-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-dialog-body {
    display: grid;
    gap: 12px;
    padding: 16px;
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.admin-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-top: 8px;
    padding-bottom: 2px;
}

.admin-section-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-search-field input {
    min-width: 220px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 12px;
    font: inherit;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.admin-field-block {
    display: grid;
    gap: 8px;
}

.admin-field-block .microcopy {
    margin: 0;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 400;
}

.role-rights-block {
    margin-top: 4px;
}

.role-rights-block legend {
    padding: 0;
}

.role-rights-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 16px;
}

@media (max-width: 900px) {
    .role-rights-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .role-rights-grid {
        grid-template-columns: 1fr;
    }
}

#userPropertyAccessTable td,
#userPropertyAccessTable th {
    text-align: center;
    vertical-align: middle;
}

#userPropertyAccessTable td:first-child,
#userPropertyAccessTable th:first-child {
    text-align: left;
}

#userPropertyAccessTable input[type="checkbox"] {
    width: auto;
    margin: 0;
}

#addUserPropertyTable input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.user-property-select-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
    font: inherit;
    font-weight: inherit;
    color: inherit;
    text-align: left;
}

.user-property-select-label input[type="checkbox"] {
    flex: 0 0 auto;
}

.user-property-access-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.user-property-access-header .admin-field-label {
    margin-bottom: 0;
}

.user-property-access-toolbar,
.user-property-picker-filters {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.user-property-picker-filters > label {
    min-width: 140px;
    flex: 1 1 140px;
}

.user-property-picker-list {
    max-height: min(50vh, 420px);
    overflow: auto;
}

.admin-inline-filter {
    margin: 0;
    min-width: 140px;
}

.admin-inline-filter .admin-select {
    min-width: 140px;
    width: auto;
}

.admin-section-header-actions .admin-inline-filter .admin-select {
    max-width: 180px;
}

@media (max-width: 960px) {
    .admin-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.admin-success-toast {
    /* Legacy class retained for compatibility; toast style is .loyalty-export-toast */
}

/* Help guide modal */
.loyalty-help-overlay {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.45);
}

.loyalty-help-overlay.hidden {
    display: none;
}

.loyalty-help-dialog {
    width: min(720px, 100%);
    max-height: min(860px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d7dbe3;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
}

.loyalty-help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
}

.loyalty-help-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.loyalty-help-tour-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.loyalty-help-tour-btn:hover {
    color: #0f3c96;
    background: #e6f0ff;
}

.loyalty-help-tour-btn.hidden {
    display: none;
}

.loyalty-help-tour-btn svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Page tour (Help → Start page tour) */
.page-tour-root {
    position: fixed;
    inset: 0;
    z-index: 1500;
    pointer-events: none;
}

.page-tour-root.hidden {
    display: none;
}

.page-tour-backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: auto;
}

.page-tour-spotlight {
    position: fixed;
    z-index: 1501;
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.55);
    outline: 2px solid #1353a5;
    outline-offset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.page-tour-spotlight.is-visible {
    opacity: 1;
}

.page-tour-popover {
    position: fixed;
    z-index: 1502;
    width: min(360px, calc(100vw - 24px));
    padding: 14px 16px 16px;
    background: #fff;
    border: 1px solid #d7dbe3;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
}

.page-tour-popover.is-visible {
    opacity: 1;
    visibility: visible;
}

.page-tour-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.page-tour-progress {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
}

.page-tour-skip {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 2px 4px;
}

.page-tour-skip:hover {
    color: #0f172a;
}

.page-tour-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    color: #0f3c96;
    font-family: inherit;
}

.page-tour-body {
    margin: 0 0 14px;
    color: #475569;
    font-size: 0.94rem;
    line-height: 1.5;
}

.page-tour-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.page-tour-target {
    position: relative;
    z-index: 1501;
}

body.tour-demo-active #transactionsSection.tour-demo-revealed {
    display: block !important;
}

/* Loyalty AI Assistant */
.ai-assist-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    line-height: 1;
}

.ai-assist-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ai-assist-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1600;
    background: rgba(15, 23, 42, 0.35);
}

.ai-assist-backdrop.hidden {
    display: none;
}

.ai-assist-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1601;
    width: min(420px, 100vw);
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-left: 1px solid #d7dbe3;
    box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
}

.ai-assist-drawer.hidden {
    display: none;
}

.ai-assist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.ai-assist-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #0f3c96;
}

.ai-assist-close {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 1.1rem;
    cursor: pointer;
}

.ai-assist-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px 0;
}

.ai-assist-chip {
    border: 1px solid #d7dbe3;
    background: #f8fafc;
    color: #334155;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.8rem;
    cursor: pointer;
}

.ai-assist-chip:hover {
    border-color: #1353a5;
    color: #0f3c96;
}

.ai-assist-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-assist-msg {
    max-width: 95%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.92rem;
    line-height: 1.45;
}

.ai-assist-msg--user {
    align-self: flex-end;
    background: #1353a5;
    color: #fff;
}

.ai-assist-msg--assistant {
    align-self: flex-start;
    background: #f1f5f9;
    color: #0f172a;
}

.ai-assist-typing {
    opacity: 0.75;
    font-style: italic;
}

.ai-assist-tools {
    margin: 8px 0 0;
    font-size: 0.75rem;
    color: #64748b;
}

.ai-assist-insert {
    margin-top: 8px;
}

.ai-assist-code {
    white-space: pre-wrap;
    background: #e2e8f0;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    overflow-x: auto;
}

.ai-assist-attach-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 8px;
}

.ai-assist-attach-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.78rem;
    color: #1e3a8a;
}

.ai-assist-attach-chip button {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #64748b;
}

.ai-assist-composer {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 8px;
    align-items: end;
    padding: 10px 16px 8px;
    border-top: 1px solid #e5e7eb;
}

.ai-assist-composer textarea {
    width: 100%;
    min-height: 44px;
    max-height: 120px;
    resize: vertical;
    border: 1px solid #d7dbe3;
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
}

.ai-assist-icon-btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    gap: 0;
    border: 1px solid #c5ccd8;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
}

.ai-assist-icon-btn svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ai-assist-icon-btn.is-listening {
    border-color: #1353a5;
    color: #1353a5;
    background: #e6f0ff;
}

.ai-assist-icon-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ai-assist-footnote {
    margin: 0;
    padding: 0 16px 12px;
    font-size: 0.75rem;
    color: #64748b;
}

@media (max-width: 640px) {
    .ai-assist-composer {
        grid-template-columns: auto auto 1fr;
    }
    .ai-assist-composer .primary {
        grid-column: 1 / -1;
    }
}

.loyalty-help-header h2 {
    margin: 0;
    font-size: 1.15rem;
    color: #0f3c96;
}

.loyalty-help-close {
    border: 0;
    background: transparent;
    font-size: 1.1rem;
    cursor: pointer;
    color: #64748b;
}

.loyalty-help-body {
    padding: 8px 18px 18px;
    display: grid;
    gap: 14px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.loyalty-help-section h3 {
    margin: 10px 0 6px;
    font-size: 0.98rem;
    color: #0f172a;
}

.loyalty-help-section p {
    margin: 0;
    color: #475569;
    font-size: 0.94rem;
    line-height: 1.5;
}

.loyalty-help-section.is-callout {
    margin: 2px 0;
    padding: 12px 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #1353a5;
    border-radius: 10px;
}

.loyalty-help-section.is-callout h3 {
    margin: 0 0 4px;
    color: #1353a5;
}

.loyalty-help-section.is-callout .loyalty-help-callout-lead {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 0.9rem;
}

.loyalty-help-section.is-callout p {
    color: #1e293b;
}

.help-guide-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    line-height: 1;
}

.help-guide-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Loyalty Central hub (white) */
.central-body {
    background: #ffffff;
    min-height: 100vh;
}

.shell-central {
    width: 90vw;
    max-width: none;
    margin: 28px auto 40px;
    gap: 32px;
}

.central-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.central-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-shrink: 0;
    margin-left: auto;
}

.central-header .banner-anker-logo,
.central-header .banner-property-logo {
    height: 48px;
    max-width: 200px;
    max-height: 48px;
    object-fit: contain;
}

.central-greeting h1 {
    margin: 0;
    font-size: clamp(2rem, 3.2vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.central-greeting p {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 1.08rem;
}

.central-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.central-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    min-height: 188px;
    padding: 22px 22px 24px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    text-decoration: none;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.central-tile:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}

.central-tile--hidden {
    display: none;
}

.central-tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    color: #fff;
}

.central-tile-icon svg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.central-tile-icon--blue { background: #2563eb; }
.central-tile-icon--sky { background: #0284c7; }
.central-tile-icon--indigo { background: #4f46e5; }
.central-tile-icon--teal { background: #0d9488; }
.central-tile-icon--rose { background: #e11d48; }
.central-tile-icon--slate { background: #475569; }
.central-tile-icon--violet { background: #7c3aed; }
.central-tile-icon--amber { background: #d97706; }
.central-tile-icon--emerald { background: #059669; }

.central-tile h2 {
    margin: 0;
    font-size: 1.28rem;
    font-weight: 700;
}

.central-tile p {
    margin: 0;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.4;
}

@media (max-width: 980px) {
    .central-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .central-header {
        flex-direction: column;
    }

    .central-header-right {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 560px) {
    .central-grid {
        grid-template-columns: 1fr;
    }
}

/* Support Guidelines reader + CMS */
.shell-guides,
.shell-guides-admin {
    width: 95%;
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
}

.guides-topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.guides-top,
.guides-topbar-left,
.guides-topbar-right {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.guides-top {
    margin-bottom: 14px;
}

.guides-title-block {
    min-width: 0;
}

.guides-title-block h1 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
}

.guides-title-block p {
    margin: 2px 0 0;
    color: #64748b;
    font-size: 0.92rem;
}

.guides-search-field input,
.guides-audience-switch select,
.guides-audience-select,
.admin-guides-audience,
.admin-guides-form input:not([type="checkbox"]):not([type="file"]),
.admin-guides-form textarea,
.admin-guides-form select {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
    background: #fff;
    box-sizing: border-box;
}

.guides-audience-select {
    width: auto;
    min-width: 200px;
    max-width: 280px;
}

.admin-guides-form input[type="file"] {
    width: 100%;
    min-height: 38px;
    padding: 6px 0;
    border: 0;
    font: inherit;
    background: transparent;
}

.guides-search-field {
    min-width: 200px;
    flex: 1 1 200px;
    max-width: 320px;
}

.guides-top-logo {
    margin-left: auto;
}

.guides-audience-switch {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
}

.hero-guides-admin {
    padding-top: 18px;
    padding-bottom: 18px;
}

.hero-guides-admin h1 {
    font-size: 1.45rem;
}

.hero-guides-admin p {
    margin: 4px 0 0;
    color: #64748b;
}

.admin-guides-top {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.admin-guides-audience {
    width: auto;
    min-width: 200px;
    max-width: 280px;
}

.admin-guides-status {
    margin: 0;
    flex: 1;
    min-width: 120px;
}

.admin-guides-top .admin-user-label {
    margin-left: auto;
}

.guides-layout,
.admin-guides-layout {
    display: grid;
    grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.guides-sidebar,
.guides-content,
.admin-guides-nav,
.admin-guides-editor {
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    min-width: 0;
}

.guides-sidebar h2,
.admin-guides-nav h2,
.admin-guides-editor-head h2,
.guides-article-head h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.guides-sidebar h2,
.admin-guides-nav h2 {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eef2f7;
    font-weight: 800;
}

.guides-article-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f7;
}

.guides-article-head-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.guides-top {
    overflow: visible;
    position: relative;
    z-index: 6;
}

.guides-print-wrap {
    position: relative;
    flex: 0 0 auto;
    z-index: 30;
}

.guides-print-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    cursor: pointer;
}

.guides-print-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.guides-print-btn:hover,
.guides-print-btn:focus-visible,
.guides-print-btn.is-open {
    border-color: #1353a5;
    color: #1353a5;
    background: #f8fafc;
}

.guides-print-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 40;
    min-width: 240px;
    padding: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.guides-print-menu:not([hidden]) {
    display: block;
}

.guides-print-menu button {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 36px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #1353a5;
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.guides-print-menu button:hover:not(:disabled),
.guides-print-menu button:focus-visible {
    background: #eff6ff;
}

.guides-print-menu button:disabled {
    color: #94a3b8;
    cursor: default;
}

.guides-article-print {
    flex: 0 0 auto;
    margin-top: 2px;
}

.guides-article-head h2 {
    font-size: 1.25rem;
    font-weight: 800;
}

.admin-guides-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f7;
}

.admin-guides-publish {
    margin-top: 0 !important;
    white-space: nowrap;
}

.admin-guides-editor-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.admin-delete-btn {
    background: #f3f4f6;
    color: #b91c1c;
    border: 1px solid #d1d5db;
}

.admin-delete-btn:hover,
.admin-delete-btn:focus-visible {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.guides-side-nav h3,
.guides-nav-section-title {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
}

.guides-nav-section + .guides-nav-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eef2f7;
}

.guides-nav-articles {
    display: grid;
    gap: 2px;
}

.guides-nav-article,
.admin-guides-tree-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: #334155;
    padding: 7px 8px;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 400;
}

.admin-guides-tree-section-btn {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: #0f172a;
    padding: 7px 8px;
    border-radius: 8px;
    cursor: pointer;
    margin: 0 0 6px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: inherit;
}

.guides-nav-article:hover,
.admin-guides-tree-item:hover,
.admin-guides-tree-section-btn:hover,
.guides-nav-article.is-active,
.admin-guides-tree-item.is-active,
.admin-guides-tree-section-btn.is-active {
    background: #eff6ff;
    color: #1353a5;
}

.guides-nav-article.is-active {
    font-weight: 700;
}

.guides-breadcrumb {
    margin: 0 0 4px;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.guides-summary {
    color: #475569;
}

.guides-body-html {
    line-height: 1.6;
}

.guides-body-html ol,
.guides-body-html ul {
    padding-left: 1.25rem;
}

.guides-body-html table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
}

.guides-body-html th,
.guides-body-html td {
    border: 1px solid #cbd5e1;
    padding: 6px 8px;
    text-align: left;
}

.guides-body-html img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.guides-callout {
    margin: 16px 0;
    padding: 14px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #1353a5;
    border-radius: 10px;
}

.guides-callout h3 {
    margin: 0 0 8px;
    color: #1353a5;
}

.guides-callout-lead {
    margin: 0 0 8px;
    color: #0f172a;
}

.guides-callout p:last-child {
    margin-bottom: 0;
}

.guides-videos {
    margin-top: 24px;
    display: grid;
    gap: 16px;
}

.guides-video video,
.admin-guides-video-row video {
    width: 100%;
    max-width: 720px;
    border-radius: 12px;
    background: #0f172a;
}

.guides-search-results {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.guides-search-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.guides-search-list button {
    width: 100%;
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    cursor: pointer;
    display: grid;
    gap: 2px;
    font: inherit;
}

.guides-search-list span {
    color: #64748b;
    font-size: 0.85rem;
}

.admin-guides-form {
    display: grid;
    gap: 12px;
}

.admin-guides-form label {
    display: grid;
    gap: 4px;
    font-weight: 600;
    color: #334155;
}

.admin-guides-form label > span {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
}

.admin-guides-form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 140px);
    gap: 12px;
}

.admin-guides-body-field {
    display: grid;
    gap: 6px;
}

.admin-guides-body-field .tox-tinymce {
    border-radius: 10px;
    border-color: #cbd5e1;
}

.admin-guides-body-field .tox .tox-toolbar,
.admin-guides-body-field .tox .tox-toolbar__primary {
    background: #f8fafc;
}

.admin-guides-body-field textarea#adminArticleBody {
    min-height: 280px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9rem;
}

.admin-guides-meta-field input {
    color: #64748b;
}

.admin-guides-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid #eef2f7;
}

.admin-guides-tree-articles {
    margin: 0 0 10px 4px;
    display: grid;
    gap: 2px;
}

.admin-guides-videos {
    margin-top: 18px;
    padding-top: 4px;
    border-top: 1px solid #eef2f7;
}

.admin-guides-videos > summary {
    cursor: pointer;
    font-weight: 700;
    color: #334155;
    padding: 8px 0;
    list-style: none;
}

.admin-guides-videos > summary::-webkit-details-marker {
    display: none;
}

.admin-guides-videos > summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 6px;
    color: #94a3b8;
}

.admin-guides-videos[open] > summary::before {
    content: "▾";
}

.admin-guides-video-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: grid;
    gap: 8px;
}

.admin-guides-video-row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.admin-guides-video-meta {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.admin-guides-video-form {
    margin-top: 4px;
}

/* Reservations module shell — match Dashboard/Reporting/Central (90vw, no max-width) */
.shell-reservations {
    width: 90vw;
    max-width: none;
}

.hero-reservations h1 {
    margin: 0;
}

.hero-reservations p {
    margin: 6px 0 0;
}

@media (max-width: 900px) {
    .shell-guides,
    .shell-guides-admin {
        width: 100%;
        max-width: 100%;
    }

    .guides-layout,
    .admin-guides-layout {
        grid-template-columns: 1fr;
    }

    .admin-guides-form-row {
        grid-template-columns: 1fr;
    }
}


.admin-subsection {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    display: grid;
    gap: 12px;
}

.admin-subsection:first-of-type {
    margin-top: 4px;
}

.admin-subsection-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f3c96;
}

.admin-stack-field {
    display: grid;
    gap: 6px;
    margin: 0;
}

.admin-stack-field > span {
    font-size: 0.86rem;
    font-weight: 600;
    color: #334155;
}

.admin-design-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-inline-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
}


.admin-theme-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-theme-swatch {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}

.admin-theme-swatch[title]::after {
    /* native title tooltip is enough */
}

/* Public landing / home (outside Protel) — Ankerdata product-page layout */
.home-body {
    --home-accent: #d7081c;
    --home-accent-hover: #b50618;
    --home-ink: #212934;
    --home-muted: #4a4e57;
    --home-muted-soft: #747474;
    --home-surface: #f4f4f4;
    --home-line: #e2e2e2;
    --home-footer: #242223;
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    width: 100%;
    color: var(--home-ink);
    background: #ffffff;
    overflow-x: hidden;
    font-family: "Open Sans", "Roboto", sans-serif;
}

.home-nav {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    background: #ffffff;
    border-bottom: 1px solid transparent;
}

.home-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
    /* Avada header_padding left/right 20px; logo margins 10px top/bottom */
    padding: 10px 20px;
    min-height: 80px;
}

.home-nav-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
}

.home-nav-logo {
    /* Matches computed Ankerdata header logo (~220 × 51.1875) */
    height: 51.1875px;
    width: 220px;
    max-width: 220px;
    object-fit: contain;
    display: block;
}

.home-nav-product {
    display: none;
}

.home-nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0;
    /* nav_padding: 22px */
}

.home-nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 80px;
    padding: 0 22px;
    color: #212934;
    text-decoration: none;
    /* nav_typography */
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.3px;
    line-height: 1.4;
    transition: color 0.2s linear;
}

.home-nav-links a:hover {
    color: #d7081c;
}

.home-nav-cta {
    display: none;
}

.home-body > main {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    display: block;
}

.home-band {
    width: 100%;
    box-sizing: border-box;
    padding: 60px 4vw;
}

.home-band--white {
    background: #ffffff;
}

.home-band--gray {
    background: var(--home-surface);
}

.home-band--cta {
    background: #ececec;
    padding: 48px 4vw;
}

.home-band-inner {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}

.home-page-title {
    padding-top: 72px;
    padding-bottom: 56px;
    /* Matches Cloud PMS page-title band: dark base + header-background.jpg cover */
    background-color: #242223;
    background-image: url("/reporting/static/backgrounds/header-background.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: #ffffff;
}

.home-page-title-inner {
    max-width: 720px;
}

.home-eyebrow {
    margin: 0 0 12px;
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--home-accent);
}

.home-feature-copy > p.home-eyebrow,
.home-section-head > p.home-eyebrow {
    margin: 0 0 12px;
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.4;
    color: var(--home-accent);
}

.home-page-title h1,
.home-feature-copy h2,
.home-section-head h2 {
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--home-ink);
}

.home-page-title h1 {
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    line-height: 1.08;
    color: #ffffff;
}

.home-hero-lead {
    margin: 18px 0 0;
    font-size: 1.12rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
    max-width: 38rem;
}

.home-page-title .home-hero-lead a {
    color: #ffffff;
    text-decoration: underline;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 26px;
    border-radius: 2px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.home-body a.primary.home-btn,
.home-body a.home-btn.primary {
    background: var(--home-accent);
    color: #fff;
    border: 0;
}

.home-body a.primary.home-btn:hover,
.home-body a.home-btn.primary:hover {
    background: var(--home-accent-hover);
    color: #fff;
}

a.home-btn.secondary {
    background: transparent;
    border: 1px solid var(--home-ink);
    color: var(--home-ink);
}

a.home-btn.secondary:hover {
    background: var(--home-ink);
    color: #fff;
    border-color: var(--home-ink);
}

a.home-btn.secondary.home-btn--on-dark {
    border-color: rgba(255, 255, 255, 0.85);
    color: #ffffff;
}

a.home-btn.secondary.home-btn--on-dark:hover {
    background: #ffffff;
    color: var(--home-ink);
    border-color: #ffffff;
}

.home-hero-note {
    margin: 22px 0 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.65);
    max-width: 36rem;
}

.home-logo-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.home-logo-row-anker {
    height: 30px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}

.home-logo-row-protel {
    height: 32px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}

.home-logo-row-sep {
    width: 1px;
    height: 28px;
    background: #c8c8c8;
    flex-shrink: 0;
}

.home-logo-row--on-dark .home-logo-row-anker,
.home-logo-row--on-dark .home-logo-row-protel {
    filter: brightness(0) invert(1);
}

.home-logo-row--on-dark .home-logo-row-sep {
    background: rgba(255, 255, 255, 0.35);
}

.home-feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.home-feature--reverse .home-feature-copy {
    order: 2;
}

.home-feature--reverse .home-feature-panel,
.home-feature--reverse .home-feature-media {
    order: 1;
}

.home-feature-copy h2 {
    font-size: clamp(1.6rem, 2.6vw, 2rem);
    margin-bottom: 12px;
}

.home-feature-copy > p {
    margin: 0 0 18px;
    color: var(--home-muted);
    font-size: 1.02rem;
    line-height: 1.6;
}

.home-feature-copy .home-btn {
    margin-top: 8px;
}

.home-feature-media {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-feature-media-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.home-feature-panel {
    border: 1px solid var(--home-line);
    background: #ffffff;
    padding: 32px 28px;
    border-radius: 2px;
}

.home-band--gray .home-feature-panel {
    border-color: #e0e0e0;
}

.home-feature-panel--accent {
    background: var(--home-accent);
    border-color: transparent;
    color: #fff;
}

.home-feature-panel h3 {
    margin: 0 0 12px;
    font-size: 1.2rem;
    font-weight: 700;
}

.home-feature-panel p {
    margin: 0;
    color: var(--home-muted);
    font-size: 0.98rem;
    line-height: 1.55;
}

.home-feature-panel--accent p {
    color: rgba(255, 255, 255, 0.92);
}

.home-protel-logo {
    display: block;
    height: 36px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    margin-bottom: 16px;
}

.home-eyebrow a,
.home-hero-lead a,
.home-feature-copy a:not(.home-btn),
.home-section-head a {
    color: var(--home-accent);
    font-weight: 700;
    text-decoration: none;
}

.home-eyebrow a:hover,
.home-hero-lead a:hover,
.home-feature-copy a:not(.home-btn):hover,
.home-section-head a:hover {
    text-decoration: underline;
}

.home-checklist {
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.home-checklist li {
    position: relative;
    padding-left: 1.35rem;
    color: var(--home-ink);
    font-size: 0.98rem;
    line-height: 1.5;
}

.home-checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--home-accent);
}

.home-section-head {
    max-width: 40rem;
    margin-bottom: 32px;
}

.home-section-head--center {
    max-width: 44rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.home-section-head h2 {
    font-size: clamp(1.6rem, 2.6vw, 2rem);
}

.home-section-head p {
    margin: 12px 0 0;
    color: var(--home-muted);
    font-size: 1.02rem;
    line-height: 1.55;
}

.home-module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.home-module {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-height: 168px;
    padding: 22px;
    border: 1px solid var(--home-line);
    border-radius: 2px;
    background: #ffffff;
    transition: border-color 0.15s ease;
}

.home-module:hover {
    border-color: #c8c8c8;
}

.home-module h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--home-ink);
}

.home-module p {
    margin: 0;
    color: var(--home-muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.home-benefit-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.home-benefit {
    border-top: 3px solid var(--home-accent);
    padding-top: 18px;
}

.home-benefit h3 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--home-ink);
}

.home-benefit p {
    margin: 10px 0 0;
    color: var(--home-muted);
    font-size: 0.96rem;
    line-height: 1.5;
}

.home-cta-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.home-cta-copy h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2.2vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--home-ink);
}

.home-cta-copy p {
    margin: 10px 0 0;
    color: var(--home-muted);
    max-width: 36rem;
}

.home-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.home-footer {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    background-color: #212934;
    background-image: url("/reporting/static/backgrounds/footer-background-dark.jpg");
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    color: #ffffff;
    font-size: 14px;
    font-family: "Open Sans", "Roboto", sans-serif;
    line-height: 1.7;
}

.home-footer-widgets {
    padding: 60px 40px 50px;
}

.home-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.home-footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 40px;
    row-gap: 30px;
    align-items: start;
}

.home-footer-col {
    min-width: 0;
}

/* Column 1 — left (default) */
.home-footer-col:nth-child(1) {
    text-align: left;
}

/* Column 2 — centered heading + social icons */
.home-footer-col:nth-child(2) {
    text-align: center;
}

.home-footer-col:nth-child(2) .home-footer-social {
    justify-content: center;
}

/* Column 3 — right-aligned logo, tagline, search */
.home-footer-col--brand {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.home-footer-heading,
.home-footer-col h4 {
    margin: 0 0 18px;
    font-family: "Open Sans", sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #ffffff;
}

.home-footer-col p,
.home-footer-block p {
    margin: 0 0 16px;
    line-height: 1.7;
    color: #ffffff;
}

.home-footer-col strong,
.home-footer-label {
    color: #ffffff !important;
    font-weight: 700;
}

.home-footer a {
    color: #ffffff;
    text-decoration: underline;
}

.home-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.home-footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
}

.home-footer-social a {
    text-decoration: none;
}

.home-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #d7081c;
    color: #fff !important;
    text-decoration: none !important;
    border: 1px solid #d7081c;
    box-sizing: border-box;
}

.home-social-icon:hover {
    background: #b50618;
    border-color: #b50618;
    text-decoration: none !important;
}

.home-social-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.home-footer-logo {
    display: block;
    width: 260px;
    max-width: 100%;
    height: auto;
    margin: 0 0 14px;
    object-fit: contain;
    filter: none;
}

.home-footer-tagline {
    margin: 0 0 18px;
    line-height: 1.7;
    color: #ffffff;
    text-align: right;
    max-width: 280px;
}

.home-footer-search {
    width: 100%;
    max-width: 280px;
    margin: 0;
}

.home-footer-search-label {
    position: relative;
    display: block;
    width: 100%;
}

.home-footer-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #9ca3af;
    pointer-events: none;
}

.home-footer-search-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.home-footer-search-input {
    width: 100%;
    box-sizing: border-box;
    height: 40px;
    padding: 0 14px 0 38px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    color: #212934;
    font-family: "Open Sans", "Roboto", sans-serif;
    font-size: 14px;
    outline: none;
}

.home-footer-search-input::placeholder {
    color: #9ca3af;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.home-footer-copyright {
    padding: 18px 40px 24px;
    text-align: center;
}

.home-footer-copy {
    margin: 0;
    font-size: 13px;
    color: #ffffff;
}

.home-footer-links,
.home-footer-bottom {
    display: none;
}

@media (max-width: 900px) {
    .home-feature,
    .home-feature--reverse,
    .home-module-grid,
    .home-benefit-row,
    .home-footer-cols {
        grid-template-columns: 1fr;
    }

    .home-feature--reverse .home-feature-copy,
    .home-feature--reverse .home-feature-panel {
        order: initial;
    }

    .home-band {
        padding: 44px 4vw;
    }

    .home-page-title {
        padding-top: 48px;
    }

    .home-nav-inner {
        flex-direction: column;
        align-items: flex-start;
        min-height: 0;
        padding: 10px 20px 0;
    }

    .home-nav-links {
        width: 100%;
        justify-content: flex-start;
    }

    .home-nav-links a {
        min-height: 44px;
        padding: 10px 16px 10px 0;
    }

    .home-footer-col:nth-child(2),
    .home-footer-col--brand {
        text-align: left;
        align-items: flex-start;
    }

    .home-footer-col:nth-child(2) .home-footer-social {
        justify-content: flex-start;
    }

    .home-footer-tagline {
        text-align: left;
    }
}

@media (max-width: 640px) {
    .home-module-grid {
        grid-template-columns: 1fr;
    }
}

.action-log-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    margin: 0 0 16px;
}
.action-log-filters label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
    flex: 1 1 140px;
    font-size: 0.85rem;
    color: #475569;
}
.action-log-filters input,
.action-log-filters select {
    min-height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 12px;
    font: inherit;
    color: #0f172a;
    background: #fff;
}
.action-log-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.action-log-table tbody tr.action-log-row.has-details {
    cursor: pointer;
}
.action-log-table tbody tr.action-log-row.has-details:hover,
.action-log-table tbody tr.action-log-row.is-open {
    background: #f8fafc;
}
.action-log-detail-row.hidden {
    display: none !important;
}
.action-log-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: #e2e8f0;
    color: #334155;
}
.action-log-pill--login { background: #e0f2fe; color: #0369a1; }
.action-log-pill--redemption { background: #dcfce7; color: #166534; }
.action-log-pill--refund { background: #ffedd5; color: #9a3412; }
.action-log-pill--purchase { background: #dbeafe; color: #1d4ed8; }
.action-log-pill--settings { background: #ede9fe; color: #5b21b6; }
.action-log-details {
    margin: 0;
    padding: 10px 12px;
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: auto;
    max-height: 280px;
    font-size: 0.8rem;
    line-height: 1.4;
}
.action-log-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
}

