:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.3);
    --secondary: #818cf8;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --glass-bg: rgba(15, 23, 42, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    background-image:
        radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(129, 140, 248, 0.15) 0px, transparent 50%);
    min-height: 100vh;
}

h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
}

.app-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem;
}

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

header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    border-color: rgba(56, 189, 248, 0.3);
}

.chart-container {
    height: 300px;
}

.process-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    table-layout: auto;
}

.process-table th:nth-child(1) {
    width: 220px;
}

.process-table th:nth-child(3) {
    width: 280px;
}

.process-table th:nth-child(4) {
    width: 150px;
}

.process-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 1px solid var(--border);
}

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

.no-wrap {
    white-space: nowrap !important;
}

.process-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-pago {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-liberado {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-aguardando {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-parcial {
    background: rgba(20, 184, 166, 0.2);
    color: #14b8a6;
    border: 1px solid rgba(20, 184, 166, 0.3);
}

.badge-resgate {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.issue-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    margin-right: 0.5rem;
    box-shadow: 0 0 8px var(--danger);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-color);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 1.5rem;
    border: 1px solid var(--glass-border);
    padding: 2rem;
    overflow-y: auto;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.5rem;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.nested-list {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.audit-issue {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
}