/* ===== VARIÁVEIS DE CORES ROXO ===== */
:root {
    --primary-purple: #8B5CF6;
    --primary-purple-dark: #7C3AED;
    --primary-purple-light: #A78BFA;
    --primary-purple-lighter: #C4B5FD;
    --primary-purple-lightest: #EDE9FE;
    
    --secondary-blue: #6366F1;
    --accent-pink: #EC4899;
    
    --text-dark: #1F2937;
    --text-medium: #4B5563;
    --text-light: #6B7280;
    --text-lighter: #9CA3AF;
    
    --bg-white: #FFFFFF;
    --bg-gray-50: #F9FAFB;
    --bg-gray-100: #F3F4F6;
    --bg-gray-200: #E5E7EB;
    
    --border-light: #E5E7EB;
    --border-medium: #D1D5DB;
    
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-gray-50) 0%, var(--bg-white) 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.main-header {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 30px;
    border-radius: 0 0 20px 20px;
    box-shadow: var(--shadow-lg);
}

.header-content {
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 3em;
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.logo h1 {
    font-size: 2.8em;
    font-weight: 700;
    background: linear-gradient(135deg, #FFFFFF 0%, #F0F0F0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.2em;
    opacity: 0.9;
    font-weight: 300;
    margin-top: 5px;
}

/* ===== UPLOAD SECTION ===== */
.upload-section {
    margin-bottom: 40px;
}

.upload-card {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 2px dashed var(--primary-purple-lightest);
    transition: all 0.3s ease;
}

.upload-card:hover {
    border-color: var(--primary-purple-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.upload-icon {
    font-size: 3em;
    margin-bottom: 15px;
    color: var(--primary-purple);
}

.upload-card h3 {
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1.5em;
}

.upload-card p {
    color: var(--text-light);
    margin-bottom: 25px;
}

.file-input {
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    padding: 15px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-gray-50);
    transition: all 0.3s ease;
    display: block;
}

.file-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px var(--primary-purple-lightest);
}

.upload-btn {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-blue) 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-icon {
    font-size: 1.2em;
}

.file-info {
    margin-top: 20px;
    padding: 15px;
    background: var(--primary-purple-lightest);
    border-radius: 12px;
    border-left: 4px solid var(--primary-purple);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    text-align: left;
}

/* ===== LOADING ===== */
.loading-section {
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
}

.loading-content {
    text-align: center;
    padding: 60px 40px;
}

.spinner {
    border: 4px solid var(--bg-gray-200);
    border-top: 4px solid var(--primary-purple);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h3 {
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1.4em;
}

.loading-content p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    max-width: 300px;
    height: 6px;
    background: var(--bg-gray-200);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
}

.progress {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-purple), var(--secondary-blue));
    border-radius: 3px;
    animation: progressAnimation 2s ease-in-out infinite;
}

@keyframes progressAnimation {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0%); }
    100% { transform: translateX(100%); }
}

/* ===== DASHBOARD SECTIONS ===== */
.dashboard {
    animation: fadeIn 0.5s ease-out;
}

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

.section-header h2 {
    color: var(--text-dark);
    font-size: 1.8em;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: var(--bg-white);
    color: var(--primary-purple);
    border: 2px solid var(--primary-purple-light);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background: var(--primary-purple);
    color: white;
    transform: translateY(-1px);
}

/* ===== SUMMARY CARDS ===== */
.summary-section {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.summary-card {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.summary-card h3 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.summary-card p {
    opacity: 0.9;
    font-weight: 500;
    position: relative;
    font-size: 0.95em;
}

/* ===== FILTERS ===== */
.filters-section {
    background: var(--bg-white);
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.filters-section h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1.3em;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-medium);
    font-size: 14px;
}

.filter-group input,
.filter-group select {
    padding: 12px 15px;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px var(--primary-purple-lightest);
}

/* ===== RESOURCES SECTION ===== */
.resources-section {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.resource-count {
    background: var(--primary-purple-lightest);
    color: var(--primary-purple);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.resource-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-light);
}

.tab-button {
    background: var(--bg-gray-100);
    border: 2px solid transparent;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--text-medium);
    border: none;
}

.tab-button:hover {
    background: var(--primary-purple-lightest);
    color: var(--primary-purple);
    border-color: var(--primary-purple-light);
}

.tab-button.active {
    background: var(--primary-purple);
    color: white;
    border-color: var(--primary-purple);
}

.resource-content {
    max-height: 600px;
    overflow-y: auto;
    padding: 10px;
}

/* ===== CHARTS SECTION ===== */
.charts-section {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.chart-card {
    background: var(--bg-gray-50);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
}

.chart-card h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-dark);
    font-size: 1.2em;
}

/* ===== CARDS E TABELAS ===== */
.simple-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.simple-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out;
}

.simple-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-purple-light);
}

.simple-card h4 {
    margin: 0 0 15px 0;
    color: var(--text-dark);
    font-size: 15px;
    word-break: break-all;
    font-weight: 600;
}

.card-details p {
    margin: 8px 0;
    font-size: 13px;
    color: var(--text-medium);
}

.card-details strong {
    color: var(--text-dark);
}

/* ===== EBS VOLUMES STYLES ===== */
.ebs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.ebs-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

.ebs-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-purple-light);
}

.ebs-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-purple), var(--secondary-blue));
}

.ebs-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.ebs-header h4 {
    margin: 0;
    color: var(--text-dark);
    font-size: 14px;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    flex: 1;
    margin-right: 10px;
}

.volume-type {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.volume-type.gp3 {
    background: var(--primary-purple-lightest);
    color: var(--primary-purple-dark);
    border: 1px solid var(--primary-purple-lighter);
}

.volume-type.gp2 {
    background: #E8F5E8;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

.volume-type.io1, .volume-type.io2 {
    background: #FFF3E0;
    color: #EF6C00;
    border: 1px solid #FFE0B2;
}

.ebs-details {
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 0;
}

.detail-row .label {
    font-weight: 600;
    color: var(--text-medium);
    font-size: 12px;
}

.detail-row .value {
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 500;
}

.az-badge {
    background: var(--bg-gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    border: 1px solid var(--border-medium);
}

.status-in-use {
    color: var(--success);
    font-weight: 600;
}

.status-available {
    color: var(--warning);
    font-weight: 600;
}

.status-error, .status-failed {
    color: var(--error);
    font-weight: 600;
}

.warning {
    color: var(--warning);
    font-weight: 600;
}

.tags-section {
    border-top: 1px solid var(--border-light);
    padding-top: 15px;
    margin-bottom: 15px;
}

.tags-label {
    font-weight: 600;
    color: var(--text-medium);
    font-size: 12px;
    margin-bottom: 8px;
}

.tags-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 120px;
    overflow-y: auto;
}

.tag {
    display: flex;
    align-items: center;
    background: var(--bg-gray-50);
    padding: 4px 8px;
    border-radius: 4px;
    border-left: 3px solid var(--primary-purple);
    font-size: 11px;
}

.tag-key {
    font-weight: 600;
    color: var(--text-medium);
    margin-right: 4px;
    min-width: 80px;
}

.tag-value {
    color: var(--text-dark);
    word-break: break-word;
    flex: 1;
}

.ebs-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    padding-top: 12px;
    font-size: 11px;
    color: var(--text-light);
}

.ebs-footer .region {
    background: var(--primary-purple);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.ebs-footer .created {
    font-style: italic;
}

/* ===== TABELAS ===== */
.resource-table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    margin-top: 20px;
}

.resource-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 800px;
}

.resource-table th {
    background: var(--primary-purple);
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.resource-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-dark);
}

.resource-table tr:hover {
    background: var(--primary-purple-lightest);
}

/* ===== STATUS BADGES ===== */
.status-active {
    color: var(--success);
    font-weight: 600;
    background: #F0FFF4;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
}

.status-inactive {
    color: var(--error);
    font-weight: 600;
    background: #FED7D7;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
}

.status-pending {
    color: var(--warning);
    font-weight: 600;
    background: #FEF3C7;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
}

.region-badge {
    background: var(--primary-purple);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* ===== FOOTER ===== */
.main-footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: 25px 0;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info p {
    color: var(--text-medium);
    font-size: 14px;
    margin-bottom: 5px;
}

.footer-info span {
    font-weight: 600;
    color: var(--primary-purple);
}

.footer-credits p {
    color: var(--text-light);
    font-size: 13px;
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .logo h1 {
        font-size: 2.2em;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .filters {
        grid-template-columns: 1fr;
    }
    
    .resource-tabs {
        justify-content: center;
    }
    
    .tab-button {
        flex: 1;
        text-align: center;
        min-width: 140px;
    }
    
    .simple-cards,
    .ebs-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .upload-card {
        padding: 25px 20px;
    }
    
    .charts-container {
        gap: 20px;
    }
    
    .chart-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 30px 0;
    }
    
    .logo h1 {
        font-size: 1.8em;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .resource-table {
        font-size: 12px;
    }
    
    .resource-table th,
    .resource-table td {
        padding: 8px 10px;
    }
    
    .upload-card {
        padding: 20px 15px;
    }
}

/* ===== SCROLLBAR PERSONALIZADO ===== */
.resource-content::-webkit-scrollbar,
.tags-container::-webkit-scrollbar {
    width: 6px;
}

.resource-content::-webkit-scrollbar-track,
.tags-container::-webkit-scrollbar-track {
    background: var(--bg-gray-100);
    border-radius: 3px;
}

.resource-content::-webkit-scrollbar-thumb,
.tags-container::-webkit-scrollbar-thumb {
    background: var(--primary-purple-light);
    border-radius: 3px;
}

.resource-content::-webkit-scrollbar-thumb:hover,
.tags-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-purple);
}