:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-primary: #10b981;
    --accent-secondary: #22d3ee;
    --accent-gradient: linear-gradient(135deg, #10b981, #22d3ee);
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-glow: 0 0 40px rgba(16, 185, 129, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* LOGIN PAGE */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
        var(--bg-primary);
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-glow);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* Password Toggle */
.password-wrapper {
    position: relative !important;
    width: 100% !important;
    display: block !important;
}

.password-wrapper input {
    width: 100% !important;
    padding-right: 50px !important;
}

.toggle-password {
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 0;
    margin: 0;
    width: 24px;
    height: 24px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
    z-index: 10;
}

.toggle-password:hover {
    color: var(--accent-primary);
}

.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: #000;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0.8;
    pointer-events: none;
    cursor: wait;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 14px;
    text-align: center;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* DASHBOARD PAGE */
.dashboard-container {
    min-height: 100vh;
    background: var(--bg-primary);
}

.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 20px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-name {
    color: var(--text-secondary);
    font-size: 14px;
}

.btn-logout {
    padding: 8px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    color: #ef4444;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
}

.main-content {
    padding: 32px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* STATS CARDS */
/* STATS CARDS */
.stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex: 1 1 250px;
    max-width: 350px;
}

.stat-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    border-color: var(--accent-primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-break: break-word;
}

.stat-icon {
    font-size: 24px;
    margin-bottom: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.15));
    border-radius: 12px;
    margin-left: auto;
    margin-right: auto;
}

.stat-icon i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Highlight styles removed for consistency */

/* DATA TABLE */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.table-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.table-info {
    font-size: 13px;
    color: var(--text-muted);
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

thead {
    background: var(--bg-secondary);
}

th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--bg-card-hover);
}

/* Responsivo - Tablet */
@media (max-width: 992px) {
    .table-header {
        padding: 16px 20px;
    }

    th,
    td {
        padding: 12px 10px;
        font-size: 12px;
    }

    table {
        min-width: 500px;
    }
}

/* Responsivo - Mobile */
@media (max-width: 576px) {
    .table-container {
        border-radius: var(--radius-md);
    }

    .table-header {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .table-header h2 {
        font-size: 16px;
    }

    th,
    td {
        padding: 10px 8px;
        font-size: 11px;
    }

    table {
        min-width: 400px;
    }

    .table-scroll {
        max-height: 400px;
        overflow-y: auto;
    }
}

tbody tr:hover td {
    color: var(--text-primary);
}

/* Total Row Styling */
.total-row {
    background: rgba(16, 185, 129, 0.1);
    font-weight: 600;
}

.total-row td {
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-primary);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .login-card {
        padding: 32px 24px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .navbar {
        padding: 12px 16px;
    }

    .navbar-brand {
        font-size: 18px;
    }

    .main-content {
        padding: 20px 16px;
    }

    .page-header h1 {
        font-size: 22px;
    }

    .stats-grid {
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 24px;
    }

    .table-header {
        padding: 16px;
    }

    th,
    td {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .navbar-user {
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }

    .user-name {
        display: none;
    }

    .navbar-brand {
        font-size: 16px;
    }

    .btn-logout {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* CLICKABLE CARDS */
.stat-card.clickable {
    cursor: pointer;
}

.stat-card.clickable:active {
    transform: scale(0.98);
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 500px;
    width: 100%;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-secondary);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-right: 40px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-title i {
    margin-right: 8px;
}

.modal-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.modal-description i {
    color: var(--accent-primary);
    margin-right: 4px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.btn-confirm,
.btn-cancel {
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 14px;
}

.btn-confirm {
    background: var(--accent-gradient);
    color: white;
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-cancel {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-cancel:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.modal-description strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Modal Responsivo */
@media (max-width: 576px) {
    .modal-content {
        padding: 24px;
        margin: 10px;
    }

    .modal-title {
        font-size: 18px;
    }

    .modal-description {
        font-size: 14px;
    }
}

/* UPLOAD BUTTON */
.btn-upload {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 10px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    transition: var(--transition);
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-upload i {
    font-size: 16px;
}



/* Upload Message */
.upload-message {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.upload-message.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.upload-message.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Header File Indicator */
.header-file-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--accent-primary);
    font-size: 14px;
    margin-right: 12px;
}

.header-file-indicator i {
    font-size: 16px;
}

.header-file-indicator span {
    font-weight: 500;
}

.btn-remove-file {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
}

.btn-remove-file:hover {
    background: rgba(239, 68, 68, 1);
    color: white;
}

@media (max-width: 576px) {
    .header-file-indicator span {
        display: none;
    }

    .header-file-indicator {
        padding: 8px;
        gap: 8px;
    }
}

/* Responsive Upload */
/* Mobile Optimizations */
@media (max-width: 576px) {

    /* Cards Compactos (2 colunas) */
    /* Cards Compactos (2 colunas) */
    .stat-card {
        padding: 12px;
        flex: 1 1 140px;
    }

    .stat-value {
        font-size: 18px;
        margin-top: 4px;
        word-break: break-word;
    }

    .stat-label {
        font-size: 11px;
        line-height: 1.2;
    }

    .stat-icon i {
        font-size: 20px;
        margin-bottom: 8px;
    }
}

/* REPORT SELECTOR */
.report-selector {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    animation: fadeInUp 0.4s ease-out;
}

.report-selector-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-selector-label i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.report-selector-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.report-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.report-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.report-btn.active {
    background: rgba(16, 185, 129, 0.12);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    font-weight: 600;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

.report-btn.active i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.report-btn i {
    font-size: 13px;
}

@media (max-width: 576px) {
    .report-selector {
        padding: 16px;
    }

    .report-selector-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .report-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-color);
    margin: 40px auto;
    max-width: 600px;
}

.empty-state i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: block;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 16px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state button i {
    font-size: 16px;
    color: white;
    margin-bottom: 0;
    display: inline-block;
}