/* ============================================
   PROMETHEUS - ESTILO UNIFICADO (BASEADO NO TERMÔMETRO)
   Design Premium & Coeso
============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    /* Cores Base - Termômetro Palette */
    --bg-deep: #050510;
    --bg-card: rgba(10, 15, 30, 0.65);
    /* Modals e Overlays sem transparência excessiva */
    --bg-overlay: #0b1021;
    --bg-header: rgba(10, 15, 30, 0.95);

    /* Acentos */
    --gold: #D4AF37;
    --gold-light: #f4d03f;
    --primary: #3b82f6;
    --purple: #8b5cf6;
    --cyan: #06b6d4;

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --risk: #f97316;
    --info: #3b82f6;
    --gray-medium: #64748b;
    --gray-light: #94a3b8;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    /* Glass Effect & Borders */
    --glass-border: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(212, 175, 55, 0.4);

    /* Sombras & Transições */
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(212, 175, 55, 0.2);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Canvas Background Animation */
#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Content Layer */
.header,
main,
.container {
    position: relative;
    z-index: 10;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* ========================================
   HEADER
======================================== */
.header {
    background: var(--bg-header);
    /* Solid-ish for header */
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1100;
    /* Acima da tela de detalhes (z-index 1000) */
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Bee Icon & Animation */
.bee-container-wrapper {
    position: relative;
}

.bee-icon {
    width: 60px;
    height: 60px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.3));
    cursor: pointer;
    transition: var(--transition-smooth);
}

.bee-icon:hover {
    transform: scale(1.05);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Header Text */
.header-titles {
    display: flex;
    flex-direction: column;
}

.header-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, var(--gold) 50%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.header-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Tooltips (Bee & Subtitle) - Solid Background */
.bee-tooltip,
.subtitle-tooltip {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-overlay);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    color: var(--text-main);
    z-index: 101;
    box-shadow: var(--shadow-sm);
}

.bee-container-wrapper:hover .bee-tooltip,
.subtitle-wrapper:hover .subtitle-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Center Logo */
.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.artta-logo {
    width: 120px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.latin-phrase {
    font-size: 0.7rem;
    color: var(--gray-medium);
}

/* Token Status */
.token-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.token-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.85rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: blink 2s infinite;
}

.status-dot.active {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.status-dot.inactive {
    background: var(--danger);
    box-shadow: 0 0 10px var(--danger);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ========================================
   LAYOUT & CONTAINER
======================================== */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
}

.section-spacing {
    margin-bottom: 2rem;
}

/* ========================================
   KPI CARDS - PREMIUM GLASS (TERMOMETRO STYLE)
======================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
}

@media (max-width: 1400px) {
    .kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.kpi-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.kpi-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* KPI Internal Layout */
.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.kpi-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    /* Fallback */
}

.kpi-value {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.kpi-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition-smooth);
}

/* --- Status Specific Styles (Exact Termometro Match) --- */

/* Approved (Success) */
.kpi-card[style*="--success"] {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border-color: var(--success);
    border-top: 1px solid var(--success);
    /* Termometro uses border-color, keeping consistent */
}

.kpi-card[style*="--success"] .kpi-title,
.kpi-card[style*="--success"] .kpi-value,
.kpi-card[style*="--success"] .kpi-subtitle {
    color: #ffffff !important;
}

.kpi-card[style*="--success"] .kpi-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Analysis (Warning) */
.kpi-card[style*="--warning"] {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    border-color: var(--warning);
    border-top: 1px solid var(--warning);
}

.kpi-card[style*="--warning"] .kpi-title,
.kpi-card[style*="--warning"] .kpi-value,
.kpi-card[style*="--warning"] .kpi-subtitle {
    color: #ffffff !important;
}

.kpi-card[style*="--warning"] .kpi-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Incomplete (Gray/Neutral) */
.kpi-card[style*="--gray"],
.kpi-card[style*="--gray-medium"] {
    background: linear-gradient(135deg, var(--gray-medium) 0%, #475569 100%);
    border-color: var(--gray-medium);
    border-top: 1px solid var(--gray-medium);
}

.kpi-card[style*="--gray"] .kpi-title,
.kpi-card[style*="--gray"] .kpi-value,
.kpi-card[style*="--gray"] .kpi-subtitle {
    color: #ffffff !important;
}

.kpi-card[style*="--gray"] .kpi-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Rejected (Danger) */
.kpi-card[style*="--danger"] {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    border-color: var(--danger);
    border-top: 1px solid var(--danger);
}

.kpi-card[style*="--danger"] .kpi-title,
.kpi-card[style*="--danger"] .kpi-value,
.kpi-card[style*="--danger"] .kpi-subtitle {
    color: #ffffff !important;
}

.kpi-card[style*="--danger"] .kpi-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Total (Info) - Also Full Color to Match others if desired, or lighter blue */
.kpi-card[style*="--info"] {
    background: linear-gradient(135deg, var(--info) 0%, #1d4ed8 100%);
    border-color: var(--info);
    border-top: 1px solid var(--info);
}

.kpi-card[style*="--info"] .kpi-title,
.kpi-card[style*="--info"] .kpi-value,
.kpi-card[style*="--info"] .kpi-subtitle {
    color: #ffffff !important;
}

.kpi-card[style*="--info"] .kpi-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}


/* ========================================
   FILTERS SECTION
======================================== */
.filters-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
}

.filters-header {
    margin-bottom: 1.5rem;
}

.filters-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filters-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Filter Pills */
.filter-pills {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    background: transparent;
    opacity: 0.7;
}

.filter-pill:hover,
.filter-pill.active {
    opacity: 1;
    transform: translateY(-1px);
}

.filter-pill.approved {
    border-color: var(--success);
    color: var(--success);
}

.filter-pill.approved.active {
    background: var(--success);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.filter-pill.analysis {
    border-color: var(--warning);
    color: var(--warning);
}

.filter-pill.analysis.active {
    background: var(--warning);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.filter-pill.incomplete {
    border-color: var(--gray-medium);
    color: var(--gray-medium);
}

.filter-pill.incomplete.active {
    background: var(--gray-medium);
    color: #fff;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.2);
}

.filter-pill.rejected {
    border-color: var(--danger);
    color: var(--danger);
}

.filter-pill.rejected.active {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* Inputs & Selects & Checkboxes */
input[type="text"],
input[type="date"],
select,
.filter-select-styled,
.dash-select,
.dash-search {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-size: 0.875rem;
    font-family: inherit;
    transition: var(--transition-smooth);
}

input:focus,
select:focus,
.dash-select:focus,
.dash-search:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

select option,
.dash-select option {
    background: var(--bg-overlay);
    color: var(--text-main);
}

/* Checkbox Custom Style */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--glass-border);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    position: relative;
    vertical-align: middle;
}

input[type="checkbox"]:checked {
    background: var(--gold);
    border-color: var(--gold);
}

input[type="checkbox"]:checked::after {
    content: '✓';
    color: #000;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
}

/* Search */
.search-container {
    position: relative;
    flex: 1;
    min-width: 250px;
    /* max-width removed to allow full expansion */
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input {
    width: 100%;
    padding-left: 2.75rem !important;
}

/* Additional Filters Grid */
.filters-additional {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   BUTTONS
======================================== */
button {
    font-family: 'Inter', sans-serif;
}

/* Generic Action Button (Base) */
.action-btn,
.btn-dashboard-small,
.btn-reset-filters,
.pagination-btn,
.dash-btn,
.back-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    /* Transparent style */
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

/* Hover Effects */
.action-btn:hover,
.btn-dashboard-small:hover,
.btn-reset-filters:hover,
.pagination-btn:hover,
.dash-btn:hover,
.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
}

/* Exceptions and Specific Styles */

/* Primary / Gold Button */
.action-btn-primary,
.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, #b8860b 100%);
    color: white;
    border: none !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.action-btn-primary:hover,
.btn-gold:hover {
    background: linear-gradient(135deg, #e5c14d 0%, #c6920e 100%);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    color: white;
}

/* Secondary Button - Explicitly Transparent */
.action-btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
}

/* Pagination */
.pagination-btn {
    padding: 0.5rem 1rem;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    border-color: transparent;
}

/* ========================================
   TABLE SECTION
======================================== */
.table-container {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.table-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.data-table,
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.data-table th,
.dashboard-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition-smooth);
}



.data-table th:hover,
.dashboard-table th:hover {
    color: var(--gold);
    background: rgba(255, 255, 255, 0.05);
}

.data-table td,
.dashboard-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

.data-table tbody tr,
.dashboard-table tbody tr {
    transition: var(--transition-smooth);
}

.data-table tbody tr:hover,
.dashboard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Tabela Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.status-approved {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-analysis {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-rejected {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-incomplete {
    background: rgba(100, 116, 139, 0.2);
    color: var(--gray-medium);
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.status-integrate {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-completed {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Obs Button */
.btn-obs {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-obs:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gold);
    border-color: var(--gold);
}

.btn-obs.has-obs {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold);
    border-color: rgba(212, 175, 55, 0.4);
}

/* ========================================
   DETAILS SECTION STYLING (New Blocks)
======================================== */
.detail-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    /* Add spacing between blocks */
    transition: var(--transition-smooth);
}

.detail-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: rgba(255, 255, 255, 0.2);
}

.detail-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.detail-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.detail-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 0.95rem;
    color: var(--text-main);
    word-break: break-word;
    font-weight: 500;
}

.list-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.list-item:hover {
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.05);
}

.list-item-title {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
}

/* Badges Header in Details */
#detailsBadges {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.badge-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.badge-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
}


/* ========================================
   MODALS & OVERLAYS - SOLID BACKGROUNDS
======================================== */
/* Overriding transparency for modals as requested */

.dashboard-modal,
.modal,
#modalObservacao {
    background: rgba(0, 0, 0, 0.85) !important;
    /* Dimm background backdrop */
    backdrop-filter: blur(10px);
}

.dashboard-content,
.modal-content,
#detalhesView,
#modalObservacao>div {
    background: var(--bg-overlay) !important;
    /* Solid Dark Color */
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    border-radius: 20px;
    position: relative;
    z-index: 1000;
}

/* Ensure no transparency creeping in */
#detalhesView {
    padding: 2rem;
}

/* Adjusting modal specific content */
.dashboard-header h2 {
    font-family: 'Outfit', sans-serif;
    color: var(--gold);
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Loading Overlay Premium */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(5, 5, 16, 0.98) 0%, rgba(16, 24, 40, 0.98) 100%);
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.loading-logo-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Anéis orbitais animados */
.loading-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top: 2px solid var(--gold);
    border-right: 2px solid rgba(212, 175, 55, 0.3);
    animation: ringRotate 2s linear infinite;
}

.loading-ring-2 {
    width: 130%;
    height: 130%;
    border-top: 2px solid rgba(212, 175, 55, 0.4);
    border-right: 2px solid transparent;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    animation: ringRotateReverse 3s linear infinite;
}

.loading-logo {
    width: 80px;
    height: 80px;
    animation: logoPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.5));
    z-index: 1;
}

@keyframes ringRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes ringRotateReverse {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-360deg);
    }
}

@keyframes logoPulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.5));
    }

    50% {
        transform: scale(1.08);
        filter: drop-shadow(0 0 40px rgba(212, 175, 55, 0.8));
    }
}

.loading-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.loading-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #e2e8f0;
    letter-spacing: 0.5px;
}

.loading-progress-bar {
    width: 280px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.loading-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), #f5d76e);
    border-radius: 10px;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.loading-progress {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: rgba(212, 175, 55, 0.8);
    font-weight: 600;
    letter-spacing: 1px;
}

/* ========================================
   NEW ADDITIONS & REFINEMENTS
======================================== */

/* Collapsible Filter Section */
.filters-toggle-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    gap: 1rem;
    /* Subtle dashed line */
}

.toggle-filters-btn {
    background: transparent;
    border: none;
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: var(--transition-smooth);
}

.toggle-filters-btn:hover {
    background: rgba(212, 175, 55, 0.1);
}

.toggle-filters-btn i {
    transition: transform 0.3s ease;
}

.filters-additional.hidden {
    display: none;
}

/* Detail List Items (Partners, Operators, Files) */
.list-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    width: 100%;
    /* Force full width */
    transition: var(--transition-smooth);
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.list-item-title {
    font-size: 1.1rem;
    color: var(--accent-light);
    margin-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: var(--transition-smooth);
}

.file-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.file-actions button {
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.file-actions .copy-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-color: var(--glass-border);
}

.file-actions .download-btn {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border-color: rgba(59, 130, 246, 0.3);
}

.file-actions button:hover {
    transform: scale(1.05);
}

/* Specific Button Colors */
.btn-dashboard-small {
    background: linear-gradient(135deg, var(--info) 0%, #2563eb 100%);
    color: white !important;
    border: none;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.btn-dashboard-small:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4);
    color: white !important;
    transform: translateY(-2px);
}

.btn-reset-filters {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.btn-reset-filters:hover {
    background: var(--warning);
    color: white;
}

/* Workflow Dropdowns */
/* Workflow Dropdowns */
.workflow-dropdown {
    width: 100%;
    min-width: 130px;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    background-image: none;
}

/* Ensure CNPJ column doesn't wrap */
.data-table td:nth-child(2),
.dashboard-table td:nth-child(2) {
    white-space: nowrap;
}

.workflow-dropdown:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Download Modal / Contract Modal Overrides */
.download-modal {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000 !important;
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Action Grid in Details */
.action-buttons.has-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    width: 100%;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.details-view .back-btn {
    margin-bottom: 0;
}

.details-header {
    margin-top: 1rem;
}

/* Styled Inputs Class */
.token-input {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px !important;
    padding: 0.75rem 1rem !important;
    color: var(--text-main) !important;
    font-size: 0.95rem !important;
    font-family: 'Inter', sans-serif !important;
    transition: var(--transition-smooth) !important;
    width: 100%;
}

.token-input:focus {
    outline: none !important;
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition-smooth);
}

textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

/* Gestora Column Toggle */
#thGestora button {
    opacity: 0.7;
    transition: opacity 0.2s;
}

#thGestora:hover button {
    opacity: 1;
}

/* Action Button Colors in Details */
.btn-cyan {
    background: rgba(6, 182, 212, 0.1);
    color: var(--cyan);
    border: 1px solid var(--cyan);
}

.btn-cyan:hover {
    background: var(--cyan);
    color: white;
}

.btn-purple {
    background: rgba(139, 92, 246, 0.1);
    color: var(--purple);
    border: 1px solid var(--purple);
}

.btn-purple:hover {
    background: var(--purple);
    color: white;
}

.btn-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.btn-success:hover {
    background: var(--success);
    color: white;
}

.btn-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
    border: 1px solid var(--info);
}

.btn-info:hover {
    background: var(--info);
    color: white;
}

.btn-disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(1);
}

/* Custom Action Buttons - Vivid Solid Colors */
.btn-contract {
    background: linear-gradient(135deg, var(--cyan) 0%, #0891b2 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
    min-height: 50px;
}

.btn-contract:hover {
    background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%) !important;
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
}

.btn-onboarding {
    background: linear-gradient(135deg, var(--purple) 0%, #7c3aed 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    min-height: 50px;
}

.btn-onboarding:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%) !important;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.btn-facial {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    min-height: 50px;
}

.btn-facial:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.btn-assign {
    background: rgba(148, 163, 184, 0.1) !important;
    border: 1px solid var(--gray-medium) !important;
    color: var(--gray-medium) !important;
    opacity: 0.6;
    cursor: not-allowed;
    min-height: 50px;
    box-shadow: none !important;
}

/* Coming Soon Badge */
.btn-coming-soon-wrapper {
    position: relative;
    display: inline-block;
}

.coming-soon-badge {
    position: absolute;
    top: -10px;
    right: -5px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.btn-kyc-check {
    background: linear-gradient(135deg, var(--gold) 0%, #b8860b 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    min-height: 50px;
}

.btn-kyc-check:hover {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%) !important;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

.btn-download {
    background: linear-gradient(135deg, var(--info) 0%, #1d4ed8 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    min-height: 50px;
}

.btn-download:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%) !important;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.btn-ib-admin {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
    min-height: 50px;
}

.btn-ib-admin:hover {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%) !important;
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
    transform: translateY(-2px);
}