/* Notification deep-link focus — briefly highlights the card a notification
   navigated to (e.g. a target card on My Targets). */
.notif-focus-pulse {
    /* box-shadow highlights cards; background flash covers table rows where
       box-shadow on <tr> doesn't render reliably. */
    animation: notifFocusPulse 2.2s ease;
    border-radius: 14px;
}
@keyframes notifFocusPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 23, 43, 0);    background-color: rgba(212, 23, 43, 0); }
    15%      { box-shadow: 0 0 0 4px rgba(212, 23, 43, 0.45); background-color: rgba(212, 23, 43, 0.12); }
    60%      { box-shadow: 0 0 0 4px rgba(212, 23, 43, 0.25); background-color: rgba(212, 23, 43, 0.06); }
}

/* Global Cursor Fix - Prevent caret/cursor on non-input elements */
*:not(input):not(textarea):not(select):not([contenteditable="true"]) {
    caret-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

/* Ensure inputs show the caret and allow text selection */
input, textarea, select, [contenteditable="true"] {
    caret-color: auto;
    user-select: text;
    -webkit-user-select: text;
}

/* Login View */
.login-view {
    min-height: calc(100vh + 1px);
    min-height: 100dvh; /* dynamic viewport height (falls back to the vh value above) */
    flex-direction: column;
}

.login-view.active {
    display: flex !important;
}

.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background: #f7f8fa;
}

.login-container {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e8eaed;
    padding: 2.75rem 2.5rem 2.25rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease;
}

.login-container:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.09);
}

/* ── Login profile picture: clickable, cycles through idle animations ── */
.login-pfp-wrapper {
    width: 104px;
    height: 104px;
    margin: 0 auto 1rem;
    position: relative;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-pfp-wrapper:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 168, 143, 0.45);
    border-radius: 12px;
}

.login-pfp {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
    will-change: transform, filter;
}

/* 1 — Float: gentle vertical bob */
.login-pfp-wrapper[data-anim="1"] .login-pfp {
    animation: pfp-float 3.2s ease-in-out infinite;
}
@keyframes pfp-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-7px); }
}

/* 2 — Pulse glow (drop-shadow follows the silhouette) */
.login-pfp-wrapper[data-anim="2"] .login-pfp {
    animation: pfp-pulse 2.2s ease-out infinite;
}
@keyframes pfp-pulse {
    0%   { filter: drop-shadow(0 0 0 rgba(0, 168, 143, 0.9)); }
    60%  { filter: drop-shadow(0 0 14px rgba(0, 168, 143, 0.55)); }
    100% { filter: drop-shadow(0 0 0 rgba(0, 168, 143, 0)); }
}

/* 3 — Breathe: subtle scale in/out */
.login-pfp-wrapper[data-anim="3"] .login-pfp {
    animation: pfp-breathe 3.4s ease-in-out infinite;
}
@keyframes pfp-breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}

/* 4 — Sway: gentle pendulum tilt */
.login-pfp-wrapper[data-anim="4"] .login-pfp {
    animation: pfp-sway 3.8s ease-in-out infinite;
    transform-origin: 50% 95%;
}
@keyframes pfp-sway {
    0%, 100% { transform: rotate(-4deg); }
    50%      { transform: rotate(4deg); }
}

/* 5 — Rainbow aura: drop-shadow cycles colour around the silhouette */
.login-pfp-wrapper[data-anim="5"] .login-pfp {
    animation: pfp-aura 5s linear infinite;
}
@keyframes pfp-aura {
    0%   { filter: drop-shadow(0 0 10px rgba(0, 168, 143, 0.7)); }
    25%  { filter: drop-shadow(0 0 10px rgba(255, 99, 132, 0.65)); }
    50%  { filter: drop-shadow(0 0 10px rgba(255, 197, 71, 0.65)); }
    75%  { filter: drop-shadow(0 0 10px rgba(99, 132, 255, 0.65)); }
    100% { filter: drop-shadow(0 0 10px rgba(0, 168, 143, 0.7)); }
}

.login-header {
    text-align: center;
    margin-bottom: 2.25rem;
}

.login-header h1 {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: #111827;
}

.login-header p {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
}

.demo-credentials {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;
}

.demo-credentials h3 {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.demo-credentials p {
    margin: 0;
    color: #374151;
    font-size: 0.82rem;
    line-height: 1.5;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.demo-credentials p + p {
    margin-top: 0.35rem;
}

.demo-credentials p[style*="margin-top"] {
    margin-top: 0.85rem !important;
    padding-top: 0.85rem;
    border-top: 1px solid #e5e7eb;
}

.demo-credentials strong {
    color: #111827;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 0.1rem 0.45rem;
}

/* Hub View */
.hub-view {
    min-height: 100vh;
    min-height: 100dvh; /* dynamic viewport height — footer sits at the true bottom under mobile URL bars (falls back to 100vh) */
    flex-direction: column;
}

.hub-view.active {
    display: flex !important;
}

/* Dashboard View */
.dashboard-view {
    min-height: 100vh;
    background: #f5f5f5;
}

.dashboard-view.active {
    display: block !important;
}

.dashboard-content {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.dashboard-header {
    background: white;
    border-bottom: 1px solid var(--border-light);
    padding: 2.5rem 3rem;
    margin-bottom: 0;
    text-align: center;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 600;
    letter-spacing: -0.5px;
}

.dashboard-header p {
    color: var(--text-medium);
    font-size: 1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid #1e40af;
}

.dashboard-card.success {
    border-left-color: var(--success);
}

.dashboard-card.warning {
    border-left-color: var(--warning);
}

.dashboard-card.secondary {
    border-left-color: #7c3aed;
}

.card-value {
    font-size: 2rem;
    font-weight: bold;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.dashboard-card.success .card-value {
    color: var(--success);
}

.dashboard-card.warning .card-value {
    color: var(--warning);
}

.dashboard-card.secondary .card-value {
    color: #7c3aed;
}

.card-label {
    color: var(--text-medium);
    font-size: 0.9rem;
}

.dashboard-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dashboard-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-section h2 i {
    color: var(--primary-color);
}

/* Dashboard Content Wrapper */
#dashboardSection .page-content {
    padding: 0;
    max-width: 100%;
}

.dashboard-content-wrapper {
    padding: 2rem 3rem;
    background: #f8f9fa;
    min-height: calc(100vh - 200px);
}

/* Dashboard Controls */
.dashboard-controls {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-controls {
    display: flex;
    gap: 0.5rem;
}

.filter-select {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Per-section time/date filters (replaced the single global time filter). */
.dashboard-section-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0.25rem 0 1.25rem;
}

.section-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-medium);
}

/* Compact select used inside a section (overrides the full-width filter bar). */
.dashboard-section-controls .filter-select {
    flex: 0 0 auto;
    padding: 0.5rem 0.75rem;
    border-width: 1px;
    border-radius: 8px;
    font-weight: 600;
}

/* Smaller inline select (e.g. the Sign-on Activity period picker). */
.filter-select-sm {
    width: auto;
    padding: 0.3rem 0.5rem;
    font-size: 0.82rem;
}

.filter-date {
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: white;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
}

.filter-date:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-clear-btn {
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-light, #f8fafc);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-medium);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.filter-clear-btn:hover {
    background: #eef2ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Dashboard Card Enhancements */
.card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.card-trend {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.card-trend.positive {
    color: var(--success);
}

.card-trend.negative {
    color: #e74c3c;
}

.card-trend.neutral {
    color: var(--text-medium);
}

/* Platform Comparison */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.comparison-card {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.comparison-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.comparison-card.achievers-theme {
    border-color: #667eea;
}

.comparison-card.connexus-theme {
    border-color: #f093fb;
}

.comparison-header {
    padding: 1.5rem;
    margin: 0.75rem 0.75rem 0;
    border-radius: 12px;
    text-align: center;
    background: var(--bg-light);
}

.comparison-card.achievers-theme .comparison-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.comparison-card.connexus-theme .comparison-header {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
}

.comparison-logo {
    max-width: 250px;
    width: 100%;
    height: auto;
}

.comparison-stats {
    padding: 2rem;
}

.comparison-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}

.comparison-stat:last-child {
    border-bottom: none;
}

.comparison-stat .stat-label {
    color: var(--text-medium);
    font-weight: 500;
}

.comparison-stat .stat-value {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Progress Bars */
.progress-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.progress-item {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-label {
    font-weight: 600;
    color: var(--text-dark);
}

.progress-value {
    color: var(--text-medium);
    font-size: 0.9rem;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    min-height: 12px;
    transition: width 0.6s ease;
    border-radius: 6px;
}

.achievers-gradient {
    background: linear-gradient(90deg, #667eea, #764ba2) !important;
}

.connexus-gradient {
    background: linear-gradient(90deg, #f093fb, #f5576c) !important;
}

.success-gradient {
    background: linear-gradient(90deg, var(--success), #27ae60) !important;
}

/* Table Styling */
.table-container {
    overflow-x: auto;
}

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

.dashboard-table thead tr {
    background: var(--bg-light);
    border-bottom: 2px solid var(--border-medium);
}

.dashboard-table th {
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.dashboard-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.dashboard-table tbody tr:hover {
    background: var(--bg-light);
}

.trend-positive {
    color: var(--success);
    font-weight: 600;
}

.trend-negative {
    color: #e74c3c;
    font-weight: 600;
}

.trend-neutral {
    color: var(--text-medium);
    font-weight: 600;
}

/* Campaign List */
.campaigns-list {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.campaign-item {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.campaign-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.campaign-info p {
    color: var(--text-medium);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

/* Top Performers */
.performers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.performer-card {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
}

.performer-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

/* Clickable card title — opens the full ranked drill-down list. */
.performer-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    transition: color 0.12s;
}

.performer-card-title:hover {
    color: var(--primary-color);
}

.performer-view-all {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    opacity: 0.85;
}

.performer-card-title:hover .performer-view-all {
    opacity: 1;
    text-decoration: underline;
}

.performer-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.performer-item {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.performer-item:hover {
    transform: translateX(4px);
    border-color: var(--primary-color);
}

.performer-item .rank {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 1rem;
}

.performer-item .name {
    font-weight: 600;
    color: var(--text-dark);
}

.performer-item .stat {
    color: var(--text-medium);
    font-size: 0.9rem;
}

/* Charts and Graphs */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.chart-container {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.chart-container h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-weight: 600;
}

/* Bar Chart */
.bar-chart {
    height: 250px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.chart-bars {
    display: flex;
    gap: 3rem;
    align-items: flex-end;
    height: 250px; /* Fixed height for percentage calculations */
    width: 100%;
    justify-content: center;
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    max-width: 120px;
    height: 100%; /* Full height of chart-bars */
    justify-content: flex-end; /* Push bar to bottom */
}

.bar {
    width: 80px;
    min-height: 20px; /* Ensure bars are always visible */
    background: var(--primary-color);
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: all 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 168, 143, 0.2);
}

.bar:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 168, 143, 0.3);
}

.achievers-bar {
    background: linear-gradient(to top, #667eea, #764ba2);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.connexus-bar {
    background: linear-gradient(to top, #f093fb, #f5576c);
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.2);
}

.bar::after {
    content: attr(data-value);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.bar-label {
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: 500;
    text-align: center;
}

/* Donut Charts */
.donut-chart-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
}

.donut-chart {
    position: relative;
    width: 150px;
    height: 150px;
}

.donut-chart svg {
    width: 100%;
    height: 100%;
}

.donut-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.donut-name {
    font-size: 0.85rem;
    color: var(--text-medium);
    margin-top: 0.25rem;
}

/* Line Chart */
.line-chart {
    position: relative;
    height: 200px;
    padding: 1rem 0;
}

.chart-grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.grid-line {
    height: 1px;
    background: var(--border-light);
    width: 100%;
}

.line-graph {
    width: 100%;
    height: calc(100% - 30px);
}

.line-graph polyline {
    filter: drop-shadow(0 4px 8px rgba(0, 168, 143, 0.2));
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-medium);
}

/* Horizontal Bar Chart */
.horizontal-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.h-bar-item {
    display: grid;
    grid-template-columns: 120px 1fr 80px;
    align-items: center;
    gap: 1rem;
}

.h-bar-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.h-bar-container {
    background: var(--bg-light);
    height: 28px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

.h-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #667eea);
    border-radius: 14px;
    transition: width 0.6s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.h-bar-value {
    font-weight: 600;
    color: var(--text-medium);
    text-align: right;
    font-size: 0.9rem;
}

/* A province selected in the dashboard filter — the chart still shows every
   province, but the chosen bars are highlighted to stand out. */
.h-bar-item.is-highlighted {
    background: rgba(102, 126, 234, 0.10);
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.35);
    margin: 0 -0.5rem;
    padding: 0.25rem 0.5rem;
}

.h-bar-item.is-highlighted .h-bar-label {
    color: var(--primary-color);
}

.h-bar-item.is-highlighted .h-bar {
    background: linear-gradient(90deg, var(--primary-color), #4c51bf);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(102, 126, 234, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-controls {
        grid-template-columns: 1fr;
    }

    .filter-controls {
        flex-direction: column;
    }

    .comparison-grid,
    .performers-grid,
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-table {
        font-size: 0.85rem;
    }

    .dashboard-table th,
    .dashboard-table td {
        padding: 0.75rem 0.5rem;
    }

    .h-bar-item {
        grid-template-columns: 80px 1fr 60px;
        gap: 0.5rem;
    }

    .dashboard-content-wrapper {
        padding: 1.5rem;
    }

    .dashboard-header {
        padding: 2rem 1.5rem;
    }

    .dashboard-header h1 {
        font-size: 1.8rem;
    }
}

/* Registration View */
.registration-view {
    min-height: calc(100vh + 1px);
    flex-direction: column;
}

.registration-view.active {
    display: flex !important;
}

.registration-container {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e8eaed;
    padding: 2.75rem 2.5rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.registration-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.registration-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: #111827;
}

.registration-header p {
    color: #6b7280;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
}

/* Role Selection */
.role-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.role-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    padding: 2.25rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.role-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 168, 143, 0.12);
}

.role-icon {
    display: block;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1.5px solid rgba(0, 168, 143, 0.35);
    box-shadow: 0 0 10px rgba(0, 168, 143, 0.15);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    line-height: 0;
}

.role-card:hover .role-icon {
    border-color: rgba(0, 168, 143, 0.75);
    box-shadow: 0 0 18px rgba(0, 168, 143, 0.38);
}

/* Sheen pseudo-element — starts off-left, transitions back RTL on unhover */
.role-icon::after {
    content: '';
    position: absolute;
    top: -20%;
    left: 0;
    width: 55%;
    height: 140%;
    background: linear-gradient(105deg, transparent 15%, rgba(255, 255, 255, 0.28) 50%, transparent 85%);
    transform: translateX(-200%);
    transition: transform 0.85s ease;
    pointer-events: none;
}

/* On hover: LTR animation, suppress the unhover transition */
.role-card:hover .role-icon::after {
    animation: role-sheen-ltr 0.85s ease-in-out forwards;
    transition: none;
}

@keyframes role-sheen-ltr {
    from { transform: translateX(-200%); }
    to   { transform: translateX(380%); }
}

.role-icon img,
.role-card-logo {
    width: 100%;
    height: auto;
    display: block;
}

.role-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    color: #111827;
}

.role-card p {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

/* Platform Info */
.platform-info {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.platform-info h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #000;
}

.platform-info p {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.benefits-list {
    display: grid;
    gap: 0.75rem;
}

.benefit {
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.5rem 0;
}

/* Registration Link Container */
.registration-link-container {
    text-align: center;
    margin-top: 2rem;
}

.registration-image-link {
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.registration-image-link:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.registration-image {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.registration-image:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Registration Placeholder (fallback when image doesn't exist) */
.registration-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 300px;
    height: 150px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.3;
}

.registration-placeholder:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* =============================================
   JTI Achievers Registration Form Styles
   ============================================= */

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.step-indicator .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.step-indicator .step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.step-indicator .step.active .step-number {
    background: var(--primary-color);
    color: white;
}

.step-indicator .step.completed .step-number {
    background: #10b981;
    color: white;
}

.step-indicator .step.completed .step-number::after {
    content: '✓';
    font-size: 1.2rem;
}

.step-indicator .step-label {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.step-indicator .step.active .step-label {
    color: var(--primary-color);
}

.step-indicator .step.completed .step-label {
    color: #10b981;
}

.step-indicator .step-line {
    width: 80px;
    height: 3px;
    background: #e5e7eb;
    margin: 0 0.5rem;
    margin-bottom: 1.5rem;
}

/* Registration Notice */
.reg-notice {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.reg-notice p {
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.reg-notice .warning-text {
    color: #dc2626;
    margin-top: 0.75rem;
    font-weight: 500;
}

/* Store Type Options */
.store-type-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.25rem 0;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.radio-option span {
    color: #374151;
    font-size: 0.95rem;
}

/* Form Fields Container */
.achievers-form-fields {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

/* Form Group */
.achievers-registration .form-group {
    margin-bottom: 1.25rem;
}

.achievers-registration .form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.achievers-registration .form-input,
.achievers-registration .form-select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    color: #111827;
    background: white;
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-image 0.2s ease;
}

.achievers-registration .form-input:focus,
.achievers-registration .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 168, 143, 0.1);
}

/* Validation States */
.achievers-registration .form-input.valid,
.achievers-registration .form-select.valid {
    border-color: #10b981;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
}

.achievers-registration .form-input.invalid,
.achievers-registration .form-select.invalid {
    border-color: #ef4444;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='15' y1='9' x2='9' y2='15'%3E%3C/line%3E%3Cline x1='9' y1='9' x2='15' y2='15'%3E%3C/line%3E%3C/svg%3E");
}

.achievers-registration .form-input.invalid:focus,
.achievers-registration .form-select.invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Password field needs different positioning for toggle button */
.achievers-registration .password-input-wrapper .form-input {
    padding-right: 4.5rem;
    background-position: right 2.75rem center;
}

/* Validation Message */
.validation-message {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #ef4444;
    min-height: 1.2em;
}

.validation-message.success {
    color: #10b981;
}

/* Required Field Indicator */
.required {
    color: #ef4444;
    font-weight: 600;
}

/* Validation Summary Banner */
.validation-summary {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.validation-summary h4 {
    color: #dc2626;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.validation-summary ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #991b1b;
    font-size: 0.85rem;
}

.validation-summary li {
    margin: 0.25rem 0;
}

.achievers-registration .form-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #3b82f6;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.password-toggle:hover {
    opacity: 1;
}

/* Checkbox Option */
.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-option span {
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.5;
}

.checkbox-option .link {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Help Link */
.help-link {
    text-align: left;
    font-size: 0.9rem;
    color: #374151;
}

.help-link .link {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
}

/* OTP Container */
.otp-container {
    text-align: center;
    padding: 2rem 1rem;
}

.otp-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.otp-message {
    color: #374151;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.otp-phone {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.otp-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    background: white;
    transition: border-color 0.2s ease;
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.otp-resend {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* Confirmation Container */
.confirmation-container {
    text-align: center;
    padding: 1rem;
}

.confirmation-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.confirmation-container h2 {
    font-size: 1.75rem;
    color: #111827;
    margin-bottom: 0.5rem;
}

.confirmation-subtitle {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.confirmation-details {
    text-align: left;
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.confirmation-details h3 {
    font-size: 1rem;
    color: #374151;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.confirmation-details h3:not(:first-child) {
    margin-top: 1.5rem;
}

/* API Preview */
.api-preview {
    background: #1f2937;
    border-radius: 8px;
    overflow: hidden;
}

.api-endpoint {
    background: #374151;
    color: #10b981;
    padding: 0.5rem 1rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    font-weight: 500;
}

.api-json {
    color: #f9fafb;
    padding: 1rem;
    margin: 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.confirmation-notice {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.confirmation-notice p {
    color: #92400e;
    font-size: 0.9rem;
    margin: 0;
}

/* Gray Back Button (for registration forms) */
.btn-back {
    background: transparent;
    color: var(--text-medium);
    border: 1px solid var(--border-medium);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: auto;
}

.btn-back:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* Platform Redirect Section - Styled like Hero */
.platform-access-hero {
    background: white;
    padding: 4rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.platform-access-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    animation: fadeIn 0.8s ease-in-out;
}

.role-platform-access {
    animation: fadeIn 0.6s ease-out;
    text-align: center;
}

.platform-redirect-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 1rem 0;
}

@media (max-width: 768px) {
    .platform-redirect-container {
        max-width: 400px;
    }
}

.platform-redirect-container-admin {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.platform-redirect-link {
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
}

.platform-redirect-link:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.platform-redirect-image {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.platform-redirect-image:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Image Carousel */
.carousel-container {
    max-width: 1600px;
    margin: 3rem auto;
    padding: 0 2rem;
    position: relative;
}

.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    height: 600px;
}

.carousel-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    display: none;
    height: 100%;
}

.carousel-slide.active {
    display: block;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* Logo slides are graphics, not photos — show them whole (no cropping) on a
   clean background, instead of object-fit: cover which cuts their edges off
   (most visible on the first slide / on a narrow phone). */
.carousel-slide-logo {
    background: #ffffff;
}
.carousel-slide-logo img {
    object-fit: contain;
    padding: 1.5rem;
    box-sizing: border-box;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-btn.prev {
    left: 1rem;
}

.carousel-btn.next {
    right: 1rem;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: var(--primary-color);
    width: 32px;
    border-radius: 6px;
}

/* FAQ Section */
.faq-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* FAQ Section when inside home page */
.page-content .faq-section {
    margin: 3rem auto;
}

.faq-section h2 {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 3rem;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.faq-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.faq-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 168, 143, 0.08);
    transform: translateY(-2px);
}

.faq-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 168, 143, 0.12);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-item.active .faq-question {
    color: var(--primary-color);
}

.faq-toggle {
    font-size: 1.5rem;
    color: var(--text-medium);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-medium);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.faq-answer-content p {
    margin-bottom: 1rem;
}

.faq-answer-content p:last-child {
    margin-bottom: 0;
}

/* ── FAQ responsive ── */
@media (max-width: 768px) {
    /* page-content already provides horizontal padding */
    .faq-section {
        padding: 0;
    }

    .faq-section h2 {
        font-size: 1.6rem;
        margin-bottom: 1.25rem;
    }

    /* Full-width search bar */
    .faq-search-bar {
        max-width: 100%;
        margin-bottom: 0.875rem;
    }

    /* Category pills scroll horizontally — no wrapping */
    .faq-categories {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 0.5rem;
        margin-bottom: 1.25rem;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .faq-categories::-webkit-scrollbar { display: none; }

    .faq-cat-pill {
        flex-shrink: 0;
        font-size: 0.8rem;
        padding: 0.45rem 0.875rem;
        min-height: 34px;
    }

    /* Remove lift-on-hover — wrong feel on touch */
    .faq-item:hover {
        transform: none;
    }

    .faq-item {
        margin-bottom: 0.75rem;
        border-radius: 10px;
    }

    /* Comfortable tap target */
    .faq-question {
        padding: 1rem 1.125rem;
        font-size: 0.975rem;
        gap: 0.75rem;
        min-height: 52px;
    }

    .faq-toggle {
        flex-shrink: 0;
        font-size: 1.375rem;
        width: 22px;
        height: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .faq-answer-content {
        padding: 0 1.125rem 1.125rem;
        font-size: 0.9rem;
        line-height: 1.65;
    }

    /* Tighter still-need-help block */
    .faq-support-cta {
        margin-top: 1.5rem;
        padding: 1.25rem;
    }

    .faq-support-cta p {
        font-size: 0.925rem;
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 480px) {
    .faq-section h2 {
        font-size: 1.35rem;
        margin-bottom: 1rem;
    }

    .faq-cat-pill {
        font-size: 0.775rem;
        padding: 0.4rem 0.75rem;
    }

    .faq-question {
        padding: 0.875rem 1rem;
        font-size: 0.925rem;
    }

    .faq-answer-content {
        padding: 0 1rem 1rem;
        font-size: 0.875rem;
    }

    .faq-support-cta {
        padding: 1rem;
        margin-top: 1.25rem;
    }
}

/* Welcome Splash Screen */
.welcome-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease-out;
    overflow: hidden;
}

.welcome-splash.active {
    opacity: 1;
}

.welcome-splash.fade-out {
    opacity: 0;
}

/* Scrollbar hiding handled in base.css with fade transitions */

.welcome-content {
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.welcome-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    opacity: 0;
    transform: translateY(30px);
}

.welcome-title.animate {
    animation: slideUpFadeIn 0.5s ease-out forwards;
}

.welcome-logo {
    max-width: 500px;
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
}

.welcome-logo.animate {
    animation: slideUpFadeIn 0.5s ease-out 0.15s forwards;
}

.welcome-description {
    font-size: 1.15rem;
    color: var(--text-medium);
    line-height: 1.7;
    opacity: 0;
    transform: translateY(30px);
}

.welcome-description.animate {
    animation: slideUpFadeIn 0.5s ease-out 0.3s forwards;
}

@keyframes slideUpFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Larger Platform Access Button for Main Focal Point */
.platform-access-main .platform-redirect-image {
    max-width: 600px;
    width: 100%;
    transition: all 0.3s ease;
}

.platform-access-main .platform-redirect-container {
    max-width: 600px;
}

.platform-access-main .platform-redirect-container-admin {
    max-width: 1200px;
}

.platform-access-main .platform-redirect-container-admin .platform-redirect-image {
    max-width: 550px;
}

/* Responsive for Login and Registration */
@media (max-width: 768px) {
    .login-container, .registration-container {
        padding: 2rem;
    }

    .role-selection {
        grid-template-columns: 1fr;
    }

    .registration-header h1 {
        font-size: 2rem;
    }

    .placeholder-icon {
        font-size: 3.5rem;
    }

    .placeholder-text {
        font-size: 1.4rem;
    }

    .carousel {
        height: 300px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .carousel-btn.prev {
        left: 0.5rem;
    }

    .carousel-btn.next {
        right: 0.5rem;
    }

    .platform-access-hero h1 {
        font-size: 2rem;
    }

    .platform-redirect-container-admin {
        grid-template-columns: 1fr;
    }

    .welcome-title {
        font-size: 2rem;
    }

    .welcome-logo {
        max-width: 350px;
    }

    .welcome-description {
        font-size: 1rem;
    }

    .platform-access-main .platform-redirect-image {
        max-width: 400px;
    }

    .platform-access-main .platform-redirect-container-admin .platform-redirect-image {
        max-width: 350px;
    }
}

/* Support Center Styles */
.support-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: start;
}

.support-info-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.support-info-card h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.support-detail {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}

.support-detail:last-child {
    border-bottom: none;
}

.support-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.support-value {
    font-size: 1rem;
    color: var(--text-dark);
}

.support-form-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.support-form-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.support-form-description {
    color: var(--text-medium);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.support-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
    font-family: inherit;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    /* ── Layout ── */
    .support-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Swap: form first, contact info below */
    .support-form-card { order: 1; }
    .support-info-card  { order: 2; }

    /* ── Form card — compact ── */
    .support-form-card {
        padding: 1.125rem;
        border-radius: 10px;
    }

    .support-form-card h2 {
        font-size: 1.15rem;
        margin-bottom: 0.35rem;
    }

    .support-form-description {
        font-size: 0.85rem;
        margin-bottom: 0.875rem;
        line-height: 1.4;
    }

    .support-form {
        gap: 0.75rem;
    }

    /* Collapse the two-column form row to single column */
    .support-form .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-bottom: 0;
    }

    .support-form .form-group {
        margin-bottom: 0;
    }

    .support-form .form-label {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }

    .support-form .form-input {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    /* Shorter textarea — just tall enough for a few lines */
    .form-textarea {
        min-height: 80px;
        rows: 3;
    }

    /* Full-width submit */
    .support-form .btn-large {
        width: 100%;
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
        text-align: center;
        justify-content: center;
    }

    /* Tighter context strip */
    .support-context-strip {
        font-size: 0.77rem;
        padding: 0.4rem 0.65rem;
        margin-bottom: 0.75rem;
        gap: 0.3rem;
    }

    /* ── Info card — compact ── */
    .support-info-card {
        padding: 1.125rem;
        border-radius: 10px;
    }

    .support-info-card h2 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .support-detail {
        padding: 0.625rem 0;
        gap: 0.25rem;
    }

    .support-label {
        font-size: 0.75rem;
    }

    .support-value {
        font-size: 0.9rem;
    }

    .support-faq-prompt {
        margin-top: 0.875rem;
        padding-top: 0.75rem;
    }
}

@media (max-width: 480px) {
    .support-form-card,
    .support-info-card {
        padding: 1rem;
        border-radius: 8px;
    }

    .support-form-card h2 {
        font-size: 1.05rem;
    }

    .form-textarea {
        min-height: 70px;
    }

    .support-form {
        gap: 0.6rem;
    }

    .support-form .form-row {
        gap: 0.6rem;
    }

    .support-form .btn-large {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }

    .support-context-badge {
        font-size: 0.72rem;
        padding: 0.1rem 0.45rem;
    }
}

/* Support: FAQ prompt inside info card */
.support-faq-prompt {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.875rem;
    color: var(--text-medium);
}
.support-faq-prompt p { margin-bottom: 0.6rem; }

/* Support: context strip */
.support-context-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.6rem 0.85rem;
    background: #f4faf9;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.82rem;
}
.support-context-label {
    font-weight: 600;
    color: var(--text-medium);
    margin-right: 0.15rem;
}
.support-context-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    background: var(--bg-gray);
    color: var(--text-dark);
    font-weight: 600;
}
.support-context-role  { background: #dbeafe; color: #1e40af; }
.support-context-store { background: #d1fae5; color: #065f46; }

/* FAQ: search bar */
.faq-search-bar {
    max-width: 480px;
    margin: 0 auto 1.25rem;
}

/* FAQ: category pills */
.faq-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}
.faq-cat-pill {
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    border: 1px solid var(--border-medium);
    background: var(--bg-gray);
    color: var(--text-medium);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.faq-cat-pill:hover { background: #e8f5f3; border-color: var(--primary-color); color: var(--primary-color); }
.faq-cat-pill.active { background: var(--primary-color); border-color: var(--primary-color); color: white; }

/* FAQ: still-need-help CTA */
.faq-support-cta {
    text-align: center;
    margin-top: 2.5rem;
    padding: 1.75rem;
    background: #f4faf9;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}
.faq-support-cta p { margin-bottom: 0.85rem; font-size: 1rem; color: var(--text-medium); }

/* FAQ: inline support link inside no-results text */
.faq-support-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    padding: 0;
}

/* Dark mode */
.dark-mode .support-context-strip { background: #252525; border-color: #444; }
.dark-mode .support-context-badge { background: #333; color: #d0d0d0; }
.dark-mode .support-context-role  { background: #1e3a5f; color: #93c5fd; }
.dark-mode .support-context-store { background: #0f2a1a; color: #6ee7b7; }
.dark-mode .support-faq-prompt { border-color: #444; }
.dark-mode .faq-categories { border-color: #333; }
.dark-mode .faq-cat-pill { background: #2a2a2a; border-color: #444; color: #aaa; }
.dark-mode .faq-cat-pill:hover { background: #1a332a; border-color: var(--primary-color); color: var(--primary-color); }
.dark-mode .faq-cat-pill.active { background: var(--primary-color); color: white; }
.dark-mode .faq-support-cta { background: #1e1e1e; border-color: #333; }

/* Platform Pages (Achievers & Connexus) Styles */
.platform-page-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.platform-access-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.platform-access-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 12px 32px rgba(0, 168, 143, 0.15);
}

.platform-access-card h2 {
    font-size: 2rem;
    margin-bottom: 1.25rem;
    color: var(--text-dark);
    font-weight: 600;
    letter-spacing: -0.3px;
}

.platform-access-card p {
    color: var(--text-medium);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Newsletter Card with Expandable Items */
.platform-newsletter-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.platform-newsletter-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.newsletter-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-item {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.newsletter-item:hover {
    border-color: var(--border-medium);
}

.newsletter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    background: #fafafa;
    transition: background 0.2s ease;
}

.newsletter-header:hover {
    background: #f5f5f5;
}

.newsletter-date {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.newsletter-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.newsletter-toggle {
    font-size: 1.5rem;
    color: var(--text-medium);
    font-weight: 300;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.newsletter-item.active .newsletter-toggle {
    transform: rotate(45deg);
}

.newsletter-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.newsletter-content > div {
    overflow: hidden;
    min-height: 0;
    padding: 0 1.5rem;
    opacity: 0;
    transition: padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease;
}

.newsletter-item.active .newsletter-content {
    grid-template-rows: 1fr;
}

.newsletter-item.active .newsletter-content > div {
    padding: 0.5rem 1.5rem 1.5rem 1.5rem;
    opacity: 1;
    transition: padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease 0.1s;
}

.newsletter-content p {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.newsletter-content p:last-child {
    margin-bottom: 0;
}

/* Integrated Features Card */
#achieversSection .platform-features-card {
    display: none !important;
}

.platform-features-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.platform-features-card h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
    text-align: center;
}

.features-integrated-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
}

.feature-integrated-item {
    padding: 2rem;
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    background: #fafafa;
    transition: background 0.2s ease;
}

.feature-integrated-item:nth-child(2n) {
    border-right: none;
}

.feature-integrated-item:nth-child(3),
.feature-integrated-item:nth-child(4) {
    border-bottom: none;
}

.feature-integrated-item:hover {
    background: #f5f5f5;
}

.feature-integrated-item h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.feature-integrated-item p {
    color: var(--text-medium);
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

@media (max-width: 768px) {
    .platform-page-container {
        gap: 2rem;
    }

    .platform-access-card,
    .platform-newsletter-card,
    .platform-features-card {
        padding: 1.25rem;
        border-radius: 10px;
    }

    /* ── Latest Updates ── */
    .platform-newsletter-card h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .newsletter-list {
        gap: 0.75rem;
    }

    .newsletter-item {
        border-radius: 8px;
    }

    /* Comfortable tap target, tighter padding */
    .newsletter-header {
        padding: 0.875rem 1rem;
        min-height: 52px;
        align-items: center;
        gap: 0.75rem;
    }

    .newsletter-date {
        font-size: 0.775rem;
        margin-bottom: 0.25rem;
    }

    .newsletter-title {
        font-size: 0.975rem;
    }

    .newsletter-toggle {
        font-size: 1.375rem;
        margin-left: 0;
    }

    /* Fix: padding belongs on the inner div, not the grid container */
    .newsletter-content > div {
        padding: 0 1rem;
    }

    .newsletter-item.active .newsletter-content > div {
        padding: 0.5rem 1rem 1rem;
    }

    .newsletter-content p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    /* ── Features grid ── */
    .features-integrated-grid {
        grid-template-columns: 1fr;
    }

    .feature-integrated-item {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }

    .feature-integrated-item:nth-child(2n) {
        border-right: none;
    }

    .feature-integrated-item:last-child {
        border-bottom: none;
    }
}

/* My Profile Page Styles */
.profile-page-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.profile-main-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.profile-main-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.profile-photo-section {
    padding: 3rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 168, 143, 0.05) 0%, rgba(102, 126, 234, 0.05) 100%);
    border-bottom: 1px solid var(--border-light);
}

.profile-photo-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 1rem;
    cursor: pointer;
    border-radius: 50%;
    overflow: hidden;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.profile-photo-container:hover .photo-overlay {
    opacity: 1;
}

.photo-upload-btn {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    background: none;
    border: none;
    transition: all 0.3s ease;
}

.photo-upload-btn:hover {
    opacity: 0.8;
}

.photo-hint {
    font-size: 0.85rem;
    color: var(--text-medium);
    margin: 0;
}

.profile-form-section {
    padding: 3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Profile store read-only list */
.profile-store-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.profile-store-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.profile-store-item.primary {
    background: #f0faf8;
    border-color: var(--primary-color);
}

.profile-store-name {
    flex: 1;
}

.profile-store-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    background: #d4f5ee;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    white-space: nowrap;
}

.profile-store-loading,
.profile-store-none {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.profile-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-secondary-profile,
.btn-primary-profile {
    padding: 0.875rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    min-width: 140px;
}

.btn-secondary-profile {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-medium);
}

.btn-secondary-profile:hover {
    background: var(--bg-gray);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-primary-profile {
    background: var(--primary-color);
    color: white;
}

.btn-primary-profile:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 143, 0.3);
}

.profile-info-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 100px;
}

.profile-info-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: 500;
}

.info-value {
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 600;
}

/* ── Store Link Styles (Retailer Stores section) ─────────────────── */
.stores-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.stores-card-header h3 {
    margin: 0;
    border: none;
    padding: 0;
}

.stores-add-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.stores-add-row .form-input {
    flex: 1;
}

.store-link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    margin-bottom: 0.6rem;
    background: #fafafa;
    gap: 1rem;
}

.store-link-item.store-link-primary {
    border-color: var(--primary-green, #4CAF50);
    background: #f0faf0;
}

.store-link-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.store-link-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-link-meta {
    font-size: 0.8rem;
    color: var(--text-medium);
}

.store-link-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--primary-green, #4CAF50);
    color: white;
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
    margin-top: 0.15rem;
    width: fit-content;
}

.store-link-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-store-primary {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--primary-green, #4CAF50);
    background: transparent;
    color: var(--primary-green, #4CAF50);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.btn-store-primary:hover {
    background: var(--primary-green, #4CAF50);
    color: white;
}

.btn-store-remove {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #dc3545;
    background: transparent;
    color: #dc3545;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.btn-store-remove:hover {
    background: #dc3545;
    color: white;
}

.stores-loading,
.stores-empty,
.stores-error {
    font-size: 0.9rem;
    color: var(--text-medium);
    text-align: center;
    padding: 1rem 0;
}

.stores-error { color: #dc3545; }

/* dark mode */
body.dark-mode .store-link-item { background: #2a2a2a; border-color: #3a3a3a; }
body.dark-mode .store-link-item.store-link-primary { background: #1a2e1a; border-color: #4CAF50; }
body.dark-mode .store-link-name { color: #e0e0e0; }
body.dark-mode .stores-card-header h3 { color: #e0e0e0; }

@media (max-width: 680px) {
    .store-link-item { flex-direction: column; align-items: flex-start; }
    .store-link-actions { width: 100%; }
    .btn-store-primary, .btn-store-remove { flex: 1; text-align: center; }
}
/* ─────────────────────────────────────────────────────────────────── */

@media (max-width: 968px) {
    .profile-page-container {
        grid-template-columns: 1fr;
    }

    .profile-info-card {
        position: static;
    }

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

    .profile-actions {
        flex-direction: column-reverse;
    }

    .btn-secondary-profile,
    .btn-primary-profile {
        width: 100%;
    }
}

/* About JTI Page Styles */
.about-page-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.about-jti-access-card {
    background: #f8f9fa;
    border: none;
    padding: 4rem 2rem 4rem 2rem;
    text-align: center;
    margin-top: -3rem;
}

.about-jti-access-card h2 {
    font-size: 48px;
    margin-bottom: 3rem;
    color: var(--text-dark);
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.about-jti-access-card p {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
}

.about-jti-access-card .platform-redirect-link {
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.about-jti-access-card .platform-redirect-link:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.about-jti-access-card .platform-redirect-image {
    max-width: 600px;
    width: 100%;
    display: block;
}

.about-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-info-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about-info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.about-info-card p {
    color: var(--text-medium);
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 768px) {
    .about-page-container {
        gap: 1.5rem;
    }

    .about-jti-access-card {
        padding: 1.5rem 1rem;
        margin-top: 0;
    }

    /* Title: scale down, green strip, no subtitle equivalent */
    .about-jti-access-card h2 {
        font-size: 1.75rem;
        font-weight: 600;
        letter-spacing: 1px;
        margin-bottom: 0;
        padding-bottom: 1rem;
        border-bottom: 2px solid var(--primary-color);
    }

    .about-jti-access-card p {
        font-size: 0.9rem;
        margin-top: 1rem;
        margin-bottom: 1.5rem;
    }

    .about-jti-access-card .platform-redirect-image {
        max-width: 100%;
    }

    /* Remove lift on touch */
    .about-jti-access-card .platform-redirect-link:hover {
        transform: none;
    }

    .about-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .about-info-card {
        padding: 1.25rem;
    }

    .about-info-card:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .about-jti-access-card {
        padding: 1.125rem 0.875rem;
    }

    .about-jti-access-card h2 {
        font-size: 1.45rem;
        padding-bottom: 0.875rem;
    }

    .about-jti-access-card p {
        font-size: 0.875rem;
    }

    .about-info-card {
        padding: 1rem;
    }
}

/* ============================================
   TELESALES PAGE STYLES
   ============================================ */

.telesales-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Progress Indicator */
.telesales-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: var(--primary-color);
    color: white;
}

.progress-step.completed .step-number {
    background: #4caf50;
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

.progress-step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.progress-line {
    width: 100px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 1rem;
}

.progress-step.completed ~ .progress-line {
    background: #4caf50;
}

/* Telesales Steps */
.telesales-step {
    display: none;
}

.telesales-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Telesales Card */
.telesales-card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.telesales-card h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.telesales-card h2 i {
    color: var(--primary-color);
}

/* Telesales Form */
.telesales-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.required {
    color: #ef4444;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 168, 143, 0.1);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

/* Checkbox Group */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Product Quantity Group */
.product-quantity-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-quantity-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.product-quantity-item:has(input[type="checkbox"]:checked) {
    background-color: #f0f9f7;
    border-color: var(--primary-color);
}

.product-quantity-item .checkbox-label {
    border: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.product-qty-input {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    text-align: center;
    transition: all 0.3s ease;
}

.product-qty-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.product-qty-input:not(:disabled) {
    border-color: var(--primary-color);
}

.product-qty-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 168, 143, 0.1);
}

.checkbox-label:hover {
    border-color: var(--primary-color);
    background: rgba(0, 168, 143, 0.05);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"]:checked {
    accent-color: var(--primary-color);
}

/* Invoice Upload Area */
.invoice-upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.invoice-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(0, 168, 143, 0.05);
}

.upload-placeholder i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-placeholder p {
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.875rem;
    color: #666;
}

.upload-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-info {
    text-align: center;
}

.preview-info p {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.btn-remove {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #dc2626;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.form-actions button {
    flex: 1;
    max-width: 250px;
    border-radius: 8px !important;
}

/* Success Card */
.success-card {
    text-align: center;
}

.success-icon {
    margin-bottom: 1.5rem;
}

.success-icon i {
    font-size: 4rem;
    color: #4caf50;
}

/* Order Summary */
.order-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.order-summary h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #333;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item span {
    color: #666;
}

.summary-item strong {
    color: #333;
}

/* Confirmation Actions */
.confirmation-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.confirmation-actions button {
    min-width: 200px;
}

/* ==========================================
   ORDER HISTORY SECTION
   ========================================== */

.telesales-orders-history {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.telesales-orders-history h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.telesales-orders-history h3 i {
    color: var(--primary-color);
}

.history-description {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
}

.loading-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-medium);
}

.loading-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-medium);
}

.empty-state i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.1rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 0.5rem;
}

.empty-state small {
    font-size: 0.9rem;
    color: var(--text-light);
}

.orders-table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
}

.orders-history-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.orders-history-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid var(--border-light);
}

.orders-history-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.orders-history-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    color: #555;
}

.orders-history-table tr:hover {
    background: #f9f9f9;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-verified {
    background: #d4edda;
    color: #155724;
}

.status-approved {
    background: #d1ecf1;
    color: #0c5460;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.btn-view-receipt {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-view-receipt:hover {
    background: #c8102e;
    transform: translateY(-1px);
}

.btn-view-receipt i {
    font-size: 0.9rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .telesales-progress {
        padding: 1rem;
    }
    
    .progress-line {
        width: 50px;
        margin: 0 0.5rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .telesales-card {
        padding: 1.5rem;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        max-width: 100%;
    }
    
    .confirmation-actions {
        flex-direction: column;
    }
    
    .confirmation-actions button {
        width: 100%;
    }
    
    .telesales-orders-history {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    .telesales-orders-history h3 {
        font-size: 1.25rem;
    }
    
    .orders-history-table {
        font-size: 0.85rem;
    }
    
    .orders-history-table th,
    .orders-history-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .btn-view-receipt {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* ==========================================
   TELESALES ADMIN SECTION
   ========================================== */

.telesales-admin-header {
    text-align: center;
    margin-bottom: 2rem;
}

/* Authorised Retailers panel (admin manages who can use telesales) */
.ts-access-panel {
    background: #fff;
    border: 1px solid var(--border-light, #e5e7eb);
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    margin-top: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ts-access-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.ts-access-panel-header h2 {
    font-size: 1.25rem;
    margin: 0 0 0.25rem 0;
    color: #1f2937;
}

.ts-access-panel-header h2 i {
    margin-right: 0.5rem;
    color: var(--primary-color, #06b085);
}

.ts-access-panel-header p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.ts-access-panel-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ts-access-panel-summary {
    background: rgba(6, 176, 133, 0.08);
    color: #047857;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.ts-access-btn {
    width: auto;
    padding: 0.55rem 1.25rem;
    font-size: 0.9rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.ts-access-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    overflow: hidden;
}

.ts-access-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    background: #fff;
}

.ts-access-item:last-child {
    border-bottom: 0;
}

.ts-access-item-info {
    flex: 1;
    min-width: 0;
}

.ts-access-item-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.ts-access-item-sub {
    color: #6b7280;
    font-size: 0.8rem;
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ts-access-empty {
    text-align: center;
    color: #9ca3af;
    padding: 1.5rem 1rem;
    font-style: italic;
    background: #fafafa;
}

.ts-access-revoke {
    background: transparent;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.ts-access-revoke:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.ts-access-revoke:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Authorise modal */
.ts-authoriser-modal {
    width: min(560px, 92vw);
    max-width: 560px;
}

.ts-authoriser-hint {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0 0 0.85rem 0;
}

.ts-authoriser-modal .filter-input {
    width: 100%;
    margin-bottom: 0.85rem;
}

.ts-authoriser-list {
    max-height: 50vh;
    overflow-y: auto;
}

.ts-access-grant {
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
}

.ts-access-grant:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.telesales-admin-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.telesales-admin-header p {
    color: #666;
    font-size: 1rem;
}

/* Stats Grid */
.telesales-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Filters */
.telesales-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.telesales-filters .filter-group {
    flex: 1;
    min-width: 200px;
}

/* Orders Table */
.telesales-table-container {
    overflow-x: auto;
}

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

.telesales-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.telesales-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.telesales-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.telesales-table tbody tr:hover {
    background-color: #f9f9f9;
}

.telesales-table td {
    padding: 1rem;
    color: #555;
    font-size: 0.95rem;
}

.telesales-table .status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.processed {
    background: #d4edda;
    color: #155724;
}

.status-badge.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.telesales-table .action-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.telesales-table .action-btn:hover {
    background: #00997f;
    transform: translateY(-2px);
}

/* Empty State */
.telesales-table .empty-state td {
    padding: 3rem;
    text-align: center;
}

/* Order Details Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.order-details-modal {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 2rem;
}

.order-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.order-info-section {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 12px;
}

.order-info-section.full-width {
    grid-column: 1 / -1;
}

.order-info-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #666;
}

.detail-value {
    color: #333;
    text-align: right;
}

.products-list {
    margin-top: 0.5rem;
}

.products-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.products-list li {
    padding: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #e0e0e0;
}

.products-list li:last-child {
    border-bottom: none;
}

.invoice-preview {
    margin-top: 1rem;
    text-align: center;
}

.invoice-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.detail-notes {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    color: #555;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    align-items: center;
}

.modal-footer .btn-primary,
.modal-footer .btn-danger,
.modal-footer .btn-secondary {
    width: auto;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}

.status-select {
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .telesales-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .telesales-filters {
        flex-direction: column;
    }
    
    .telesales-table-container {
        overflow-x: auto;
    }
    
    .telesales-table {
        min-width: 800px;
    }
    
    .order-details-grid {
        grid-template-columns: 1fr;
    }
    
    .order-info-section.full-width {
        grid-column: 1;
    }
    
    .modal-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-footer button {
        width: 100%;
    }
}

/* Telesales Orders Container */
.orders-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.orders-header {
    margin-bottom: 2rem;
}

.orders-header h2 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.orders-header h2 i {
    color: #007bff;
}

/* Revenue Dashboard Styles */
.revenue-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.revenue-stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.revenue-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.revenue-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.revenue-stat-content {
    flex: 1;
}

.revenue-stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.revenue-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.revenue-stat-percentage {
    font-size: 0.9rem;
    color: #28a745;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Brand Split Visualization */
.brand-split-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.brand-split-bar {
    display: flex;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.brand-split-winston,
.brand-split-camel {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease;
    position: relative;
}

.brand-split-winston {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.brand-split-camel {
    background: linear-gradient(135deg, #ffc107, #ff9800);
}

.brand-split-label {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.brand-split-legend {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #495057;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

/* Revenue Trend Chart */
.revenue-trend-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.revenue-trend-section h3 {
    margin-bottom: 1.5rem;
}

.revenue-trend-chart {
    min-height: 250px;
    margin-top: 1rem;
}

.trend-chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    height: 220px;
    padding: 1.5rem 0 1rem 0;
    margin-top: 1rem;
}

.trend-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.trend-bar-wrapper {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-top: 1.5rem;
}

.trend-bar {
    width: 80%;
    background: linear-gradient(180deg, #28a745, #20c997);
    border-radius: 6px 6px 0 0;
    transition: height 0.3s ease;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0.5rem;
    cursor: pointer;
    position: relative;
    min-height: 30px;
}

.trend-bar:hover {
    opacity: 0.85;
}

.trend-bar-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.trend-bar-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    text-align: center;
}

.trend-bar-orders {
    font-size: 0.75rem;
    color: #6c757d;
    text-align: center;
}

/* Line Chart Styles */
.trend-line-chart {
    position: relative;
    padding: 1.5rem 0;
    margin-top: 1rem;
}

.trend-line-chart svg {
    display: block;
    margin: 0 auto;
}

.trend-point {
    cursor: pointer;
    transition: r 0.2s ease;
}

.trend-line-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    position: relative;
    padding: 0 10%;
}

.trend-line-label {
    position: absolute;
    transform: translateX(-50%);
    text-align: center;
}

.label-month {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
}

.label-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.15rem;
}

.label-orders {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Product Analytics Container */
.analytics-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.analytics-header {
    margin-bottom: 2rem;
}

.analytics-header h2 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analytics-header h2 i {
    color: #007bff;
}

.product-analytics-table-container {
    overflow-x: auto;
}

.product-analytics-table {
    width: 100%;
    border-collapse: collapse;
}

.product-analytics-table thead {
    background: #f8f9fa;
}

.product-analytics-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-analytics-table th:first-child {
    width: 60px;
    text-align: center;
}

.product-analytics-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.product-analytics-table tbody tr:hover {
    background-color: #f8f9fa;
}

.product-analytics-table td {
    padding: 1rem;
    color: #495057;
}

.product-analytics-table td:first-child {
    text-align: center;
    font-weight: 600;
    color: #6c757d;
}

.product-analytics-table .product-name {
    font-weight: 600;
    color: #2c3e50;
}

.product-analytics-table .total-value {
    font-weight: 600;
    color: #28a745;
}

.popularity-bar-container {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.popularity-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.product-analytics-empty {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.product-analytics-empty p {
    margin: 0;
    font-size: 1rem;
}

/* Responsive for Product Analytics */
@media (max-width: 768px) {
    .analytics-container {
        padding: 1rem;
        margin-bottom: 2rem;
        border-radius: 8px;
    }
    
    .analytics-header h2 {
        font-size: 1.25rem;
    }
    
    .orders-container {
        padding: 1rem;
        margin-bottom: 1.5rem;
        border-radius: 8px;
    }
    
    .orders-header h2 {
        font-size: 1.25rem;
    }
    
    /* Revenue Dashboard Mobile */
    .revenue-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .revenue-stat-card {
        padding: 1rem;
    }
    
    .revenue-stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .revenue-stat-value {
        font-size: 1.5rem;
    }
    
    .brand-split-section,
    .revenue-trend-section {
        padding: 1rem;
    }
    
    .brand-split-bar {
        height: 50px;
    }
    
    .brand-split-label {
        font-size: 0.9rem;
    }
    
    .trend-chart-bars {
        height: 180px;
        gap: 0.5rem;
    }
    
    .trend-bar-wrapper {
        height: 140px;
    }
    
    .trend-bar-value {
        font-size: 0.65rem;
    }
    
    .trend-bar-label {
        font-size: 0.75rem;
    }
    
    .trend-bar-orders {
        font-size: 0.7rem;
    }
    
    .product-analytics-table {
        font-size: 0.85rem;
    }
    
    .product-analytics-table th,
    .product-analytics-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .product-analytics-table th {
        font-size: 0.75rem;
    }
}

/* Spinner animation for receipt analysis */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   FORUM STYLES
   ======================================== */

.forum-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Forum Filters */
.forum-filters {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.form-select:hover {
    border-color: var(--primary-color);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 168, 143, 0.1);
}

/* Forum Posts */
.forum-posts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.forum-post {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.forum-post:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.post-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #666;
}

.post-author {
    font-weight: 600;
    color: var(--primary-color);
}

.post-badges {
    display: flex;
    gap: 0.5rem;
}

.post-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-badge.region {
    background: #e8f5f3;
    color: var(--primary-color);
}

.post-badge.category {
    background: #f0f0f0;
    color: #555;
}

.post-content {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-content-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.post-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

.post-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-stat svg {
    width: 18px;
    height: 18px;
}

.post-date {
    font-size: 0.85rem;
    color: #999;
}

/* Forum Modal */
.forum-modal {
    max-width: 700px;
}

.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 168, 143, 0.1);
}

.character-count {
    text-align: right;
    font-size: 0.85rem;
    color: #999;
    margin-top: 0.25rem;
}

/* Post Detail */
.forum-post-detail {
    padding: 1rem 0;
}

.post-content-full {
    padding: 1.5rem 0;
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 1rem;
    white-space: pre-wrap;
}

/* Comments Section */
.comments-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.comments-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.comment {
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.comment-content {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.comment-date {
    font-size: 0.8rem;
    color: #999;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Empty State */
.forum-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}

.forum-empty svg {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.forum-empty h3 {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.forum-empty p {
    font-size: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .forum-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .forum-filters .btn {
        width: 100%;
    }
    
    .post-header {
        flex-direction: column;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .post-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* ========================================
   YOUR STORE STYLES (RETAILERS)
   ======================================== */

.your-store-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Profitability Banner */
.profitability-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #00a88f 0%, #00876f 100%);
    border-radius: 12px;
    color: white;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 168, 143, 0.2);
}

.banner-icon {
    font-size: 3rem;
}

.banner-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.banner-content p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* Store Section */
.store-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.region-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.region-filter label {
    font-weight: 600;
    color: var(--text-secondary);
}

.form-select-small {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

/* Staff Table */
.staff-table-wrapper {
    overflow-x: auto;
}

.staff-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.staff-table thead {
    background: #f8f9fa;
}

.staff-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid #e0e0e0;
}

.staff-table td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.staff-row {
    transition: background 0.2s;
}

.staff-row:hover {
    background: #f9f9f9;
}

.staff-row.pending {
    opacity: 0.7;
}

.staff-name-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.staff-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.staff-name {
    font-weight: 600;
    color: var(--text-primary);
}

.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.status-badge.status-active {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-invite_sent {
    background: #e0e7ff;
    color: #3730a3;
}

.status-badge.status-sms_failed {
    background: #fde2e2;
    color: #9b1c1c;
}

/* Invite cashiers — team table extras */
.section-header-actions {
    justify-content: space-between;
}

.sci-invite-btn {
    white-space: nowrap;
}

.staff-name-block {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.sci-phone {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.sci-row-actions {
    margin-top: 0.4rem;
    display: flex;
    gap: 0.75rem;
}

.sci-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
}

.sci-link:hover { text-decoration: underline; }
.sci-link-danger { color: #b91c1c; }

/* Invite cashiers — modal */
.sci-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.sci-modal {
    background: var(--bg-primary, #fff);
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.sci-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.sci-modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.sci-modal-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-secondary);
}

.sci-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.sci-help {
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.sci-help-warn {
    background: #fff7ed;
    border-left: 3px solid #d97706;
    color: #92400e;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
}

body.dark-mode .sci-help-warn {
    background: #2b1c06;
    color: #fcd34d;
}

.sci-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.1rem;
}

.sci-field > span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.sci-field select,
.sci-field textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
}

.sci-field textarea {
    resize: vertical;
    min-height: 110px;
}

.sci-error {
    background: #fde2e2;
    color: #9b1c1c;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

.sci-results {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sci-result-group {
    border-radius: 8px;
    border: 1px solid #eee;
    padding: 0.6rem 0.85rem;
}

.sci-result-group.sci-ok    { border-left: 4px solid #16a34a; }
.sci-result-group.sci-warn  { border-left: 4px solid #d97706; }
.sci-result-group.sci-muted { border-left: 4px solid #9ca3af; }

.sci-result-head {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.sci-result-group ul {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.sci-result-group li { margin-bottom: 0.2rem; }
.sci-result-phone { font-weight: 600; color: var(--text-primary); }
.sci-result-name  { margin-left: 0.4rem; }
.sci-result-msg   { display: block; font-size: 0.8rem; }

.sci-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
}

body.dark-mode .sci-modal {
    background: #1f2937;
}

body.dark-mode .sci-modal-header,
body.dark-mode .sci-modal-footer {
    border-color: #374151;
}

body.dark-mode .sci-field select,
body.dark-mode .sci-field textarea {
    background: #111827;
    border-color: #374151;
    color: #e5e7eb;
}

/* Staff table — modules column */
.staff-modules-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.staff-modules-count {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 40px;
    white-space: nowrap;
}

.staff-modules-count.complete {
    color: var(--primary-color);
}

.staff-modules-bar-wrapper {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    min-width: 80px;
}

.staff-modules-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, #00d4aa 100%);
    border-radius: 3px;
    transition: width 0.4s ease-out;
}

.staff-pts {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.section-sub {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Training Mini Display in Table */
.training-mini {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.training-mini-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.training-mini-label {
    min-width: 70px;
    color: #666;
}

.training-mini-bar {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    min-width: 80px;
}

.training-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, #00a88f 0%, #00d4aa 100%);
    transition: width 0.3s;
}

.training-mini-percent {
    min-width: 35px;
    text-align: right;
    font-weight: 600;
    color: var(--primary-color);
}

.submissions-count {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
}

.submissions-count.high {
    background: #d4edda;
    color: #155724;
}

.submissions-count.medium {
    background: #d1ecf1;
    color: #0c5460;
}

.submissions-count.low {
    background: #f8d7da;
    color: #721c24;
}

.last-active {
    color: #999;
    font-size: 0.9rem;
}

/* Training Cards */
.training-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.training-card {
    padding: 1.5rem;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
}

.training-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 168, 143, 0.1);
}

.training-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.training-card h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}

.training-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00a88f 0%, #00d4aa 100%);
    transition: width 0.3s;
}

.progress-text {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

.training-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Barometer Grid */
.barometer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.barometer-card {
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #f0f0f0;
    transition: all 0.3s;
}

.barometer-card.your-store {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 168, 143, 0.05) 0%, rgba(0, 168, 143, 0.1) 100%);
}

.barometer-card.regional-avg {
    border-color: #667eea;
}

.barometer-card.top-performer {
    border-color: #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 215, 0, 0.1) 100%);
}

.barometer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.barometer-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.rank-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    background: #f0f0f0;
    font-size: 0.85rem;
    font-weight: 600;
}

.barometer-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.stat-value.positive {
    color: #28a745;
}

/* Stories Grid */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.story-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: white;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.story-card.featured {
    border: 2px solid #ffd700;
}

.story-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.story-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    position: relative;
}

.story-card > div:first-child {
    position: relative;
}

.story-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.story-excerpt {
    padding: 0 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.story-author {
    padding: 0.5rem 1.5rem;
    font-style: italic;
    color: #999;
    font-size: 0.9rem;
}

.btn-story-read {
    margin: auto 1.5rem 1.5rem;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-story-read:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .profitability-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .staff-table {
        font-size: 0.85rem;
    }
    
    .staff-table th,
    .staff-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .training-mini {
        font-size: 0.8rem;
    }
    
    .barometer-grid,
    .stories-grid,
    .training-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   TRIP STORY SUBMISSION (RETAILERS)
   ======================================== */

/* Trip Story Banner */
.trip-story-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    flex-wrap: wrap;
}

.trip-story-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.trip-story-icon {
    font-size: 3.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.trip-story-text h3 {
    margin: 0 0 0.5rem 0;
    color: white;
    font-size: 1.5rem;
}

.trip-story-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.btn-submit-story {
    padding: 1rem 2rem;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-submit-story:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: #f8f9fa;
}

/* Rating Stars */
.rating-stars {
    display: flex;
    gap: 0.5rem;
    font-size: 2rem;
    margin: 0.5rem 0;
}

.rating-stars .star {
    cursor: pointer;
    color: #ddd;
    transition: all 0.2s;
    user-select: none;
}

.rating-stars .star:hover,
.rating-stars .star.active {
    color: #ffd700;
    transform: scale(1.1);
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.6;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Reward Info Box */
.reward-info-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1.25rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.reward-info-box strong {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.reward-info-box ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.reward-info-box li {
    padding: 0.35rem 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Form Hint */
.form-hint {
    display: block;
    margin-top: 0.5rem;
    color: #999;
    font-size: 0.85rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .trip-story-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .trip-story-content {
        flex-direction: column;
        text-align: center;
    }
    
    .btn-submit-story {
        width: 100%;
    }
    
    .rating-stars {
        justify-content: center;
    }
}

/* ========================================
   ACTIVE CAMPAIGNS & PRIZES
   ======================================== */

.active-campaigns-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.campaigns-prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.prize-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
    position: relative;
    border: 2px solid #f0f0f0;
}

.prize-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.prize-card.featured {
    border-color: #ffd700;
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}

.prize-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #ffd700;
    color: #333;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.prize-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.prize-card h4 {
    margin: 0 0 0.35rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.prize-description {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.prize-deadline {
    padding: 0.35rem 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
}

/* ========================================
   WINNINGS STORIES (CASHIERS)
   ======================================== */

.winnings-stories-section {
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
}

.section-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-share-story {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-share-story:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 143, 0.3);
}

.winnings-stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.winnings-story-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s;
}

.winnings-story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.story-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.story-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.story-meta {
    flex: 1;
}

.story-meta h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.story-location {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.story-prize-badge {
    padding: 0.35rem 0.75rem;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.story-image-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-icon {
    font-size: 4rem;
    opacity: 0.5;
}

.story-content {
    padding: 1.5rem;
}

.story-content h5 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.4;
}

.story-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.story-date {
    color: #999;
    font-size: 0.85rem;
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .campaigns-prizes-grid,
    .winnings-stories-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header-with-action {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-share-story {
        width: 100%;
    }
    
    .winnings-stories-section {
        padding: 1.5rem;
    }
}

/* ========================================
   PERFORMANCE SECTION (CASHIERS)
   ======================================== */

.performance-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.performance-stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.performance-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.performance-stat-card .stat-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.performance-stat-card .stat-content h3 {
    margin: 0;
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 700;
}

.performance-stat-card .stat-content p {
    margin: 0.25rem 0 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.performance-comparison-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

.performance-comparison-section::after {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color) 30%, rgba(102, 126, 234, 0.6) 70%, transparent);
}

.comparison-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
    text-align: center;
}

.comparison-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 0.875rem;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #05c99a 100%);
    color: white;
    box-shadow: 0 6px 16px rgba(6, 176, 133, 0.25);
}

.comparison-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.comparison-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.comparison-header span {
    font-weight: 600;
    color: var(--primary-color);
}

.barometer-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.barometer-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.barometer-item:hover {
    background: #f8f9fa;
}

.barometer-item.current-user {
    background: linear-gradient(135deg, #e8f5f3 0%, #f0f9f7 100%);
    border: 2px solid var(--primary-color);
    font-weight: 600;
}

.barometer-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: center;
}

.barometer-item.current-user .barometer-rank {
    color: var(--primary-color);
}

.barometer-rank.top-3 {
    color: #ffd700;
}

.barometer-info {
    flex: 1;
    min-width: 0;
}
.barometer-active-staff {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.barometer-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.barometer-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.barometer-bar-wrapper {
    width: 100%;
    background: #e9ecef;
    border-radius: 20px;
    height: 24px;
    overflow: hidden;
    position: relative;
}

.barometer-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, #00d4aa 100%);
    border-radius: 20px;
    transition: width 0.8s ease-out;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.75rem;
}

.barometer-bar.top-performer {
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 100%);
}

.barometer-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}

.barometer-sales-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 80px;
    text-align: right;
}

.performance-tips-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 2rem;
    border-left: 4px solid var(--primary-color);
}

.performance-tips-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tips-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    /* ── Overview stats ── */
    .performance-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .performance-stat-card {
        padding: 0.875rem;
        gap: 0.625rem;
        border-radius: 10px;
    }

    /* Remove hover lift on touch */
    .performance-stat-card:hover {
        transform: none;
    }

    .performance-stat-card .stat-icon {
        font-size: 1.75rem;
    }

    .performance-stat-card .stat-content h3 {
        font-size: 1.35rem;
    }

    .performance-stat-card .stat-content p {
        font-size: 0.78rem;
        line-height: 1.25;
    }

    /* ── Comparison sections ── */
    .performance-comparison-section {
        padding: 1.125rem;
        margin-bottom: 2rem;
        border-radius: 10px;
    }

    .performance-comparison-section::after {
        bottom: -1rem;
        width: 60%;
    }

    .comparison-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .comparison-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 0.625rem;
        border-radius: 11px;
    }

    .comparison-icon svg {
        width: 24px;
        height: 24px;
    }

    .comparison-header h2 {
        font-size: 1.15rem;
    }

    .comparison-header p {
        font-size: 0.85rem;
    }

    /* ── Barometer (leaderboard rows) ── */
    .barometer-container {
        gap: 0.875rem;
    }

    .barometer-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
        padding: 0.75rem;
        position: relative;
    }

    /* Top row: rank + name on one line */
    .barometer-rank {
        position: absolute;
        top: 0.75rem;
        left: 0.75rem;
        font-size: 1.05rem;
        min-width: 28px;
        text-align: left;
    }

    .barometer-info {
        padding-left: 2rem;
    }

    .barometer-name {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    .barometer-badge {
        font-size: 0.68rem;
        padding: 0.1rem 0.4rem;
    }

    .barometer-bar-wrapper {
        height: 18px;
    }

    .barometer-value {
        font-size: 0.75rem;
    }

    .barometer-sales-count {
        font-size: 0.78rem;
        text-align: left;
        min-width: 0;
        margin-top: 0.1rem;
    }

    /* ── Tips card ── */
    .performance-tips-card {
        padding: 1.125rem;
        border-radius: 10px;
        border-left-width: 3px;
    }

    .performance-tips-card h3 {
        font-size: 1.05rem;
        margin-bottom: 0.75rem;
    }

    .tips-list li {
        padding: 0.5rem 0 0.5rem 1.5rem;
        font-size: 0.875rem;
        line-height: 1.5;
    }

    .tips-list li::before {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    /* On very small screens single-column stats fit better */
    .performance-overview {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }

    .performance-stat-card {
        padding: 0.75rem 0.875rem;
    }

    .performance-stat-card .stat-icon {
        font-size: 1.5rem;
    }

    .performance-stat-card .stat-content h3 {
        font-size: 1.25rem;
    }

    .performance-comparison-section {
        padding: 1rem 0.875rem;
    }

    .comparison-header h2 {
        font-size: 1.05rem;
    }

    .performance-tips-card {
        padding: 1rem 0.875rem;
    }
}

/* ----------------------------------------
   MODULE PROGRESS CARDS
   ---------------------------------------- */

.perf-module-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.perf-module-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    background: white;
    border: 2px solid #e9ecef;
    transition: all 0.2s;
}

.perf-module-card.completed {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f0faf8 0%, #ffffff 100%);
}

.perf-module-card.in-progress {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fffdf0 0%, #ffffff 100%);
}

.perf-module-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e9ecef;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.perf-module-card.completed .perf-module-number {
    background: var(--primary-color);
    color: white;
}

.perf-module-card.in-progress .perf-module-number {
    background: #ffc107;
    color: white;
}

.perf-module-info {
    flex: 1;
    min-width: 0;
}

.perf-module-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.perf-module-status-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.perf-module-card.completed .perf-module-status-label {
    color: var(--primary-color);
    font-weight: 600;
}

.perf-module-card.in-progress .perf-module-status-label {
    color: #d4a100;
    font-weight: 600;
}

.perf-module-time {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}
body.dark-mode .perf-module-time {
    color: #cbd5e1;
}

.perf-module-pts {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 120px;
    text-align: right;
    white-space: nowrap;
}

.perf-module-card.completed .perf-module-pts {
    color: var(--primary-color);
    font-weight: 600;
}

@media (max-width: 768px) {
    .perf-module-list {
        gap: 0.5rem;
    }

    .perf-module-card {
        padding: 0.75rem 0.875rem;
        gap: 0.75rem;
        align-items: center;
        border-width: 1px;
        border-radius: 8px;
    }

    /* Remove the awkward 52px nudge — pts now sit on the right inline */
    .perf-module-number {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }

    .perf-module-title {
        font-size: 0.875rem;
        margin-bottom: 0.1rem;
    }

    .perf-module-status-label {
        font-size: 0.72rem;
    }

    .perf-module-pts {
        font-size: 0.75rem;
        min-width: 0;
        text-align: right;
        flex-shrink: 0;
    }
}

/* Achievers updated logo has a near-square source; crop it to the
   original wide (8:3) button footprint so buttons keep their size. */
img[src*="jti-achievers-logo-updated"].platform-redirect-image,
img[src*="jti-achievers-logo-updated"].comparison-logo {
    aspect-ratio: 8 / 3;
    height: auto;
    object-fit: cover;
    object-position: center;
}

/* ============================================================
   Platform Membership (JTI-Connect vs JTI Achievers)
   ============================================================ */
.dashboard-section-sub {
    color: #6b7280;
    font-size: 0.85rem;
    margin: -0.5rem 0 1rem;
}
.membership-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 900px) {
    .membership-grid { grid-template-columns: 1fr; }
}
.membership-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.4rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-top: 4px solid #00a88f;
}
.membership-achievers { border-top-color: #667eea; }
.membership-header {
    margin-bottom: 1.1rem;
}
.membership-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1f2937;
}
.membership-subtitle {
    color: #6b7280;
    font-size: 0.8rem;
}
.membership-body {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.membership-stats {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.membership-stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #f1f3f8;
}
.membership-stat:last-child { border-bottom: none; }
.membership-stat .ms-label {
    color: #6b7280;
    font-size: 0.85rem;
}
.membership-stat .ms-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    transition: color 0.15s;
}
.membership-stat .ms-value[style*="cursor:pointer"]:hover,
.membership-stat .ms-value[style*="cursor: pointer"]:hover {
    color: #00a88f;
    text-decoration: underline;
}
.membership-donut-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    margin-left: auto;
}
.membership-donut { width: 100%; height: 100%; }
.membership-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.membership-donut-center .md-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.1;
}
.membership-donut-center .md-label {
    font-size: 0.58rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

body.dark-mode .membership-card { background: #1f2937; }
body.dark-mode .membership-card .ms-value,
body.dark-mode .membership-card .md-value,
body.dark-mode .membership-card h3 { color: #f3f4f6; }
body.dark-mode .membership-stat { border-bottom-color: #374151; }

/* ============================================================
   Training Completion section
   ============================================================ */
.training-kpi-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.training-kpi-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-top: 4px solid #667eea;
    min-width: 180px;
}
.training-kpi-card .tk-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.1;
}
.training-kpi-card .tk-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-top: 0.3rem;
}
.training-kpi-card .tk-sub {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.15rem;
}
.training-module-row {
    background: #fff;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem 1.5rem;
    align-items: center;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.tm-row-link {
    cursor: pointer;
}
.tm-row-link:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

/* Make the training-completion KPI tile feel clickable when wired up. */
.training-kpi-card[style*="cursor: pointer"]:hover,
.training-kpi-card[style*="cursor:pointer"]:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.training-module-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}
.training-module-meta {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.2rem;
}
/* Archived module rows in the training breakdown — completion data is kept
   but the module is no longer live to cashiers, so it's visually muted. */
.tm-archived-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.05rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    background: #e5e7eb;
    border-radius: 8px;
    vertical-align: middle;
}
.training-module-row.tm-row-archived {
    opacity: 0.78;
}
body.dark-mode .tm-archived-badge {
    color: #d1d5db;
    background: #374151;
}
.training-module-meta.tm-time-split {
    font-size: 0.72rem;
    color: #9ca3af;
    margin-top: 0.1rem;
}
.training-module-counts {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}
.tm-stat-sep {
    color: #d1d5db;
    font-size: 0.85rem;
}
.tm-stat-btn {
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    padding: 0.2rem 0.6rem;
    transition: background 0.15s, color 0.15s;
}
.tm-started {
    color: #667eea;
    background: #eff2ff;
}
.tm-started:hover { background: #667eea; color: #fff; }
.tm-completed {
    color: #00a88f;
    background: #ecfdf5;
}
.tm-completed:hover { background: #00a88f; color: #fff; }
.training-module-bar-wrap {
    grid-column: 1 / -1;
    background: #f3f4f6;
    border-radius: 6px;
    height: 8px;
    overflow: hidden;
}
.training-module-bar {
    height: 100%;
    background: linear-gradient(90deg, #00a88f, #667eea);
    border-radius: 6px;
    transition: width 0.5s ease;
}
body.dark-mode .training-kpi-card,
body.dark-mode .training-module-row { background: #1f2937; }
body.dark-mode .training-module-title,
body.dark-mode .training-kpi-card .tk-value { color: #f3f4f6; }
body.dark-mode .training-module-bar-wrap { background: #374151; }
body.dark-mode .tm-started  { background: #312e81; color: #a5b4fc; }
body.dark-mode .tm-completed { background: #064e3b; color: #6ee7b7; }

/* ── Redeem Points button (centered call-to-action on profile card) ──── */
.btn-redeem {
    padding: 0.85rem 2.4rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    background: linear-gradient(135deg, #00a88f 0%, #0d8a76 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,168,143,0.32);
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
    /* Subtle attention-drawing pulse — fades the glow in/out without
       moving the button so it doesn't feel jittery. */
    animation: redeemPulse 2.4s ease-in-out infinite;
}
.btn-redeem:hover:not(:disabled) {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0,168,143,0.45);
}
.btn-redeem:disabled,
.btn-redeem.btn-locked {
    background: #d1d5db;
    color: #6b7280;
    cursor: default;
    transform: none;
    box-shadow: none;
    animation: none;
}
@keyframes redeemPulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(0,168,143,0.32); }
    50%      { box-shadow: 0 6px 22px rgba(0,168,143,0.55); }
}
@media (prefers-reduced-motion: reduce) {
    .btn-redeem { animation: none; }
}
.redeem-points-tile {
    margin-top: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: center;
}
.redeem-tile-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.redeem-tile-value {
    font-weight: 700;
    font-size: 1rem;
    color: #00a88f;
}
body.dark-mode .redeem-points-tile { border-top-color: #374151; }
body.dark-mode .redeem-tile-value { color: #34d399; }

/* ── Redeem modal shell ───────────────────────────────────────────────── */
.redeem-modal { align-items: center; justify-content: center; padding: 1.5rem; }
.redeem-modal-box {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    overflow: hidden;
}
.redeem-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}
.redeem-modal-header h2 { margin: 0; font-size: 1.15rem; color: #1a1a2e; }
.redeem-modal-body { padding: 1.5rem; }
.redeem-modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

/* ── Modal body copy ─────────────────────────────────────────────────── */
.redeem-icon {
    text-align: center;
    margin-bottom: 0.75rem;
    line-height: 0;
}
.redeem-icon .flame-icon {
    width: 3rem;
    height: 3rem;
    display: inline-block;
}
.redeem-points-display {
    text-align: center;
    font-size: 1.1rem;
    color: #1a1a2e;
    margin-bottom: 1rem;
}
.redeem-body-text {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}
.redeem-confirm-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9rem;
}
.redeem-confirm-label { color: #6b7280; }
.redeem-confirm-value { font-weight: 600; color: #1a1a2e; }
.redeem-disclaimer {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #9ca3af;
    line-height: 1.5;
}

/* ── Success state ───────────────────────────────────────────────────── */
.redeem-success-body { text-align: center; }
.redeem-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00a88f 0%, #0d8a76 100%);
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}
.redeem-success-footer { justify-content: center; }

/* ── Modal action buttons ────────────────────────────────────────────── */
.btn-redeem-primary {
    padding: 0.55rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, #00a88f 0%, #0d8a76 100%);
    color: #fff;
    transition: opacity 0.2s;
}
.btn-redeem-primary:hover:not(:disabled) { opacity: 0.88; }
.btn-redeem-primary:disabled { opacity: 0.5; cursor: default; }
.btn-redeem-cancel {
    padding: 0.55rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    color: #374151;
    transition: background 0.15s;
}
.btn-redeem-cancel:hover { background: #f9fafb; }

/* ── Dark mode overrides ─────────────────────────────────────────────── */
body.dark-mode .redeem-modal-box { background: #1f2937; }
body.dark-mode .redeem-modal-header { border-bottom-color: #374151; }
body.dark-mode .redeem-modal-header h2 { color: #f3f4f6; }
body.dark-mode .redeem-modal-footer { background: #111827; border-top-color: #374151; }
body.dark-mode .redeem-body-text { color: #9ca3af; }
body.dark-mode .redeem-confirm-summary { border-bottom-color: #374151; }
body.dark-mode .redeem-confirm-value { color: #f3f4f6; }
body.dark-mode .redeem-points-display { color: #f3f4f6; }
body.dark-mode .btn-redeem-cancel { background: #374151; border-color: #4b5563; color: #e5e7eb; }
body.dark-mode .btn-redeem-cancel:hover { background: #4b5563; }

/* ── Recent Redemptions table ────────────────────────────────────────── */
.redemptions-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}
.redemptions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.redemptions-table thead tr {
    background: #f9fafb;
}
.redemptions-table th {
    padding: 0.65rem 0.9rem;
    text-align: left;
    font-weight: 600;
    color: #6b7280;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}
.redemptions-table td {
    padding: 0.7rem 0.9rem;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}
.redemptions-table tbody tr:last-child td { border-bottom: none; }
.redemptions-table tbody tr:hover td { background: #f9fafb; }
.redemptions-row-link { cursor: pointer; }
.redemptions-row-link:hover td { background: #f0fdf4; }

.redemptions-empty {
    text-align: center;
    color: #9ca3af;
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

/* Status badges */
.rdm-status {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: capitalize;
}
.rdm-status-pending   { background: #fef3c7; color: #92400e; }
.rdm-status-completed { background: #d1fae5; color: #065f46; }
.rdm-status-reversed  { background: #fee2e2; color: #991b1b; }

/* Reference cell */
.rdm-ref {
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 0.78rem;
    color: #6b7280;
}

/* Dark mode — redemptions table */
body.dark-mode .redemptions-table-wrap { border-color: #374151; }
body.dark-mode .redemptions-table thead tr { background: #1f2937; }
body.dark-mode .redemptions-table th { color: #9ca3af; border-bottom-color: #374151; }
body.dark-mode .redemptions-table td { color: #d1d5db; border-bottom-color: #1f2937; }
body.dark-mode .redemptions-table tbody tr:hover td { background: #1f2937; }
body.dark-mode .redemptions-empty { color: #6b7280; }
body.dark-mode .rdm-ref { color: #9ca3af; }
body.dark-mode .rdm-status-pending   { background: #451a03; color: #fcd34d; }
body.dark-mode .rdm-status-completed { background: #022c22; color: #6ee7b7; }
body.dark-mode .rdm-status-reversed  { background: #450a0a; color: #fca5a5; }

/* =====================================================================
   Drill-down drawer (Surface A) + Admin Profile modal (Surface B)
   ===================================================================== */

/* Affordance: any element that opens a drill-down */
.is-drillable { cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; }
.is-drillable:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.08); }

/* ── Drawer ────────────────────────────────────────────────────────── */
.drill-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 4000;
}
.drill-drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(880px, 95vw);
    background: #fff;
    box-shadow: -8px 0 24px rgba(0,0,0,0.12);
    z-index: 4001;
    display: flex; flex-direction: column;
    animation: drillSlideIn 0.18s ease-out;
}
@keyframes drillSlideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.drill-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}
.drill-header h2 { margin: 0; font-size: 1.15rem; color: #111827; }
.drill-close {
    background: none; border: none; font-size: 1.6rem; line-height: 1;
    color: #6b7280; cursor: pointer; padding: 0 0.4rem;
}
.drill-close:hover { color: #111827; }

.drill-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding: 0.6rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}
.drill-search {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 0.875rem;
}
.drill-toolbar-right { display: flex; align-items: center; gap: 0.75rem; }
.drill-total { font-size: 0.825rem; color: #6b7280; }
.btn-drill-csv {
    padding: 0.45rem 0.85rem;
    font-size: 0.825rem; font-weight: 500;
    background: linear-gradient(135deg, #00a88f 0%, #0d8a76 100%);
    color: #fff; border: none; border-radius: 8px; cursor: pointer;
    transition: opacity 0.15s;
}
.btn-drill-csv:hover:not(:disabled) { opacity: 0.88; }
.btn-drill-csv:disabled { opacity: 0.5; cursor: default; }

.drill-summary {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    background: linear-gradient(135deg, #f0fdf9 0%, #f9fafb 100%);
}
.drill-summary-row {
    display: flex; flex-wrap: wrap; gap: 0.75rem;
}
.drill-summary-tile {
    flex: 1 1 0; min-width: 140px;
    padding: 0.6rem 0.85rem;
    background: #fff;
    border: 1px solid #e5e7eb; border-radius: 8px;
}
.drill-summary-label {
    font-size: 0.72rem; font-weight: 600;
    color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em;
}
.drill-summary-value {
    margin-top: 0.2rem;
    font-size: 1.05rem; font-weight: 600; color: #111827;
}
.drill-summary-note {
    margin-top: 0.45rem;
    font-size: 0.75rem; color: #6b7280;
}

.drill-table-wrap {
    flex: 1; overflow: auto;
    padding: 0 1.25rem;
}
.drill-table {
    width: 100%; border-collapse: collapse;
    font-size: 0.85rem;
}
.drill-table thead th {
    position: sticky; top: 0; background: #f9fafb;
    padding: 0.6rem 0.5rem; text-align: left;
    font-weight: 600; color: #6b7280; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 0.04em;
    border-bottom: 1px solid #e5e7eb;
    user-select: none;
}
.drill-th.sort-asc::after  { content: ' ↑'; opacity: 0.7; }
.drill-th.sort-desc::after { content: ' ↓'; opacity: 0.7; }
.drill-table tbody td {
    padding: 0.55rem 0.5rem;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}
.drill-row-link { cursor: pointer; }
.drill-row-link:hover td { background: #f0fdf4; }
.drill-empty {
    text-align: center; color: #9ca3af; padding: 2rem 1rem; font-size: 0.9rem;
}
.drill-error { color: #b91c1c; }

.drill-footer {
    display: flex; align-items: center; justify-content: center; gap: 1rem;
    padding: 0.6rem 1.25rem;
    border-top: 1px solid #e5e7eb;
}
.drill-page-btn {
    padding: 0.35rem 0.85rem; font-size: 0.825rem;
    background: #fff; border: 1px solid #d1d5db; border-radius: 6px;
    cursor: pointer; color: #374151;
}
.drill-page-btn:hover:not(:disabled) { background: #f9fafb; }
.drill-page-btn:disabled { opacity: 0.45; cursor: default; }
.drill-page-info { font-size: 0.825rem; color: #6b7280; }

/* ── Admin profile modal (Surface B) ──────────────────────────────── */
.ap-modal {
    position: fixed; inset: 0; z-index: 4100;
    background: rgba(0,0,0,0.45);
    align-items: center; justify-content: center;
}
.ap-modal-box {
    width: min(960px, 95vw); height: min(85vh, 820px);
    background: #fff; border-radius: 14px;
    display: flex; flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.25);
}
.ap-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}
.ap-header h2 { margin: 0; font-size: 1.25rem; color: #111827; }
.ap-subtitle { margin: 0.15rem 0 0; font-size: 0.825rem; color: #6b7280; }
.ap-close {
    background: none; border: none; font-size: 1.6rem; line-height: 1;
    color: #6b7280; cursor: pointer; padding: 0 0.4rem;
}
.ap-close:hover { color: #111827; }

.ap-tabs {
    display: flex; gap: 0.25rem;
    padding: 0 1.25rem; background: #fff;
    border-bottom: 1px solid #e5e7eb;
}
.ap-tab {
    padding: 0.65rem 1rem;
    background: none; border: none; cursor: pointer;
    font-size: 0.875rem; color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.ap-tab:hover { color: #111827; }
.ap-tab.active { color: #0d8a76; border-bottom-color: #0d8a76; font-weight: 600; }

.ap-content {
    flex: 1; overflow: auto;
    padding: 1.25rem;
}

.ap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.6rem 1.5rem;
}
.ap-row {
    display: flex; flex-direction: column; gap: 0.15rem;
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid #f3f4f6;
}
.ap-row-label { font-size: 0.72rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; }
.ap-row-value { font-size: 0.9rem; color: #111827; }

.ap-table {
    width: 100%; border-collapse: collapse;
    font-size: 0.85rem;
}
.ap-table th {
    text-align: left; padding: 0.5rem 0.6rem;
    background: #f9fafb;
    font-weight: 600; color: #6b7280;
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em;
    border-bottom: 1px solid #e5e7eb;
}
.ap-table td {
    padding: 0.55rem 0.6rem;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}
.ap-mono { font-family: ui-monospace, 'Cascadia Code', monospace; font-size: 0.78rem; }
.ap-tag-ok  { color: #047857; font-weight: 700; }
.ap-tag-bad { color: #b91c1c; font-weight: 700; }
.ap-empty { color: #9ca3af; text-align: center; padding: 2rem; }
.ap-error { color: #b91c1c; padding: 1rem; }

.ap-progress {
    display: inline-block; vertical-align: middle;
    width: 80px; height: 8px;
    background: #e5e7eb; border-radius: 4px; overflow: hidden;
    margin-right: 0.4rem;
}
.ap-progress-bar { height: 100%; background: linear-gradient(90deg, #00a88f, #0d8a76); }
.ap-progress-pct { font-size: 0.78rem; color: #6b7280; }

/* ── Dark mode ───────────────────────────────────────────────────── */
body.dark-mode .drill-drawer       { background: #111827; box-shadow: -8px 0 24px rgba(0,0,0,0.6); }
body.dark-mode .drill-header       { border-bottom-color: #1f2937; }
body.dark-mode .drill-header h2    { color: #f3f4f6; }
body.dark-mode .drill-toolbar      { border-bottom-color: #1f2937; }
body.dark-mode .drill-search       { background: #1f2937; border-color: #374151; color: #e5e7eb; }
body.dark-mode .drill-table thead th { background: #1f2937; color: #9ca3af; border-bottom-color: #374151; }
body.dark-mode .drill-table tbody td { color: #d1d5db; border-bottom-color: #1f2937; }
body.dark-mode .drill-row-link:hover td { background: #064e3b; }
body.dark-mode .drill-footer       { border-top-color: #1f2937; }
body.dark-mode .drill-summary      { background: linear-gradient(135deg, #064e3b 0%, #111827 100%); border-bottom-color: #1f2937; }
body.dark-mode .drill-summary-tile { background: #1f2937; border-color: #374151; }
body.dark-mode .drill-summary-label{ color: #9ca3af; }
body.dark-mode .drill-summary-value{ color: #f3f4f6; }
body.dark-mode .drill-summary-note { color: #9ca3af; }
body.dark-mode .drill-page-btn     { background: #1f2937; border-color: #374151; color: #e5e7eb; }
body.dark-mode .drill-page-btn:hover:not(:disabled) { background: #374151; }

body.dark-mode .ap-modal-box       { background: #111827; }
body.dark-mode .ap-header          { border-bottom-color: #1f2937; }
body.dark-mode .ap-header h2       { color: #f3f4f6; }
body.dark-mode .ap-subtitle        { color: #9ca3af; }
body.dark-mode .ap-tabs            { background: #111827; border-bottom-color: #1f2937; }
body.dark-mode .ap-tab             { color: #9ca3af; }
body.dark-mode .ap-tab:hover       { color: #f3f4f6; }
body.dark-mode .ap-tab.active      { color: #00d4af; border-bottom-color: #00d4af; }
body.dark-mode .ap-row             { border-bottom-color: #1f2937; }
body.dark-mode .ap-row-label       { color: #9ca3af; }
body.dark-mode .ap-row-value       { color: #f3f4f6; }
body.dark-mode .ap-table th        { background: #1f2937; color: #9ca3af; border-bottom-color: #374151; }
body.dark-mode .ap-table td        { color: #d1d5db; border-bottom-color: #1f2937; }
body.dark-mode .ap-progress        { background: #1f2937; }

/* ── My Rewards (cashier voucher picker) ────────────────────────────── */
.my-rewards-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.my-rewards-balance-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid #eef0f5;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.my-rewards-balance-lifetime {
    background: linear-gradient(135deg, #f7f6ff 0%, #eef2ff 100%);
}
.mr-balance-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary, #6b7280);
    font-weight: 600;
}
.mr-balance-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-primary, #111827);
}

.my-rewards-category {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem 1.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid #eef0f5;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.mr-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}
.mr-cat-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary, #111827);
}
.mr-cat-sub {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary, #6b7280);
}
.mr-cat-min {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.1rem 0.5rem;
    font-size: 0.72rem;
    background: #f3f4f6;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 600;
}
.mr-cat-icon {
    font-size: 1.8rem;
    line-height: 1;
    flex-shrink: 0;
}

.mr-voucher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 1rem;
    padding: 0.25rem 0 0.75rem;
}

.mr-voucher-circle {
    aspect-ratio: 1;
    border-radius: 50%;
    background: #fafafa;
    border: 2px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.72rem;
    text-align: center;
    line-height: 1.1;
    padding: 0.4rem;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.mr-voucher-circle.is-placeholder::before {
    content: "+";
    font-size: 1.6rem;
    font-weight: 300;
    color: #c4c8d2;
}

.mr-voucher-circle.is-real {
    border-style: solid;
    cursor: pointer;
    background: #fff;
}
.mr-voucher-circle.is-real:hover {
    border-color: var(--primary-color, #d4172b);
    background: #fff7f8;
}

.mr-cat-empty {
    margin: 0.5rem 0 0;
    font-size: 0.83rem;
    color: #9ca3af;
    font-style: italic;
}

.mr-footnote {
    margin: 0.5rem 0 0;
    font-size: 0.82rem;
    color: var(--text-secondary, #6b7280);
}

/* Dark mode */
body.dark-mode .my-rewards-balance-card,
body.dark-mode .my-rewards-category { background: #1f2937; border-color: #374151; }
body.dark-mode .my-rewards-balance-lifetime { background: linear-gradient(135deg, #1f2937 0%, #312e81 100%); }
body.dark-mode .mr-balance-value,
body.dark-mode .mr-cat-title { color: #f3f4f6; }
body.dark-mode .mr-balance-label,
body.dark-mode .mr-cat-sub,
body.dark-mode .mr-footnote { color: #9ca3af; }
body.dark-mode .mr-cat-min { background: #374151; color: #d1d5db; }
body.dark-mode .mr-voucher-circle { background: #111827; border-color: #4b5563; color: #6b7280; }
body.dark-mode .mr-voucher-circle.is-placeholder::before { color: #4b5563; }
body.dark-mode .mr-voucher-circle.is-real { background: #1f2937; }
body.dark-mode .mr-voucher-circle.is-real:hover { background: #312e81; }

/* ── Admin Rewards (voucher catalog management) ─────────────────────── */
.admin-rewards-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(340px, 1.5fr);
    gap: 1.25rem;
    align-items: flex-start;
}
@media (max-width: 900px) {
    .admin-rewards-grid { grid-template-columns: 1fr; }
}

.admin-rewards-card {
    background: #fff;
    border: 1px solid #eef0f5;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.ar-card-title {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #111827);
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}
.ar-count {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary, #6b7280);
    background: #f3f4f6;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
}

/* Add-voucher form */
.ar-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}
.ar-field-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
}
.ar-input {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    font-size: 0.95rem;
    background: #fff;
    color: var(--text-primary, #111827);
    width: 100%;
    box-sizing: border-box;
}
.ar-input:focus {
    outline: none;
    border-color: var(--primary-color, #d4172b);
    box-shadow: 0 0 0 3px rgba(212, 23, 43, 0.15);
}
.ar-input.ar-file {
    padding: 0.45rem;
    background: #fafafa;
}
.ar-image-preview {
    margin-top: 0.5rem;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    padding: 0.4rem;
    max-width: 140px;
    background: #fafafa;
}
.ar-image-preview img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    object-fit: contain;
}
.ar-submit {
    margin-top: 0.5rem;
    width: 100%;
}

.ar-alert {
    padding: 0.6rem 0.85rem;
    border-radius: 6px;
    font-size: 0.88rem;
    margin-bottom: 0.85rem;
    border: 1px solid transparent;
}
.ar-alert-success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.ar-alert-error   { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.ar-alert-info    { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }

/* Voucher list */
.ar-voucher-list { display: flex; flex-direction: column; gap: 1.25rem; }
.ar-voucher-group {}
.ar-group-title {
    margin: 0 0 0.5rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-secondary, #4b5563);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ar-group-count {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.05rem 0.5rem;
    font-size: 0.72rem;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 999px;
    font-weight: 600;
}
.ar-voucher-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.ar-voucher-row {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 0.9rem;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: #fafafa;
    border: 1px solid #eef0f5;
    border-radius: 10px;
}
.ar-voucher-image {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ar-voucher-image img { width: 100%; height: 100%; object-fit: cover; }
.ar-voucher-image-empty {
    font-size: 0.7rem;
    color: #9ca3af;
}
.ar-voucher-brand { font-weight: 700; color: var(--text-primary, #111827); }
.ar-voucher-desc { font-size: 0.85rem; color: var(--text-secondary, #6b7280); }
.ar-voucher-cost { font-size: 0.85rem; font-weight: 600; color: var(--primary-color, #d4172b); margin-top: 0.15rem; }
/* Hide + Delete buttons sit side-by-side in their own action column. */
.ar-voucher-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: stretch;
}

.ar-voucher-delete {
    background: #fff;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ar-voucher-delete:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}
.ar-voucher-delete:disabled {
    opacity: 0.55;
    cursor: progress;
}

/* Hide / Unhide voucher toggle */
.ar-voucher-toggle {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #4b5563;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ar-voucher-toggle:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}
.ar-voucher-toggle.is-hidden {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}
.ar-voucher-toggle.is-hidden:hover {
    background: #d1fae5;
}
.ar-voucher-toggle:disabled {
    opacity: 0.55;
    cursor: progress;
}

/* Hidden voucher rows are dimmed in the admin list so they're visually
   demoted but still scannable for unhide. */
.ar-voucher-row-hidden {
    opacity: 0.55;
    background: #f9fafb;
}
.ar-voucher-row-hidden .ar-voucher-image,
.ar-voucher-row-hidden .ar-voucher-image img {
    filter: grayscale(60%);
}
.ar-voucher-hidden-pill {
    display: inline-block;
    margin-left: 0.45rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
    background: #e5e7eb;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    vertical-align: middle;
}

body.dark-mode .ar-voucher-toggle {
    background: #111827; border-color: #4b5563; color: #d1d5db;
}
body.dark-mode .ar-voucher-toggle:hover { background: #1f2937; color: #f3f4f6; }
body.dark-mode .ar-voucher-toggle.is-hidden {
    background: #064e3b; border-color: #065f46; color: #a7f3d0;
}
body.dark-mode .ar-voucher-toggle.is-hidden:hover { background: #047857; }
body.dark-mode .ar-voucher-row-hidden { background: #111827; }
body.dark-mode .ar-voucher-hidden-pill { background: #374151; color: #9ca3af; }

body.dark-mode .ar-voucher-delete {
    background: #111827;
    border-color: #7f1d1d;
    color: #fca5a5;
}
body.dark-mode .ar-voucher-delete:hover {
    background: #450a0a;
    border-color: #991b1b;
    color: #fecaca;
}
.ar-empty {
    margin: 0;
    padding: 0.75rem 0;
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    font-size: 0.9rem;
}
.ar-empty-error { color: #b91c1c; font-style: normal; }

/* Voucher tiles on the cashier My Rewards page — circle + caption below */
.mr-voucher-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: none;
    border: none;
    padding: 0;
    gap: 0.4rem;
    cursor: default;
}
.mr-voucher-tile-real {
    cursor: pointer;
    transition: transform 0.15s ease;
}
.mr-voucher-tile-real:hover { transform: translateY(-2px); }
.mr-voucher-tile-real:hover .mr-voucher-circle.is-real { border-color: var(--primary-color, #d4172b); }

.mr-voucher-tile .mr-voucher-circle {
    width: 100%;
    aspect-ratio: 1;
    margin: 0;
}
.mr-voucher-circle.is-real {
    position: relative;
    overflow: hidden;
    padding: 0;
    background: #fff;
    border: 2px solid #e5e7eb;
}
.mr-voucher-circle.is-real img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.mr-voucher-initials {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4b5563;
}

.mr-voucher-brand {
    font-weight: 700;
    color: var(--text-primary, #111827);
    font-size: 0.9rem;
    line-height: 1.15;
    margin-top: 0.15rem;
}
.mr-voucher-value {
    font-size: 0.78rem;
    color: var(--text-secondary, #6b7280);
    line-height: 1.2;
}
.mr-voucher-cost {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-color, #d4172b);
    background: rgba(212, 23, 43, 0.08);
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    margin-top: 0.15rem;
}

/* ─── Winnings (quiz prizes + target voucher rewards) ─────────────────── */
.mr-winnings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}
.mr-winning-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
    padding: 1rem 0.85rem 0.85rem;
    background: var(--card-bg, #fff);
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}
.mr-winning-tile.is-claimable {
    border-color: var(--primary-color, #d4172b);
    box-shadow: 0 2px 10px rgba(212, 23, 43, 0.12);
}
.mr-winning-tile .mr-voucher-circle.is-real {
    width: 64px;
    height: 64px;
    aspect-ratio: 1;
    margin: 0;
}
.mr-winning-brand {
    font-weight: 700;
    color: var(--text-primary, #111827);
    font-size: 0.9rem;
    line-height: 1.15;
}
.mr-winning-custom {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    vertical-align: middle;
}
.mr-winning-value {
    font-size: 0.78rem;
    color: var(--text-secondary, #6b7280);
    line-height: 1.2;
}
.mr-winning-ctx {
    font-size: 0.7rem;
    color: var(--text-secondary, #9ca3af);
    line-height: 1.2;
}
.mr-winning-claim {
    margin-top: 0.35rem;
    border: none;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    background: var(--primary-color, #d4172b);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    transition: opacity 0.15s ease;
}
.mr-winning-claim:hover { opacity: 0.9; }
.mr-winning-claim:disabled { opacity: 0.6; cursor: default; }
.mr-winning-sent {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #059669;
}
body.dark-mode .mr-winning-tile { background: #1f2937; border-color: #4b5563; }
body.dark-mode .mr-winning-brand { color: #f3f4f6; }
body.dark-mode .mr-winning-value,
body.dark-mode .mr-winning-ctx { color: #9ca3af; }
body.dark-mode .mr-winning-custom { background: #374151; color: #d1d5db; }

/* ─── Winnings popup (one-time "you won!" on page load) ───────────────── */
.wp-overlay {
    position: fixed;
    inset: 0;
    z-index: 11000;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: wpFade 0.2s ease;
}
@keyframes wpFade { from { opacity: 0; } to { opacity: 1; } }
.wp-modal {
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--card-bg, #fff);
    border-radius: 18px;
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    animation: wpPop 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes wpPop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.wp-confetti { font-size: 2.6rem; line-height: 1; }
.wp-title {
    margin: 0.5rem 0 0.25rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary, #111827);
}
.wp-sub {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: var(--text-secondary, #6b7280);
}
.wp-list { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.wp-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
    padding: 0.6rem 0.7rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: var(--bg-secondary, #f9fafb);
}
.wp-item-logo {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wp-item-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wp-initials { font-size: 0.95rem; font-weight: 700; color: #4b5563; }
.wp-item-body { flex: 1 1 auto; min-width: 0; }
.wp-item-brand { font-weight: 700; font-size: 0.92rem; color: var(--text-primary, #111827); }
.wp-custom {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    vertical-align: middle;
}
.wp-item-desc { font-size: 0.78rem; color: var(--text-secondary, #6b7280); }
.wp-item-ctx { font-size: 0.7rem; color: var(--text-secondary, #9ca3af); margin-top: 0.1rem; }
.wp-item-tag {
    flex: 0 0 auto;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
}
.wp-item-tag-claim { color: var(--primary-color, #d4172b); background: rgba(212, 23, 43, 0.1); }
.wp-item-tag-sent { color: #059669; background: rgba(5, 150, 105, 0.1); }
.wp-actions { display: flex; gap: 0.6rem; justify-content: center; }
.wp-btn {
    border: none;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    transition: opacity 0.15s ease, background 0.15s ease;
}
.wp-btn-primary { color: #fff; background: var(--primary-color, #d4172b); }
.wp-btn-primary:hover { opacity: 0.9; }
.wp-btn-secondary { color: var(--text-secondary, #6b7280); background: #f3f4f6; }
.wp-btn-secondary:hover { background: #e5e7eb; }
body.dark-mode .wp-modal { background: #1f2937; }
body.dark-mode .wp-title { color: #f3f4f6; }
body.dark-mode .wp-item { background: #111827; border-color: #4b5563; }
body.dark-mode .wp-item-logo { background: #1f2937; border-color: #4b5563; }
body.dark-mode .wp-item-brand { color: #f3f4f6; }
body.dark-mode .wp-btn-secondary { background: #374151; color: #d1d5db; }
body.dark-mode .wp-btn-secondary:hover { background: #4b5563; }

/* Redemption confirm modal */
.mr-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}
.mr-modal-card {
    background: #fff;
    width: 100%;
    max-width: 420px;
    border-radius: 14px;
    padding: 1.75rem 1.5rem 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    position: relative;
    text-align: center;
}
.mr-modal-close {
    position: absolute;
    top: 0.6rem;
    right: 0.9rem;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
}
.mr-modal-close:hover { color: #111827; }
.mr-modal-image {
    width: 88px;
    height: 88px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    overflow: hidden;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mr-modal-image img { width: 100%; height: 100%; object-fit: cover; }
.mr-modal-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary, #111827);
}
.mr-modal-type {
    margin: 0.25rem 0 0;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary, #6b7280);
    font-weight: 600;
}
.mr-modal-desc {
    margin: 0.75rem 0 1.25rem;
    color: var(--text-secondary, #555);
    font-size: 0.95rem;
    line-height: 1.45;
}
.mr-modal-points {
    background: #fafafa;
    border: 1px solid #eef0f5;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    text-align: left;
}
.mr-points-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.92rem;
    color: var(--text-secondary, #4b5563);
}
.mr-points-row strong { color: var(--text-primary, #111827); }
.mr-points-after {
    border-top: 1px solid #e5e7eb;
    margin-top: 0.3rem;
    padding-top: 0.55rem;
    font-weight: 600;
}
.mr-modal-delivery {
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.mr-modal-delivery-icon {
    font-size: 1rem;
    line-height: 1.4;
    flex-shrink: 0;
}
.mr-modal-delivery-text {
    flex: 1;
    min-width: 0;
}
.mr-modal-delivery strong {
    white-space: nowrap;
}
body.dark-mode .mr-modal-delivery {
    background: #1e3a8a;
    color: #dbeafe;
    border-color: #1e40af;
}

.mr-modal-alert {
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 1rem;
    text-align: left;
}
.mr-modal-alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.mr-modal-alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.mr-modal-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: stretch;
}
.mr-modal-actions .btn { flex: 1; }

body.dark-mode .mr-voucher-circle.is-real { background: #1f2937; border-color: #4b5563; }
body.dark-mode .mr-voucher-brand { color: #f3f4f6; }
body.dark-mode .mr-voucher-value { color: #9ca3af; }


body.dark-mode .mr-modal-card { background: #1f2937; color: #f3f4f6; }
body.dark-mode .mr-modal-title { color: #f3f4f6; }
body.dark-mode .mr-modal-type, body.dark-mode .mr-modal-desc { color: #9ca3af; }
body.dark-mode .mr-modal-image { background: #111827; border-color: #4b5563; }
body.dark-mode .mr-modal-points { background: #111827; border-color: #374151; }
body.dark-mode .mr-points-row { color: #d1d5db; }
body.dark-mode .mr-points-row strong { color: #f3f4f6; }
body.dark-mode .mr-points-after { border-top-color: #374151; }
body.dark-mode .mr-modal-alert-error   { background: #7f1d1d; color: #fecaca; border-color: #991b1b; }
body.dark-mode .mr-modal-alert-success { background: #064e3b; color: #d1fae5; border-color: #065f46; }

/* Dark mode */
body.dark-mode .admin-rewards-card { background: #1f2937; border-color: #374151; }
body.dark-mode .ar-card-title { color: #f3f4f6; }
body.dark-mode .ar-field-label { color: #9ca3af; }
body.dark-mode .ar-input { background: #111827; border-color: #4b5563; color: #f3f4f6; }
body.dark-mode .ar-input.ar-file { background: #1f2937; }
body.dark-mode .ar-voucher-row { background: #111827; border-color: #374151; }
body.dark-mode .ar-voucher-image { background: #1f2937; border-color: #4b5563; }
body.dark-mode .ar-voucher-brand { color: #f3f4f6; }
body.dark-mode .ar-voucher-desc { color: #9ca3af; }
body.dark-mode .ar-image-preview { background: #111827; border-color: #4b5563; }
body.dark-mode .ar-group-title { color: #9ca3af; }
body.dark-mode .ar-count, body.dark-mode .ar-group-count { background: #374151; color: #d1d5db; }

/* ── Admin FAQs page ────────────────────────────────────────────────── */
.ar-textarea {
    resize: vertical;
    min-height: 110px;
    font-family: inherit;
    line-height: 1.45;
}
.ar-form-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.5rem;
}
.ar-form-actions .btn { flex: 1; }

.ar-faq-list { display: flex; flex-direction: column; gap: 1.25rem; }
.ar-faq-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.ar-faq-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    background: #fafafa;
    border: 1px solid #eef0f5;
    border-radius: 10px;
}
.ar-faq-meta { min-width: 0; }
.ar-faq-question {
    font-weight: 700;
    color: var(--text-primary, #111827);
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}
.ar-faq-answer {
    font-size: 0.85rem;
    color: var(--text-secondary, #6b7280);
    line-height: 1.45;
    margin-bottom: 0.5rem;
    max-height: 5.6em;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}
.ar-faq-answer::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1.4em;
    background: linear-gradient(transparent, #fafafa);
    pointer-events: none;
}
.ar-faq-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}
.ar-faq-pill {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
}
.ar-faq-pill-aud-cashier  { background: #eff6ff; color: #1d4ed8; }
.ar-faq-pill-aud-retailer { background: #f0fdf4; color: #15803d; }
.ar-faq-pill-aud-both     { background: #fef3c7; color: #92400e; }
.ar-faq-pill-order {
    font-size: 0.7rem;
    color: var(--text-secondary, #6b7280);
}

.ar-faq-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: stretch;
}
.ar-faq-edit {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
    border-radius: 6px;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.ar-faq-edit:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

body.dark-mode .ar-faq-row { background: #111827; border-color: #374151; }
body.dark-mode .ar-faq-question { color: #f3f4f6; }
body.dark-mode .ar-faq-answer { color: #9ca3af; }
body.dark-mode .ar-faq-answer::after { background: linear-gradient(transparent, #111827); }
body.dark-mode .ar-faq-pill-aud-cashier  { background: #1e3a8a; color: #bfdbfe; }
body.dark-mode .ar-faq-pill-aud-retailer { background: #14532d; color: #bbf7d0; }
body.dark-mode .ar-faq-pill-aud-both     { background: #78350f; color: #fde68a; }
body.dark-mode .ar-faq-edit {
    background: #111827; border-color: #4b5563; color: #93c5fd;
}
body.dark-mode .ar-faq-edit:hover {
    background: #1f2937; border-color: #60a5fa;
}

/* Empty-state for the Latest Updates feed on Achievers / Connexus pages. */
.newsletter-empty {
    text-align: center;
    color: var(--text-light, #9ca3af);
    font-size: 0.9rem;
    padding: 1.5rem 1rem;
    margin: 0;
    font-style: italic;
}
body.dark-mode .newsletter-empty { color: #94a3b8; }

/* Admin Updates page reuses the FAQ pill colour palette — add a 'both'
   variant if not already present (cashier / retailer already styled). */
.ar-faq-pill-aud-both     { background: #fef3c7; color: #92400e; }
body.dark-mode .ar-faq-pill-aud-both { background: #78350f; color: #fde68a; }

/* ============================================================
 * Daily Quizzes — cashier CTA + player + admin builder
 * ============================================================ */

/* ── Cashier CTA on JTI Achievers ─────────────────────────── */
.daily-quiz-cta {
    margin: 0 0 1.5rem 0;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
}
.daily-quiz-cta[data-state="loading"] {
    background: #f3f4f6;
    padding: 1.25rem 1.5rem;
}
.dq-cta-loading {
    display: flex; align-items: center; gap: .75rem;
    color: #6b7280; font-size: .95rem;
}
.dq-cta-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(0,0,0,.1);
    border-top-color: #0ea5e9;
    border-radius: 50%;
    animation: dq-spin 1s linear infinite;
}
@keyframes dq-spin { to { transform: rotate(360deg); } }

.dq-cta-live {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, #047857 0%, #10b981 45%, #34d399 100%);
    color: #fff;
    position: relative;
}
.dq-cta-live::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.18), transparent 55%);
    pointer-events: none;
}
.dq-cta-content { position: relative; z-index: 1; flex: 1; min-width: 0; }
.dq-cta-eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    background: rgba(255,255,255,.18);
    padding: .25rem .65rem; border-radius: 999px;
    margin-bottom: .65rem;
}
.dq-cta-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #fde68a; box-shadow: 0 0 0 0 rgba(253, 230, 138, .8);
    animation: dq-pulse-dot 1.4s ease-out infinite;
}
@keyframes dq-pulse-dot {
    0%   { box-shadow: 0 0 0 0   rgba(253, 230, 138, .8); }
    70%  { box-shadow: 0 0 0 10px rgba(253, 230, 138, 0); }
    100% { box-shadow: 0 0 0 0   rgba(253, 230, 138, 0); }
}
.dq-cta-title  { margin: 0 0 .25rem 0; font-size: 1.5rem; font-weight: 800; color: #fff; }
.dq-cta-sub    { margin: 0; opacity: .92; font-size: .98rem; }

.dq-cta-btn {
    position: relative; z-index: 1;
    display: inline-flex; align-items: center; gap: .75rem;
    padding: 1rem 1.5rem;
    background: #fff; color: #047857;
    border: none; border-radius: 999px;
    font-size: 1.05rem; font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,.18), 0 0 0 0 rgba(253, 230, 138, .55);
    transition: transform .15s ease, box-shadow .25s ease;
    overflow: hidden;
    animation: dq-cta-pulse 2.2s ease-in-out infinite, dq-cta-float 3.4s ease-in-out infinite;
}
.dq-cta-btn:hover  { transform: translateY(-2px) scale(1.03); }
.dq-cta-btn:active { transform: translateY(0)    scale(.98);  }
.dq-cta-btn-icon { display: inline-flex; }
.dq-cta-btn-arrow { font-size: 1.25rem; transition: transform .2s ease; }
.dq-cta-btn:hover .dq-cta-btn-arrow { transform: translateX(4px); }
.dq-cta-btn-shine {
    position: absolute; inset: 0;
    background: linear-gradient(120deg,
        transparent 30%,
        rgba(255,255,255,.55) 50%,
        transparent 70%);
    transform: translateX(-100%);
    animation: dq-cta-shine 3s ease-in-out infinite;
    pointer-events: none;
}
@keyframes dq-cta-pulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,.18), 0 0 0 0   rgba(253, 230, 138, .55); }
    50%      { box-shadow: 0 8px 24px rgba(0,0,0,.18), 0 0 0 14px rgba(253, 230, 138, 0);   }
}
@keyframes dq-cta-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}
@keyframes dq-cta-shine {
    0%   { transform: translateX(-100%); }
    60%  { transform: translateX(120%);  }
    100% { transform: translateX(120%);  }
}

.dq-cta-done, .dq-cta-none {
    display: flex; align-items: center; gap: 1.25rem;
    padding: 1.5rem 1.75rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
}
.dq-cta-none {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: #e2e8f0;
}
.dq-cta-done-icon {
    width: 56px; height: 56px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #16a34a; color: #fff; flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(22,163,74,.35);
}
.dq-cta-done .dq-cta-title { color: #064e3b; }
.dq-cta-done .dq-cta-sub   { color: #065f46; }
.dq-cta-none .dq-cta-title { color: #1e293b; }
.dq-cta-none .dq-cta-sub   { color: #475569; }
.dq-cta-countdown {
    display: inline-flex; align-items: center; gap: .5rem;
    margin-top: .65rem;
    font-size: .9rem; color: #334155;
}
.dq-cta-countdown-label { color: #6b7280; font-weight: 600; }
.dq-cta-countdown-value {
    background: #fff; padding: .25rem .65rem; border-radius: 6px;
    font-variant-numeric: tabular-nums; font-weight: 700;
    border: 1px solid #e2e8f0;
}
.dq-cta-error {
    padding: 1rem 1.25rem;
    background: #fef2f2; color: #991b1b;
    border: 1px solid #fecaca; border-radius: 12px;
}

@media (max-width: 720px) {
    .dq-cta-live { flex-direction: column; align-items: stretch; padding: 1.5rem; }
    .dq-cta-btn  { width: 100%; justify-content: center; }
    .dq-cta-title { font-size: 1.3rem; }
}

/* ── Quiz player ──────────────────────────────────────────── */
.daily-quiz-container { max-width: 760px; margin: 0 auto; }
.dq-loading, .dq-empty, .dq-error {
    padding: 2rem; text-align: center; color: #64748b;
    background: #fff; border-radius: 14px; border: 1px solid #e5e7eb;
}
.dq-error { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.dq-spinner {
    display: inline-block; width: 14px; height: 14px;
    border: 2px solid rgba(0,0,0,.1); border-top-color: #0ea5e9;
    border-radius: 50%; vertical-align: middle;
    animation: dq-spin 1s linear infinite;
}
.dq-empty-card {
    background: #fff; padding: 2rem; border-radius: 14px;
    border: 1px solid #e5e7eb; text-align: center;
}
.dq-empty-card h2 { margin-top: 0; color: #1f2937; }

.dq-player {
    background: #fff; padding: 1.75rem; border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.dq-player-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 1rem; margin-bottom: 1.25rem;
}
.dq-player-title { margin: 0 0 .25rem 0; font-size: 1.4rem; color: #111827; }
.dq-player-sub   { margin: 0; color: #6b7280; font-size: .95rem; }
.dq-timer {
    background: #f3f4f6; padding: .5rem .85rem; border-radius: 10px;
    text-align: center; flex-shrink: 0;
}
.dq-timer-label { display: block; font-size: .7rem; color: #6b7280; text-transform: uppercase; letter-spacing: .06em; }
.dq-timer-value { display: block; font-size: 1.15rem; font-weight: 700; color: #1f2937; font-variant-numeric: tabular-nums; }

.dq-progress-track {
    height: 8px; background: #e5e7eb; border-radius: 999px;
    overflow: hidden; margin-bottom: .35rem;
}
.dq-progress-bar {
    height: 100%; background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 999px;
    transition: width .35s ease;
}
.dq-progress-meta { color: #6b7280; font-size: .85rem; margin-bottom: 1.25rem; }

.dq-question-stage { margin: 1.5rem 0; min-height: 240px; }
.dq-q-eyebrow { font-size: .8rem; color: #6b7280; letter-spacing: .04em; margin-bottom: .5rem; }
.dq-q-text {
    margin: 0 0 1.25rem 0; font-size: 1.25rem; color: #111827; line-height: 1.45;
}
.dq-q-options { display: flex; flex-direction: column; gap: .65rem; }
.dq-q-option {
    display: flex; align-items: center; gap: .85rem;
    padding: .9rem 1rem; border: 2px solid #e5e7eb; border-radius: 12px;
    cursor: pointer; background: #fff;
    transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.dq-q-option:hover { border-color: #93c5fd; background: #f8fafc; }
.dq-q-option.is-selected {
    border-color: #10b981; background: #ecfdf5;
}
.dq-q-option input[type="radio"] { display: none; }
.dq-q-option-marker {
    width: 32px; height: 32px; border-radius: 50%;
    background: #f3f4f6; color: #4b5563;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; flex-shrink: 0;
}
.dq-q-option.is-selected .dq-q-option-marker { background: #10b981; color: #fff; }
.dq-q-option-text { font-size: 1rem; color: #1f2937; }

.dq-result-card {
    background: #fff; padding: 2rem; border-radius: 16px;
    border: 1px solid #e5e7eb; text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.dq-result-card h2 { margin: 1rem 0 .5rem 0; }
.dq-result-sub { color: #6b7280; margin: 0 0 1.5rem 0; }
.dq-result-badge {
    width: 80px; height: 80px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    animation: dq-pop .35s ease;
}
.dq-result-done { background: #16a34a; box-shadow: 0 4px 14px rgba(22,163,74,.35); }
.dq-result-try  { background: #f59e0b; box-shadow: 0 4px 14px rgba(245,158,11,.35); }
@keyframes dq-pop {
    0%   { transform: scale(.4); opacity: 0; }
    80%  { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1);  }
}
.dq-result-stats {
    display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
    margin: 1.25rem 0 1.5rem 0;
}
.dq-result-stat {
    background: #f8fafc; padding: .85rem 1.5rem; border-radius: 12px;
    min-width: 160px;
}
.dq-result-stat-value { display: block; font-size: 1.6rem; font-weight: 800; color: #111827; }
.dq-result-stat-label { display: block; font-size: .8rem; color: #6b7280; margin-top: .25rem; }

/* ── Admin builder ────────────────────────────────────────── */
.dq-tabs {
    display: flex; gap: .5rem; margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}
.dq-tab-btn {
    background: transparent; border: none;
    padding: .75rem 1.25rem;
    color: #6b7280; font-weight: 600; font-size: .95rem;
    cursor: pointer; border-bottom: 3px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}
.dq-tab-btn:hover  { color: #1f2937; }
.dq-tab-btn.active { color: #00806d; border-bottom-color: var(--primary-color); }

.dq-tab-panel { margin-top: 1rem; }

.dq-tips { padding-left: 1.25rem; margin: 0; color: #4b5563; }
.dq-tips li { margin-bottom: .5rem; line-height: 1.5; }
.dq-hint { color: #6b7280; font-size: .82rem; display: block; margin-top: .25rem; }

.dq-questions {
    display: flex; flex-direction: column; gap: 1rem;
    margin: 1rem 0;
}
.dq-question-card {
    background: #f9fafb; padding: 1rem 1.1rem; border-radius: 10px;
    border: 1px solid #e5e7eb;
}
.dq-q-head {
    display: flex; align-items: center; gap: .75rem;
    margin-bottom: .65rem;
}
.dq-q-num {
    background: #10b981; color: #fff;
    padding: .15rem .55rem; border-radius: 6px;
    font-weight: 700; font-size: .85rem;
}
.dq-q-type-label { display: inline-flex; align-items: center; gap: .35rem; }
.dq-q-type-label span { font-size: .8rem; color: #6b7280; }
.dq-q-type-label .dq-q-type { padding: .35rem .5rem; width: auto; }
.dq-q-text { width: 100%; margin-bottom: .65rem; }
.dq-options { display: flex; flex-direction: column; gap: .4rem; }
.dq-opt-row { display: flex; align-items: center; gap: .5rem; }
.dq-opt-correct {
    display: inline-flex; align-items: center; gap: .25rem;
    background: #fff; padding: .25rem .55rem; border-radius: 6px;
    border: 1px solid #d1d5db;
    cursor: pointer; font-size: .8rem; color: #4b5563;
    white-space: nowrap;
}
.dq-opt-correct input[type="radio"]:checked + span {
    color: #10b981; font-weight: 700;
}
.dq-opt-text { flex: 1; }
.dq-opt-remove {
    background: transparent; border: 1px solid #e5e7eb;
    width: 28px; height: 28px; border-radius: 6px;
    cursor: pointer; color: #9ca3af; font-size: 1.1rem; line-height: 1;
}
.dq-opt-remove:hover { color: #dc2626; border-color: #fca5a5; }
.dq-add-option { margin-top: .5rem; font-size: .85rem; padding: .35rem .75rem; }

/* ── Per-question image (admin builder) ───────────────────── */
.dq-q-image { margin: 0 0 .65rem; }
.dq-q-image-add {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .4rem .75rem; border-radius: 8px;
    border: 1px dashed #cbd5e1; background: #fff;
    color: #4b5563; font-size: .85rem; cursor: pointer;
}
.dq-q-image-add:hover { border-color: #10b981; color: #10b981; }
.dq-q-image-preview { position: relative; display: inline-block; }
.dq-q-image-preview img {
    max-width: 220px; max-height: 160px; border-radius: 8px;
    border: 1px solid #e5e7eb; display: block; object-fit: cover;
}
.dq-q-image-remove {
    position: absolute; top: 6px; right: 6px;
    background: rgba(17, 24, 39, .82); color: #fff;
    border: none; border-radius: 6px; padding: .2rem .5rem;
    font-size: .72rem; cursor: pointer;
}
.dq-q-image-remove:hover { background: #dc2626; }
.dq-q-image-status { font-size: .78rem; margin-top: .3rem; }
.dq-q-image-status.is-loading { color: #6b7280; }
.dq-q-image-status.is-error { color: #dc2626; }

/* ── Per-question image (cashier player & review) ─────────── */
.dq-q-image-view { margin: 0 0 1rem; text-align: center; }
.dq-q-image-view img {
    max-width: 100%; max-height: 320px; width: auto; height: auto;
    border-radius: 12px; border: 1px solid #e5e7eb;
    display: inline-block; object-fit: contain;
}

/* Live "total points for this quiz" readout under the points field */
.dq-total-points {
    margin-top: .5rem; padding: .5rem .7rem;
    background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 8px;
    font-size: .85rem; color: #065f46;
}
.dq-total-points strong { color: #047857; }
body.dark-mode .dq-total-points { background: #064e3b33; border-color: #065f46; color: #6ee7b7; }
body.dark-mode .dq-total-points strong { color: #34d399; }

/* Builder right column: Tips stacked above the All Quizzes list. */
.dq-builder-side {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}
.dq-library-card { min-width: 0; }

/* ── Admin analytics ──────────────────────────────────────── */
.dq-analytics-grid {
    display: grid; gap: 1.25rem;
    grid-template-columns: repeat(2, 1fr);
}
.dq-analytics-full { grid-column: 1 / -1; }
@media (max-width: 900px) {
    .dq-analytics-grid { grid-template-columns: 1fr; }
}
.dq-analytics-block { overflow-x: auto; }
.dq-table {
    width: 100%; border-collapse: collapse; font-size: .92rem;
}
.dq-table th, .dq-table td {
    padding: .55rem .75rem; text-align: left;
    border-bottom: 1px solid #f1f5f9;
}
.dq-table th { background: #f8fafc; font-weight: 600; color: #374151; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.dq-table tbody tr:hover { background: #fafafa; }

.dq-heatmap-controls {
    display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem;
}
.ar-field-inline { display: inline-flex; align-items: center; gap: .5rem; }
.ar-field-inline .ar-input { width: auto; min-width: 220px; }
.dq-heatmap-wrap { overflow-x: auto; }
.dq-heatmap {
    border-collapse: separate; border-spacing: 2px; font-size: .75rem;
}
.dq-heatmap th {
    padding: .25rem .35rem; color: #6b7280; font-weight: 600;
    text-align: center; background: transparent; border: none;
}
.dq-heatmap-cell {
    min-width: 26px; height: 26px;
    text-align: center; border-radius: 4px;
    font-variant-numeric: tabular-nums;
    transition: transform .1s ease;
}
.dq-heatmap-cell:hover { transform: scale(1.15); }
.dq-heatmap-legend {
    margin: .65rem 0 0 0; color: #6b7280; font-size: .82rem;
}

/* Dark mode tweaks */
body.dark-mode .dq-player                { background: #1f2937; border-color: #374151; }
body.dark-mode .dq-player-title          { color: #f3f4f6; }
body.dark-mode .dq-player-sub            { color: #9ca3af; }
body.dark-mode .dq-q-text                { color: #f3f4f6; }
body.dark-mode .dq-q-option              { background: #111827; border-color: #374151; }
body.dark-mode .dq-q-option:hover        { background: #1f2937; border-color: #3b82f6; }
body.dark-mode .dq-q-option.is-selected  { background: #064e3b; border-color: #10b981; }
body.dark-mode .dq-q-option-text         { color: #e5e7eb; }
body.dark-mode .dq-q-option-marker       { background: #374151; color: #d1d5db; }
body.dark-mode .dq-timer                 { background: #111827; }
body.dark-mode .dq-timer-value           { color: #f3f4f6; }
body.dark-mode .dq-result-card           { background: #1f2937; border-color: #374151; color: #f3f4f6; }
body.dark-mode .dq-result-stat           { background: #111827; }
body.dark-mode .dq-result-stat-value     { color: #f3f4f6; }
body.dark-mode .dq-loading,
body.dark-mode .dq-empty,
body.dark-mode .dq-empty-card            { background: #1f2937; color: #9ca3af; border-color: #374151; }
body.dark-mode .dq-empty-card h2         { color: #f3f4f6; }
body.dark-mode .dq-cta-done              { background: linear-gradient(135deg, #064e3b 0%, #065f46 100%); border-color: #047857; }
body.dark-mode .dq-cta-none              { background: linear-gradient(135deg, #1f2937 0%, #111827 100%); border-color: #374151; }
body.dark-mode .dq-cta-done .dq-cta-title { color: #f0fdf4; }
body.dark-mode .dq-cta-done .dq-cta-sub   { color: #bbf7d0; }
body.dark-mode .dq-cta-none .dq-cta-title { color: #f3f4f6; }
body.dark-mode .dq-cta-none .dq-cta-sub   { color: #9ca3af; }
body.dark-mode .dq-cta-countdown          { color: #d1d5db; }
body.dark-mode .dq-cta-countdown-value    { background: #111827; color: #f3f4f6; border-color: #374151; }
body.dark-mode .dq-question-card          { background: #111827; border-color: #374151; }
body.dark-mode .dq-opt-correct            { background: #1f2937; border-color: #4b5563; color: #d1d5db; }
body.dark-mode .dq-tab-btn                { color: #9ca3af; }
body.dark-mode .dq-tab-btn:hover          { color: #f3f4f6; }
body.dark-mode .dq-tab-btn.active         { color: #5eead4; border-bottom-color: #14b8a6; }
body.dark-mode .dq-tabs                   { border-bottom-color: #374151; }
body.dark-mode .dq-table th               { background: #111827; color: #d1d5db; }
body.dark-mode .dq-table td               { border-color: #374151; }
body.dark-mode .dq-table tbody tr:hover   { background: #1f2937; }
body.dark-mode .dq-heatmap th             { color: #9ca3af; }
body.dark-mode .dq-heatmap-legend         { color: #9ca3af; }
body.dark-mode .dq-q-image-add            { background: #1f2937; border-color: #4b5563; color: #d1d5db; }
body.dark-mode .dq-q-image-preview img    { border-color: #374151; }
body.dark-mode .dq-q-image-view img       { border-color: #374151; }

/* ── Question Bank (adaptive quiz source) ─────────────────────────────── */
/* Question Bank — teal-accented to match the cashier daily quiz, with the
   card/tile/hover polish of the freeze builder. */
.qb-blurb { color: #6b7280; font-size: .88rem; line-height: 1.5; margin: 0 0 1.1rem; max-width: 62ch; }
.qb-settings-card { margin-bottom: 1.25rem; }
/* Settings inputs presented as compact tiles, like the freeze stat tiles. */
.qb-settings-row { display: flex; flex-wrap: wrap; gap: .9rem; align-items: flex-end; }
.qb-inline { flex: 0 0 auto; margin: 0; }
.qb-inline .ar-input { max-width: 190px; }
.qb-settings-row .btn { min-height: 44px; }

.qb-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1.1rem; }
.qb-toolbar .ar-card-title { margin: 0; }
.qb-toolbar-spacer { flex: 1 1 auto; }
.qb-filter { display: flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 600; color: #6b7280; }
.qb-filter .ar-input { max-width: 260px; }

.qb-module-group { margin-bottom: 1.6rem; }
.qb-module-head {
    font-size: .82rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    color: #00806d; margin: 0 0 .7rem; padding-left: .6rem;
    display: flex; align-items: center; gap: .55rem;
    border-left: 3px solid var(--primary-color);
}
.qb-module-count {
    background: #f0fdfa; color: #00806d; border: 1px solid #99e5d9;
    font-size: .7rem; font-weight: 800; padding: .08rem .5rem; border-radius: 999px;
}

.qb-row {
    display: flex; align-items: center; gap: 1rem; padding: .8rem .95rem;
    border: 1px solid #eef0f5; border-radius: 12px; margin-bottom: .55rem; background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.qb-row:hover { border-color: #99e5d9; box-shadow: 0 4px 14px rgba(0,168,143,.12); transform: translateY(-1px); }
.qb-row-main { flex: 1 1 auto; min-width: 0; }
.qb-row-text { font-weight: 600; color: #1f2937; line-height: 1.4; }
.qb-row-index {
    display: inline-block; margin-right: .1rem;
    font-variant-numeric: tabular-nums; font-weight: 800; color: #00806d;
    background: #f0fdfa; border: 1px solid #99e5d9; border-radius: 6px;
    padding: .02rem .38rem; font-size: .78rem;
}
.qb-row-sub  { font-size: .78rem; color: #6b7280; margin-top: .2rem; }
/* Empty-module placeholder inside a bank section. */
.qb-module-empty { margin: 0 0 .4rem; padding-left: .6rem; font-style: italic; }
.qb-row-actions { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }
.qb-row-img { font-size: 1rem; opacity: .7; }
.qb-row .btn { padding: .38rem .7rem; font-size: .8rem; }

/* Inline editor — a teal-tinted card that stands out from the plain rows. */
.qb-editor {
    border: 1px solid #99e5d9; background: #f0fdfa; border-radius: 14px;
    padding: 1.15rem 1.25rem; margin-bottom: 1.25rem;
    box-shadow: 0 6px 20px rgba(0,168,143,.10);
}
.qb-editor-title { margin: 0 0 .9rem; font-size: 1.02rem; font-weight: 800; color: #00806d; }
.qb-editor-grid { display: flex; flex-wrap: wrap; gap: 1rem; }
.qb-editor .ar-field { margin-bottom: .8rem; }
.qb-editor-options { margin-top: .5rem; display: flex; flex-direction: column; gap: .5rem; }
.qb-editor-options > .ar-field-label { margin-bottom: .15rem; }
.qb-opt-row { display: flex; align-items: center; gap: .5rem; }
.qb-opt-correct {
    display: flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 600; color: #374151;
    background: #fff; border: 1px solid #d1d5db; border-radius: 8px; padding: .38rem .55rem; white-space: nowrap; cursor: pointer;
}
.qb-opt-correct:has(input:checked) { background: #f0fdfa; border-color: var(--primary-color); color: #00806d; }
.qb-opt-text { flex: 1 1 auto; }
.qb-opt-remove {
    border: none; background: #fee2e2; color: #b91c1c; width: 30px; height: 30px;
    border-radius: 8px; cursor: pointer; font-size: 1.15rem; line-height: 1; flex-shrink: 0;
    transition: background .15s;
}
.qb-opt-remove:hover { background: #fecaca; }
.qb-editor-image { margin-top: .85rem; }
.qb-image-preview { display: flex; align-items: center; gap: .75rem; }
.qb-image-preview img { max-width: 140px; max-height: 100px; border-radius: 10px; border: 1px solid #e5e7eb; }
.qb-image-add {
    display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
    background: #fff; border: 1px dashed #9ca3af; border-radius: 10px; padding: .55rem .85rem;
    font-size: .84rem; font-weight: 600; color: #374151; transition: border-color .15s, color .15s;
}
.qb-image-add:hover { border-color: var(--primary-color); color: #00806d; }
.qb-image-status { font-size: .8rem; color: #6b7280; margin-top: .35rem; }
.qb-image-status.is-error { color: #b91c1c; }

body.dark-mode .qb-blurb, body.dark-mode .qb-filter, body.dark-mode .qb-image-status { color: #9ca3af; }
body.dark-mode .qb-module-head { color: #5eead4; }
body.dark-mode .qb-module-count { background: #052e2a; color: #5eead4; border-color: #0a4f47; }
body.dark-mode .qb-row-index { background: #052e2a; color: #5eead4; border-color: #0a4f47; }
body.dark-mode .qb-row { background: #1f2937; border-color: #374151; box-shadow: none; }
body.dark-mode .qb-row:hover { border-color: #0a6b5c; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
body.dark-mode .qb-row-text { color: #f3f4f6; }
body.dark-mode .qb-editor { background: #052e2a; border-color: #0a4f47; box-shadow: none; }
body.dark-mode .qb-editor-title { color: #5eead4; }
body.dark-mode .qb-opt-correct { background: #1f2937; border-color: #4b5563; color: #d1d5db; }
body.dark-mode .qb-opt-correct:has(input:checked) { background: #052e2a; border-color: #14b8a6; color: #5eead4; }
body.dark-mode .qb-image-add { background: #1f2937; border-color: #4b5563; color: #d1d5db; }

/* Date-conflict warning on the daily-quiz builder */
.dq-conflict {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
    padding: .65rem .85rem;
    border-radius: 8px;
    font-size: .9rem;
    margin: -.5rem 0 .85rem 0;
}
.dq-conflict strong { display: block; margin-bottom: .15rem; color: #78350f; }
.dq-conflict-link {
    background: transparent; border: none;
    color: #b45309; font-weight: 700; text-decoration: underline;
    cursor: pointer; padding: 0 .25rem;
}
.dq-conflict-link:hover { color: #78350f; }
.dq-input-error { border-color: #f59e0b !important; background: #fffbeb; }
body.dark-mode .dq-conflict {
    background: #422006; border-color: #92400e; color: #fde68a;
}
body.dark-mode .dq-conflict strong { color: #fef3c7; }
body.dark-mode .dq-conflict-link   { color: #fcd34d; }
body.dark-mode .dq-input-error     { background: #422006; }

/* Auto-advance flow: no Prev/Next/Submit buttons anymore. The player now
   advances itself ~1.6s after the cashier picks an answer (or auto-submits
   on the last question). Styling for the obsolete action bar has been removed. */
#dailyQuizSection .dq-player { padding-bottom: 2rem; }

/* "Review answers" view shown when the cashier clicks Review on the result card.
   One scrollable list of every question with the green/red feedback reused. */
.dq-review-header {
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem; margin-bottom: 1.25rem;
}
.dq-review-title { margin: 0; font-size: 1.4rem; }
.dq-review-sub   { margin: .25rem 0 0 0; color: #6b7280; }
.dq-review-list  { display: flex; flex-direction: column; gap: 1.25rem; }
.dq-review-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left-width: 4px;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}
.dq-review-item.is-correct { border-left-color: #10b981; }
.dq-review-item.is-wrong   { border-left-color: #ef4444; }
.dq-review-item .dq-q-text { margin-top: .35rem; }
.dq-review-footer { margin-top: 1.5rem; text-align: center; }

.dq-result-actions {
    display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap;
}

body.dark-mode .dq-review-item { background: #1f2937; border-color: #374151; }
body.dark-mode .dq-review-sub  { color: #9ca3af; }

/* Daily Quiz — points badges */
.dq-cta-points-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    margin-top: .65rem;
    padding: .35rem .75rem;
    background: rgba(255,255,255,.18);
    color: #fff;
    border-radius: 999px;
    font-size: .82rem; font-weight: 700;
    letter-spacing: .02em;
}
.dq-player-points {
    margin: .35rem 0 0 0;
    color: #047857;
    font-size: .95rem;
}
.dq-player-points strong { font-weight: 800; }
body.dark-mode .dq-player-points { color: #34d399; }

.dq-points-earned {
    display: inline-block;
    margin: .25rem 0 1rem 0;
    padding: .5rem 1rem;
    background: linear-gradient(135deg, #16a34a, #10b981);
    color: #fff;
    border-radius: 999px;
    font-weight: 800;
    font-size: 1rem;
    animation: dq-pop .5s ease;
}
.dq-result-stat-points .dq-result-stat-value {
    color: #047857;
}
body.dark-mode .dq-result-stat-points .dq-result-stat-value { color: #34d399; }

.dq-points-pill {
    background: #dcfce7 !important;
    color: #065f46 !important;
    font-weight: 700;
}
body.dark-mode .dq-points-pill {
    background: #064e3b !important;
    color: #bbf7d0 !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   Freezes — admin builder, leaderboard, and the cashier popup.
   Shares some tokens (.dq-*) with daily quizzes via cascading; the rules
   below add the freeze-specific layouts.
   ───────────────────────────────────────────────────────────────────────── */

/* ─── Admin builder + library ───────────────────────────────────────── */
.fz-prizes {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    margin: 0.75rem 0;
    background: #fafafa;
}
body.dark-mode .fz-prizes { background: #18181b; border-color: #27272a; }
.fz-prizes legend {
    font-weight: 700;
    padding: 0 0.4rem;
}
.fz-prize-row {
    display: grid;
    grid-template-columns: 40px 1fr 110px;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.4rem;
}
.fz-prize-place {
    font-weight: 800;
    color: #f59e0b;
    text-align: center;
}
.fz-prize-row:nth-child(2) .fz-prize-place { color: #f59e0b; }   /* 1st gold */
.fz-prize-row:nth-child(3) .fz-prize-place { color: #94a3b8; }   /* 2nd silver */
.fz-prize-row:nth-child(4) .fz-prize-place { color: #d97706; }   /* 3rd bronze */
.fz-prize-pts { max-width: 110px; }

.fz-status {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    margin-right: 0.5rem;
    letter-spacing: 0.04em;
}
.fz-status-open    { background: #dcfce7; color: #065f46; }
.fz-status-closed  { background: #e5e7eb; color: #374151; }
.fz-status-hidden  { background: #fef3c7; color: #92400e; }
.fz-status-expired { background: #fee2e2; color: #991b1b; }
body.dark-mode .fz-status-open    { background: #064e3b; color: #bbf7d0; }
body.dark-mode .fz-status-closed  { background: #27272a; color: #d4d4d8; }
body.dark-mode .fz-status-hidden  { background: #422006; color: #fde68a; }
body.dark-mode .fz-status-expired { background: #450a0a; color: #fecaca; }

/* Freeze question image in the cashier popup player (mirrors .dq-q-image-view) */
.fz-pop-q-image { margin: 0 0 1rem; text-align: center; }
.fz-pop-q-image img {
    max-width: 100%; max-height: 300px; width: auto; height: auto;
    border-radius: 12px; border: 1px solid #e5e7eb;
    display: inline-block; object-fit: contain;
}
body.dark-mode .fz-pop-q-image img { border-color: #374151; }

/* ── Freeze Templates tab ─────────────────────────────────────────────── */
/* Header: title + blurb stacked ABOVE the New-template button. */
.fz-templates-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.fz-templates-heading { margin: 0; }
.fz-templates-head .ar-card-title { margin: 0 0 0.4rem; font-size: 1.5rem; }
.fz-templates-sub {
    margin: 0;
    max-width: 70ch;
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: left;
    color: var(--text-secondary, #6b7280);
}
.fz-templates-head .btn { flex: 0 0 auto; }

/* Responsive card grid */
.fz-tpl-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}
.fz-tpl-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem 1.05rem 0.9rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.fz-tpl-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 14px rgba(30, 58, 138, 0.08);
    transform: translateY(-1px);
}
.fz-tpl-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
}
.fz-tpl-title {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary, #111827);
}
.fz-tpl-desc {
    margin: 0;
    font-size: 0.83rem;
    line-height: 1.45;
    color: var(--text-secondary, #6b7280);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fz-tpl-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.fz-tpl-chip {
    font-size: 0.74rem;
    font-weight: 600;
    color: #4b5563;
    background: #f3f4f6;
    padding: 0.14rem 0.5rem;
    border-radius: 6px;
}
.fz-tpl-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: auto;
    padding-top: 0.7rem;
}
.fz-tpl-actions .fz-tpl-launch {
    flex: 1 1 auto;
    padding: 0.45rem 0.6rem;
    font-size: 0.82rem;
    font-weight: 700;
}
.fz-tpl-edit {
    flex: 0 0 auto;
    background: #fff;
    border: 1px solid #d1d5db;
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 0.75rem;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.fz-tpl-edit:hover { background: #eff6ff; border-color: #93c5fd; }

/* Usage badge */
.fz-tpl-badge {
    flex: 0 0 auto;
    white-space: nowrap;
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}
.fz-tpl-unused { background: #e5e7eb; color: #374151; }
.fz-tpl-used   { background: #dbeafe; color: #1e3a8a; }

body.dark-mode .fz-tpl-card { background: #111827; border-color: #374151; }
body.dark-mode .fz-tpl-card:hover { border-color: #4f46e5; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
body.dark-mode .fz-tpl-title { color: #f3f4f6; }
body.dark-mode .fz-tpl-desc { color: #9ca3af; }
body.dark-mode .fz-tpl-chip { background: #1f2937; color: #d1d5db; }
body.dark-mode .fz-tpl-edit { background: #111827; border-color: #4b5563; color: #93c5fd; }
body.dark-mode .fz-tpl-edit:hover { background: #1f2937; border-color: #60a5fa; }
body.dark-mode .fz-tpl-unused { background: #27272a; color: #d4d4d8; }
body.dark-mode .fz-tpl-used   { background: #1e3a5f; color: #bfdbfe; }

.fz-row-meta  { color: #6b7280; }
.fz-row-stats { color: #4b5563; font-size: 0.92rem; margin: 0.4rem 0 0.2rem; }
.fz-row-desc  { color: #4b5563; font-size: 0.95rem; }
body.dark-mode .fz-row-meta,
body.dark-mode .fz-row-stats,
body.dark-mode .fz-row-desc { color: #a1a1aa; }

.dq-row-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}
@media (max-width: 540px) {
    .dq-row-pair { grid-template-columns: 1fr; }
    .fz-prize-row { grid-template-columns: 32px 1fr; }
    .fz-prize-row .fz-prize-pts { grid-column: 2; max-width: none; }
}

/* ─── Leaderboard (admin + cashier) ─────────────────────────────────── */
.fz-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
}
.fz-leaderboard-table th,
.fz-leaderboard-table td {
    padding: 0.55rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}
body.dark-mode .fz-leaderboard-table th,
body.dark-mode .fz-leaderboard-table td { border-color: #27272a; }
.fz-leaderboard-table th { background: #f9fafb; font-weight: 700; }
body.dark-mode .fz-leaderboard-table th { background: #18181b; }

.fz-rank-1 td { background: linear-gradient(90deg, #fef3c7 0%, transparent 60%); font-weight: 700; }
.fz-rank-2 td { background: linear-gradient(90deg, #f1f5f9 0%, transparent 60%); font-weight: 600; }
.fz-rank-3 td { background: linear-gradient(90deg, #fed7aa 0%, transparent 60%); font-weight: 600; }
body.dark-mode .fz-rank-1 td { background: linear-gradient(90deg, #422006 0%, transparent 60%); }
body.dark-mode .fz-rank-2 td { background: linear-gradient(90deg, #27272a 0%, transparent 60%); }
body.dark-mode .fz-rank-3 td { background: linear-gradient(90deg, #431407 0%, transparent 60%); }

.fz-rank-me td { outline: 2px solid #2563eb; outline-offset: -2px; }
.fz-me-badge {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.4rem;
    letter-spacing: 0.06em;
}
.fz-bonus { color: #047857; font-weight: 700; }
body.dark-mode .fz-bonus { color: #34d399; }
.fz-rank-other td { color: #6b7280; font-style: italic; }

/* ─── Cashier popup overlay ─────────────────────────────────────────── */
.freeze-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fz-pop-fade .25s ease-out;
}
@keyframes fz-pop-fade { from { opacity: 0; } to { opacity: 1; } }
body.freeze-popup-open { overflow: hidden; }

.freeze-popup-box {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 640px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.6);
    padding: 1.5rem 1.6rem;
    animation: fz-pop-pop .35s cubic-bezier(.18,.89,.32,1.28);
}
body.dark-mode .freeze-popup-box { background: #0f0f10; color: #f4f4f5; }
@keyframes fz-pop-pop {
    from { transform: scale(.85) translateY(20px); opacity: 0; }
    to   { transform: scale(1)    translateY(0);   opacity: 1; }
}

.fz-pop-flash {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    background: linear-gradient(90deg, #0ea5e9, #6366f1);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.6rem;
    animation: fz-pop-shake 0.6s ease-in-out;
}
@keyframes fz-pop-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.fz-pop-intro h2,
.fz-pop-player-header h2,
.fz-pop-result h2 {
    margin: 0 0 0.4rem;
    font-size: 1.6rem;
}
.fz-pop-desc { color: #4b5563; margin: 0 0 0.8rem; }
body.dark-mode .fz-pop-desc { color: #a1a1aa; }

.fz-pop-meta {
    display: flex;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0 0 0.8rem;
    flex-wrap: wrap;
}
.fz-pop-meta li {
    background: #f3f4f6;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    font-size: 0.9rem;
}
body.dark-mode .fz-pop-meta li { background: #18181b; }

.fz-pop-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-size: 0.92rem;
    margin: 0.5rem 0 0.8rem;
}
body.dark-mode .fz-pop-warning { background: #422006; color: #fde68a; }

.fz-pop-prizes {
    margin: 0 0 1rem;
    padding-left: 1.4rem;
}
.fz-pop-prizes li { margin: 0.2rem 0; }
.fz-pop-prize-place { font-weight: 800; margin-right: 0.4rem; }
.fz-pop-prize-pts { font-weight: 700; color: #047857; }
body.dark-mode .fz-pop-prize-pts { color: #34d399; }

.fz-pop-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Player */
.fz-pop-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}
.fz-pop-timer {
    font-family: 'Courier New', monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    color: #2563eb;
    background: #eff6ff;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-size: 1rem;
    min-width: 100px;
    text-align: right;
}
body.dark-mode .fz-pop-timer { background: #1e3a8a; color: #bfdbfe; }

.fz-pop-progress {
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}
.fz-pop-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0ea5e9, #6366f1);
    transition: width 0.3s ease;
}
.fz-pop-progress-label { font-size: 0.85rem; color: #6b7280; margin-bottom: 0.8rem; }
body.dark-mode .fz-pop-progress-label { color: #a1a1aa; }

.fz-pop-q { margin-bottom: 0.6rem; }
.fz-pop-q-eyebrow { font-size: 0.75rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.3rem; }
.fz-pop-q-text { margin: 0 0 0.8rem; font-size: 1.15rem; font-weight: 700; }
.fz-pop-q-options { display: flex; flex-direction: column; gap: 0.4rem; }
.fz-pop-q-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
}
.fz-pop-q-option:hover { border-color: #93c5fd; background: #eff6ff; }
.fz-pop-q-option input { display: none; }
.fz-pop-q-option.is-selected {
    border-color: #2563eb;
    background: #dbeafe;
}
body.dark-mode .fz-pop-q-option { background: #18181b; border-color: #27272a; }
body.dark-mode .fz-pop-q-option:hover { border-color: #3b82f6; background: #1e3a8a; }
body.dark-mode .fz-pop-q-option.is-selected { background: #1e40af; border-color: #60a5fa; }
.fz-pop-q-option-marker {
    background: #e5e7eb;
    color: #1f2937;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}
.fz-pop-q-option.is-selected .fz-pop-q-option-marker { background: #2563eb; color: #fff; }

/* Result */
.fz-pop-result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin: 1rem 0;
}
.fz-pop-result-stats > div {
    background: #f9fafb;
    border-radius: 10px;
    padding: 0.75rem 0.5rem;
    text-align: center;
}
body.dark-mode .fz-pop-result-stats > div { background: #18181b; }
.fz-pop-result-stats strong { display: block; font-size: 1.3rem; }
.fz-pop-result-stats small { color: #6b7280; font-size: 0.8rem; }
body.dark-mode .fz-pop-result-stats small { color: #a1a1aa; }

.fz-pop-points-earned {
    background: #dcfce7;
    color: #065f46;
    text-align: center;
    padding: 0.75rem;
    border-radius: 10px;
    font-weight: 800;
    margin: 0.75rem 0;
}
body.dark-mode .fz-pop-points-earned { background: #064e3b; color: #bbf7d0; }

/* Performance card icon styling already covered by .comparison-icon. */
.freeze-leaderboard-card .comparison-icon { background: linear-gradient(135deg, #0ea5e9, #6366f1); color: #fff; }

/* Prize row updates — type select + voucher select + bonus pts coexist in one row. */
.fz-prize-row {
    grid-template-columns: 40px 130px 1fr 1fr !important;
}
.fz-prize-row .fz-prize-type    { max-width: 130px; }
.fz-prize-row .fz-prize-pts,
.fz-prize-row .fz-prize-voucher { max-width: 100%; }
.fz-prize-row .fz-prize-desc    { grid-column: 1 / -1; margin-top: 0.35rem; }
@media (max-width: 700px) {
    .fz-prize-row {
        grid-template-columns: 32px 1fr !important;
    }
    .fz-prize-row .fz-prize-type,
    .fz-prize-row .fz-prize-pts,
    .fz-prize-row .fz-prize-voucher,
    .fz-prize-row .fz-prize-desc {
        grid-column: 2;
        max-width: none;
    }
}

/* Redeem-voucher CTA on My Performance leaderboard. */
.fz-redeem-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #fef3c7, #fde68a);
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
    flex-wrap: wrap;
}
.fz-redeem-cta-text { flex: 1; min-width: 220px; color: #78350f; }
.fz-redeem-cta-text strong { display: block; font-size: 1.05rem; margin-bottom: 0.2rem; }
body.dark-mode .fz-redeem-cta {
    background: linear-gradient(90deg, #422006, #78350f);
    border-color: #f59e0b;
}
body.dark-mode .fz-redeem-cta-text { color: #fde68a; }
.fz-redeem-cta-done {
    background: #dcfce7;
    border-color: #16a34a;
}
.fz-redeem-cta-done .fz-redeem-cta-text { color: #065f46; }
body.dark-mode .fz-redeem-cta-done {
    background: #064e3b;
    border-color: #34d399;
}
body.dark-mode .fz-redeem-cta-done .fz-redeem-cta-text { color: #bbf7d0; }

/* Prize row — custom brand/value inputs span their own line below the voucher select. */
.fz-prize-row .fz-prize-custom-brand,
.fz-prize-row .fz-prize-custom-value {
    grid-column: 1 / -1;
    margin-top: 0.35rem;
}
.fz-custom-tag {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #312e81;
    color: #c7d2fe;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    margin-left: 0.35rem;
    vertical-align: middle;
}
body.dark-mode .fz-custom-tag { background: #4f46e5; color: #e0e7ff; }

/* Scheduled freezes + warning badges in the admin library list. */
.fz-status-scheduled    { background: #dbeafe; color: #1e3a8a; }
.fz-status-warn-pending { background: #ede9fe; color: #5b21b6; text-transform: none; font-weight: 600; }
.fz-status-warn-sent    { background: #e0e7ff; color: #312e81; text-transform: none; font-weight: 600; }
body.dark-mode .fz-status-scheduled    { background: #1e3a8a; color: #bfdbfe; }
body.dark-mode .fz-status-warn-pending { background: #3b1f6f; color: #ddd6fe; }
body.dark-mode .fz-status-warn-sent    { background: #312e81; color: #c7d2fe; }

.fz-schedule { margin: 0.75rem 0; }
.fz-schedule legend { font-weight: 700; padding: 0 0.4rem; }

/* The freeze builder has a long form (schedule + prizes + N questions) while
   the right-hand "How freezes work" tips card is short. Flip the column
   ratio scoped to the Freezes admin so the form gets the wider tile. */
#adminFreezesSection .admin-rewards-grid {
    grid-template-columns: minmax(420px, 2.2fr) minmax(260px, 1fr);
}
@media (max-width: 900px) {
    #adminFreezesSection .admin-rewards-grid { grid-template-columns: 1fr; }
}

/* Daily quiz — per-click feedback states.
   Once the cashier clicks an option, the question locks. The correct option
   turns green, their wrong pick (if any) turns red, and the rest fade so the
   eye lands on the right answer. */
.dq-q-option.is-correct {
    background: #ecfdf5;
    border-color: #10b981;
    color: #064e3b;
}
.dq-q-option.is-correct .dq-q-option-marker { background: #10b981; color: #fff; }
.dq-q-option.is-wrong {
    background: #fef2f2;
    border-color: #ef4444;
    color: #7f1d1d;
}
.dq-q-option.is-wrong .dq-q-option-marker { background: #ef4444; color: #fff; }
.dq-q-option.is-disabled {
    opacity: .55;
    cursor: not-allowed;
}
.dq-q-option.is-correct,
.dq-q-option.is-wrong,
.dq-q-option.is-disabled { pointer-events: none; }

.dq-q-option-tag {
    margin-left: auto;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .2rem .55rem;
    border-radius: 999px;
}
.dq-q-option-tag.is-correct { background: #10b981; color: #fff; }
.dq-q-option-tag.is-wrong   { background: #ef4444; color: #fff; }

.dq-q-feedback {
    display: flex; align-items: center; gap: .55rem;
    margin-top: 1rem;
    padding: .75rem 1rem;
    border-radius: 10px;
    font-size: .95rem;
    line-height: 1.4;
    animation: dq-fade-in .2s ease;
}
.dq-q-feedback.is-correct { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.dq-q-feedback.is-wrong   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.dq-q-feedback-icon { display: inline-flex; align-items: center; justify-content: center; }
.dq-q-feedback strong { font-weight: 700; }

@keyframes dq-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Dark-mode variants */
body.dark-mode .dq-q-option.is-correct { background: #064e3b; border-color: #10b981; color: #d1fae5; }
body.dark-mode .dq-q-option.is-wrong   { background: #450a0a; border-color: #ef4444; color: #fecaca; }
body.dark-mode .dq-q-feedback.is-correct { background: #064e3b; color: #d1fae5; border-color: #047857; }
body.dark-mode .dq-q-feedback.is-wrong   { background: #450a0a; color: #fecaca; border-color: #b91c1c; }

/* Freeze library list — adopts the .ar-faq-row look used by Daily Quizzes /
   FAQs / News, with Hide and Delete as compact icon-only buttons. */
.fz-library-rows .ar-faq-row { align-items: flex-start; }
.fz-library-rows .ar-faq-question {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}
.fz-icon-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.fz-icon-btn:hover { background: #f9fafb; color: #1f2937; border-color: #cbd5e1; }
.fz-icon-btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.fz-icon-toggle.is-hidden { color: #92400e; border-color: #fcd34d; background: #fef3c7; }
.fz-icon-toggle.is-hidden:hover { background: #fde68a; }
.fz-icon-delete { color: #b91c1c; border-color: #fecaca; }
.fz-icon-delete:hover { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }
body.dark-mode .fz-icon-btn { background: #18181b; border-color: #27272a; color: #d4d4d8; }
body.dark-mode .fz-icon-btn:hover { background: #27272a; color: #fafafa; }
body.dark-mode .fz-icon-toggle.is-hidden { background: #422006; border-color: #b45309; color: #fde68a; }
body.dark-mode .fz-icon-delete { color: #fca5a5; border-color: #7f1d1d; }
body.dark-mode .fz-icon-delete:hover { background: #450a0a; color: #fecaca; }

/* Freeze popup — per-question locked state with right/wrong feedback.
   Mirrors the daily-quiz player so the cashier sees identical signals. */
.fz-pop-q.is-locked .fz-pop-q-option { cursor: default; }
.fz-pop-q-option.is-correct {
    border-color: #16a34a;
    background: #dcfce7;
}
.fz-pop-q-option.is-correct .fz-pop-q-option-marker {
    background: #16a34a;
    color: #fff;
}
.fz-pop-q-option.is-wrong {
    border-color: #dc2626;
    background: #fee2e2;
}
.fz-pop-q-option.is-wrong .fz-pop-q-option-marker {
    background: #dc2626;
    color: #fff;
}
.fz-pop-q-option.is-disabled { opacity: 0.55; }
body.dark-mode .fz-pop-q-option.is-correct { background: #064e3b; border-color: #34d399; }
body.dark-mode .fz-pop-q-option.is-wrong   { background: #450a0a; border-color: #f87171; }

.fz-pop-q-option-tag {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}
.fz-pop-q-option-tag.is-correct { background: #16a34a; color: #fff; }
.fz-pop-q-option-tag.is-wrong   { background: #dc2626; color: #fff; }

.fz-pop-q-feedback {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.75rem;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-weight: 600;
}
.fz-pop-q-feedback.is-correct { background: #dcfce7; color: #065f46; }
.fz-pop-q-feedback.is-wrong   { background: #fee2e2; color: #991b1b; }
.fz-pop-q-feedback .fz-pop-q-feedback-icon { display: inline-flex; }
body.dark-mode .fz-pop-q-feedback.is-correct { background: #064e3b; color: #bbf7d0; }
body.dark-mode .fz-pop-q-feedback.is-wrong   { background: #450a0a; color: #fecaca; }

.fz-pop-prize-empty { color: #9ca3af; }
body.dark-mode .fz-pop-prize-empty { color: #6b7280; }

/* Inline checkbox label inside the Schedule fieldset — checkbox sits on
   the same line as its caption rather than stacking. */
.fz-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.4rem 0 0.6rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.92rem;
    font-weight: 500;
}
.fz-inline-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}

/* All-Freezes row info — labelled rows stacked vertically instead of pills. */
.fz-info-grid {
    margin-top: 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.fz-info-row {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    font-size: 0.88rem;
    line-height: 1.4;
}
.fz-info-label {
    flex: 0 0 145px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.72rem;
}
.fz-info-value {
    color: #1f2937;
    font-weight: 500;
}
body.dark-mode .fz-info-label { color: #9ca3af; }
body.dark-mode .fz-info-value { color: #f3f4f6; }

/* Freeze library actions — text buttons (Leaderboard / Send warning / Edit
   / Close now) sit on a clear background with a subtle border, and the
   icon toggles (Hide / Delete) line up with them on the same row instead
   of stacking. Scoped to .fz-faq-row so other admin lists aren't touched. */
.fz-faq-row .ar-faq-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}
.fz-faq-row .ar-faq-edit {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.fz-faq-row .ar-faq-edit:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}
.fz-faq-row .ar-faq-edit:active { background: #e2e8f0; }
body.dark-mode .fz-faq-row .ar-faq-edit {
    background: transparent;
    border-color: #3f3f46;
    color: #d4d4d8;
}
body.dark-mode .fz-faq-row .ar-faq-edit:hover {
    background: #18181b;
    border-color: #52525b;
    color: #fafafa;
}

/* Freeze popup — close X in the top-right corner of the box. Sits on the
   box itself (not the body) so it survives intro → playing → review
   re-renders. */
.freeze-popup-box {
    position: relative;
}
.fz-pop-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    z-index: 2;
}
.fz-pop-close:hover {
    background: #fee2e2;
    color: #991b1b;
    transform: rotate(90deg);
}
.fz-pop-close:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
body.dark-mode .fz-pop-close {
    background: rgba(244, 244, 245, 0.08);
    color: #d4d4d8;
}
body.dark-mode .fz-pop-close:hover {
    background: #450a0a;
    color: #fecaca;
}

/* Player navigation — arrow buttons that replace the old text Prev/Next. */
.fz-pop-arrows {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}
.fz-pop-arrow {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #1f2937;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.fz-pop-arrow:hover:not(:disabled) {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
}
.fz-pop-arrow:active:not(:disabled) { transform: translateY(0); }
.fz-pop-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}
.fz-pop-arrow:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
body.dark-mode .fz-pop-arrow {
    background: #18181b;
    border-color: #27272a;
    color: #f4f4f5;
}
body.dark-mode .fz-pop-arrow:hover:not(:disabled) {
    background: #1e3a8a;
    border-color: #3b82f6;
    color: #bfdbfe;
}

/* Review-mode banner — appears above the question stage once the cashier
   has answered the last question. Three visual states reflect status. */
.fz-pop-banner {
    margin: 0.6rem 0 0.8rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.92rem;
    line-height: 1.4;
}
.fz-pop-banner strong { font-size: 1.05rem; }
.fz-pop-banner.is-submitting {
    background: #eff6ff;
    color: #1e3a8a;
    border-left: 4px solid #3b82f6;
}
.fz-pop-banner.is-done {
    background: #dcfce7;
    color: #065f46;
    border-left: 4px solid #16a34a;
}
.fz-pop-banner.is-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}
body.dark-mode .fz-pop-banner.is-submitting { background: #1e3a8a; color: #bfdbfe; }
body.dark-mode .fz-pop-banner.is-done       { background: #064e3b; color: #bbf7d0; }
body.dark-mode .fz-pop-banner.is-error      { background: #450a0a; color: #fecaca; }
.fz-pop-banner-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    font-size: 0.95rem;
}
.fz-pop-banner-stats b { font-weight: 800; }
.fz-pop-banner-pts {
    background: #16a34a;
    color: #fff;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.85rem;
}
.fz-pop-banner-hint {
    font-size: 0.82rem;
    opacity: 0.8;
}
.fz-pop-retry {
    margin-left: 0.4rem;
    background: #fff;
    border: 1px solid currentColor;
    color: inherit;
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}
.fz-pop-retry:hover { background: #fff5f5; }
body.dark-mode .fz-pop-retry { background: #0f0f10; }

/* Keep the title from sitting under the X button on narrow boxes. */
.fz-pop-player-header,
.fz-pop-intro,
.fz-pop-result { padding-right: 2.5rem; }

/* Leaderboard title row — select + Download CSV button aligned to the right. */
.fz-leaderboard-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.fz-leaderboard-title > span:first-child { flex: 0 0 auto; margin-right: auto; }
.fz-leaderboard-title #fzLeaderboardSelect { max-width: 320px; min-width: 220px; }
.fz-leaderboard-title #fzLeaderboardExport {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Analytics summary — stat-tile grid above the per-cashier / per-month
   cards. Tile palette mirrors the freeze status pills so the eye reads
   colour as semantic. */
.fz-analytics-summary {
    background: #fff;
    border: 1px solid #eef0f5;
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
body.dark-mode .fz-analytics-summary {
    background: #111827;
    border-color: #1f2937;
}
.fz-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.6rem;
}
.fz-stat-tile {
    background: #f8fafc;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    border: 1px solid #e2e8f0;
}
body.dark-mode .fz-stat-tile {
    background: #18181b;
    border-color: #27272a;
}
.fz-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
}
.fz-stat-label {
    font-size: 0.78rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-top: 0.25rem;
}
body.dark-mode .fz-stat-value { color: #f4f4f5; }
body.dark-mode .fz-stat-label { color: #a1a1aa; }
.fz-stat-open      .fz-stat-value { color: #047857; }
.fz-stat-scheduled .fz-stat-value { color: #1d4ed8; }
.fz-stat-success   .fz-stat-value { color: #047857; }
.fz-stat-warn      .fz-stat-value { color: #b45309; }
body.dark-mode .fz-stat-open      .fz-stat-value,
body.dark-mode .fz-stat-success   .fz-stat-value { color: #34d399; }
body.dark-mode .fz-stat-scheduled .fz-stat-value { color: #93c5fd; }
body.dark-mode .fz-stat-warn      .fz-stat-value { color: #fde68a; }

.fz-stat-top {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px dashed #e2e8f0;
}
body.dark-mode .fz-stat-top { border-color: #27272a; }
.fz-stat-top-eyebrow {
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.fz-stat-sub { font-size: 0.95rem; color: #0f172a; }
body.dark-mode .fz-stat-sub { color: #f4f4f5; }

/* Daily Quiz analytics — per-cashier pagination + CSV toolbar.
   Compact button variants so the auxiliary controls don't dominate the card. */
.dq-pc-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem; margin-bottom: .75rem; flex-wrap: wrap;
}
.dq-pc-summary { color: #6b7280; font-size: .85rem; }

/* Small CSV button — outlined pill, distinct from primary actions */
.dq-pc-csv {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .7rem;
    font-size: .8rem; font-weight: 600;
    background: #fff;
    color: #047857;
    border: 1px solid #10b981;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1;
    transition: background .15s ease;
}
.dq-pc-csv:hover { background: #ecfdf5; }
body.dark-mode .dq-pc-csv {
    background: #064e3b; color: #6ee7b7; border-color: #047857;
}
body.dark-mode .dq-pc-csv:hover { background: #065f46; }

/* Compact pager: small Prev/Next chips with a page label between */
.dq-pc-pager {
    display: flex; justify-content: center; align-items: center;
    gap: .5rem; margin-top: .85rem;
}
.dq-pc-nav {
    padding: .3rem .7rem;
    font-size: .8rem; font-weight: 600;
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1;
    transition: background .15s ease, border-color .15s ease;
}
.dq-pc-nav:hover:not(:disabled) {
    background: #f3f4f6; border-color: #9ca3af;
}
.dq-pc-nav:disabled,
.dq-pc-nav[disabled] {
    opacity: .4; cursor: not-allowed; pointer-events: none;
    background: #f9fafb; color: #9ca3af;
}
.dq-pc-page { color: #4b5563; font-size: .8rem; min-width: 5.5rem; text-align: center; }

body.dark-mode .dq-pc-summary,
body.dark-mode .dq-pc-page { color: #9ca3af; }
body.dark-mode .dq-pc-nav {
    background: #1f2937; color: #d1d5db; border-color: #4b5563;
}
body.dark-mode .dq-pc-nav:hover:not(:disabled) { background: #374151; }
body.dark-mode .dq-pc-nav:disabled,
body.dark-mode .dq-pc-nav[disabled] {
    background: #111827; color: #6b7280; border-color: #374151;
}

/* Freeze viewer modal — read-only details panel opened from the All Freezes list. */
.fz-viewer-modal {
    max-width: 720px;
    width: 100%;
}
.fz-viewer { font-size: 0.95rem; }
.fz-viewer-meta-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}
.fz-viewer-meta-row p { margin: 0; color: #475569; }
body.dark-mode .fz-viewer-meta-row p { color: #a1a1aa; }
.fz-viewer-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    row-gap: 0.3rem;
    column-gap: 0.8rem;
    margin: 0 0 1rem;
}
.fz-viewer-grid dt {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: #6b7280;
}
.fz-viewer-grid dd { margin: 0; color: #1f2937; font-weight: 500; }
body.dark-mode .fz-viewer-grid dt { color: #a1a1aa; }
body.dark-mode .fz-viewer-grid dd { color: #f4f4f5; }

.fz-viewer-section {
    margin: 1.1rem 0 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #475569;
    font-weight: 800;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.3rem;
}
body.dark-mode .fz-viewer-section { color: #a1a1aa; border-color: #27272a; }
.fz-viewer-prizes {
    margin: 0 0 0.6rem;
    padding-left: 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.fz-viewer-prizes li { font-size: 0.95rem; }

.fz-viewer-questions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 50vh;
    overflow-y: auto;
}
.fz-viewer-q {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
}
body.dark-mode .fz-viewer-q { background: #18181b; border-color: #27272a; }
.fz-viewer-q header {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 700;
}
.fz-viewer-qnum {
    background: #1d4ed8;
    color: #fff;
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
}
.fz-viewer-qtext {
    margin: 0.4rem 0 0.6rem;
    font-weight: 600;
    color: #0f172a;
}
body.dark-mode .fz-viewer-qtext { color: #f4f4f5; }
.fz-viewer-opts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.fz-viewer-opt {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.4rem 0.55rem;
    font-size: 0.92rem;
}
.fz-viewer-opt.is-correct {
    background: #dcfce7;
    border-color: #16a34a;
    font-weight: 600;
}
body.dark-mode .fz-viewer-opt { background: #0f0f10; border-color: #27272a; color: #f4f4f5; }
body.dark-mode .fz-viewer-opt.is-correct { background: #064e3b; border-color: #34d399; color: #bbf7d0; }
.fz-viewer-marker {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #1f2937;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    flex-shrink: 0;
}
.fz-viewer-opt.is-correct .fz-viewer-marker {
    background: #16a34a;
    color: #fff;
}
.fz-viewer-opt-text { flex: 1; }
.fz-viewer-correct-tag {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: #16a34a;
    color: #fff;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

/* Freeze heatmap with a side panel that opens when an admin clicks a cell. */
.fz-heatmap-host {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.fz-heatmap-grid { flex: 1; min-width: 0; }
.fz-heatmap-clickable { cursor: pointer; }
.fz-heatmap-clickable:hover {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
}
.fz-heatmap-side {
    flex: 0 0 280px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
    padding: 0.75rem 0.9rem;
    max-height: 60vh;
    overflow-y: auto;
    align-self: stretch;
}
body.dark-mode .fz-heatmap-side {
    background: #111827;
    border-color: #1f2937;
}
.fz-heatmap-side-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #e5e7eb;
}
body.dark-mode .fz-heatmap-side-head { border-color: #27272a; }
.fz-heatmap-side-head strong { display: block; font-size: 1rem; }
.fz-heatmap-side-head small  { color: #64748b; font-size: 0.78rem; }
body.dark-mode .fz-heatmap-side-head small { color: #a1a1aa; }
.fz-heatmap-side-close {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.05);
    color: #475569;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}
.fz-heatmap-side-close:hover { background: #fee2e2; color: #991b1b; }
body.dark-mode .fz-heatmap-side-close { background: rgba(244, 244, 245, 0.08); color: #d4d4d8; }

.fz-heatmap-side-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.fz-heatmap-side-list li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.2rem 0.5rem;
    padding: 0.4rem 0.5rem;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.88rem;
}
body.dark-mode .fz-heatmap-side-list li { background: #18181b; }
.fz-heatmap-side-name { font-weight: 600; color: #0f172a; }
body.dark-mode .fz-heatmap-side-name { color: #f4f4f5; }
.fz-heatmap-side-count {
    background: #1d4ed8;
    color: #fff;
    border-radius: 999px;
    padding: 0.05rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
}
.fz-heatmap-side-times {
    grid-column: 1 / -1;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.35;
}
body.dark-mode .fz-heatmap-side-times { color: #a1a1aa; }

@media (max-width: 880px) {
    .fz-heatmap-host { flex-direction: column; }
    .fz-heatmap-side { flex: 1 1 auto; width: 100%; max-height: none; }
}

/* Cashier-side Latest Freeze Leaderboard — reuses the .barometer-* shell
   so it matches Store / Regional leaderboards visually. The subline below
   each cashier's name carries the freeze-specific "X/Y correct · Ts" detail
   that doesn't exist on the points leaderboards. */
.fz-leaderboard-barometer .fz-barometer-sub {
    font-size: 0.82rem;
    color: var(--text-secondary, #6b7280);
    margin-bottom: 0.45rem;
    font-variant-numeric: tabular-nums;
}
body.dark-mode .fz-leaderboard-barometer .fz-barometer-sub { color: #a1a1aa; }
.fz-leaderboard-barometer .barometer-sales-count {
    font-variant-numeric: tabular-nums;
}

/* Daily Quiz analytics — click-to-open side panel on heatmap cells. Mirrors
   the freezes admin heatmap pattern (.fz-heatmap-side / -clickable / -list). */
.dq-heatmap-host {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.dq-heatmap-grid { flex: 1; min-width: 0; }
.dq-heatmap-clickable { cursor: pointer; }
.dq-heatmap-clickable:hover {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
}
.dq-heatmap-side {
    flex: 0 0 280px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
    padding: 0.75rem 0.9rem;
    max-height: 60vh;
    overflow-y: auto;
    align-self: stretch;
}
body.dark-mode .dq-heatmap-side {
    background: #111827;
    border-color: #1f2937;
}
.dq-heatmap-side-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #e5e7eb;
}
body.dark-mode .dq-heatmap-side-head { border-color: #27272a; }
.dq-heatmap-side-head strong { display: block; font-size: 1rem; }
.dq-heatmap-side-head small  { color: #64748b; font-size: 0.78rem; }
body.dark-mode .dq-heatmap-side-head small { color: #a1a1aa; }
.dq-heatmap-side-close {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.05);
    color: #475569;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}
.dq-heatmap-side-close:hover { background: #fee2e2; color: #991b1b; }
body.dark-mode .dq-heatmap-side-close { background: rgba(244, 244, 245, 0.08); color: #d4d4d8; }

.dq-heatmap-side-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.dq-heatmap-side-list li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.2rem 0.5rem;
    padding: 0.4rem 0.5rem;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.88rem;
    align-items: center;
}
body.dark-mode .dq-heatmap-side-list li { background: #18181b; }
.dq-heatmap-side-name { font-weight: 600; color: #0f172a; }
body.dark-mode .dq-heatmap-side-name { color: #f4f4f5; }
.dq-heatmap-side-count {
    background: #047857;
    color: #fff;
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    justify-self: end;
}
/* Stack the panel below the grid on narrow viewports so it doesn't squeeze
   the heatmap. */
@media (max-width: 900px) {
    .dq-heatmap-host { flex-direction: column; }
    .dq-heatmap-side { flex-basis: auto; width: 100%; max-height: 40vh; }
}

/* Unclaimed-prize card on My Performance — tighter, centred, with a place
   medal at the top and a small pill button. Distinct from .fz-redeem-cta
   (the inline banner used elsewhere) so this stays a self-contained card. */
.fz-redeem-card {
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 0.9rem 1rem 1rem;
    margin-bottom: 0.75rem;
    text-align: center;
    box-shadow: 0 1px 2px rgba(146, 64, 14, 0.08);
}
.fz-redeem-card[data-place="1"] { border-color: #f59e0b; }
.fz-redeem-card[data-place="2"] { border-color: #94a3b8; background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%); }
.fz-redeem-card[data-place="3"] { border-color: #d97706; background: linear-gradient(180deg, #fff7ed 0%, #fed7aa 100%); }
body.dark-mode .fz-redeem-card {
    background: linear-gradient(180deg, #422006 0%, #78350f 100%);
    border-color: #b45309;
}
body.dark-mode .fz-redeem-card[data-place="2"] {
    background: linear-gradient(180deg, #18181b 0%, #27272a 100%);
    border-color: #71717a;
}
body.dark-mode .fz-redeem-card[data-place="3"] {
    background: linear-gradient(180deg, #431407 0%, #7c2d12 100%);
    border-color: #c2410c;
}

.fz-redeem-medal {
    display: inline-block;
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 0.3rem;
}
.fz-redeem-head {
    font-weight: 700;
    color: #78350f;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}
.fz-redeem-prize {
    color: #78350f;
    font-size: 0.88rem;
    margin-bottom: 0.7rem;
}
.fz-redeem-prize-desc { opacity: 0.85; }
body.dark-mode .fz-redeem-head,
body.dark-mode .fz-redeem-prize { color: #fde68a; }

.fz-redeem-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    /* Soft freeze-brand cyan→indigo — matches the popup's flash badge and
       the action buttons in the admin list. "Lighter" than the slate
       previously used, and visually anchors the card to the freeze theme. */
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.35rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.18);
    transition: filter 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.fz-redeem-pill:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
}
.fz-redeem-pill:active { transform: translateY(0); filter: brightness(0.96); }
.fz-redeem-pill:disabled {
    background: #cbd5e1;
    color: #f8fafc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
body.dark-mode .fz-redeem-pill {
    background: linear-gradient(90deg, #0ea5e9, #6366f1);
}
body.dark-mode .fz-redeem-pill:disabled {
    background: #3f3f46;
    color: #a1a1aa;
}

/* ============================================================================
 * JTI Connect — Freezes + Daily Quiz redesign (approved options 1a–1f)
 * ----------------------------------------------------------------------------
 * PASTE: append this whole file to the END of public/css/views.css
 * (or load it as its own <link> after views.css). Everything here either
 * overrides existing fz-pop-* / dq-* rules or adds new classes used by the
 * markup snippets in handoff/markup-changes.md.
 *
 * Accents (harmonized, one hue apart):
 *   Daily Quiz  — brand teal   #00a88f / hover #008f7a / deep #00806d
 *                 tint #f0fdfa / tint-border #99e5d9
 *   Freezes     — ice cyan     #0891b2 / hover #0e7490
 *                 tint #ecfeff / tint-border #a5f3fc
 * ========================================================================== */

/* ─── 1e · Button system (scoped — does NOT touch buttons elsewhere) ────── */
/* Kills the indigo #667eea secondary inside freeze/quiz surfaces only.      */
.freeze-popup-box .btn,
#dailyQuizSection .btn,
.dq-result-card .btn,
.dq-review .btn {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
}
.freeze-popup-box .btn-secondary,
#dailyQuizSection .btn-secondary,
.dq-result-card .btn-secondary,
.dq-review .btn-secondary {
    background: #fff;
    border: 1px solid var(--border-medium);
    color: var(--text-medium);
    font-weight: 600;
    min-height: 44px;
}
.freeze-popup-box .btn-secondary:hover,
#dailyQuizSection .btn-secondary:hover,
.dq-result-card .btn-secondary:hover,
.dq-review .btn-secondary:hover {
    background: var(--bg-light);
    border-color: #ccc;
    color: var(--text-dark);
    transform: none;
}
/* Freeze primary uses the ice-cyan accent. */
.freeze-popup-box .btn-primary {
    background: #0891b2;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.28);
}
.freeze-popup-box .btn-primary:hover { background: #0e7490; }
body.dark-mode .freeze-popup-box .btn-secondary,
body.dark-mode #dailyQuizSection .btn-secondary,
body.dark-mode .dq-result-card .btn-secondary {
    background: #18181b;
    border-color: #3f3f46;
    color: #d4d4d8;
}

/* ─── 1a · Freeze popup — shell + intro ─────────────────────────────────── */
.freeze-popup-box {
    max-width: 420px;          /* was 640px — mobile-first card */
    padding: 0;                /* hero header is edge-to-edge   */
    border-radius: 16px;
    overflow: hidden;
}
.fz-pop-body-pad { padding: 1.1rem 1.25rem 1.25rem; }

/* Hero header (new element — see markup-changes.md renderIntro/renderPlayer) */
.fz-pop-hero {
    background: linear-gradient(135deg, #0e7490, #0891b2);
    color: #fff;
    padding: 1.1rem 1.25rem 1rem;
    position: relative;
}
body.dark-mode .fz-pop-hero { background: linear-gradient(135deg, #164e63, #0e7490); }
.fz-pop-hero h2 { margin: 0.6rem 0 0.25rem; font-size: 1.3rem; font-weight: 800; line-height: 1.2; }
.fz-pop-hero .fz-pop-desc { color: rgba(255, 255, 255, 0.85); margin: 0; font-size: 0.85rem; }

/* "FREEZE — LIVE NOW" chip replaces .fz-pop-flash's blue→indigo gradient */
.fz-pop-flash {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0;
    animation: fz-pop-shake 0.6s ease-in-out;
}
.fz-pop-flash-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #a5f3fc;
    animation: fz-dot-pulse 1.6s ease-out infinite;
}
@keyframes fz-dot-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(165, 243, 252, 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(165, 243, 252, 0); }
    100% { box-shadow: 0 0 0 0 rgba(165, 243, 252, 0); }
}

/* Meta pills → three equal stat tiles */
.fz-pop-meta { display: flex; gap: 0.5rem; margin: 0 0 0.9rem; }
.fz-pop-meta li {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.55rem 0.4rem;
    text-align: center;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-medium);
}
.fz-pop-meta li strong { display: block; font-size: 1rem; font-weight: 800; color: var(--text-dark); text-transform: none; letter-spacing: 0; }
.fz-pop-meta li.fz-pop-meta-pts { background: #ecfeff; border-color: #a5f3fc; color: #0e7490; }
.fz-pop-meta li.fz-pop-meta-pts strong { color: #0e7490; }
body.dark-mode .fz-pop-meta li { background: #18181b; border-color: #27272a; color: #a1a1aa; }
body.dark-mode .fz-pop-meta li strong { color: #f4f4f5; }
body.dark-mode .fz-pop-meta li.fz-pop-meta-pts { background: #164e63; border-color: #155e75; color: #a5f3fc; }
body.dark-mode .fz-pop-meta li.fz-pop-meta-pts strong { color: #a5f3fc; }

/* Prize podium rows (replaces the plain <ol>) */
.fz-pop-prizes-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-medium);
    margin: 0 0 0.5rem;
}
.fz-pop-prizes { list-style: none; padding: 0; margin: 0 0 0.9rem; display: flex; flex-direction: column; gap: 0.4rem; }
.fz-pop-prizes li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dark);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.fz-pop-prizes li:nth-child(1) { background: #fffbeb; border-color: #fde68a; }
.fz-pop-prizes li:nth-child(3) { background: #fff7ed; border-color: #fed7aa; }
.fz-pop-prize-place {
    width: 24px; height: 24px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 0.68rem; font-weight: 800; color: #fff;
    background: #94a3b8;             /* 2nd — silver */
    margin-right: 0;
}
.fz-pop-prizes li:nth-child(1) .fz-pop-prize-place { background: #f59e0b; }  /* gold   */
.fz-pop-prizes li:nth-child(3) .fz-pop-prize-place { background: #c2680c; }  /* bronze */
body.dark-mode .fz-pop-prizes li { background: #18181b; border-color: #27272a; color: #f4f4f5; }
body.dark-mode .fz-pop-prizes li:nth-child(1) { background: #2a2005; border-color: #713f12; }
body.dark-mode .fz-pop-prizes li:nth-child(3) { background: #2a1505; border-color: #7c2d12; }

/* Warning — quiet amber note (no heavy left border, no emoji) */
.fz-pop-warning {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 1px solid #fde68a;
    color: #92400e;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    font-size: 0.78rem;
    line-height: 1.5;
    margin: 0 0 1rem;
}
body.dark-mode .fz-pop-warning { background: #2a2005; border-color: #713f12; color: #fde68a; }

/* Actions — stacked full-width, primary on top */
.fz-pop-actions { flex-direction: column-reverse; gap: 0.5rem; margin-top: 0; }
.fz-pop-actions .btn { width: 100%; }

/* Shine sweep on the Start button (keep-it-lively) */
.fz-pop-shine { position: relative; overflow: hidden; }
.fz-pop-shine::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%);
    transform: translateX(-120%);
    animation: fz-shine 2.8s ease-in-out infinite;
    pointer-events: none;
}
@keyframes fz-shine {
    0%   { transform: translateX(-120%); }
    55%  { transform: translateX(130%); }
    100% { transform: translateX(130%); }
}

/* Close X — on the hero it sits on the gradient */
.fz-pop-hero .fz-pop-close,
.fz-pop-close.on-hero {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}
.fz-pop-hero .fz-pop-close:hover { background: rgba(255, 255, 255, 0.28); transform: rotate(90deg); }

/* ─── 1b · Player (freeze + quiz share these) ───────────────────────────── */
.fz-pop-player-header { padding-right: 2.4rem; margin-bottom: 0.6rem; }
.fz-pop-player-header h2 { font-size: 1.15rem; font-weight: 800; }

/* Timer — cyan, no Courier */
.fz-pop-timer {
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    color: #0e7490;
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    padding: 0.3rem 0.7rem;
    border-radius: 10px;
    font-size: 0.95rem;
    min-width: 90px;
    text-align: center;
}
body.dark-mode .fz-pop-timer { background: #164e63; border-color: #155e75; color: #67e8f9; }

/* Progress — solid accent, no blue→indigo gradient */
.fz-pop-progress-bar { background: #0891b2; border-radius: 999px; }
body.dark-mode .fz-pop-progress-bar { background: #22d3ee; }

/* Options — bigger touch targets, softer borders */
.fz-pop-q-options { gap: 0.5rem; }
.fz-pop-q-option {
    padding: 0.75rem 0.85rem;
    min-height: 48px;
    border: 1.5px solid var(--border-medium);
    border-radius: 12px;
}
.fz-pop-q-option:hover { border-color: #0891b2; background: #ecfeff; }
.fz-pop-q-option.is-selected { border-color: #0891b2; background: #ecfeff; }
.fz-pop-q-option.is-selected .fz-pop-q-option-marker { background: #0891b2; color: #fff; }
body.dark-mode .fz-pop-q-option:hover,
body.dark-mode .fz-pop-q-option.is-selected { border-color: #0891b2; background: #164e63; }

/* Arrows — 44px hit targets */
.fz-pop-arrow { width: 44px; height: 44px; }
.fz-pop-arrow:not(:disabled):hover { border-color: #0891b2; color: #0891b2; }

/* ─── Daily Quiz runs in the SAME modal shell ───────────────────────────── */
/* The quiz overlay reuses .freeze-popup-overlay/.freeze-popup-box (see      */
/* markup-changes.md). .is-quiz swaps cyan → brand teal on the shared bits.  */
.freeze-popup-box.is-quiz .fz-pop-timer {
    color: #00806d; background: #f0fdfa; border-color: #99e5d9;
}
.freeze-popup-box.is-quiz .fz-pop-progress-bar { background: var(--primary-color); }
.freeze-popup-box.is-quiz .fz-pop-q-option:hover,
.freeze-popup-box.is-quiz .fz-pop-q-option.is-selected {
    border-color: var(--primary-color); background: #f0fdfa;
}
.freeze-popup-box.is-quiz .fz-pop-q-option.is-selected .fz-pop-q-option-marker {
    background: var(--primary-color); color: #fff;
}
/* Dark mode: keep the selected/hover option a DARK teal tint (the light
   #f0fdfa above has higher specificity than the base dark rule, so it must be
   overridden here or the option turns into an unreadable light box). */
body.dark-mode .freeze-popup-box.is-quiz .fz-pop-q-option:hover,
body.dark-mode .freeze-popup-box.is-quiz .fz-pop-q-option.is-selected {
    border-color: #14b8a6; background: #0a4f47;
}
.freeze-popup-box.is-quiz .btn-primary { background: var(--primary-color); box-shadow: 0 4px 12px rgba(0,168,143,.28); }
.freeze-popup-box.is-quiz .btn-primary:hover { background: var(--primary-hover); }
body.dark-mode .freeze-popup-box.is-quiz .fz-pop-timer { background: #052e2a; border-color: #0a4f47; color: #5eead4; }

/* Quiz eyebrow inside the modal ("● DAILY QUIZ") */
.dq-modal-eyebrow {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.66rem; font-weight: 800;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}
.dq-modal-eyebrow .dq-cta-dot { width: 7px; height: 7px; background: var(--primary-color); box-shadow: none; animation: dq-dot-teal 1.6s ease-out infinite; }
@keyframes dq-dot-teal {
    0%   { box-shadow: 0 0 0 0 rgba(0, 168, 143, 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(0, 168, 143, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 168, 143, 0); }
}

/* ─── 1c · Daily quiz CTA — seamless white card ─────────────────────────── */
.daily-quiz-cta { border-radius: 16px; }
.dq-cta-live {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 1.25rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    color: var(--text-dark);
}
.dq-cta-live::before { content: none; }   /* kill the old radial sheen */
body.dark-mode .dq-cta-live { background: #0f0f10; border-color: #27272a; color: #f4f4f5; }

/* Icon tile (new element in renderCtaLive) */
.dq-cta-icon-tile {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-color), #00c4a7);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 168, 143, 0.3);
    position: relative;
    overflow: hidden;
}
.dq-cta-icon-tile::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%);
    transform: translateX(-120%);
    animation: fz-shine 3.2s ease-in-out infinite;
}

.dq-cta-eyebrow { color: #00806d; margin-bottom: 0.2rem; font-size: 0.66rem; letter-spacing: 0.12em; font-weight: 800; }
.dq-cta-dot { background: var(--primary-color); box-shadow: none; animation: dq-dot-teal 1.6s ease-out infinite; }
.dq-cta-title { color: var(--text-dark); font-size: 1.1rem; font-weight: 800; }
.dq-cta-sub   { color: var(--text-medium); opacity: 1; font-size: 0.85rem; }
.dq-cta-points-badge { font-weight: 700; color: #00806d; background: none; padding: 0; }
body.dark-mode .dq-cta-title { color: #f4f4f5; }
body.dark-mode .dq-cta-sub   { color: #a1a1aa; }
body.dark-mode .dq-cta-eyebrow, body.dark-mode .dq-cta-points-badge { color: #5eead4; }

/* CTA button — solid teal, one shine cue (pulse + float + shine removed) */
.dq-cta-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    min-height: 46px;
    padding: 0 1.4rem;
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 168, 143, 0.3);
    animation: none;                      /* was pulse + float */
    transition: transform 0.15s ease, background 0.2s ease;
}
.dq-cta-btn:hover  { background: var(--primary-hover); transform: translateY(-1px) scale(1); }
.dq-cta-btn:active { transform: translateY(0); }
.dq-cta-btn-shine {
    background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.25) 50%, transparent 65%);
    animation: fz-shine 2.8s ease-in-out infinite;
}

/* Done / none states — white card + circular check */
.dq-cta-done, .dq-cta-none {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1rem 1.4rem;
    gap: 1rem;
}
.dq-cta-done-icon {
    width: 44px; height: 44px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: var(--success);
    box-shadow: none;
}
.dq-cta-done .dq-cta-title, .dq-cta-none .dq-cta-title { color: var(--text-dark); font-size: 0.98rem; }
.dq-cta-done .dq-cta-sub,   .dq-cta-none .dq-cta-sub   { color: var(--text-medium); font-size: 0.82rem; }
.dq-cta-countdown-value { background: var(--bg-light); border-color: var(--border-light); }
body.dark-mode .dq-cta-done, body.dark-mode .dq-cta-none { background: #0f0f10; border-color: #27272a; }
body.dark-mode .dq-cta-done .dq-cta-title, body.dark-mode .dq-cta-none .dq-cta-title { color: #f4f4f5; }
body.dark-mode .dq-cta-done .dq-cta-sub,   body.dark-mode .dq-cta-none .dq-cta-sub   { color: #a1a1aa; }
body.dark-mode .dq-cta-done-icon { background: #064e3b; border-color: #047857; color: #6ee7b7; }
body.dark-mode .dq-cta-countdown-value { background: #18181b; border-color: #27272a; color: #f4f4f5; }

/* ─── 1d · Result card (shared) ─────────────────────────────────────────── */
.dq-result-badge {
    width: 64px; height: 64px;
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    color: var(--success);
    box-shadow: none;
    margin: 0 auto;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
}
.dq-result-card h2 { font-size: 1.25rem; font-weight: 800; margin: 0.75rem 0 0.25rem; }
.dq-points-earned {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f0fdfa;
    border: 1px solid #99e5d9;
    color: #00806d;
    font-size: 0.82rem;
    font-weight: 800;
    border-radius: 999px;
    padding: 0.45rem 1rem;
    margin: 0 0 1rem;
}
.dq-result-stat {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 0.75rem 0.4rem;
}
.dq-result-stat-points { background: #f0fdfa; border-color: #99e5d9; }
.dq-result-stat-points .dq-result-stat-value, .dq-result-stat-points .dq-result-stat-label { color: #00806d; }
.dq-result-actions { display: flex; flex-direction: column-reverse; gap: 0.5rem; margin-top: 1.1rem; }
body.dark-mode .dq-result-stat { background: #18181b; border-color: #27272a; }
body.dark-mode .dq-points-earned, body.dark-mode .dq-result-stat-points { background: #052e2a; border-color: #0a4f47; color: #5eead4; }
body.dark-mode .dq-result-badge { background: #064e3b; border-color: #047857; color: #6ee7b7; }

/* ─── 1e · Admin list rows — actions on one line ────────────────────────── */
.ar-faq-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}
.ar-faq-actions button {
    min-height: 36px;
    padding: 0 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--border-medium);
    background: #fff;
    color: var(--text-dark);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ar-faq-actions button:hover { border-color: var(--primary-color); color: #00806d; background: #fff; }
.ar-faq-actions .ar-faq-delete,
.ar-faq-actions [data-action="delete"] {
    border-color: #fecaca; color: #b91c1c;
}
.ar-faq-actions .ar-faq-delete:hover,
.ar-faq-actions [data-action="delete"]:hover { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
body.dark-mode .ar-faq-actions button { background: #18181b; border-color: #3f3f46; color: #d4d4d8; }
body.dark-mode .ar-faq-actions button:hover { border-color: var(--primary-color); color: #5eead4; }
body.dark-mode .ar-faq-actions .ar-faq-delete { border-color: #7f1d1d; color: #fca5a5; }

/* ============================================================================
 * JTI Connect — Template pages (approved 3a Freeze + 3b Daily Quiz row list)
 * ----------------------------------------------------------------------------
 * PASTE: append to the end of public/css/views.css (after the earlier
 * freezes-quizzes-redesign.css block). Markup: see template-pages.html.
 *
 * One set of classes serves BOTH pages. The page container carries an accent
 * modifier:  .tpl-page.is-freeze  → ice cyan   #0891b2 / #0e7490
 *            .tpl-page.is-quiz    → brand teal #00a88f / #008f7a
 * ========================================================================== */

.tpl-page { --tpl-accent: #0891b2; --tpl-accent-deep: #0e7490; --tpl-tint: #ecfeff; --tpl-tint-border: #a5f3fc; --tpl-shadow: rgba(8,145,178,.25); }
.tpl-page.is-quiz { --tpl-accent: #00a88f; --tpl-accent-deep: #008f7a; --tpl-tint: #f0fdfa; --tpl-tint-border: #99e5d9; --tpl-shadow: rgba(0,168,143,.25); }

/* Card shell */
.tpl-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
}
body.dark-mode .tpl-card { background: #0f0f10; border-color: #27272a; }

/* ── Header: title + count + search + New template ─────────────────────── */
.tpl-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-light); }
body.dark-mode .tpl-header { border-color: #27272a; }
.tpl-header-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.tpl-title { margin: 0; font-size: 1rem; font-weight: 800; color: var(--text-dark); }
body.dark-mode .tpl-title { color: #f4f4f5; }
.tpl-count {
    font-size: 0.69rem; font-weight: 700;
    background: var(--tpl-tint); color: var(--tpl-accent-deep);
    border: 1px solid var(--tpl-tint-border);
    border-radius: 999px; padding: 0.12rem 0.6rem;
}
.tpl-header-spacer { flex: 1; }
.tpl-search {
    display: flex; align-items: center; gap: 0.45rem;
    border: 1px solid var(--border-medium); border-radius: 10px;
    padding: 0 0.75rem; min-height: 38px; min-width: 210px;
    background: #fff;
}
.tpl-search svg { color: var(--text-light); flex: none; }
.tpl-search input {
    border: none; outline: none; background: transparent;
    font-size: 0.82rem; color: var(--text-dark); width: 100%;
    font-family: inherit; padding: 0;
}
.tpl-search input::placeholder { color: var(--text-light); }
.tpl-search:focus-within { border-color: var(--tpl-accent); }
body.dark-mode .tpl-search { background: #18181b; border-color: #3f3f46; }
body.dark-mode .tpl-search input { color: #f4f4f5; }
.tpl-new-btn {
    min-height: 38px; padding: 0 0.95rem;
    border: none; border-radius: 10px;
    background: var(--tpl-accent); color: #fff;
    font-size: 0.78rem; font-weight: 700; font-family: inherit;
    cursor: pointer; white-space: nowrap;
    box-shadow: 0 3px 8px var(--tpl-shadow);
    transition: background 0.15s ease;
}
.tpl-new-btn:hover { background: var(--tpl-accent-deep); }
.tpl-blurb {
    margin: 0.6rem 0 0; font-size: 0.75rem; color: var(--text-medium);
    line-height: 1.5; max-width: 620px;
}
body.dark-mode .tpl-blurb { color: #a1a1aa; }

/* ── Rows ───────────────────────────────────────────────────────────────── */
.tpl-row {
    display: flex; align-items: center; gap: 0.9rem;
    padding: 0.8rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.12s ease;
}
.tpl-row:last-child { border-bottom: none; }
.tpl-row:hover { background: var(--bg-light); }
body.dark-mode .tpl-row { border-color: #27272a; }
body.dark-mode .tpl-row:hover { background: #18181b; }

.tpl-row-main { flex: 1; min-width: 0; }
.tpl-row-title-line { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.tpl-row-title { font-size: 0.85rem; font-weight: 700; color: var(--text-dark); }
body.dark-mode .tpl-row-title { color: #f4f4f5; }
.tpl-row-sub { font-size: 0.72rem; color: var(--text-medium); margin-top: 1px; }
body.dark-mode .tpl-row-sub { color: #a1a1aa; }

/* Status badges */
.tpl-badge {
    font-size: 0.56rem; font-weight: 700; letter-spacing: 0.04em;
    border-radius: 999px; padding: 0.12rem 0.45rem; white-space: nowrap;
    background: var(--bg-light); color: var(--text-light);
    border: 1px solid var(--border-light);
}
.tpl-badge.is-used      { background: var(--tpl-tint); color: var(--tpl-accent-deep); border-color: var(--tpl-tint-border); }
.tpl-badge.is-scheduled { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
body.dark-mode .tpl-badge { background: #18181b; color: #71717a; border-color: #27272a; }
body.dark-mode .tpl-badge.is-used { background: #164e63; color: #a5f3fc; border-color: #155e75; }
body.dark-mode .tpl-page.is-quiz .tpl-badge.is-used { background: #052e2a; color: #5eead4; border-color: #0a4f47; }
body.dark-mode .tpl-badge.is-scheduled { background: #1e3a8a; color: #bfdbfe; border-color: #1e40af; }

/* Row actions — Publish / Edit / Delete on one line */
.tpl-row-actions { display: flex; gap: 0.4rem; flex: none; align-items: center; }
.tpl-btn-publish {
    min-height: 34px; padding: 0 0.9rem;
    border: none; border-radius: 8px;
    background: var(--tpl-accent); color: #fff;
    font-size: 0.75rem; font-weight: 700; font-family: inherit;
    cursor: pointer; transition: background 0.15s ease;
}
.tpl-btn-publish:hover { background: var(--tpl-accent-deep); }
.tpl-btn-edit {
    min-height: 34px; padding: 0 0.75rem;
    border: 1px solid var(--border-medium); border-radius: 8px;
    background: #fff; color: var(--text-dark);
    font-size: 0.75rem; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease;
}
.tpl-btn-edit:hover { border-color: var(--tpl-accent); color: var(--tpl-accent-deep); }
.tpl-btn-delete {
    width: 34px; height: 34px; padding: 0;
    border: 1px solid #fecaca; border-radius: 8px;
    background: #fff; color: #b91c1c;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.15s ease;
}
.tpl-btn-delete:hover { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
body.dark-mode .tpl-btn-edit { background: #18181b; border-color: #3f3f46; color: #d4d4d8; }
body.dark-mode .tpl-btn-edit:hover { border-color: var(--tpl-accent); color: var(--tpl-tint-border); }
body.dark-mode .tpl-btn-delete { background: #18181b; border-color: #7f1d1d; color: #fca5a5; }
body.dark-mode .tpl-btn-delete:hover { background: #450a0a; }

/* Empty state (search with no hits) */
.tpl-empty { padding: 2rem 1.25rem; text-align: center; color: var(--text-medium); font-size: 0.82rem; }

/* Mobile: actions wrap below the text */
@media (max-width: 640px) {
    .tpl-header-row .tpl-search { min-width: 0; flex: 1 1 100%; order: 10; }
    .tpl-row { flex-wrap: wrap; }
    .tpl-row-main { flex: 1 1 100%; }
    .tpl-row-actions { width: 100%; justify-content: flex-end; }
}

/* ════════════════════════════════════════════════════════════════════════
   Daily Quiz — training gate (locked CTA + modal card)
   Shown when the quiz is locked behind training: either no module completed
   yet ('no_modules') or every unlocked question answered correctly
   ('exhausted'). Same white-card language as .dq-cta-done/.dq-cta-none,
   with the teal icon tile pointing at the training CTA.
   ════════════════════════════════════════════════════════════════════════ */
.dq-cta-locked {
    display: flex; align-items: center; gap: 1.1rem;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.25rem 1.4rem;
    color: var(--text-dark);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.dq-cta-locked .dq-cta-icon-tile.dq-cta-icon-locked {
    background: #f0fdfa;
    border: 1px solid #99e5d9;
    color: #00806d;
    box-shadow: none;
}
.dq-cta-locked .dq-cta-icon-tile.dq-cta-icon-locked::after { content: none; }
.dq-cta-locked .dq-cta-sub strong { color: #00806d; }
body.dark-mode .dq-cta-locked { background: #0f0f10; border-color: #27272a; color: #f4f4f5; }
body.dark-mode .dq-cta-locked .dq-cta-icon-tile.dq-cta-icon-locked {
    background: #052e2a; border-color: #0a4f47; color: #5eead4;
}
body.dark-mode .dq-cta-locked .dq-cta-sub strong { color: #5eead4; }
@media (max-width: 720px) {
    .dq-cta-locked { flex-direction: column; align-items: stretch; padding: 1.5rem; }
    .dq-cta-locked .dq-cta-btn { width: 100%; justify-content: center; }
}

/* Locked card inside the quiz modal */
.dq-locked-card .dq-locked-icon {
    width: 64px; height: 64px; margin: 0 auto 0.5rem;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f0fdfa; border: 1.5px solid #99e5d9; color: #00806d;
}
.dq-locked-card p strong { color: #00806d; }
body.dark-mode .dq-locked-card .dq-locked-icon { background: #052e2a; border-color: #0a4f47; color: #5eead4; }
body.dark-mode .dq-locked-card p strong { color: #5eead4; }

/* ════════════════════════════════════════════════════════════════════════
   Admin › Daily Quizzes › Cashier Completion matrix (.dqc-*)
   Cashiers as rows, bank questions as columns grouped per module (labels
   1.1, 1.2, …). Module headers click to expand/collapse; collapsed groups
   show a correct/total summary per cashier. Same teal admin aesthetic as
   the Question Bank (.qb-*) block.
   ════════════════════════════════════════════════════════════════════════ */
.dqc-card .ar-card-title { display: flex; align-items: center; gap: 0.6rem; }
.dqc-intro { color: var(--text-medium); font-size: 0.82rem; margin: 0.25rem 0 1rem; max-width: 68ch; }

.dqc-toolbar {
    display: flex; flex-wrap: wrap; gap: 0.6rem;
    margin-bottom: 0.75rem;
}
/* .ar-input is width:100% for stacked forms — undo it so the filters sit on
   one row and wrap naturally. */
.dqc-toolbar .ar-input { width: auto; }
.dqc-search { flex: 1 1 220px; min-width: 180px; }
.dqc-select { flex: 0 1 auto; min-width: 150px; }

.dqc-legend {
    display: flex; flex-wrap: wrap; gap: 1rem;
    margin-bottom: 0.9rem;
    font-size: 0.75rem; color: var(--text-medium);
}
.dqc-legend-item { display: inline-flex; align-items: center; gap: 0.4rem; }
.dqc-chip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 6px;
    font-size: 0.72rem; font-weight: 800;
}

/* Table shell — scrolls inside its own wrapper, never the page */
.dqc-table-wrap {
    overflow: auto;
    max-height: 70vh;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: #fff;
}
.dqc-table {
    border-collapse: separate; border-spacing: 0;
    width: max-content; min-width: 100%;
    font-size: 0.78rem;
}
.dqc-table th, .dqc-table td {
    border-bottom: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    padding: 0.45rem 0.55rem;
    background: #fff;
    white-space: nowrap;
}

/* Sticky header rows + sticky cashier column. The header needs a HIGHER
   z-index than the sticky first column so vertical scrolling slides cashier
   names under it, not over it; the corner cell tops both. */
.dqc-table thead th { position: sticky; z-index: 5; }
.dqc-table thead tr:first-child th { top: 0; }
.dqc-table thead tr:last-child  th { top: 37px; }
.dqc-th-corner, .dqc-th-cashier {
    position: sticky; left: 0; z-index: 3;
    text-align: left;
    min-width: 170px; max-width: 240px;
    overflow: hidden; text-overflow: ellipsis;
}
.dqc-table thead .dqc-th-corner { z-index: 6; background: #f0fdfa; color: #00806d; }

/* Module group headers — clickable, teal accent like .qb-module-head.
   Scoped under .dqc-table so they outrank the generic `.dqc-table th`
   background above. */
.dqc-table .dqc-th-module {
    background: #f0fdfa;
    color: #00806d;
    font-weight: 800; font-size: 0.72rem;
    letter-spacing: 0.04em; text-transform: uppercase;
    text-align: left;
    cursor: pointer; user-select: none;
    border-left: 3px solid var(--primary-color);
    transition: background 0.15s ease;
}
.dqc-table .dqc-th-module:hover { background: #ccf5ec; }
.dqc-th-module-caret { display: inline-block; width: 1em; margin-right: 0.15rem; }
/* A module with no questions yet — shown but not clickable/expandable. */
.dqc-table .dqc-th-module.is-empty { cursor: default; opacity: 0.72; }
.dqc-table .dqc-th-module.is-empty:hover { background: #f0fdfa; }

/* Question-label header cells (1.1, 1.2, …) */
.dqc-table .dqc-th-q {
    font-weight: 700; color: var(--text-medium);
    text-align: center; min-width: 40px;
    background: var(--bg-light);
    cursor: help;
}
.dqc-th-agg { min-width: 52px; }
.dqc-th-q.dqc-th-empty { color: #cbd5e1; font-weight: 600; }

/* Cashier row header */
.dqc-th-cashier { font-weight: 600; }
.dqc-cashier-name { display: block; color: var(--text-dark); }
.dqc-cashier-sub  { display: block; font-size: 0.68rem; font-weight: 500; color: var(--text-medium); }

/* Cells */
.dqc-cell { text-align: center; font-weight: 800; min-width: 40px; }
.dqc-cell.is-correct, .dqc-chip.is-correct { color: #00806d; background: #f0fdfa; }
.dqc-cell.is-wrong,   .dqc-chip.is-wrong   { color: #b91c1c; background: #fef2f2; }
.dqc-cell.is-unseen,  .dqc-chip.is-unseen  { color: #cbd5e1; background: #fff; font-weight: 600; }
.dqc-cell-agg { font-variant-numeric: tabular-nums; font-weight: 700; }
.dqc-cell-agg.is-full { color: #00806d; background: #f0fdfa; }
.dqc-cell-agg.is-part { color: #92640a; background: #fffbeb; }
.dqc-cell-agg.is-seen { color: #b91c1c; background: #fef2f2; }
.dqc-cell-agg.is-none { color: #94a3b8; background: #fff; font-weight: 600; }
.dqc-cell.dqc-cell-empty { color: #cbd5e1; background: #fafafa; font-weight: 600; }

/* Dark mode. dark-mode.css paints every th/td with `!important` blanket rules
   (`body.dark-mode th { background:#374151 !important }` etc.), so the matrix
   overrides below must be !important too or they silently lose the cascade. */
body.dark-mode .dqc-intro, body.dark-mode .dqc-legend { color: #a1a1aa; }
body.dark-mode .dqc-table-wrap { border-color: #27272a; background: #0f0f10; }
body.dark-mode .dqc-table th, body.dark-mode .dqc-table td {
    background: #0f0f10 !important; border-color: #27272a !important;
}
body.dark-mode .dqc-table thead .dqc-th-corner,
body.dark-mode .dqc-table .dqc-th-module { background: #052e2a !important; color: #5eead4 !important; }
body.dark-mode .dqc-table .dqc-th-module { border-left-color: #14b8a6 !important; }
body.dark-mode .dqc-table .dqc-th-module:hover { background: #0a4f47 !important; }
body.dark-mode .dqc-table .dqc-th-q { background: #18181b !important; color: #a1a1aa !important; }
body.dark-mode .dqc-cashier-name { color: #f4f4f5 !important; }
body.dark-mode .dqc-cashier-sub  { color: #a1a1aa !important; }
body.dark-mode .dqc-table td.dqc-cell.is-correct, body.dark-mode .dqc-chip.is-correct,
body.dark-mode .dqc-table td.dqc-cell-agg.is-full { color: #5eead4 !important; background: #052e2a !important; }
body.dark-mode .dqc-table td.dqc-cell.is-wrong, body.dark-mode .dqc-chip.is-wrong,
body.dark-mode .dqc-table td.dqc-cell-agg.is-seen { color: #fca5a5 !important; background: #450a0a !important; }
body.dark-mode .dqc-table td.dqc-cell.is-unseen, body.dark-mode .dqc-chip.is-unseen,
body.dark-mode .dqc-table td.dqc-cell-agg.is-none { color: #52525b !important; background: #0f0f10 !important; }
body.dark-mode .dqc-table td.dqc-cell-agg.is-part { color: #fcd34d !important; background: #422006 !important; }
body.dark-mode .dqc-table td.dqc-cell.dqc-cell-empty { color: #52525b !important; background: #0f0f10 !important; }
body.dark-mode .dqc-table .dqc-th-module.is-empty:hover { background: #052e2a !important; }

@media (max-width: 720px) {
    .dqc-toolbar { flex-direction: column; }
    .dqc-search, .dqc-select { min-width: 0; width: 100%; }
    .dqc-th-corner, .dqc-th-cashier { min-width: 130px; }
}
