@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   1. DESIGN SYSTEM VARIABLES & RESET
   ========================================================================== */
:root {
    --font-primary: 'Outfit', sans-serif;

    /* Colors */
    --bg-dark: #090d16;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-hover: rgba(31, 41, 55, 0.85);
    --bg-sidebar: #0d1117;
    --bg-card-modal: #111827;
    --border-color: rgba(255, 255, 255, 0.08);

    --primary-grad: linear-gradient(135deg, #10b981, #059669);
    --primary-color: #10b981;
    --primary-glow: rgba(16, 185, 129, 0.4);

    --success-grad: linear-gradient(135deg, #10b981, #059669);
    --success-color: #10b981;
    --success-glow: rgba(16, 185, 129, 0.4);

    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #6b7280;

    /* Inner box variables */
    --inner-box-bg: rgba(255, 255, 255, 0.03);
    --inner-box-border: rgba(255, 255, 255, 0.08);

    /* Layout & Shadow */
    --shadow-glow: 0 8px 32px 0 rgba(16, 185, 129, 0.15);
    --shadow-ticket: 0 20px 50px rgba(0, 0, 0, 0.5);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;

    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Form & Structural Variables */
    --input-bg: rgba(255, 255, 255, 0.03);
    --input-color: var(--text-primary);
    --input-border: var(--border-color);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    --modal-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --table-hover: rgba(255, 255, 255, 0.015);
}

[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-sidebar: #ffffff;
    --bg-card-modal: #ffffff;
    --border-color: #cbd5e1;

    --primary-glow: rgba(16, 185, 129, 0.2);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --shadow-glow: 0 8px 32px 0 rgba(15, 23, 42, 0.05);
    --shadow-ticket: 0 20px 50px rgba(15, 23, 42, 0.1);

    /* Form & Structural Variables Override */
    --input-bg: #ffffff;
    --input-color: #1e293b;
    --input-border: #cbd5e1;
    --card-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    --modal-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
    --table-hover: rgba(15, 23, 42, 0.02);

    /* Inner box variables Override */
    --inner-box-bg: #f8fafc;
    --inner-box-border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Background mesh decorative circles */
.bg-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.decor-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
}

.decor-1 {
    width: 400px;
    height: 400px;
    background: #10b981;
    top: -100px;
    right: -50px;
}

.decor-2 {
    width: 500px;
    height: 500px;
    background: #059669;
    bottom: -150px;
    left: -100px;
}

/* ==========================================================================
   2. KEYFRAMES & ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
    }

    50% {
        box-shadow: 0 0 25px rgba(16, 185, 129, 0.6);
    }
}

@keyframes ticketFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-8px) rotate(0.5deg);
    }
}

@keyframes confettiFall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   3. LANDING PAGE & QUESTIONNAIRE WIZARD (index.php)
   ========================================================================== */
.container {
    width: 100%;
    max-width: 600px;
    margin: auto;
    padding: 24px;
}

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

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Wizard card base */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

/* Progress indicator */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    margin-bottom: 24px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-grad);
    width: 25%;
    transition: width 0.4s ease;
}

.step-indicator {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 12px;
}

/* Steps control */
.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

/* Multi-choice options layout */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

.option-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateX(4px);
}

.option-card.selected {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}

.option-text {
    font-size: 1.05rem;
    font-weight: 500;
}

.option-circle {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    position: relative;
    transition: var(--transition-smooth);
}

.option-card.selected .option-circle {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.option-card.selected .option-circle::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Inputs styling */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

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

.form-input, select.form-input, textarea.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    color: var(--input-color);
    font-family: var(--font-primary);
    font-size: 1rem;
    outline: none;
    transition: var(--transition-smooth);
}

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

input, 
select, 
textarea, 
.form-input, 
.leads-filter-wrapper select, 
.leads-filter-wrapper input, 
.leads-filter-wrapper select option, 
.filters-bar select, 
.filters-bar input,
.filters-container select,
.filters-container input {
    background-color: var(--input-bg) !important;
    color: var(--input-color) !important;
    border: 1px solid var(--input-border) !important;
}

select option {
    background-color: var(--bg-card-modal) !important;
    color: var(--text-primary) !important;
}

/* Privacy/LGPD Checkbox */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.checkbox-group input {
    margin-top: 4px;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    cursor: pointer;
}

.checkbox-group label a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-group label a:hover {
    text-decoration: underline;
}

/* Navigation Buttons */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    outline: none;
}

.btn-primary {
    flex: 1;
    background: var(--primary-grad);
    border: none;
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
    opacity: 0.95;
    box-shadow: 0 6px 20px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Error messages */
.error-message {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 6px;
    display: none;
}

.server-alert {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--danger-color);
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: none;
}

/* Consultant tag footer */
.consultant-tag {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.consultant-tag span {
    color: var(--primary-color);
    font-weight: 600;
}

/* ==========================================================================
   4. SUCCESS PAGE & LUCKY TICKET (sucesso.php)
   ========================================================================== */
.success-container {
    text-align: center;
    padding-bottom: 40px;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--success-color);
    color: var(--success-color);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

/* Elegant Perforated Ticket Graphic */
.ticket-wrapper {
    perspective: 1000px;
    margin: 30px 0;
}

.ticket {
    background: var(--bg-card-modal);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    position: relative;
    box-shadow: var(--shadow-ticket);
    padding: 30px;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    animation: ticketFloat 4s ease-in-out infinite;
}

/* Ticket Side Semi-circles */
.ticket::before,
.ticket::after {
    content: '';
    position: absolute;
    top: 55%;
    width: 20px;
    height: 20px;
    background-color: var(--bg-dark);
    /* Match the outer background */
    border-radius: 50%;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ticket::before {
    left: -11px;
    clip-path: circle(50% at 100% 50%);
}

.ticket::after {
    right: -11px;
    clip-path: circle(50% at 0 50%);
}

.ticket-header {
    border-bottom: 2px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.ticket-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ticket-body {
    margin-bottom: 24px;
}

.ticket-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.ticket-info-row .label {
    color: var(--text-secondary);
}

.ticket-info-row .val {
    font-weight: 600;
    color: var(--text-primary);
}

.ticket-numbers-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    margin: 20px 0;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ticket-numbers-box p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ticket-number-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.lucky-number-badge {
    background: var(--primary-grad);
    color: #fff;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* Simulated Gradient Barcode */
.barcode {
    height: 45px;
    width: 80%;
    margin: 24px auto 8px auto;
    background: repeating-linear-gradient(90deg,
            #fff,
            #fff 2px,
            transparent 2px,
            transparent 6px,
            #fff 6px,
            #fff 9px,
            transparent 9px,
            transparent 11px,
            #fff 11px,
            #fff 12px,
            transparent 12px,
            transparent 16px);
    opacity: 0.5;
}

.barcode-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 4px;
}

/* WhatsApp Share button */
.btn-whatsapp {
    background: #25d366;
    color: #fff;
    border: none;
    width: 100%;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    margin-top: 15px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-whatsapp:hover {
    background: #20ba59;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

/* ==========================================================================
   5. ADMIN DASHBOARD & LOGIN (admin.php)
   ========================================================================== */
/* Admin Dashboard Layout & SPA Styling */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-dark);
}

.admin-sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-brand h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.user-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 2px 8px;
    border-radius: 20px;
    align-self: flex-start;
    text-transform: uppercase;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.nav-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    flex-shrink: 0;
    stroke: currentColor;
    stroke-width: 2;
}

.kpi-watermark-icon {
    position: absolute;
    right: 20px;
    bottom: 15px;
    width: 48px;
    height: 48px;
    opacity: 0.12;
    pointer-events: none;
    stroke: currentColor;
    stroke-width: 1.5;
}

.btn-icon {
    width: 14px;
    height: 14px;
    display: inline-block;
    vertical-align: -2px;
    margin-right: 6px;
    flex-shrink: 0;
    stroke: currentColor;
    stroke-width: 2;
}

.modal-close-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
    stroke: currentColor;
    stroke-width: 2.5;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease, color 0.2s ease;
    width: 100%;
}

.sidebar-nav-link:hover {
    background: var(--table-hover);
    color: var(--text-primary);
}

.sidebar-nav-link.active {
    background: var(--primary-grad);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.sidebar-footer {
    padding: 20px 12px;
    border-top: 1px solid var(--border-color);
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--danger-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
    width: 100%;
}

.sidebar-logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

.admin-content-area {
    flex: 1;
    padding: 40px;
}

.admin-view {
    display: none;
    width: 100%;
    contain: content;
}

.admin-view.active {
    display: block;
    animation: adminViewFadeIn 0.3s ease-in-out;
}

@keyframes adminViewFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ─── Chart Container Dimension Pinning ──────────────────────────────────
   Garante que os contêineres pai de cada gráfico (Chart.js e ApexCharts)
   tenham dimensões previsíveis e estáveis. Isso evita que getBoundingClientRect,
   Layout e drawLegends do ApexCharts forcem reflows pesados ao descobrir que
   o contêiner tem 0px de altura. ──────────────────────────────────────── */
.chart-wrapper {
    width: 100%;
    min-height: 350px;
    position: relative;
}

.chart-card {
    width: 100%;
    min-height: 350px;
}

#chart-left,
#chart-right {
    width: 100%;
    min-height: 300px;
}

/* Modal Overlay & Modal Card Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    background: var(--bg-card-modal);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--modal-shadow);
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.admin-login-card {
    max-width: 400px;
    margin: 80px auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.admin-header .nav-actions {
    display: flex;
    gap: 12px;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-logout:hover {
    background: var(--danger-color);
    color: #fff;
}

/* Grid parameters for dashboard stats */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-card .value,
.stat-number,
.stat-value {
    font-size: 2.2rem;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
}

/* Two-column layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr 2fr;
    }
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 992px) {
    .dashboard-main-grid {
        grid-template-columns: 2fr 1fr;
    }
}


/* Section elements styling */
.admin-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--card-shadow);
    margin-bottom: 32px;
}

.admin-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
}

/* Consultant ranking listing */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.ranking-consultant {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ranking-badge {
    width: 28px;
    height: 28px;
    background: var(--primary-grad);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

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

.ranking-count {
    background: var(--table-hover);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Custom Table style */
.table-container {
    overflow-x: auto;
    width: 100%;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color) !important;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color) !important;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.admin-table tbody tr:hover {
    background: var(--table-hover);
}

.lead-numbers {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.lead-number-pill {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Search Filters in Admin */
.filters-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

/* Animated Winner Draw Machine Component */
.draw-machine-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.draw-machine-modal.active {
    opacity: 1;
    pointer-events: all;
}

.draw-card {
    background: #111827;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 0 50px rgba(99, 102, 241, 0.4);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.draw-machine-modal.active .draw-card {
    transform: scale(1);
}

.draw-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Slot Machine Styling for Rapid cycling numbers */
.draw-display {
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 30px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
}

.draw-number-spinner {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 4px;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.8);
}

.draw-winner-info {
    display: none;
    margin-top: 10px;
    animation: fadeInUp 0.5s ease;
}

.draw-winner-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 4px;
}

.draw-winner-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.draw-machine-modal .btn-close-modal {
    margin-top: 20px;
    display: none;
}

/* Floating validation or status alerts */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: #111827;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.active {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--danger-color);
}

/* ==========================================================================
   6. MISSING CLASSES & SCROLLBAR REFINEMENTS
   ========================================================================== */

/* Confetti Animation Classes */
.confetti {
    position: fixed;
    top: -10px;
    z-index: 999;
    border-radius: 0px;
    animation: confettiFall linear forwards;
}

.confetti.circle {
    border-radius: 50%;
}

/* Input Validation Error State */
.form-input.invalid {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.05);
}

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

/* Custom Scrollbar for Dark Theme (Webkit) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   7. PREMIUM LINK & QR CODE CARD COMPONENT
   ========================================================================== */
.link-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.copy-link-text {
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: var(--font-primary);
    word-break: break-all;
    text-align: center;
    line-height: 1.4;
    display: block;
    margin-bottom: 4px;
}

.btn-copy {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
    text-align: center;
}

.btn-copy:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
    transform: translateY(-1px);
}

.qr-frame {
    background: #ffffff;
    padding: 8px;
    border-radius: 8px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    margin: 8px auto;
}

.qr-frame canvas {
    display: block;
    width: 90px !important;
    height: 90px !important;
}

.btn-download-qr {
    background: var(--primary-grad);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.btn-download-qr:hover {
    opacity: 0.9;
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

/* Forçado para Tema Claro/Escuro (Bordas e Textos) */
.leads-filter-wrapper, .filters-bar, .filters-container {
    border-bottom: 1px solid var(--border-color) !important;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.admin-table td strong, 
.admin-table td strong[style], 
.search-name, 
.search-name[style] {
    color: var(--text-primary) !important;
}

.admin-table td span,
.admin-table td span[style],
.admin-table td span font {
    color: var(--text-secondary) !important;
}

.admin-table td span.search-campaign,
.admin-table td span.lead-number-pill,
.admin-table td span[style*="color:var(--primary-color)"],
.admin-table td span[style*="color: var(--primary-color)"],
.admin-table td span[style*="color:var(--success-color)"],
.admin-table td span[style*="color: var(--success-color)"],
.admin-table td span[style*="color:var(--danger-color)"],
.admin-table td span[style*="color: var(--danger-color)"],
.admin-table td span[style*="color:var(--warning-color)"],
.admin-table td span[style*="color: var(--warning-color)"],
.admin-table td span[style*="color:var(--text-muted)"],
.admin-table td span[style*="color: var(--text-muted)"] {
    color: inherit !important;
}

/* Modal inner boxes / detail blocks dynamic theme support */
.modal-card div[style*="rgba(255,255,255,0.02)"],
.modal-card div[style*="rgba(255, 255, 255, 0.02)"],
.modal-card div[style*="rgba(255,255,255,0.05)"],
.modal-card div[style*="rgba(255, 255, 255, 0.05)"],
.modal-card div[style*="rgba(255,255,255,0.06)"],
.modal-card div[style*="rgba(255, 255, 255, 0.06)"],
.modal-overlay div[style*="rgba(255,255,255,0.02)"],
.modal-overlay div[style*="rgba(255, 255, 255, 0.02)"],
.modal-overlay div[style*="rgba(255,255,255,0.05)"],
.modal-overlay div[style*="rgba(255, 255, 255, 0.05)"],
.modal-overlay div[style*="rgba(255,255,255,0.06)"],
.modal-overlay div[style*="rgba(255, 255, 255, 0.06)"],
.modal-section,
.info-block,
.details-box,
.stats-container {
    background-color: var(--inner-box-bg) !important;
    border: 1px solid var(--inner-box-border) !important;
    border-radius: 8px !important;
    padding: 15px !important;
    margin-bottom: 15px !important;
}

/* Ensure headings and texts in modals respect theme colors */
.modal-card h2,
.modal-card h2[style],
.modal-card h3[style*="color:#fff"],
.modal-card h3[style*="color: #fff"],
.modal-card h3[style*="color:#ffffff"],
.modal-card h3[style*="color: #ffffff"],
.modal-card strong[style*="color:#fff"],
.modal-card strong[style*="color: #fff"],
.modal-card strong[style*="color:#ffffff"],
.modal-card strong[style*="color: #ffffff"],
.modal-card div[style*="color:#fff"],
.modal-card div[style*="color: #fff"],
.modal-card div[style*="color:#ffffff"],
.modal-card div[style*="color: #ffffff"],
.modal-card span[style*="color:#fff"],
.modal-card span[style*="color: #fff"],
.modal-card span[style*="color:#ffffff"],
.modal-card span[style*="color: #ffffff"],
.modal-overlay h2,
.modal-overlay h2[style],
.modal-overlay h3[style*="color:#fff"],
.modal-overlay h3[style*="color: #fff"],
.modal-overlay strong[style*="color:#fff"],
.modal-overlay strong[style*="color: #fff"],
.modal-overlay strong[style*="color:#ffffff"],
.modal-overlay strong[style*="color: #ffffff"] {
    color: var(--text-primary) !important;
}

.modal-card span[style*="color:#e4e4e7"],
.modal-card span[style*="color: #e4e4e7"],
.modal-card strong[style*="color:#e4e4e7"],
.modal-card strong[style*="color: #e4e4e7"],
.modal-overlay span[style*="color:#e4e4e7"],
.modal-overlay span[style*="color: #e4e4e7"] {
    color: var(--text-secondary) !important;
}

/* Fix lead survey response highlights */
.lead-answer-item,
.answer-text,
.lead-response {
    background: transparent !important;
    color: var(--text-primary) !important;
    font-weight: 600;
}

.lead-answer-item strong,
.answer-text strong,
.lead-response strong {
    color: var(--text-primary) !important;
}

/* Dashboard Redesign Grid System */
.dashboard-row-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-row-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.chart-wrapper {
    position: relative;
    height: 320px;
    width: 100%;
}

@media (min-width: 992px) {
    .dashboard-row-2 {
        grid-template-columns: 7fr 3fr;
    }
    .dashboard-row-3 {
        grid-template-columns: 1fr 1fr;
    }
}

/* Correção Nativa de Dropdowns por Tema */
html[data-theme="light"], [data-theme="light"] {
    color-scheme: light;
}

html[data-theme="dark"], [data-theme="dark"] {
    color-scheme: dark;
}

/* Hide mobile components and restore desktop view rules */
@media (min-width: 769px) {
    .mobile-top-bar {
        display: none !important;
    }
    .sidebar-backdrop {
        display: none !important;
    }
    .admin-sidebar {
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        display: flex !important;
        z-index: 100 !important;
        width: 260px !important;
        min-width: 260px !important;
    }
    .admin-content-wrapper {
        margin-top: 0 !important;
        height: 100vh !important;
    }
}

/* ==========================================================================
   6. RESPONSIVIDADE E MOBILE-FIRST (Telas < 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* Menu Hambúrguer & Top Bar */
    .mobile-top-bar {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: var(--bg-sidebar);
        border-bottom: 1px solid var(--border-color);
        z-index: 1000;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
    }

    .mobile-brand {
        font-family: var(--font-primary);
        font-size: 1.2rem;
        font-weight: 800;
        color: var(--text-primary);
        letter-spacing: -0.5px;
    }

    .hamburger-btn {
        background: none;
        border: none;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        gap: 5px;
        padding: 10px;
        z-index: 1002;
    }

    .hamburger-bar {
        width: 22px;
        height: 2.5px;
        background: var(--text-primary);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* Animação do botão hamburger para X */
    .hamburger-btn.active .hamburger-bar:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }

    .hamburger-btn.active .hamburger-bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger-btn.active .hamburger-bar:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }

    /* Sidebar móvel deslizante */
    .admin-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -280px !important;
        width: 280px !important;
        min-width: 280px !important;
        height: 100vh !important;
        z-index: 1050 !important; /* Estritamente maior que o backdrop */
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .admin-sidebar.open {
        transform: translateX(280px);
    }

    /* Backdrop escurecido */
    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
        z-index: 1040 !important; /* Abaixo da sidebar, mas acima de todo o resto */
        animation: fadeIn 0.2s ease-out;
    }

    .sidebar-backdrop.active {
        display: block;
    }

    /* Espaçamento do conteúdo principal para a Top Bar */
    .admin-content-wrapper {
        margin-top: 60px !important;
        height: calc(100vh - 60px) !important;
    }

    .admin-content-area {
        padding: 16px !important;
    }

    /* Ocultar barra lateral estática */
    .admin-layout {
        display: block !important; /* Remove flex desktop */
    }

    /* Empilhamento dos cards do Dashboard e métricas */
    .admin-stats-grid,
    .metrics-grid,
    .dashboard-row-2,
    .dashboard-row-3,
    .dashboard-stats-modal-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        margin-bottom: 24px !important;
    }

    .stat-card,
    .metric-card,
    .chart-card {
        width: 100% !important;
        flex: 1 1 auto !important;
    }

    /* Correção do mini-dashboard inline-styled de colaboradores */
    .colaboradores-mini-dashboard {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        width: 100% !important;
        margin-bottom: 24px !important;
    }

    /* Redimensionamento e responsividade dos gráficos */
    .chart-wrapper {
        height: 280px !important;
    }

    /* Metamorfose de Tabelas para Cards */
    .table-container {
        overflow-x: visible !important; /* Desabilita scroll horizontal */
    }

    .admin-table {
        display: block !important;
        width: 100% !important;
        border: none !important;
    }

    .admin-table thead {
        display: none !important; /* Oculta cabeçalho */
    }

    .admin-table tbody {
        display: block !important;
        width: 100% !important;
    }

    .admin-table tr {
        display: block !important;
        background: var(--bg-card) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--radius-md) !important;
        padding: 16px !important;
        margin-bottom: 16px !important;
        box-shadow: var(--card-shadow) !important;
    }

    .admin-table tr:hover {
        background: var(--bg-card-hover) !important;
    }

    .admin-table td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        text-align: right !important;
        font-size: 0.88rem !important;
        min-height: 40px;
    }

    .admin-table td br {
        display: none; /* Evita quebras desnecessárias dentro das células no formato card */
    }

    /* Alinha o conteúdo principal da célula à direita */
    .admin-table td > * {
        text-align: right !important;
    }

    /* Caso haja um link ou texto puro, garantir que não quebre o layout */
    .admin-table td strong, 
    .admin-table td span {
        max-width: 60%;
        word-break: break-word;
        display: inline-block;
    }

    /* Criação de rótulo dinâmico utilizando data-label */
    .admin-table td[data-label]::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-secondary);
        text-align: left;
        margin-right: 15px;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        flex-shrink: 0;
        display: inline-block;
    }

    /* Linha de botões de ação na base do card */
    .admin-table td:last-child {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: center !important;
        border-bottom: none !important;
        padding-top: 16px !important;
        text-align: center !important;
        width: 100% !important;
    }

    .admin-table td:last-child::before {
        display: none !important; /* Remove label do data-label se houver */
    }

    .admin-table td:last-child button,
    .admin-table td:last-child a,
    .admin-table td:last-child div button,
    .admin-table td:last-child div a {
        flex: 1 1 calc(50% - 8px) !important; /* Divide em dois botões por linha */
        min-height: 44px !important; /* Altura touch target mínima */
        margin: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.85rem !important;
        padding: 8px 12px !important;
        border-radius: var(--radius-sm) !important;
    }

    /* Modais em Tela Cheia no Mobile */
    .modal-overlay {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        overflow-y: auto !important;
    }

    .modal-card {
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        top: 0 !important;
        left: 0 !important;
        border-radius: 0 !important;
        margin: 0 !important;
        transform: none !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 20px !important;
        box-shadow: none !important;
        border: none !important;
        overflow-y: auto !important;
    }

    .modal-card form {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
    }

    .modal-dual-column {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    .modal-form-column {
        max-height: none !important;
        overflow-y: visible !important;
        padding-right: 0 !important;
    }

    /* Aumenta o tamanho e visibilidade do botão de fechar do modal */
    .modal-header .btn-close-section,
    .modal-header button {
        font-size: 1.8rem !important;
        padding: 8px !important;
        color: var(--text-primary) !important;
        background: none !important;
        border: none !important;
    }

    /* Ajustes específicos para botões gerais e formulários no mobile */
    .view-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
    }

    .view-header button,
    .view-header a {
        width: 100% !important;
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Filtros e Inputs Stacking */
    .leads-filter-wrapper,
    .campaigns-filter-wrapper,
    .consultants-filter-wrapper,
    .filters-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 12px !important;
    }

    .leads-filter-wrapper *,
    .campaigns-filter-wrapper *,
    .consultants-filter-wrapper *,
    .filters-bar * {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
    }

    /* Ajustes no formulário de campanha */
    .tags-container {
        gap: 6px !important;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Altura e largura fixas para evitar reflows abruptos na troca de abas */
#chart-left, #chart-right {
    min-height: 280px;
    height: 280px;
    width: 100%;
}

.chart-wrapper canvas {
    display: block;
}

/* ==========================================================================
   7. FINANCIAL MODULE STATUS BADGES AND BUTTONS
   ========================================================================== */

/* Financial status badges */
.status-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    border: 1px solid transparent;
    line-height: 1.2;
    white-space: nowrap;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fde047;
    border-color: rgba(245, 158, 11, 0.3);
}

.status-badge.paid {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.status-badge.overdue {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.status-badge.canceled {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
    border-color: rgba(107, 114, 128, 0.3);
}

/* Pay invoice button consistency */
.btn-pay-invoice {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    box-sizing: border-box;
}

.btn-pay-invoice:hover {
    background: #059669;
}

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

/* Campanha: Editor de Regulamento Amplo */
#regulation-modal {
    z-index: 1200; /* Abre por cima do modal de campanha (z-index: 999) */
}

.regulation-preview-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px;
    margin-top: 10px;
}

.regulation-preview-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.regulation-preview-text {
    max-height: 150px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    padding-right: 5px;
}

.regulation-char-counter {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Global Error Modal Styles */
#global-error-modal {
    z-index: 9999 !important;
}
#global-error-modal .modal-card {
    max-width: 520px;
    width: calc(100% - 32px);
    margin: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(239, 68, 68, 0.25);
    background: var(--bg-card-modal);
}
