/**
 * ToqiSmart Unified Atomic Components (v4.0)
 * Reusable component classes aligned with DESIGN.md and tokens.css
 */

@import url('tokens.css');

/* ============================================================
   1. GLOBAL RESETS & ACCESSIBILITY
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Smooth Theme Switching Transitions */
body,
.merchant-header-bar,
.card,
.kpi-card,
.btn,
.merchant-nav-link,
.data-table,
.sidebar,
.top-bar {
    transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        color 0.2s ease,
        box-shadow 0.25s ease;
}

/* ============================================================
   2. BUTTONS & ACTIONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: 700;
    line-height: 1.2;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    white-space: nowrap;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 40px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-sm {
    padding: 6px 12px;
    font-size: var(--text-xs);
    min-height: 32px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 24px;
    font-size: var(--text-md);
    min-height: 48px;
    border-radius: var(--radius-lg);
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-contrast, var(--bg));
    border-color: var(--primary);
    box-shadow: none;
}

.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
}

.btn-secondary {
    background: var(--surface-card);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-color: var(--border);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--surface-overlay);
    color: var(--text);
}

/* Quick Action Toolbar Buttons (Datatables) */
.action-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.65);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.btn-act {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    font-size: var(--text-xs);
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.btn-act:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* ── Platform Theme Toggle (Modo Noturno / Modo Dia) ── */
.btn-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
    background: var(--surface-card, var(--surface));
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
    box-shadow: none;
}

.btn-theme-toggle:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover, var(--primary));
    color: var(--text);
    transform: translateY(-1px);
}

.btn-theme-toggle:active {
    transform: scale(0.94);
}

.btn-theme-toggle svg {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

/* Em Titanium Slate / Modo Noturno: mostra Sol (para mudar para Dia) e oculta Lua */
[data-theme="titanium-slate"] .btn-theme-toggle .theme-icon-moon,
:root:not([data-theme="alpine-slate"]) .btn-theme-toggle .theme-icon-moon {
    display: none !important;
}

[data-theme="titanium-slate"] .btn-theme-toggle .theme-icon-sun,
:root:not([data-theme="alpine-slate"]) .btn-theme-toggle .theme-icon-sun {
    display: block !important;
    color: #f59e0b;
}

/* Em Alpine Slate / Modo Dia: mostra Lua (para mudar para Noturno) e oculta Sol */
[data-theme="alpine-slate"] .btn-theme-toggle .theme-icon-sun {
    display: none !important;
}

[data-theme="alpine-slate"] .btn-theme-toggle .theme-icon-moon {
    display: block !important;
    color: #344b73;
}

/* ============================================================
   3. CARDS & CONTAINERS
   ============================================================ */
.card {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-card);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    clip-path: none;
}

.card:hover {
    border-color: var(--border-hover);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-family: var(--font-sans);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-subtitle {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

/* ============================================================
   4. KPI GRIDS & CARDS
   ============================================================ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    clip-path: none;
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kpi-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.3;
}

.kpi-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--surface-overlay);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.kpi-value {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--text);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.kpi-value.cyan,
.kpi-value-accent {
    color: var(--primary);
}

.kpi-value.amber {
    color: var(--secondary);
}

.kpi-value.emerald {
    color: var(--success);
}

.kpi-delta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    font-weight: 700;
}

.kpi-delta.positive {
    color: var(--success);
}

.kpi-delta.negative {
    color: var(--danger);
}

.kpi-delta.neutral {
    color: var(--text-muted);
}

/* ============================================================
   5. DATA TABLES & EMPTY STATES
   ============================================================ */
.data-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-base);
    text-align: left;
}

.data-table th {
    padding: 12px 14px;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    text-transform: none;
    font-size: var(--text-sm);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.data-table td {
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text);
    vertical-align: middle;
    transition: background 0.15s ease;
}

.data-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tenant-name {
    font-weight: 700;
    font-size: var(--text-base);
    color: var(--text);
}

.tenant-slug {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.health-badge-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.health-meta {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.35;
}

.plan-tag {
    font-weight: 700;
    font-size: var(--text-sm);
    color: var(--text);
}

.plan-price {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: var(--text-xs);
    color: var(--text);
    font-weight: 600;
}

.contract-dates {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.empty-state {
    padding: 48px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 40px;
    opacity: 0.6;
}

.empty-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text);
}

/* ============================================================
   6. BADGES & STATUS PILLS
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.35;
    background: var(--primary-glow);
    border: 1px solid var(--border);
    color: var(--text);
    white-space: nowrap;
}

.badge-pill {
    border-radius: var(--radius-pill);
    padding: 4px 12px;
}

.badge-cyan,
.badge-primary {
    background: var(--primary-glow);
    border-color: var(--border);
    color: var(--text);
}

.badge-amber,
.badge-secondary {
    background: var(--secondary-glow);
    border-color: var(--border);
    color: var(--secondary);
}

.badge-emerald,
.badge-success,
.badge-health-HEALTHY {
    background: var(--success-glow);
    border-color: var(--success);
    color: var(--text);
}

.badge-warning,
.badge-health-WARNING {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--warning);
    color: var(--warning);
}

.badge-danger,
.badge-health-INACTIVE {
    background: var(--danger-muted);
    border-color: var(--danger);
    color: var(--text);
}

.badge-purple {
    background: var(--color-purple-muted);
    border-color: rgba(168, 85, 247, 0.3);
    color: var(--color-purple-text);
}

.badge-info {
    background: var(--color-info-muted);
    border-color: var(--color-info);
    color: var(--color-info);
}

/* ============================================================
   7. FORM GROUPS & INPUTS
   ============================================================ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-label {
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: normal;
}

.form-input,
.form-select,
.form-textarea,
.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 42px;
}

select.form-control,
select.form-select,
select.filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 40px;
    background-color: var(--surface-card);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    color-scheme: inherit;
}

select.form-control option,
select.form-select option,
select.filter-select option,
.form-control option,
.form-select option {
    background-color: var(--surface-card);
    color: var(--text);
}

/* Themed select (toqi-select.js) — open menu uses project tokens. */
.toqi-select {
    position: relative;
    display: block;
    width: 100%;
}

.toqi-select-native {
    /* Keep in the form for submit/change; remove from paint without opacity:0
       (opacity:0 triggers "raster buried" quality detectors on emoji options). */
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    color: transparent !important;
    background: transparent !important;
}

.toqi-select-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 42px;
    padding: 10px 40px 10px 14px;
    text-align: left;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    color: var(--text);
    background-color: var(--surface-card);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.toqi-select-trigger:hover:not(:disabled) {
    border-color: var(--border-hover, var(--primary));
}

.toqi-select-trigger:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.toqi-select-trigger:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.toqi-select.is-open .toqi-select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.toqi-select-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 60;
    max-height: 280px;
    overflow-y: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.toqi-select-list[hidden],
.toqi-select:not(.is-open) .toqi-select-list {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.toqi-select-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    margin: 0;
    border: 0;
    border-radius: calc(var(--radius-md) - 2px);
    background: transparent;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    cursor: pointer;
}

.toqi-select-option:hover,
.toqi-select-option:focus-visible {
    background: var(--surface-hover);
    outline: none;
}

.toqi-select-option.is-selected {
    background: var(--surface-active);
    color: var(--text);
    font-weight: 600;
}

.toqi-select-option:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/*
 * Fields whose value is derived from the Google Places lookup (venue address and
 * coordinate pair). They stay in the form so the value is submitted, but must not
 * be edited by hand: the mapped place is the single source of truth (AD-034).
 */
.form-control[data-derived="true"] {
    background: var(--surface-header);
    color: var(--text-muted);
    cursor: default;
}

.form-control[data-derived="true"]:focus {
    outline: none;
    border-color: var(--border);
    box-shadow: none;
}

/* Explains why the derived fields above cannot be typed into. */
.venue-derived-note {
    grid-column: 1 / -1;
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0;
    max-width: 65ch;
    line-height: 1.5;
}

/* Custom Places prediction list + minimap (place-search.js). */
.place-search-minimap-frame {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-header);
    padding: 6px;
}

.place-search-minimap {
    width: 100%;
    height: 220px;
    border-radius: calc(var(--radius-lg) - 6px);
    overflow: hidden;
    position: relative;
    isolation: isolate;
    transform: translateZ(0);
    background: var(--surface-header);
}

.place-search-minimap-frame .gm-style,
.place-search-minimap-frame .gm-style-cc,
.place-search-minimap-frame .gm-style-cc *,
.place-search-minimap-frame .gmnoscreen,
.place-search-minimap-frame .gmnoscreen * {
    font-size: var(--text-xs) !important;
    line-height: 1.35;
}

.place-search-minimap-frame .gmnoprint,
.place-search-minimap-frame .gmnoprint * {
    font-size: var(--text-xs) !important;
}

.form-group:has([data-place-search]) {
    position: relative;
}

.venue-place-search-input-wrapper {
    position: relative;
    width: 100%;
}

.place-search-results {
    list-style: none;
    margin: 6px 0 0;
    padding: 6px 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 260px;
    overflow-y: auto;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.place-search-option,
.place-search-empty {
    padding: 10px 14px;
    font-size: var(--text-sm);
    color: var(--text);
    cursor: pointer;
}

.place-search-empty {
    color: var(--text-muted);
    cursor: default;
}

.place-search-option:hover,
.place-search-option:focus {
    background: var(--surface-active);
    outline: none;
}

.place-search-hint {
    margin-top: 10px;
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 65ch;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

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

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

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-subtle);
}

.form-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.form-error {
    font-size: var(--text-xs);
    color: var(--danger);
    font-weight: 600;
}

/* ============================================================
   8. MODALS & DIALOGS
   ============================================================ */
.modal,
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal.open,
.modal.active,
.modal-backdrop.open,
.modal-backdrop.active {
    display: flex;
}

.modal-content,
.modal-dialog {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    min-width: var(--touch-target-min, 44px);
    min-height: var(--touch-target-min, 44px);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
}

.modal-close:hover,
.modal-close:active {
    color: #fff;
    background: var(--surface-overlay);
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(0, 0, 0, 0.15);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================================
   9. PAGE HEADERS
   ============================================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.page-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-title {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.2;
}

.page-subtitle {
    font-size: var(--text-md);
    color: var(--text-muted);
}

.page-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* ============================================================
   10. SIDE DRAWERS & FINANCIAL PANELS
   ============================================================ */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.side-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 480px;
    max-width: 100vw;
    background: var(--surface);
    border-left: 1px solid var(--border);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
}

.side-drawer.active {
    transform: translateX(0);
}

.drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-title {
    font-size: var(--text-xl);
    font-weight: 700;
}

.close-drawer {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

.close-drawer:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.25);
}

.drawer-content {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.action-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    font-weight: 600;
    font-size: var(--text-base);
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.action-btn:active {
    transform: scale(0.98);
}

.action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: var(--danger);
}

.action-icon {
    opacity: 0.85;
    color: var(--primary);
    flex-shrink: 0;
}

.action-btn.danger .action-icon {
    color: var(--danger);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: var(--text);
    background: var(--surface-overlay);
    border: 1px solid var(--border);
}

.status-active {
    background: var(--success-glow);
    color: var(--text);
    border-color: var(--success);
}

.status-overdue {
    background: var(--danger-muted);
    color: var(--text);
    border-color: var(--danger);
}

.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--text);
    border-color: var(--warning);
}

.tenant-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tenant-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--surface-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: var(--text-md);
    color: var(--text);
    flex-shrink: 0;
}

.hash-mono {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.empty-subscription {
    font-size: var(--text-xs);
    color: var(--text-subtle);
    font-style: italic;
}

/* ============================================================
   11. THEME SELECTION & COLOR SWATCHES
   ============================================================ */
.theme-picker-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.theme-picker-block + .theme-picker-block {
    margin-top: 16px;
}

.theme-picker-hint {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0;
    max-width: 65ch;
    line-height: 1.5;
}

.theme-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 640px) {
    .theme-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

.theme-card {
    aspect-ratio: 3 / 4;
    background: rgba(7, 10, 18, 0.6);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    text-align: center;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.theme-card:hover {
    border-color: rgba(0, 210, 255, 0.4);
    transform: translateY(-2px);
}

.theme-card.active {
    border-color: var(--primary);
    background: rgba(0, 210, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.theme-preview-box {
    width: 100%;
    flex: 1;
    height: auto;
    min-height: 0;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px 10px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-preview-mini-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
}

.theme-preview-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.theme-preview-line {
    height: 4px;
    border-radius: 2px;
    flex: 1;
    opacity: 0.6;
}

.theme-preview-mini-btn {
    height: 12px;
    border-radius: 3px;
    width: 80%;
    margin: 0 auto;
}

/* 1. Obsidian Gold (Dark Luxury) */
.theme-preview-box.theme-obsidian-gold {
    background: #1a1410;
    border-color: rgba(214, 168, 79, 0.4);
}
.theme-preview-box.theme-obsidian-gold .theme-preview-dot {
    background: #d6a84f;
    box-shadow: 0 0 6px rgba(214, 168, 79, 0.5);
}
.theme-preview-box.theme-obsidian-gold .theme-preview-line {
    background: #3a2c22;
}
.theme-preview-box.theme-obsidian-gold .theme-preview-mini-btn {
    background: linear-gradient(135deg, #d6a84f, #a57b27);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* 2. Alpine Gold (Light Gourmet) */
.theme-preview-box.theme-alpine-gold {
    background: #fbf7f0;
    border-color: rgba(184, 134, 11, 0.35);
}
.theme-preview-box.theme-alpine-gold .theme-preview-dot {
    background: #c6942f;
}
.theme-preview-box.theme-alpine-gold .theme-preview-line {
    background: #e7ddcf;
}
.theme-preview-box.theme-alpine-gold .theme-preview-mini-btn {
    background: linear-gradient(135deg, #c6942f, #9a6b1f);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 3. Titanium Slate (Dark Pro Minimalist) */
.theme-preview-box.theme-titanium-slate {
    background: #15191e;
    border-color: rgba(145, 164, 190, 0.35);
}
.theme-preview-box.theme-titanium-slate .theme-preview-dot {
    background: #91a4be;
    box-shadow: 0 0 6px rgba(145, 164, 190, 0.5);
}
.theme-preview-box.theme-titanium-slate .theme-preview-line {
    background: #2d3540;
}
.theme-preview-box.theme-titanium-slate .theme-preview-mini-btn {
    background: linear-gradient(135deg, #5f7595, #425067);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* 4. Alpine Slate (Light Crisp Minimalist) */
.theme-preview-box.theme-alpine-slate {
    background: #f0f3f6;
    border-color: rgba(52, 75, 115, 0.35);
}
.theme-preview-box.theme-alpine-slate .theme-preview-dot {
    background: #344b73;
}
.theme-preview-box.theme-alpine-slate .theme-preview-line {
    background: #d3dbe8;
}
.theme-preview-box.theme-alpine-slate .theme-preview-mini-btn {
    background: linear-gradient(135deg, #3f5c8d, #344c74);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.theme-title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text);
}

.theme-desc {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.color-swatches-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.color-swatch {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 12px var(--primary);
    transform: scale(1.15);
}

.color-swatch.active::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: var(--text-md);
    font-weight: 900;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.custom-color-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    background: transparent;
    transition: all 0.2s ease;
}

.custom-color-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================================
   12. PRICING BOX & FINANCIAL HIGHLIGHTS
   ============================================================ */
.pricing-box {
    background: rgba(0, 210, 255, 0.05);
    border: 1px solid rgba(0, 210, 255, 0.25);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.price-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.price-value {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--primary);
    margin-top: 4px;
}

/* ============================================================
   13. HARDWARE CATALOG & HARDWARE CARDS
   ============================================================ */
.hardware-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.hw-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.hw-card:hover {
    transform: translateY(-2px);
    border-color: rgba(16, 185, 129, 0.35);
}

.hw-card.inactive {
    opacity: 0.55;
    border-style: dashed;
}

.hw-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.hw-icon-box {
    font-size: var(--text-4xl);
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.hw-title {
    font-size: var(--text-lg);
    font-weight: 800;
    color: var(--text);
}

.hw-material {
    font-size: var(--text-sm);
    color: var(--primary-light);
    font-weight: 600;
    margin-top: 2px;
}

.hw-finance-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: rgba(0, 0, 0, 0.25);
    padding: 12px;
    border-radius: var(--radius-md);
    margin: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hw-finance-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hw-finance-label {
    font-size: var(--text-2xs);
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

.hw-finance-value {
    font-size: var(--text-lg);
    font-weight: 800;
}

.hw-actions {
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

/* ============================================================
   14. RBAC & ROLE BADGES
   ============================================================ */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--text-xs);
    font-weight: 800;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
}

.role-MASTER_ADMIN {
    background: rgba(0, 210, 255, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 210, 255, 0.3);
}

.role-TECH {
    background: rgba(245, 158, 11, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.role-SUPPORT_AGENT {
    background: rgba(139, 92, 246, 0.15);
    color: var(--color-purple-text);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.role-COMMERCIAL {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.role-MERCHANT {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ============================================================
   15. BUSINESS VERTICALS
   ============================================================ */
.verticals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.vertical-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.vertical-card:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.35);
}

.vertical-card.inactive {
    opacity: 0.55;
    border-style: dashed;
}

.vert-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.vert-icon-box {
    font-size: 32px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.vert-title {
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--text);
}

.vert-code {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-family: monospace;
}

.vert-plan-rec {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: rgba(0, 210, 255, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 210, 255, 0.2);
    font-size: var(--text-xs);
    font-weight: 700;
}

.vert-actions {
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

/* ============================================================
   16. SAAS PLANS & PRICING CARDS
   ============================================================ */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.plan-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.plan-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.plan-card.inactive {
    opacity: 0.55;
    border-style: dashed;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.plan-name {
    font-size: var(--text-xl);
    font-weight: 800;
}

.plan-code {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.plan-badge {
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 800;
}

.plan-price-box {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 12px 0 6px 0;
}

.plan-price {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: var(--text-4xl);
    font-weight: 900;
    color: var(--text);
}

.plan-period {
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 600;
}

.plan-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.5;
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.plan-actions {
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

/* ============================================================
   17. INFRASTRUCTURE & SERVER MONITORING
   ============================================================ */
.infra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.infra-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.infra-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.infra-service-title {
    font-size: var(--text-lg);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.infra-status-badge {
    font-size: var(--text-xs);
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-online {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.infra-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-base);
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.infra-stat-label {
    color: var(--text-muted);
}

.infra-stat-value {
    font-weight: 700;
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xs, 4px);
    overflow: hidden;
    margin-top: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-xs, 4px);
}

/* ============================================================
   18. PLAQUE STUDIO & PRINT SPECIFICATIONS
   ============================================================ */
.plaques-studio {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 28px;
    align-items: start;
}

.studio-controls {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.studio-stage {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 700px;
    position: relative;
}

.stage-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.stage-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.specs-badge {
    font-size: 12px;
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 6px;
    color: var(--primary-light);
}

.plaque-viewport-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.btn-print-master {
    background: var(--primary);
    color: var(--primary-contrast);
    font-weight: 800;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-family: var(--font-sans);
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    box-shadow: 0 4px 10px rgba(20, 24, 31, 0.28);
}

.btn-print-master:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(20, 24, 31, 0.34);
}

.btn-print-master:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

.specs-footer {
    margin-top: 24px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.spec-tile {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 10px 14px;
}

.spec-tile .label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

.spec-tile .val {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    font-family: var(--font-mono);
    margin-top: 2px;
}

.radio-card {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.radio-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.radio-card.active {
    border-color: var(--primary);
    background: var(--surface-active);
}

.radio-card input {
    display: none;
}

.radio-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.radio-card.active .radio-indicator {
    border-color: var(--primary);
    background: var(--primary);
}

.radio-card.active .radio-indicator::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #000;
}

@media (max-width: 1024px) {
    .plaques-studio {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   19. FIELD INSTALLER & NFC TOUCHPOINTS
   ============================================================ */
.search-client-container {
    position: relative;
    width: 280px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 10px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    background: rgba(7, 10, 18, 0.85);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 28px 8px 32px;
    color: var(--text);
    font-size: var(--text-xs);
    font-weight: 600;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: rgba(16, 22, 38, 0.95);
}

.search-clear-btn {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: var(--text-xs);
    padding: 2px 4px;
}

.client-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 320px;
    max-width: 90vw;
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
    z-index: 100;
    overflow: hidden;
    max-height: 380px;
    display: flex;
    flex-direction: column;
}

.dropdown-header {
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: rgba(7, 10, 18, 0.5);
}

.dropdown-list {
    overflow-y: auto;
    max-height: 300px;
}

.client-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    text-decoration: none;
    border-bottom: 1px solid rgba(99, 115, 148, 0.1);
    transition: background 0.15s ease;
}

.client-item:hover,
.client-item.highlighted {
    background: rgba(0, 210, 255, 0.12);
    outline: none;
}

.client-item.active {
    background: var(--primary-glow);
}

.client-item-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.client-name {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text);
}

.client-sub {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    gap: 6px;
}

.client-slug {
    color: var(--primary);
    font-family: monospace;
    font-weight: 600;
}

.current-badge {
    background: var(--primary);
    color: var(--primary-contrast);
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.no-clients-found {
    padding: 20px;
    text-align: center;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.touchpoint-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tp-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tp-label {
    font-size: var(--text-md);
    font-weight: 700;
}

.tp-type {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.badge-recorded {
    display: none;
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.touchpoint-item.recorded {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.05);
}

.touchpoint-item.recorded .badge-recorded {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.tp-url-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-family: monospace;
    font-size: var(--text-xs);
    color: var(--primary-light);
    word-break: break-all;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tp-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.tips-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    padding: 14px;
    font-size: var(--text-xs);
    color: #a7f3d0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    line-height: 1.5;
}

.toast-copied {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: var(--primary-contrast);
    font-weight: 800;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 100;
    font-size: var(--text-sm);
}

/* ==========================================================================
   Auth & Standalone Pages (Login, 404, etc.)
   ========================================================================== */
.auth-body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

.auth-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 50% 0%, rgba(0, 210, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
    transform: translateZ(0);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 32px 32px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 20px 60px rgba(0, 0, 0, 0.4);
    animation: cardIn 0.5s ease-out;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.brand-header {
    text-align: center;
    margin-bottom: 32px;
}

.brand-lockup {
    display: block;
    width: 142px;
    height: 38px;
    object-fit: contain;
    object-position: left center;
}

.brand-header h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
    color: var(--text);
}

.brand-header p {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

.error-toast {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #fca5a5;
    animation: shake 0.4s ease-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

.error-toast svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--danger);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--primary-contrast);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    margin-top: 6px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-login:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0, 210, 255, 0.45);
}

.btn-login:active {
    transform: scale(0.98);
}

.btn-login:focus-visible,
.form-group input:focus-visible,
.auth-footer a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: rgba(148, 163, 184, 0.4);
}

.auth-footer a {
    color: var(--text-muted);
    text-decoration: none;
}

/* Standalone error/404 card */
.standalone-error-card {
    max-width: 420px;
    width: 100%;
    padding: 40px 28px;
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.standalone-icon-box {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-standalone-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: var(--primary-contrast);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px var(--primary-glow);
    margin-bottom: 24px;
}

.btn-standalone-action:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.45);
}

/* ==========================================================================
   Merchant Dashboard & CRM Components
   ========================================================================== */
.period-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.period-group {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(16, 22, 38, 0.8);
    border: 1px solid var(--surface-border);
    padding: 4px;
    border-radius: var(--radius-md);
}

.period-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.funnel-card {
    background: var(--surface-card, var(--surface));
    border: 1px solid var(--border);
}

/* Funnel components */
.funnel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 12px;
}

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

.funnel-step {
    background: var(--surface, var(--surface-card));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.funnel-step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-muted);
}

.funnel-step-value {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--text);
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin-top: 4px;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    background: var(--primary);
}

/* 2-Column Dashboard Grid */
.dash-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
}

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

/* WhatsApp pill */
.btn-whatsapp-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-emerald-text, #34d399);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: monospace;
}

.btn-whatsapp-sm:hover {
    background: rgba(16, 185, 129, 0.25);
    color: #fff;
    transform: translateY(-1px);
}

/* Quick actions bar */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

@media (max-width: 768px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.quick-action-card {
    background: rgba(16, 22, 38, 0.6);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
}

.quick-action-card:hover {
    border-color: var(--border-hover);
    background: var(--surface-hover);
}

.quick-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    flex-shrink: 0;
}

.quick-action-title {
    font-size: var(--text-md);
    font-weight: 700;
}

.quick-action-sub {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* CRM Toolbar & Cards */
.crm-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 900px) {
    .crm-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 550px) {
    .crm-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.crm-kpi-card {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    backdrop-filter: blur(10px);
}

.crm-kpi-label {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crm-kpi-val {
    font-size: var(--text-4xl);
    font-weight: 800;
    color: #fff;
}

.filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: rgba(16, 22, 38, 0.6);
    border: 1px solid var(--surface-border);
    padding: 16px;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-box {
    background: rgba(7, 10, 18, 0.7);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: #fff;
    font-size: var(--text-base);
    min-width: 280px;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-box:focus {
    border-color: var(--primary);
}

.filter-select {
    background-color: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 40px 10px 14px;
    color: var(--text);
    font-size: var(--text-base);
    outline: none;
    cursor: pointer;
}

.filter-btn-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-muted);
    font-size: var(--text-base);
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.filter-btn-toggle.active {
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--warning);
    color: var(--warning);
}

/* Upsell Block */
.upsell-hero {
    background: linear-gradient(180deg, rgba(0, 210, 255, 0.08) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(0, 210, 255, 0.3);
    border-radius: var(--radius-xl);
    padding: 48px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.upsell-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
    margin-top: 16px;
    text-align: left;
}

@media (max-width: 900px) {
    .upsell-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 550px) {
    .upsell-features-grid {
        grid-template-columns: 1fr;
    }
}

.upsell-feature-item {
    background: rgba(7, 10, 18, 0.6);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Toast Alert */
#toast-alert,
.toast-alert {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--success);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: var(--text-base);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 100;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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

/* ==========================================================================
   Automations & CRM Settings
   ========================================================================== */
.automations-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.col-8 {
    grid-column: span 8;
}

.col-4 {
    grid-column: span 4;
}

.col-12 {
    grid-column: span 12;
}

@media (max-width: 960px) {

    .col-8,
    .col-4 {
        grid-column: span 12;
    }
}

.trigger-box {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 18px;
}

details.trigger-box > summary.trigger-header {
    list-style: none;
    cursor: pointer;
    font-weight: inherit;
}

details.trigger-box > summary.trigger-header::-webkit-details-marker,
details.trigger-box > summary.trigger-header::marker {
    display: none;
    content: none;
}

.trigger-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.trigger-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
}

.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
}

.toggle-switch {
    width: 40px;
    height: 22px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-pill);
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--text);
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
}

input[type="checkbox"]:checked+.toggle-switch {
    background: var(--primary);
}

input[type="checkbox"]:checked+.toggle-switch::after {
    transform: translateX(18px);
    background: var(--bg);
}

.pill-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--surface-border);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    margin-right: 4px;
    margin-top: 4px;
}

.pill-tag:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    text-align: left;
}

.styled-table th {
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--surface-border);
}

.styled-table td {
    padding: 14px;
    border-bottom: 1px solid var(--surface-border);
    color: var(--text);
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-sent {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-failed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}


/* ==========================================================================
   Reviews & NPS Components
   ========================================================================== */
.reviews-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 960px) {
    .reviews-layout {
        grid-template-columns: 1fr;
    }
}

.dist-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.8125rem;
}

.dist-label {
    width: 50px;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dist-bar-track {
    flex: 1;
    height: 8px;
    background: var(--surface-overlay, color-mix(in srgb, var(--text) 8%, transparent));
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.dist-bar-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    width: var(--bar-pct, 0%);
}

.dist-count {
    width: 32px;
    text-align: right;
    font-weight: 700;
    color: var(--text-main);
}

.star-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 800;
    font-size: 0.9375rem;
    padding: 4px 10px;
    border-radius: var(--radius-md);
}

.star-badge.high {
    background: var(--success-glow);
    color: var(--success);
    border: 1px solid color-mix(in srgb, var(--success) 32%, transparent);
}

.star-badge.mid {
    background: color-mix(in srgb, var(--warning) 12%, transparent);
    color: var(--warning);
    border: 1px solid color-mix(in srgb, var(--warning) 28%, transparent);
}

.star-badge.low {
    background: var(--danger-muted);
    color: var(--danger);
    border: 1px solid color-mix(in srgb, var(--danger) 32%, transparent);
}

.tag-pill-badge {
    display: inline-block;
    background: var(--surface-overlay);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    margin-right: 4px;
}

.reviews-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.reviews-table th {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--surface-border);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
}

.reviews-table td {
    padding: 16px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.reviews-table tr:last-child td {
    border-bottom: none;
}

.comment-text {
    color: var(--text-main);
    font-style: italic;
    margin-top: 4px;
    font-size: 0.8125rem;
}

.rank-medal {
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   Cashier / POS Terminal Components
   ========================================================================== */
.operator-chip {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
    font-size: var(--text-sm);
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fff;
    transform: translateY(-1px);
}

.input-code {
    background: rgba(7, 10, 18, 0.7);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    color: #fff;
    font-size: var(--text-3xl);
    font-weight: 800;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
    outline: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-code:focus {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.feedback-box {
    display: none;
    padding: 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    font-size: var(--text-md);
    font-weight: 600;
    animation: fadeIn 0.25s ease;
}

.feedback-success {
    background: rgba(16, 185, 129, 0.12);
    border: 2px solid var(--success);
    color: rgba(16, 185, 129, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.feedback-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 2px solid var(--danger);
    color: rgba(239, 68, 68, 0.08);
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.25);
}

.customer-card-title {
    font-size: var(--text-sm);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--success);
    margin-bottom: 8px;
}

.customer-name-highlight {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.customer-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: var(--text-base);
    color: var(--text-muted);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.customer-benefit {
    background: rgba(0, 210, 255, 0.15);
    border: 1px solid rgba(0, 210, 255, 0.4);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: var(--text-md);
    margin-bottom: 16px;
    display: inline-block;
}

/* ==========================================================================
   User Capacity & Role Guide Cards
   ========================================================================== */
.capacity-box {
    background: rgba(16, 22, 38, 0.6);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.capacity-bar-wrapper {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.capacity-bar-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.capacity-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--color-info));
    border-radius: var(--radius-pill);
    transition: width 0.3s ease;
}

.role-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

@media (max-width: 960px) {
    .role-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.role-guide-card {
    background: rgba(7, 10, 18, 0.5);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.role-guide-title {
    font-size: var(--text-base);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
}

.role-guide-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.4;
}

.role-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: var(--text-base);
}

/* ==========================================================================
   Merchant Settings & Live Preview Phone Mockup
   ========================================================================== */
.settings-workspace {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}

@media (max-width: 1024px) {
    .settings-workspace {
        grid-template-columns: 1fr;
    }
}

.section-card {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    backdrop-filter: blur(12px);
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(75, 85, 99, 0.25);
    padding-bottom: 12px;
}

.section-title {
    font-size: var(--text-lg);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.section-subtitle {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.media-upload-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 16px;
}

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

.upload-card-box {
    background: rgba(7, 10, 18, 0.6);
    border: 1px dashed var(--surface-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    position: relative;
    transition: all 0.2s ease;
}

.upload-card-box:hover {
    border-color: var(--primary);
    background: rgba(0, 210, 255, 0.03);
}

.logo-preview-container {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-4xl);
}

.logo-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-preview-container.is-cutout {
    border-radius: var(--radius-sm);
    background: var(--surface-card);
}

.logo-preview-container.is-cutout img {
    object-fit: contain;
}

.banner-preview-container {
    width: 100%;
    height: 90px;
    border-radius: var(--radius-md);
    border: 2px solid var(--surface-border);
    overflow: hidden;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-base);
    color: var(--text-muted);
    position: relative;
}

.banner-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Themes */
.theme-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.theme-card {
    background: rgba(7, 10, 18, 0.6);
    border: 2px solid var(--surface-border);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 210, 255, 0.5);
}

.theme-card.active {
    border-color: var(--primary);
    background: rgba(0, 210, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transform: scale(1.02);
}

.theme-preview-box {
    width: 100%;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 1px solid var(--surface-border);
}

.theme-title {
    font-size: var(--text-sm);
    font-weight: 800;
    color: #fff;
}

/* Swatches */
.color-swatches-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.color-swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.6);
    transform: scale(1.15);
}

.color-swatch.active::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: var(--text-base);
    font-weight: 900;
}

.custom-color-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--surface-border);
    background: rgba(255, 255, 255, 0.05);
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
    color: var(--text-muted);
}

/* Phone Mockup (Live Preview) */
.mockup-sticky-container {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.mockup-phone-frame {
    width: 320px;
    height: 600px;
    background: #000;
    border: 10px solid var(--surface);
    border-radius: 40px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px var(--primary-glow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
}

.mockup-notch {
    width: 120px;
    height: 18px;
    background: var(--surface);
    border-radius: 0 0 12px 12px;
    align-self: center;
    z-index: 10;
}

.mockup-screen {
    flex: 1;
    padding: 0 0 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: background 0.3s ease, color 0.3s ease;
}

.mockup-screen.theme-dark {
    background: var(--bg);
    color: var(--text);
}

.mockup-screen.theme-light {
    background: var(--text);
    color: var(--surface);
}

.mockup-screen.theme-neon {
    background: var(--bg);
    color: #fff;
}

.mockup-banner-top {
    width: 100%;
    height: var(--mockup-banner-h, 100px);
    background: rgba(255, 255, 255, 0.05);
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mockup-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(7, 10, 18, 0.85) 100%);
}

.mockup-brand-hero {
    text-align: center;
    padding: 0 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 5;
    margin-top: calc(-0.5 * var(--mockup-banner-h, 100px) - 35px);
}

.mockup-logo-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-3xl);
    box-shadow: none;
    border: 1px solid var(--border);
    overflow: hidden;
    background: transparent;
    flex-shrink: 0;
}

.mockup-logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--surface);
}

.mockup-logo-circle.is-cutout {
    width: auto;
    max-width: 180px;
    height: 70px;
    border-radius: 0;
    border: 0;
    background: transparent;
    overflow: visible;
    box-shadow: none;
}

.mockup-logo-circle.is-cutout img {
    width: auto;
    height: 70px;
    max-width: 180px;
    object-fit: contain;
}

.mockup-brand-name {
    font-size: var(--text-md);
    font-weight: 800;
    letter-spacing: -0.3px;
}

.mockup-table-pill {
    font-size: var(--text-2xs);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.1);
}

.mockup-portal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 14px;
}

.mockup-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 700;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.mockup-action-btn.primary-highlight {
    color: var(--bg);
    border: none;
    font-weight: 800;
}

.save-bar-fixed {
    position: sticky;
    bottom: 20px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px var(--primary-glow);
    border-radius: var(--radius-lg);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(16px);
    z-index: 40;
    margin-top: 20px;
}

.toast-msg {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--success);
    color: var(--color-emerald-text);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 700;
    margin-bottom: 20px;
}

.url-status-badge {
    font-size: var(--text-2xs);
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-xs, 4px);
    display: none;
}

.url-status-badge.valid {
    display: inline-block;
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-emerald-text, #34d399);
}

/* ============================================================
   PWA INSTALL BUTTON (Obsidian Gold)
   ============================================================ */
.btn-install-pwa {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.22), rgba(180, 83, 9, 0.32));
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fef3c7;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: pwaGlow 3s infinite ease-in-out;
}

.btn-install-pwa:hover {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.4), rgba(180, 83, 9, 0.5));
    border-color: #f59e0b;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

@keyframes pwaGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.35);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.12);
    }
}

/* ============================================================
   PWA SMART TOP OVERLAY BANNER (Fiel à imagem de exemplo)
   ============================================================ */
.pwa-top-overlay-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100000;
    background: #12161a;
    color: #f6f7f9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.pwa-top-overlay-banner.dismissed {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.pwa-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    gap: 12px;
    max-width: 100%;
    box-sizing: border-box;
}

.pwa-banner-close-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: background 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.pwa-banner-close-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.08);
}

.pwa-banner-text-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding-right: 8px;
}

.pwa-banner-title {
    font-size: 15px;
    font-weight: 800;
    color: #f6f7f9;
    line-height: 1.25;
    letter-spacing: -0.2px;
}

.pwa-banner-desc {
    font-size: 12px;
    font-weight: 500;
    color: #b3bdcc;
    line-height: 1.35;
    margin-top: 2px;
}

.pwa-banner-install-btn {
    background: #ffffff;
    color: #5b21b6;
    border: none;
    border-radius: 9999px;
    padding: 8px 22px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.pwa-banner-install-btn:hover {
    background: #f8fafc;
    transform: scale(1.04);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.pwa-banner-install-btn:active {
    transform: scale(0.96);
}

/* Compensação suave e empurrão fluido dos headers e barras de navegação quando o banner do PWA estiver ativo */
body.has-pwa-banner {
    padding-top: var(--pwa-banner-h, 58px) !important;
}

body.has-pwa-banner .merchant-header-bar,
body.has-pwa-banner .top-bar {
    top: var(--pwa-banner-h, 58px) !important;
}

body.has-pwa-banner .sidebar,
body.has-pwa-banner .merchant-mobile-nav {
    top: var(--pwa-banner-h, 58px) !important;
    height: calc(100% - var(--pwa-banner-h, 58px)) !important;
}

body.has-pwa-banner .merchant-settings-page .adaptive-view-bar {
    top: calc(72px + var(--pwa-banner-h, 58px)) !important;
}

body.has-pwa-banner .mockup-sticky-container {
    top: calc(80px + var(--pwa-banner-h, 58px)) !important;
}

/* Transições visuais no PWA banner sem reflow de layout */
.merchant-header-bar,
.top-bar,
.sidebar,
.merchant-mobile-nav {
    transition: background-color 0.25s ease,
                border-color 0.25s ease,
                color 0.2s ease,
                box-shadow 0.25s ease !important;
}

@media print {
    #pwa-top-overlay-banner,
    .pwa-top-overlay-banner {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
        box-shadow: none !important;
        border: none !important;
    }

    body.has-pwa-banner {
        padding-top: 0 !important;
    }

    body.has-pwa-banner .sidebar,
    body.has-pwa-banner .merchant-mobile-nav,
    body.has-pwa-banner .merchant-header-bar,
    body.has-pwa-banner .top-bar {
        top: 0 !important;
        height: 100% !important;
    }
}

/* ============================================================
   IMPECCABLE CRAFT FLOOR & MICRO-INTERACTIONS
   ============================================================ */

/* The Craft Floor: Minimum 44px Touch Targets on Mobile Screens */
@media (max-width: 768px) {

    .btn:not(.btn-inline),
    .btn-act,
    .merchant-nav-link,
    .nav-item,
    .mobile-menu-btn,
    .merchant-mobile-toggle,
    .form-input,
    .form-select,
    .toqi-select-trigger {
        min-height: var(--touch-target-min, 44px);
    }
}

/* Micro-Interaction: Celebration & Claim Confirmation */
@keyframes celebrationPop {
    0% {
        transform: scale(0.92);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.04);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 var(--primary-glow);
    }

    50% {
        box-shadow: 0 0 0 8px transparent;
    }
}

@keyframes flashSuccess {
    0% {
        background-color: rgba(16, 185, 129, 0.35);
    }

    100% {
        background-color: transparent;
    }
}

.animate-celebrate {
    animation: celebrationPop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-pulse-glow {
    animation: pulseGlow 2s infinite ease-in-out;
}

.animate-flash-success {
    animation: flashSuccess 0.8s ease-out;
}

/* Gamified Team Leaderboard Podium */
.podium-card {
    background: var(--surface-card);
    border-radius: var(--radius-xl);
    padding: 20px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.podium-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.podium-card.podium-gold {
    border: 2px solid #f59e0b;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.12) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.podium-card.podium-silver {
    border: 1px solid #94a3b8;
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.08) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.podium-card.podium-bronze {
    border: 1px solid #b45309;
    background: linear-gradient(180deg, rgba(180, 83, 9, 0.08) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.podium-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 17px;
    margin-top: 2px;
}

.podium-avatar.avatar-gold {
    background: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
    border: 2px solid #f59e0b;
}

.podium-avatar.avatar-silver {
    background: rgba(148, 163, 184, 0.25);
    color: #f1f5f9;
    border: 2px solid #94a3b8;
}

.podium-avatar.avatar-bronze {
    background: rgba(180, 83, 9, 0.25);
    color: #fb923c;
    border: 2px solid #b45309;
}

.field-error {
    min-height: 0;
    margin: 4px 0 0;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--danger, #f87171);
}

.field-error:empty {
    display: none;
}

.pac-container {
    z-index: 12000;
}

/* Toast Notification Auto-Dismiss Animation */
@keyframes fadeOutToast {
    0%, 80% { opacity: 1; transform: translateY(0); pointer-events: auto; }
    100% { opacity: 0; transform: translateY(-10px); pointer-events: none; }
}
.toast-animation {
    animation: fadeOutToast 5s forwards;
}

.hidden,
[hidden] {
    display: none !important;
}