/* ============================================
   QaskMe – Admin Panel Styles
   Used by all pages in /admin/
   ============================================ */

/* ---- Body ---- */
.admin-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
}

/* ---- Admin nav ---- */
.admin-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 200;
}

/* ---- Impersonate bar ---- */
.impersonate-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

.nav-admin-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--gradient-primary);
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    margin-left: 0.5rem;
}

.admin-nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-menu-items {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Burger menu button – hidden on desktop */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    width: 32px;
    height: 32px;
}
.nav-burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.25s ease;
}

.admin-nav-user {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ---- Tier badge in nav ---- */
.nav-tier-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
}
.nav-tier-badge:hover {
    transform: scale(1.05);
    filter: brightness(1.15);
}
.nav-tier-badge.tier-free {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}
.nav-tier-badge.tier-basic {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}
.nav-tier-badge.tier-pro {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

.admin-nav-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

.admin-nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.admin-nav-link.active {
    color: var(--accent-primary);
}

/* ---- Main content ---- */
.admin-main {
    flex: 1;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 2.5rem;
}

/* Superadmin full-width layout */
.superadmin-body .admin-main {
    max-width: 100%;
    padding: 2rem 2.5rem;
}

/* ---- Footer ---- */
.admin-footer {
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    position: sticky;
    bottom: 0;
    background: var(--bg-secondary);
    z-index: 200;
}
.admin-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}
.admin-footer-left {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.admin-footer-right {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}
.admin-footer-right:hover { opacity: 1; }
.admin-footer-right img,
.admin-footer-right .admin-footer-logo {
    height: 22px;
    width: auto;
    display: block;
}
/* Default (dark theme): show white logo, hide black. */
.admin-footer-right .admin-footer-logo--light { display: none; }
/* Light theme: swap. */
[data-theme="light"] .admin-footer-right .admin-footer-logo--dark { display: none; }
[data-theme="light"] .admin-footer-right .admin-footer-logo--light { display: block; }
/* System preference fallback when no explicit data-theme is set. */
@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .admin-footer-right .admin-footer-logo--dark { display: none; }
    :root:not([data-theme]) .admin-footer-right .admin-footer-logo--light { display: block; }
}
/* On tablet+ keep the two parts visually centered with a gentle inner inset. */
@media (min-width: 768px) {
    .admin-footer-inner {
        max-width: 880px;
        margin: 0 auto;
        padding: 0 1rem;
    }
}
@media (min-width: 1200px) {
    .admin-footer-inner {
        max-width: 1100px;
    }
}

/* ---- Dashboard header ---- */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
}

/* ---- Empty state ---- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state.small {
    padding: 2rem 1rem;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ---- Events list (dashboard) ---- */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.event-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition);
}

.event-row:first-child {
    border-top: 1px solid var(--border-color);
}

.event-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.event-row.inactive {
    opacity: 0.5;
}

.event-row-status {
    flex-shrink: 0;
}

.status-dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-active {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

.dot-inactive {
    background: #6b7280;
}

.event-row-main {
    flex: 1;
    min-width: 0;
}

.event-row-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
    flex-wrap: wrap;
}

.event-row-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.event-row-name:hover {
    color: var(--accent-primary);
}

.event-row-bottom {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.event-row-stat {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.event-row-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.event-row-comanagers {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-top: 0.15rem;
}

.event-row-comanagers svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.cm-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.68rem;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cm-tag.cm-registered {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
}

.cm-tag.cm-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.cm-tag small {
    font-size: 0.65rem;
}

.event-row-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.event-row .code-value {
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-primary);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
    letter-spacing: 1px;
}

.event-row .code-hashtag {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-color);
}

.co-mgr-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

/* ---- Co-managers list in settings ---- */
.co-managers-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.co-mgr-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
}

.co-mgr-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

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

.co-mgr-email {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.co-mgr-name-line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.co-mgr-details {
    font-size: 0.68rem;
    color: var(--text-muted);
    opacity: 0.7;
    margin-top: 0.1rem;
}

.cm-status {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.05rem 0.4rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cm-status-active {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.cm-status-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.co-mgr-add {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.co-mgr-add .input {
    flex: 1;
    min-width: 200px;
}

/* ---- Event manage page ---- */
.event-manage-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.event-manage-info h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.event-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.2rem 0.55rem 0.2rem 0.4rem;
    margin-bottom: 0.4rem;
    border-radius: var(--radius-full, 999px);
    border: 1px solid var(--border-color);
    background: transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    line-height: 1;
}
.event-back-link:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
}
.event-back-link svg {
    flex-shrink: 0;
}

.event-manage-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.event-code-badge {
    font-family: monospace;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(37, 99, 235, 0.15);
    color: var(--accent-primary);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    letter-spacing: 2px;
}

.event-status-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

.badge-active {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.badge-inactive {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

.event-type-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.event-manage-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ---- Info dropdown ---- */
.info-dropdown {
    width: 520px;
    max-width: calc(100vw - 2rem);
    padding: 0;
    right: auto;
    left: 0;
}
.info-dropdown .info-dropdown-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 2rem;
}
.info-dropdown .info-dropdown-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 768px) {
    .info-dropdown {
        min-width: 0;
        width: calc(100vw - 2rem);
        position: fixed;
        right: 1rem;
        left: 1rem;
        top: auto;
    }
}
.info-dropdown-details {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.85rem;
}
.info-label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.78rem;
}
.info-dropdown-actions {
    padding: 0.25rem 0;
}
.info-dropdown-actions .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
button.dropdown-item {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}
.event-mod-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
}

/* ---- Main content tabs (Q&A / Polls) ---- */
.main-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}
.main-tab {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
}
.main-tab:hover {
    color: var(--text-primary);
}
.main-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

/* ---- Stats row ---- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-active .stat-value {
    background: linear-gradient(135deg, #22c55e, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
}


.stat-hidden .stat-value {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    -webkit-background-clip: text;
    background-clip: text;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.15rem;
}

/* ---- Filter tabs ---- */
.filter-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.filter-tab {
    padding: 0.4rem 1rem;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.filter-tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.filter-tab:hover:not(.active) {
    color: var(--text-secondary);
}

/* ---- Filter badge (count in tab) ---- */
.filter-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-color, #6366f1);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-full);
    margin-left: 0.2rem;
    min-width: 1.1rem;
    text-align: center;
    vertical-align: middle;
    line-height: 1.3;
}
.filter-badge:empty {
    display: none;
}
.filter-badge-green {
    background: rgba(34, 197, 94, 0.14);
    color: #16a34a;
}

/* ---- Admin questions ---- */
.questions-list {
    margin-bottom: 1.5rem;
}

.admin-q-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 0.5rem;
    transition: all var(--transition);
}

.admin-q-card.status-hidden {
    opacity: 0.5;
}

.admin-q-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-primary);
    min-width: 40px;
    flex-shrink: 0;
}

.admin-q-votes small {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.admin-q-content {
    flex: 1;
    min-width: 0;
}

.admin-q-text {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.35rem;
    word-break: break-word;
}

.admin-q-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-q-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

/* ---- Live update animations ---- */
.q-entering {
    opacity: 0;
    transform: translateY(-10px);
}

.admin-q-card,
.pres-q {
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.q-removing {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

/* ---- Highlight animation ---- */
.q-highlight-flash {
    animation: highlightPulse 0.6s ease;
}
@keyframes highlightPulse {
    0%   { transform: scale(1); box-shadow: none; }
    30%  { transform: scale(1.02); box-shadow: 0 0 16px rgba(245, 158, 11, 0.5); }
    100% { transform: scale(1); box-shadow: none; }
}

.q-unhighlight-flash {
    animation: unhighlightFade 0.4s ease;
}
@keyframes unhighlightFade {
    0%   { opacity: 1; }
    50%  { opacity: 0.5; }
    100% { opacity: 1; }
}

.stat-flash {
    animation: statPulse 0.4s ease;
}

@keyframes statPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.2); color: var(--accent-primary); }
    100% { transform: scale(1); }
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-green, #22c55e);
    letter-spacing: 0.03em;
    white-space: nowrap;
    vertical-align: middle;
}

.live-dot-small {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    display: inline-block;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}

/* Offline state */
.live-indicator.is-offline .live-dot-small {
    background: var(--accent-danger, #ef4444);
    animation: liveOfflinePulse 1s ease-in-out infinite;
}
.live-indicator.is-offline {
    color: var(--accent-danger, #ef4444);
}
.live-indicator.is-offline .live-indicator-text {
    color: var(--accent-danger, #ef4444);
}
@keyframes liveOfflinePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50%      { opacity: 0.6; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0); }
}

/* ---- Modal overlay ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 460px;
    width: 100%;
    position: relative;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* ---- QR Modal ---- */
.qr-modal h2 {
    margin-bottom: 0.5rem;
}

.qr-modal-code {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 6px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.qr-box {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.qr-box svg {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 0.75rem;
}

.qr-url {
    font-size: 0.8rem;
    color: var(--text-muted);
    word-break: break-all;
}

/* Presentation Mode styles moved to assets/css/presentation.css */

/* ---- Login page ---- */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    position: relative;
}

.login-theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

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

.login-header .logo-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.login-header .logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    display: block;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    padding: 0.2rem;
}

.auth-tab {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.auth-tab.active {
    background: var(--accent-primary);
    color: #fff;
}

.auth-form-block {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.input-icon-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.input-with-icon {
    padding-left: 2.75rem !important;
}

.btn-auth {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.login-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition);
}

.login-footer a:hover {
    color: var(--text-primary);
}

/* ---- Alert ---- */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ---- Create page ---- */
.create-container {
    max-width: 600px;
    margin: 0 auto;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.toggle-btn {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.toggle-btn.active {
    border-color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.1);
    color: var(--text-primary);
}

.toggle-icon {
    font-size: 1.1rem;
}

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

.theme-btn {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.theme-btn.active {
    border-color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.1);
    color: var(--text-primary);
}

.theme-icon {
    font-size: 1.25rem;
}

/* ---- Keyframes ---- */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .admin-nav {
        padding: 0.75rem 1rem;
    }
    .admin-nav-right {
        gap: 0.5rem;
    }
    /* Burger menu */
    .nav-burger {
        display: flex;
    }
    .nav-menu-items {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        padding: 0.5rem 1rem 0.75rem;
        gap: 0.25rem;
        z-index: 100;
        box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    }
    .admin-nav.nav-open .nav-menu-items {
        display: flex;
    }
    .admin-nav.nav-open .nav-burger span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }
    .admin-nav.nav-open .nav-burger span:nth-child(2) {
        opacity: 0;
    }
    .admin-nav.nav-open .nav-burger span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }
    .nav-menu-items .admin-nav-link {
        padding: 0.5rem 0.75rem;
        border-radius: var(--radius-md);
    }
    .nav-menu-items .admin-nav-user {
        padding: 0.5rem 0.75rem;
    }
    .nav-menu-items .btn {
        align-self: flex-start;
        margin-top: 0.25rem;
    }
    .admin-main {
        padding: 1rem;
    }
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .admin-q-card {
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }
    .admin-q-votes {
        min-width: 35px;
        font-size: 1rem;
    }
    .admin-q-text {
        font-size: 0.9rem;
    }
    .admin-q-actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 0.25rem;
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    .admin-q-actions .btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
    .event-manage-header {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    .event-manage-info h1 {
        font-size: 1.2rem;
    }
    .event-manage-meta {
        gap: 0.35rem;
    }
    .event-manage-actions {
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    .event-manage-actions .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
    .filter-tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .filter-tab {
        padding: 0.35rem 0.7rem;
        font-size: 0.78rem;
    }
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    .pres-q {
        padding: 1rem 1.25rem;
    }
    .pres-q-text {
        font-size: 1rem;
    }
    .pres-q-votes {
        font-size: 1.5rem;
        min-width: 40px;
    }
    /* Modals on mobile — fullscreen sheet so sticky header/footer
       reliably pin to the viewport edges (esp. iOS Safari). */
    .modal-overlay {
        padding: 0;
        align-items: stretch;
        overflow: hidden;          /* the modal-content itself scrolls, not the overlay */
    }
    .modal-content {
        margin: 0;
        padding: 1rem;
        width: 100%;
        max-width: none;
        height: 100vh;
        height: 100dvh;            /* dynamic viewport height (iOS) */
        max-height: 100dvh;
        border-radius: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* Close button stays visible above the scrolling content. */
    .modal-close {
        position: fixed;
        top: 0.35rem;
        right: 0.5rem;
        z-index: 10;
        background: rgba(0, 0, 0, 0.35);
        border-radius: 50%;
        width: 2rem;
        height: 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
    }
    .settings-modal {
        max-width: 100%;
    }
    /* Keep the tab switcher and Save button visible while scrolling. */
    .settings-modal .settings-tabs {
        position: sticky;
        top: -1rem;
        margin: -1rem -1rem 1rem;
        padding: 1rem 2.5rem 0 1rem;   /* right padding clears the close button */
        background: var(--bg-card);
        z-index: 5;
    }
    .settings-modal form > button.btn-primary.btn-full {
        position: sticky;
        bottom: -1rem;
        margin: 1rem -1rem -1rem;
        padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 1rem));
        border-radius: 0;
        z-index: 4;
        box-shadow: 0 -10px 14px -10px rgba(0, 0, 0, 0.55);
    }
    .tier-modal {
        max-width: 100%;
    }
    /* Moderation cards on mobile */
    .mod-card {
        flex-wrap: wrap;
        padding: 0.65rem 0.75rem;
        gap: 0.5rem;
    }
    .mod-card-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .mod-panel-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .mod-header-actions {
        flex-wrap: wrap;
        gap: 0.35rem;
    }
    /* Events list (dashboard) */
    .event-row {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .event-row-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    .event-row-actions .btn {
        font-size: 0.78rem;
        padding: 0.35rem 0.7rem;
    }
    /* QR modal */
    .qr-modal-url {
        font-size: 0.75rem;
        word-break: break-all;
    }
    /* Live indicator - hide text on mobile */
    .live-indicator .live-indicator-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .admin-main {
        padding: 0.75rem;
    }
    .admin-nav {
        padding: 0.5rem 0.75rem;
    }
    .event-manage-info h1 {
        font-size: 1.05rem;
    }
    .event-manage-actions {
        gap: 0.3rem;
    }
    .event-manage-actions .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
        gap: 0.3rem;
    }
    .event-manage-actions .btn svg {
        width: 14px;
        height: 14px;
    }
    .main-tab {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    .filter-tab {
        padding: 0.3rem 0.55rem;
        font-size: 0.72rem;
    }
    .admin-q-card {
        padding: 0.6rem 0.75rem;
    }
    .mod-view {
        gap: 0.75rem;
    }
    .mod-panel {
        min-height: 30vh;
    }
    /* (Modal sticky offsets already use 1rem padding at the 768px breakpoint.) */
    .settings-modal .form-group {
        margin-bottom: 0.5rem;
    }
    .settings-modal h2 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    .settings-modal .pres-theme-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .pres-font-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    .pres-font-size {
        font-size: 0.7rem;
    }
}

/* ============================================
   V2 – New feature styles
   ============================================ */

/* ---- Hashtag badge ---- */
.event-hashtag-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-color);
    background: var(--accent-bg, rgba(99, 102, 241, 0.1));
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}

.event-schedule-badge {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ---- Highlighted question card ---- */
.admin-q-card.highlighted {
    border-left: 3px solid #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.highlight-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 0.25rem;
}

/* ---- Archived question card ---- */
.admin-q-card.archived {
    opacity: 0.6;
}

/* ---- Author name ---- */
.admin-q-author {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 0.25rem;
}

/* ---- Stat card: archived ---- */
.stat-card.stat-archived .stat-value {
    color: var(--text-secondary);
}

/* ---- Alert ---- */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}
.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* ---- Export dropdown ---- */
.btn-dropdown {
    position: relative;
    display: inline-block;
}
.btn-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.35rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 100;
    overflow: hidden;
}
.btn-dropdown.open .btn-dropdown-menu {
    display: block;
}
.dropdown-item {
    display: block;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.15s;
}
.dropdown-item:hover {
    background: var(--bg-secondary);
}

/* ---- Inline editing ---- */
.inline-editing {
    outline: 2px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.4rem;
    background: var(--bg-secondary);
    min-height: 1.5em;
}

/* ---- Settings tabs ---- */
.settings-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
}
.settings-tab {
    flex: 1;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.settings-tab:hover {
    color: var(--text-primary);
}
.settings-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* ---- Settings modal ---- */
.settings-modal {
    max-width: 480px;
    width: 100%;
    text-align: left;
    padding: 1.5rem;
    margin-top: 2rem;
    flex-shrink: 0;
}
.settings-modal h2 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.settings-modal .form-group {
    margin-bottom: 0.75rem;
}
.settings-modal label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}
.settings-modal .input {
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
}
.settings-modal .form-hint {
    font-size: 0.7rem;
    margin-top: 0.15rem;
}
.settings-modal .checkbox-label {
    font-size: 0.8rem !important;
    gap: 0.35rem;
}
.settings-modal .checkbox-label span {
    font-size: 0.8rem;
}
.settings-modal .checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
}
.settings-modal .btn-full {
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}
.settings-modal .label-hint {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
}
.settings-modal .color-row {
    gap: 0.5rem;
}
.settings-modal .color-pick span {
    font-size: 0.75rem;
}
.settings-modal .pres-theme-grid {
    gap: 0.35rem;
    margin-top: 0.2rem;
}
.settings-modal .pres-theme-option {
    padding: 0.4rem;
    font-size: 0.75rem;
}
.settings-modal .pres-theme-icon {
    font-size: 1.2rem;
}
.settings-modal .form-row {
    gap: 0.5rem;
}
.settings-modal .input-prefix {
    padding: 0.45rem 0.6rem;
    font-size: 0.85rem;
}

/* ---- Tier comparison modal ---- */
.tier-modal {
    max-width: 680px;
    width: 100%;
}
.tier-current {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}
.tier-current .nav-tier-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.7rem;
    cursor: default;
}
.tier-table-wrap {
    overflow-x: auto;
    margin: 0 -1rem;
    padding: 0 1rem;
}
.tier-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.tier-table th,
.tier-table td {
    padding: 0.5rem 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.tier-table th:first-child,
.tier-table td:first-child {
    text-align: left;
    font-weight: 500;
}
.tier-table thead th {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    padding-bottom: 0.75rem;
}
.tier-col {
    min-width: 80px;
}
.tier-label-free { color: #9ca3af; }
.tier-label-basic { color: #3b82f6; }
.tier-label-pro { color: #a855f7; }

/* ---- Input prefix (hashtag #) ---- */
.input-prefix-wrap {
    display: flex;
    align-items: center;
}
.input-prefix {
    padding: 0.65rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.input-with-prefix {
    border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
}

/* ---- Form row (side-by-side) ---- */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ---- Checkbox label ---- */
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500 !important;
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
}

/* Settings modal: compact checkbox options */
.settings-modal .form-group .checkbox-label {
    font-size: 0.82rem;
    font-weight: 400 !important;
}
.settings-modal .form-group .checkbox-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
}
.settings-modal .form-group + .form-group .checkbox-label {
    margin-top: -0.25rem;
}
.settings-modal .checkbox-label {
    text-transform: none;
}

/* ---- Presentation settings controls ---- */
.pres-settings-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}
.pres-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.pres-settings-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.pres-settings-controls .pres-font-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.pres-settings-controls .pres-font-btn {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
}
.pres-settings-controls .pres-font-size {
    font-size: 0.75rem;
    min-width: 2.2rem;
}

/* Settings checkboxes: compact grouped checkboxes */
.settings-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}
.settings-checkboxes .checkbox-label {
    font-size: 0.8rem;
    font-weight: 400 !important;
    margin: 0;
}
.settings-checkboxes .checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
}
.settings-checkboxes .form-hint {
    font-size: 0.7rem;
    margin-top: -0.15rem;
}

/* ---- Presentation theme picker ---- */
.pres-theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.35rem;
}
.pres-theme-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-size: 0.8rem;
    font-weight: 500 !important;
}
.pres-theme-option:hover {
    border-color: var(--accent-color);
}
.pres-theme-option.selected {
    border-color: var(--accent-color);
    background: rgba(99, 102, 241, 0.05);
}
.pres-theme-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.pres-theme-icon {
    font-size: 1.5rem;
}

/* ---- Presentation theme: 16:9 thumbnail cards ---- */
.pres-theme-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.4rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    font-size: 0.78rem;
    font-weight: 500;
    background: var(--bg-card, #fff);
}
.pres-theme-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-1px);
}
.pres-theme-card.selected {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
    background: rgba(99, 102, 241, 0.06);
}
.pres-theme-card.selected::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color, #6366f1);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.pres-theme-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.pres-theme-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    padding: 8% 6%;
    display: flex;
    flex-direction: column;
    gap: 4%;
    box-sizing: border-box;
}
.pres-theme-thumb .ptt-q {
    flex: 1;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 6px;
    margin-right: 28%;
    border: 1px solid transparent;
}
.pres-theme-thumb .ptt-q-hl {
    border-style: solid;
}
.pres-theme-thumb .ptt-bar {
    flex: 1;
    height: 2px;
    border-radius: 2px;
}
.pres-theme-thumb .ptt-vote {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pres-theme-thumb .ptt-sidebar {
    position: absolute;
    top: 6%;
    bottom: 6%;
    right: 6%;
    width: 22%;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pres-theme-thumb .ptt-sidebar .ptt-qr {
    width: 60%;
    aspect-ratio: 1;
    border-radius: 2px;
    opacity: 0.85;
}
.pres-theme-card-label {
    text-align: center;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.78rem;
}

/* ---- Compact (small) variant of theme cards ---- */
.pres-theme-grid-sm {
    grid-template-columns: repeat(6, 1fr);
    gap: 0.4rem;
}
.pres-theme-card-sm {
    padding: 0.3rem;
    gap: 0.25rem;
    font-size: 0.7rem;
}
.pres-theme-card-sm .pres-theme-card-label {
    font-size: 0.7rem;
}
.pres-theme-card-sm.selected::after {
    width: 14px;
    height: 14px;
    font-size: 9px;
    top: 4px;
    right: 5px;
}
@media (max-width: 720px) {
    .pres-theme-grid-sm {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 420px) {
    .pres-theme-grid-sm {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---- Custom Colors: 2x2 grid with swatch + name + description ---- */
.custom-colors-group {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
}
.custom-colors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}
.custom-color-pick {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.7rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
}
.custom-color-pick:hover {
    border-color: var(--accent-color);
}
.custom-color-pick input[type="color"] {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    background: none;
}
.custom-color-pick input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}
.custom-color-pick input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}
.custom-color-pick input[type="color"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}
.ccp-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.ccp-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}
.ccp-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.2;
}
@media (max-width: 480px) {
    .custom-colors-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Live Presentation Preview ---- */
.pres-preview {
    display: flex;
    border-radius: var(--radius-md);
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    margin-top: 0.75rem;
    background: #060d1a;
    border: 1px solid var(--border-color);
    font-size: 11px;
    transition: background 0.3s, color 0.3s;
}
.pres-preview-sidebar {
    width: 22%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px;
    gap: 6px;
    background: #0b1628;
    border-left: 1px solid rgba(255,255,255,0.1);
    order: 2;
    transition: background 0.3s, border-color 0.3s, width 0.25s ease, padding 0.25s ease, opacity 0.2s ease;
}
/* Mirror the "Show sidebar" toggle in the live mini-preview. */
.pres-preview.pres-no-sidebar .pres-preview-sidebar {
    width: 0;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
    opacity: 0;
    overflow: hidden;
}
.pres-preview-name {
    font-weight: 700;
    font-size: 8px;
    color: #f1f5f9;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: color 0.3s, border-color 0.3s;
}
/* Mirror the "Show header" toggle in the live mini-preview. */
.pres-preview.pres-no-header .pres-preview-name {
    display: none;
}
.pres-preview-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1;
    justify-content: center;
}
.pres-preview-qr-placeholder {
    width: 42px;
    height: 42px;
    background: #fff;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 9px;
    color: #333;
}
.pres-preview-logo {
    width: 100%;
    text-align: center;
}
.pres-preview-logo img {
    max-width: 56px;
    max-height: 24px;
    object-fit: contain;
}
.pres-preview-label {
    font-size: 7px;
    font-weight: 600;
    color: rgba(241,245,249,0.7);
    text-align: center;
    transition: color 0.3s;
}
.pres-preview-hashtag {
    font-size: 8px;
    font-weight: 700;
    color: #2563eb;
    transition: color 0.3s;
}
.pres-preview-questions {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    overflow: hidden;
    order: 1;
}
.pres-preview-q {
    background: #15274d;
    border-radius: 4px;
    padding: 6px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.1);
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.pres-preview-q-text {
    font-size: 9px;
    color: #f1f5f9;
    font-weight: 500;
    transition: color 0.3s;
}
.pres-preview-q-meta {
    font-size: 8px;
    color: #adbdd8;
    font-weight: 700;
    white-space: nowrap;
    margin-left: 6px;
    transition: color 0.3s;
}
/* Highlighted question in preview */
.pres-preview-q-hl {
    border-left: 3px solid #f59e0b;
    background: rgba(245, 158, 11, 0.10);
}

/* Preview: Light */
.pres-preview-light {
    background: #e5e7eb;
}
.pres-preview-light .pres-preview-sidebar {
    background: #f3f4f6;
    border-color: #d1d5db;
}
.pres-preview-light .pres-preview-name {
    color: #111827;
    border-color: #d1d5db;
}
.pres-preview-light .pres-preview-label {
    color: #374151;
}
.pres-preview-light .pres-preview-hashtag {
    color: #1d4ed8;
}
.pres-preview-light .pres-preview-q {
    background: #ffffff;
    border-color: #e5e7eb;
}
.pres-preview-light .pres-preview-q-text {
    color: #111827;
}
.pres-preview-light .pres-preview-q-meta {
    color: #6b7280;
}
.pres-preview-light .pres-preview-q-hl {
    border-left-color: #e04f1a;
    background: rgba(224, 79, 26, 0.08);
}

/* Preview: Dark */
.pres-preview-dark {
    background: #121212;
}
.pres-preview-dark .pres-preview-sidebar {
    background: #1a1a1a;
    border-color: #2a2a2a;
}
.pres-preview-dark .pres-preview-name {
    color: #f0f0f0;
    border-color: #2a2a2a;
}
.pres-preview-dark .pres-preview-label {
    color: rgba(245,245,245,0.65);
}
.pres-preview-dark .pres-preview-hashtag {
    color: #818cf8;
}
.pres-preview-dark .pres-preview-q {
    background: #1e1e1e;
    border-color: #333;
}
.pres-preview-dark .pres-preview-q-text {
    color: #f5f5f5;
}
.pres-preview-dark .pres-preview-q-meta {
    color: #a0a0a0;
}
.pres-preview-dark .pres-preview-q-hl {
    border-left-color: #38bdf8;
    background: rgba(56, 189, 248, 0.10);
}

/* Preview: Minimal */
.pres-preview-minimal {
    background: #fafafa;
}
.pres-preview-minimal .pres-preview-sidebar {
    background: #f0f0f0;
    border-color: #ccc;
}
.pres-preview-minimal .pres-preview-name {
    color: #222;
    border-color: #ccc;
}
.pres-preview-minimal .pres-preview-label {
    color: #333;
}
.pres-preview-minimal .pres-preview-hashtag {
    color: #4f46e5;
}
.pres-preview-minimal .pres-preview-q {
    background: #fff;
    border-color: #e0e0e0;
}
.pres-preview-minimal .pres-preview-q-text {
    color: #222;
}
.pres-preview-minimal .pres-preview-q-meta {
    color: #888;
}
.pres-preview-minimal .pres-preview-q-hl {
    border-left-color: #7c3aed;
    background: rgba(124, 58, 237, 0.06);
}

/* Preview: Colorful */
.pres-preview-colorful {
    background: linear-gradient(135deg, #1a0533, #0a1628, #0d2137);
}
.pres-preview-colorful .pres-preview-sidebar {
    background: rgba(20,10,40,0.6);
    border-color: rgba(255,255,255,0.1);
}
.pres-preview-colorful .pres-preview-name {
    color: #fff;
    border-color: rgba(255,255,255,0.1);
}
.pres-preview-colorful .pres-preview-label {
    color: rgba(255,255,255,0.8);
}
.pres-preview-colorful .pres-preview-hashtag {
    color: #fbbf24;
}
.pres-preview-colorful .pres-preview-q {
    background: rgba(99,102,241,0.15);
    border-color: rgba(99,102,241,0.3);
}
.pres-preview-colorful .pres-preview-q-text {
    color: #fff;
}
.pres-preview-colorful .pres-preview-q-meta {
    color: #c4b5fd;
}
.pres-preview-colorful .pres-preview-q-hl {
    border-left-color: #f472b6;
    background: rgba(244, 114, 182, 0.15);
}

/* Preview: Custom */
.pres-preview-custom {
    background: var(--prev-custom-bg, #1a1a2e);
}
.pres-preview-custom .pres-preview-sidebar {
    background: color-mix(in srgb, var(--prev-custom-bg, #1a1a2e) 85%, var(--prev-custom-card, #162040));
    border-color: color-mix(in srgb, var(--prev-custom-text, #ffffff) 12%, transparent);
}
.pres-preview-custom .pres-preview-name {
    color: var(--prev-custom-text, #ffffff);
    border-color: color-mix(in srgb, var(--prev-custom-text, #ffffff) 12%, transparent);
}
.pres-preview-custom .pres-preview-label {
    color: color-mix(in srgb, var(--prev-custom-text, #ffffff) 80%, transparent);
}
.pres-preview-custom .pres-preview-hashtag {
    color: var(--prev-custom-text, #ffffff);
}
.pres-preview-custom .pres-preview-q {
    background: var(--prev-custom-card, #162040);
    border-color: color-mix(in srgb, var(--prev-custom-text, #ffffff) 10%, transparent);
}
.pres-preview-custom .pres-preview-q-text {
    color: var(--prev-custom-text, #ffffff);
}
.pres-preview-custom .pres-preview-q-meta {
    color: color-mix(in srgb, var(--prev-custom-text, #ffffff) 60%, transparent);
}
.pres-preview-custom .pres-preview-q-hl {
    border-left-color: var(--prev-custom-highlight, #f59e0b);
    background: color-mix(in srgb, var(--prev-custom-highlight, #f59e0b) 12%, transparent);
}

/* ---- Warning button ---- */
.btn-warning {
    background: #f59e0b;
    color: #fff;
    border: none;
}
.btn-warning:hover {
    background: #d97706;
}

.btn-full {
    width: 100%;
}

/* ---- QR hashtag ---- */
.qr-modal-hashtag {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-top: 0.25rem;
}

/* ---- Event card schedule ---- */
.event-card-schedule {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
}
.event-card-schedule svg {
    flex-shrink: 0;
}
.code-hashtag {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-left: 0.5rem;
}

/* ---- Superadmin styles ---- */
.superadmin-link {
    color: #f59e0b !important;
    font-weight: 600 !important;
}
.nav-superadmin-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%) !important;
}

.sa-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.sa-panel {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.sa-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.sa-panel-header h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.sa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.sa-table th {
    text-align: left;
    padding: 0.6rem 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}
.sa-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.sa-table tbody tr:hover {
    background: var(--bg-secondary);
}
.sa-table-full {
    margin: 0;
}
.sa-table-dense {
    font-size: 0.8rem;
}
.sa-table-dense th,
.sa-table-dense td {
    padding: 0.45rem 0.7rem;
    white-space: nowrap;
}
.sa-panel-primary {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25), 0 4px 14px rgba(245, 158, 11, 0.08);
}
.sa-panel-primary > .sa-panel-header {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(239, 68, 68, 0.05));
}
.sa-panel-primary > .sa-panel-header h2 {
    font-size: 1.15rem;
}
.row-disabled {
    opacity: 0.5;
}

/* ---- Action button cluster (wraps on small viewports) ---- */
.sa-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}
.sa-actions form {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* ---- Horizontal scroll wrapper for wide tables ---- */
.sa-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---- Tablet: keep table layout, slightly smaller ---- */
@media (max-width: 1024px) {
    .sa-table-dense th,
    .sa-table-dense td {
        padding: 0.4rem 0.5rem;
        font-size: 0.78rem;
    }
    .sa-actions .btn-sm {
        padding: 0.3rem 0.55rem;
        font-size: 0.72rem;
    }
}

/* ---- Mobile: convert responsive table to stacked cards ---- */
@media (max-width: 720px) {
    .sa-table-responsive {
        display: block;
    }
    .sa-table-responsive thead {
        display: none;
    }
    .sa-table-responsive tbody,
    .sa-table-responsive tr {
        display: block;
    }
    .sa-table-responsive tr {
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md, 8px);
        margin: 0.5rem 0.75rem;
        padding: 0.5rem 0.25rem;
        background: var(--bg-primary);
    }
    .sa-table-responsive tr.row-disabled {
        background: var(--bg-secondary);
    }
    .sa-table-responsive td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding: 0.4rem 0.75rem;
        border-bottom: 1px dashed var(--border-color);
        white-space: normal;
        text-align: right;
    }
    .sa-table-responsive td:last-child {
        border-bottom: none;
    }
    .sa-table-responsive td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-secondary);
        flex-shrink: 0;
    }
    .sa-table-responsive td[data-label="Actions"] {
        flex-direction: column;
        align-items: stretch;
    }
    .sa-table-responsive td[data-label="Actions"]::before {
        text-align: left;
        margin-bottom: 0.4rem;
    }
    .sa-table-responsive td[data-label="Actions"] .sa-actions {
        justify-content: flex-end;
    }
    .sa-users-panel .sa-panel-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* ---- Badges ---- */
.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-active { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.badge-inactive { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.badge-admin { background: rgba(99, 102, 241, 0.1); color: #6366f1; }
.badge-superadmin { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.badge-tier-free { background: rgba(156, 163, 175, 0.1); color: #9ca3af; }
.badge-tier-basic { background: rgba(37, 99, 235, 0.1); color: #2563eb; }
.badge-tier-pro { background: rgba(168, 85, 247, 0.1); color: #a855f7; }

/* ---- Tier distribution bar ---- */
.tier-distribution {
    padding: 1.5rem 1.25rem;
}
.tier-bar {
    display: flex;
    border-radius: var(--radius-full);
    overflow: hidden;
    min-height: 36px;
}
.tier-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    min-width: 0;
    white-space: nowrap;
}
.tier-free { background: #9ca3af; }
.tier-basic { background: #2563eb; }
.tier-pro { background: #a855f7; }

/* ---- Superadmin filters ---- */
.sa-filters {
    margin-bottom: 1rem;
}
.sa-filter-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.sa-filter-form .input {
    max-width: 220px;
}
.input-sm {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.8rem !important;
    min-width: 100px;
}

.text-muted {
    color: var(--text-secondary);
}

/* ---- Superadmin compact stats ---- */
.sa-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}
.sa-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.75rem 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.sa-stat-val {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.sa-stat-lbl {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sa-stat-sub {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* Superadmin 3-col grid */
.sa-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Compact panel */
.sa-panel-compact {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.sa-panel-compact .sa-panel-header {
    padding: 0.6rem 1rem;
}
.sa-panel-compact .sa-panel-header h2 {
    font-size: 0.85rem;
}

/* KPI row inside panel */
.sa-kpi-row {
    display: flex;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
}
.sa-kpi {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.sa-kpi-val {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
}
.sa-kpi-lbl {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Breakdown grid */
.sa-breakdown-grid {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 1.25rem;
    flex-wrap: wrap;
}
.sa-breakdown-col {
    flex: 1;
    min-width: 120px;
}
.sa-breakdown-col h4 {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 0.4rem 0;
}
.sa-breakdown-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    padding: 0.15rem 0;
}
.sa-breakdown-item span {
    color: var(--text-secondary);
}
.sa-breakdown-item strong {
    margin-left: auto;
    color: var(--text-primary);
}
.sa-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---- Responsive: superadmin ---- */
@media (max-width: 768px) {
    .sa-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .sa-grid-3 {
        grid-template-columns: 1fr;
    }
    .sa-grid {
        grid-template-columns: 1fr;
    }
    .sa-table {
        font-size: 0.75rem;
    }
    .sa-table th, .sa-table td {
        padding: 0.5rem 0.5rem;
    }
    .pres-theme-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .sa-filter-form .input {
        max-width: 100%;
    }
}

/* ---- Summary Page ---- */
.summary-header {
    margin-bottom: 1.25rem;
}
.summary-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
}
.summary-header p {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
}

/* ── Summary Groups (collapsible sections) ── */
.summary-group {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    margin-bottom: 1rem;
    overflow: hidden;
}
.summary-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
    gap: 0.5rem;
}
.summary-group-header:hover {
    background: var(--bg-secondary);
}
.summary-group-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.summary-group-title h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}
.summary-group-icon {
    font-size: 1.3rem;
    line-height: 1;
}
.summary-group-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    background: var(--gradient-primary);
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-full);
    margin-left: 0.25rem;
}
.summary-group-chevron {
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.summary-group.collapsed .summary-group-chevron {
    transform: rotate(-90deg);
}
.summary-group.collapsed .summary-group-body {
    display: none;
}
.summary-group-body {
    padding: 0 1.25rem 1.25rem;
}
.summary-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}
.summary-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.75rem 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.summary-stat-val {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.summary-stat-lbl {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.summary-export-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
    font-size: 0.85rem;
}
.summary-section {
    margin-bottom: 1.25rem;
}
.summary-badges {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.summary-poll-card {
    margin-bottom: 1rem;
}
.summary-poll-card .sa-panel-header {
    flex-wrap: wrap;
    gap: 0.5rem;
}
.summary-poll-card .sa-panel-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.poll-num {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
}
.summary-poll-body {
    padding: 0;
}
.summary-poll-footer {
    padding: 0.6rem 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}
.summary-bar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    height: 20px;
    overflow: hidden;
    min-width: 60px;
}
.summary-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.3s;
    min-width: 0;
}
.summary-bar-fill.bar-correct {
    background: linear-gradient(135deg, #22c55e, #06b6d4);
}
.summary-bar-fill.bar-rating {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}
.row-correct {
    background: rgba(34, 197, 94, 0.06);
}
.summary-rating-overview {
    display: flex;
    gap: 2rem;
    padding: 1.25rem;
    align-items: flex-start;
}
.summary-rating-avg {
    text-align: center;
    min-width: 80px;
}
.summary-rating-big {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.summary-rating-dist {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.summary-rating-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}
.summary-rating-label {
    min-width: 40px;
    font-weight: 600;
    text-align: right;
}
.summary-rating-cnt {
    min-width: 30px;
    font-weight: 600;
    color: var(--text-secondary);
}
.summary-text-responses {
    max-height: 300px;
    overflow-y: auto;
}

/* ── Summary Poll Bar Layout ── */
.summary-poll-bars {
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.summary-option-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}
.summary-option-row.option-correct {
    background: rgba(34, 197, 94, 0.08);
    border-left: 3px solid #22c55e;
}
.summary-option-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}
.summary-option-text {
    font-size: 0.9rem;
    font-weight: 600;
}
.summary-option-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── Word Cloud ── */
.summary-cloud {
    padding: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}
.summary-cloud-tag {
    display: inline-flex;
    align-items: baseline;
    gap: 0.2rem;
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    transition: transform 0.15s;
}
.summary-cloud-tag:hover {
    transform: scale(1.05);
}
.summary-cloud-tag small {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.7em;
}

/* ── Text Response Cards ── */
.summary-text-cards {
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 350px;
    overflow-y: auto;
}
.summary-text-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    gap: 0.5rem;
}
.summary-text-card-text {
    flex: 1;
    line-height: 1.4;
    word-break: break-word;
}
.summary-text-card-cnt {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

/* ── Ranking List ── */
.summary-ranking-list {
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.summary-ranking-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}
.summary-ranking-item.ranking-top {
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.12);
}
.summary-ranking-pos {
    font-size: 1.2rem;
    min-width: 2rem;
    text-align: center;
    flex-shrink: 0;
}
.summary-ranking-text {
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1;
}
.summary-ranking-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}
@media (max-width: 768px) {
    .summary-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    .summary-rating-overview {
        flex-direction: column;
    }
    .summary-export-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .summary-group-header {
        padding: 0.75rem 1rem;
    }
    .summary-group-body {
        padding: 0 1rem 1rem;
    }
    .summary-option-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
    }
}

/* ---- Moderation View (3-panel) ---- */
.mod-view {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    min-height: 60vh;
}

.mod-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
    min-width: 0;
}

.mod-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.mod-panel-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mod-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mod-count {
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    min-width: 1.5rem;
    text-align: center;
}

.mod-panel-pending .mod-panel-header {
    border-bottom-color: #f59e0b;
}

.mod-panel-live .mod-panel-header {
    border-bottom-color: #22c55e;
}

.mod-panel-archived .mod-panel-header {
    border-bottom-color: #6b7280;
}

.mod-panel-live {
    flex: 1.3;
}

.mod-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mod-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    animation: modCardIn 0.3s ease;
}

@keyframes modCardIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.mod-card.mod-highlighted {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.mod-card-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.mod-card-votes small {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mod-card-content {
    flex: 1;
    min-width: 0;
}

.mod-card-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

.mod-card-author {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.mod-card-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.mod-card-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
}

.mod-card-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.mod-card .highlight-star {
    color: #f59e0b;
    font-size: 1.1rem;
}

.mod-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--text-muted);
    font-size: 0.9rem;
    gap: 0.5rem;
    padding: 2rem;
}

.mod-empty-icon {
    font-size: 2rem;
    opacity: 0.5;
}

.mod-card.mod-removing {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

/* Pending panel notification pulse */
.mod-panel-pending .mod-count.has-new {
    animation: pendingPulse 1s ease infinite;
}

@keyframes pendingPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); box-shadow: 0 0 8px rgba(245, 158, 11, 0.5); }
}

@media (max-width: 768px) {
    .mod-view {
        flex-direction: column;
        min-height: auto;
    }
    .mod-panel {
        min-height: 40vh;
    }
}

/* ============================================
   POLLS
   ============================================ */

.polls-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

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

.poll-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

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

.poll-card-reorder {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.poll-move-btn {
    width: 1.5rem;
    height: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    padding: 0;
    line-height: 1;
}

.poll-move-btn:hover:not(:disabled) {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.1);
}

.poll-move-btn:disabled {
    opacity: 0.25;
    cursor: default;
}

.poll-card-question {
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.4;
    flex: 1;
}

.poll-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.poll-status-active {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.poll-status-closed {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.poll-status-draft {
    background: rgba(156, 163, 175, 0.15);
    color: var(--text-muted);
}

.poll-card-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.poll-option-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    overflow: hidden;
    min-height: 2.2rem;
}

.poll-option-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0.15;
    border-radius: var(--radius);
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.poll-option-text {
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

.poll-option-votes {
    position: relative;
    z-index: 1;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    margin-left: 0.5rem;
}

.poll-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.poll-timer-bar {
    position: relative;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.poll-timer-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #38a169;
    border-radius: 3px;
    transition: width 1s linear;
}
.poll-timer-bar-label {
    position: absolute;
    right: 0;
    top: -1.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #38a169;
    letter-spacing: 0.03em;
}
.poll-timer-bar-urgent .poll-timer-bar-fill {
    background: #e53e3e;
}
.poll-timer-bar-urgent .poll-timer-bar-label {
    color: #e53e3e;
    animation: poll-timer-pulse 0.5s ease-in-out infinite alternate;
}
@keyframes poll-timer-pulse {
    from { opacity: 1; }
    to { opacity: 0.5; }
}

.poll-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.polls-toolbar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.poll-group {
    margin-bottom: 1rem;
}
.poll-group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}
.poll-group-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary);
}
.poll-group-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.poll-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.poll-card-settings {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.poll-inline-setting {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
}
.poll-inline-label {
    white-space: nowrap;
}
.poll-inline-select {
    padding: 0.15rem 0.3rem;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
}
.poll-inline-select:focus {
    border-color: var(--primary);
    outline: none;
}
.poll-group-select {
    max-width: 140px;
}
.poll-inline-checkbox {
    gap: 0.35rem;
}
.poll-inline-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ---- Poll Modal ---- */
.poll-modal {
    max-width: 540px;
    text-align: left;
    padding: 0;
    overflow: hidden;
}

.poll-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.poll-modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.poll-modal-header .modal-close {
    position: static;
    flex-shrink: 0;
}

.poll-modal-body {
    padding: 1.5rem;
    max-height: 65vh;
    overflow-y: auto;
}

.poll-modal-body .form-group {
    margin-bottom: 1.25rem;
}

.poll-modal-body .form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.poll-question-input {
    resize: vertical;
    min-height: 2.5rem;
    font-size: 1rem;
}

/* Type grid */
.poll-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
}

.poll-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.6rem 0.3rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    font-size: inherit;
    font-family: inherit;
}

.poll-type-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.poll-type-btn.active {
    border-color: var(--accent-primary);
    color: var(--accent-light);
    background: rgba(37, 99, 235, 0.1);
    box-shadow: 0 0 0 1px var(--accent-primary);
}

.poll-type-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.poll-type-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.poll-type-grid.disabled .poll-type-btn {
    pointer-events: none;
    opacity: 0.5;
}

.poll-type-grid.disabled .poll-type-btn.active {
    opacity: 1;
}

/* Poll sections */
.poll-section {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.poll-hint {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.poll-add-option-btn {
    margin-top: 0.5rem;
}

/* Toggle row */
.poll-toggle-row {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.poll-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.poll-toggle-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent-primary);
    flex-shrink: 0;
}

/* Footer */
.poll-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

@media (max-width: 480px) {
    .poll-type-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .poll-modal-body {
        padding: 1rem;
    }
    .poll-modal-footer {
        padding: 0.75rem 1rem;
    }
}

/* ---- Poll option inputs ---- */
.poll-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.poll-option-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.poll-option-row .form-input {
    flex: 1;
}

.poll-option-remove {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--radius);
}

.poll-option-remove:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* New poll type styles */
.poll-option-correct {
    border-left: 3px solid var(--success, #22c55e);
}

.poll-word-tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.3;
}
.poll-word-tag small {
    opacity: 0.6;
    font-weight: 400;
}

.poll-response-item {
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ── Participant Analytics ── */
.summary-participant-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.summary-join-sources h4,
.summary-join-timeline h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.summary-source-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.summary-source-label {
    min-width: 120px;
    font-size: 0.85rem;
}
.summary-source-cnt {
    min-width: 80px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
}
.sa-table-compact {
    font-size: 0.8rem;
}
.sa-table-compact th,
.sa-table-compact td {
    padding: 0.25rem 0.5rem;
}

/* ── Voter Details ── */
.summary-voter-details {
    margin-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
}
.summary-voter-toggle {
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    padding: 0.3rem 0;
    user-select: none;
}
.summary-voter-toggle:hover {
    color: var(--primary-dark, #1565C0);
}
.summary-voter-details[open] .summary-voter-toggle {
    margin-bottom: 0.5rem;
}
.row-correct {
    background: rgba(76, 175, 80, 0.08);
}

@media (max-width: 768px) {
    .summary-participant-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   v25 — Plan badge in nav, toast notifications, moderation quota,
   superadmin toggle switch
   ============================================================ */

/* ---- Plan badge (next to QaskMe logo) ---- */
.nav-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 0.22rem 0.65rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    margin-left: 0.4rem;
    line-height: 1;
}
.nav-plan-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    text-decoration: none;
}
.nav-plan-badge.tier-free {
    background: rgba(148, 163, 184, 0.18);
    color: #64748b;
    border-color: rgba(148, 163, 184, 0.35);
}
.nav-plan-badge.tier-basic {
    background: rgba(59, 130, 246, 0.16);
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.35);
}
.nav-plan-badge.tier-pro {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    border-color: transparent;
}

/* ---- Toast notification system (4s auto-dismiss) ---- */
.qm-toast-container {
    position: fixed;
    top: 4.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10000;
    pointer-events: none;
    width: max-content;
    max-width: calc(100vw - 2rem);
}
.qm-toast {
    pointer-events: auto;
    padding: 0.7rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.1);
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    max-width: 480px;
}
.qm-toast.qm-toast-show {
    opacity: 1;
    transform: translateY(0);
}
.qm-toast.qm-toast-hide {
    opacity: 0;
    transform: translateY(-12px);
}
.qm-toast-success {
    background: rgba(34, 197, 94, 0.95);
    color: #fff;
    border: 1px solid rgba(22, 163, 74, 0.6);
}
.qm-toast-error {
    background: rgba(239, 68, 68, 0.95);
    color: #fff;
    border: 1px solid rgba(220, 38, 38, 0.6);
}
.qm-toast-info {
    background: rgba(59, 130, 246, 0.95);
    color: #fff;
    border: 1px solid rgba(37, 99, 235, 0.6);
}
.qm-toast-warning {
    background: rgba(245, 158, 11, 0.95);
    color: #fff;
    border: 1px solid rgba(217, 119, 6, 0.6);
}

/* ---- Moderation quota bar / badge (Free plan) ---- */
.mod-quota-bar {
    height: 4px;
    background: rgba(148, 163, 184, 0.25);
    border-radius: 2px;
    overflow: hidden;
    max-width: 220px;
}
.mod-quota-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #f59e0b);
    transition: width 0.3s ease;
}
.mod-quota-bar-fill.is-full {
    background: #ef4444;
}
.mod-quota-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    border-radius: var(--radius-full);
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.35);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.mod-quota-badge.is-full {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.4);
}

/* ---- Superadmin toggle switch ---- */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    vertical-align: middle;
    cursor: pointer;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(148, 163, 184, 0.5);
    border-radius: 999px;
    transition: background 0.2s ease;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider {
    background: #22c55e;
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(16px);
}

/* ===== Upsell badge & locked settings ===== */
.upsell-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 0.5rem;
    padding: 2px 8px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    text-decoration: none !important;
    white-space: nowrap;
    line-height: 1.4;
    vertical-align: middle;
    transition: filter 0.15s ease;
    cursor: pointer;
}
.upsell-badge:hover { filter: brightness(1.1); }
.upsell-badge svg { flex-shrink: 0; }
.upsell-basic {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff !important;
}
.upsell-pro {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff !important;
}

.is-locked {
    opacity: 0.55;
    position: relative;
}
.is-locked input,
.is-locked select,
.is-locked textarea {
    cursor: not-allowed;
}
.checkbox-label.is-locked {
    cursor: default;
}
.checkbox-label.is-locked > span {
    color: var(--text-muted, #888);
}

.upsell-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border: 1px dashed rgba(148, 163, 184, 0.4);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.06), rgba(99, 102, 241, 0.02));
}
.upsell-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
}
.upsell-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
}
.upsell-card p {
    margin: 0.4rem auto;
    max-width: 420px;
    color: var(--text-secondary, #555);
    font-size: 0.9rem;
}
.upsell-card-cta { font-size: 0.85rem; }
.upsell-card-cta a { color: #6366f1; }
