:root {
    /* Paleta de cinza completa - do claro ao escuro */
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --black: #000000;
    --white: #ffffff;
    
    /* Cores principais */
    --primary-color: var(--gray-700);
    --primary-hover: var(--gray-800);
    --secondary-color: var(--gray-600);
    --success-color: var(--gray-600);
    --warning-color: var(--gray-700);
    --danger-color: var(--gray-800);
    --background-color: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-300) 100%);
    --surface-color: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-400) 100%);
    --text-primary: var(--black);
    --text-secondary: var(--gray-700);
    --border-color: var(--gray-300);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -4px rgba(0, 0, 0, 0.15);
    --khaki-light: var(--gray-500);
    --khaki-medium: var(--gray-600);
    --khaki-dark: var(--gray-700);
    --dashboard-card-bg: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    --dashboard-card-border: var(--gray-400);
    --dashboard-card-shadow: rgba(0, 0, 0, 0.1);
}

/* Timeline Styles */
.timeline-container {
    background-color: var(--white);
    border-radius: 8px;
    padding: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.filters-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.filters-row .control-group {
    margin-bottom: 0;
}

.flex-1 {
    flex: 1;
}

.flex-2 {
    flex: 2;
}

/* Zoom and Navigation Row */
.zoom-navigation-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.zoom-navigation-row .control-group {
    margin-bottom: 0;
}

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3a8a;
}

.badge {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 800;
    min-width: 40px;
    text-align: center;
}

/* Navigation */
.nav-tabs {
    background: var(--white);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1rem;
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.nav-tab {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.nav-tab:hover {
    color: var(--text-primary);
    background: var(--gray-100);
}

.nav-tab.active {
    color: var(--gray-800);
    border-bottom-color: var(--gray-800);
    background: var(--gray-200);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Sections */
.dashboard-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.stats-grid-general {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.stats-grid-terminals {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.stat-card {
    background: var(--dashboard-card-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px var(--dashboard-card-shadow);
    border: 1px solid var(--dashboard-card-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--dashboard-card-shadow);
}

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d87cf, #092aa1);
    border-radius: 12px;
    color: white;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #64748b;
    font-weight: 500;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.chart-card {
    background: var(--dashboard-card-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px var(--dashboard-card-shadow);
    border: 1px solid var(--dashboard-card-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--dashboard-card-shadow);
}

.chart-card h3 {
    color: #1e3a8a;
    margin-bottom: 1rem;
    font-weight: 600;
}

.chart-container {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    color: var(--gray-800);
    font-size: 1.75rem;
    font-weight: 600;
}

/* Terminals Counter */
.terminals-counter {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    text-align: center;
}

.terminals-counter span {
    color: #475569;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.terminals-counter span::before {
    content: '📊';
    font-size: 1rem;
}

/* Timeline Events Counter */
.timeline-events-counter {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    text-align: center;
}

.timeline-events-counter span {
    color: #475569;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-events-counter span::before {
    content: '📅';
    font-size: 1rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #1e3a8a;
    border: 1px solid rgba(30, 58, 138, 0.2);
}

.btn-secondary:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn .icon {
    font-size: 1.1rem;
    font-weight: bold;
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select,
.search-input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.search-input {
    min-width: 250px;
}

.filter-select:focus,
.search-input:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Lists */
.operations-list,
.terminals-list {
    display: grid;
    gap: 1rem;
}

.operation-card,
.terminal-card {
    background: var(--surface-color);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.operation-card:hover,
.terminal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.operation-header,
.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.operation-title,
.terminal-number {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e3a8a;
}

.operation-actions,
.terminal-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.operation-info,
.terminal-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-weight: 600;
    color: #1e3a8a;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-active {
    background: var(--gray-700);
    color: var(--white);
}

.status-inactive {
    background: var(--gray-500);
    color: var(--white);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 999;
    display: none;
}

.modal-overlay.active {
    display: block;
}

.modal-content {
    background: var(--surface-color);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    animation: modalSlideIn 0.3s ease;
}

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

@keyframes modalSlideIn {
    from { transform: translateY(-50px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    color: #1e3a8a;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #1e3a8a;
}

/* Forms */
form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--white);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gray-600);
    box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.2);
}

.checkbox-group {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0.5rem !important;
    width: 100% !important;
}

.checkbox-label {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    color: #374151 !important;
    padding: 0.5rem !important;
    border-radius: 6px !important;
    transition: background-color 0.2s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

.checkbox-label:hover {
    background-color: #f8fafc;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
    visibility: hidden;
}

.checkmark {
    width: 24px !important;
    height: 24px !important;
    border: 2px solid #d1d5db !important;
    border-radius: 6px !important;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: inline-block !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #1e3a8a !important;
    border-color: #1e3a8a !important;
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.2) !important;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: bold !important;
    display: block !important;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .app-title {
        font-size: 1.25rem;
    }
    
    .nav-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-tab {
        white-space: nowrap;
        min-width: 120px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .search-input {
        min-width: auto;
    }
    
    .operation-header,
    .terminal-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .operation-actions,
    .terminal-actions {
        align-self: flex-start;
    }
    
    .operation-info,
    .terminal-info {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem 0.5rem;
    }
    
    .stat-card,
    .operation-card,
    .terminal-card {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #64748b;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #1e3a8a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

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

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.empty-state p {
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.hidden { display: none; }
.visible { display: block; }

/* Privacy Banner */
.privacy-banner {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
    position: relative;
    z-index: 100;
}

.privacy-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.privacy-banner-text {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.privacy-banner-text i {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

.privacy-banner-text span {
    font-size: 0.95rem;
    line-height: 1.4;
}

.privacy-banner-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.privacy-banner-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.privacy-banner.hidden {
    display: none;
}

@media (max-width: 768px) {
    .privacy-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .privacy-banner-text {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .privacy-banner-text span {
        font-size: 0.9rem;
    }
}

/* Footer */
.app-footer {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-top: 3rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.developer-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.developer-info strong {
    color: var(--text-primary);
    font-weight: 600;
}

.linkedin-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #0077b5;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 119, 181, 0.3);
}

.linkedin-link:hover {
    background: #005885;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.4);
}

.linkedin-icon {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .developer-info {
        font-size: 0.8rem;
    }
}

/* Estilos para gráficos de barras verticais */
.vertical-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-evenly;
    height: 220px;
    padding: 1.5rem 1rem;
    gap: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    margin: 0.5rem 0;
}

.vertical-bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    min-width: 60px;
    max-width: 120px;
    height: 100%;
    position: relative;
}

.vertical-bar-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
    min-height: 1.25rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    order: -1;
}

.vertical-bar {
    width: 100%;
    min-width: 24px;
    min-height: 8px;
    border-radius: 6px 6px 2px 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.vertical-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
    border-radius: 6px 6px 0 0;
}

.vertical-bar:hover {
    transform: scaleY(1.08) scaleX(1.02);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
}

.vertical-bar-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    line-height: 1.1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 2px;
    min-height: 1rem;
    order: 1;
}

.vertical-bar-percentage {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.25rem;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    order: 2;
}

/* Media queries para gráficos verticais */
@media (max-width: 768px) {
    .vertical-chart {
        height: 200px;
        padding: 1rem 0.5rem;
        gap: 0.5rem;
    }
    
    .vertical-bar-container {
        min-width: 50px;
        max-width: 80px;
    }
    
    .vertical-bar-value {
        font-size: 0.8rem;
    }
    
    .vertical-bar-label {
        font-size: 0.65rem;
        margin-top: 0.5rem;
        margin-bottom: 0.4rem;
    }
    
    .vertical-bar-percentage {
        font-size: 0.65rem;
        padding: 1px 4px;
    }
}

@media (max-width: 480px) {
    .vertical-chart {
        height: 180px;
        padding: 0.75rem 0.25rem;
        gap: 0.25rem;
    }
    
    .vertical-bar-container {
        min-width: 40px;
        max-width: 60px;
    }
    
    .vertical-bar-value {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .vertical-bar-label {
        font-size: 0.6rem;
        margin-top: 0.5rem;
        margin-bottom: 0.4rem;
        line-height: 1;
    }
    
    .vertical-bar-percentage {
        font-size: 0.6rem;
        padding: 1px 3px;
    }
    
    .vertical-bar {
        min-width: 20px;
    }
}

/* Vinculos Styles */
.vinculos-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
}

.control-group label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.vinculos-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--dashboard-card-bg);
    border: 1px solid var(--dashboard-card-border);
    border-radius: 12px;
    box-shadow: 0 2px 4px var(--dashboard-card-shadow);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.vinculos-graph-container {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    min-height: 600px;
    height: 600px;
    position: relative;
    width: 100%;
}

.vinculos-graph-container .vis-network {
    width: 100% !important;
    height: 100% !important;
    border-radius: 12px;
}

/* Vinculo Modal Styles */
#vinculoModal .form-group {
    margin-bottom: 1rem;
}

#vinculoModal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

#vinculoModal select,
#vinculoModal input,
#vinculoModal textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

#vinculoModal select:focus,
#vinculoModal input:focus,
#vinculoModal textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(73, 80, 87, 0.1);
}

#vinculoFrequency {
    width: 100%;
    margin-bottom: 0.5rem;
}

#frequencyValue {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Color controls styles */
#vinculoCustomColor {
    width: 60px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

#vinculoCustomColor:hover {
    border-color: var(--primary-color);
}

#customColorGroup {
    transition: all 0.3s ease;
    min-width: 80px;
}

.filter-select {
    min-width: 150px;
}

/* Color scheme indicators */
.color-scheme-preview {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

.color-dot.type-chamada { background-color: #e74c3c; }
.color-dot.type-sms { background-color: #3498db; }
.color-dot.type-whatsapp { background-color: #2ecc71; }
.color-dot.type-pix { background-color: #f39c12; }
.color-dot.type-outros { background-color: #9b59b6; }

/* Responsive adjustments for vinculos */
@media (max-width: 768px) {
    .vinculos-controls {
        flex-direction: column;
    }
    
    .vinculos-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .vinculos-graph-container {
        min-height: 400px;
        height: 400px;
    }
    
    .vinculos-graph-container .vis-network {
        height: 100% !important;
    }
}

/* Estilos para Grid de Vínculos */
.vinculos-grid-section {
    margin: 1.5rem 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.vinculos-grid-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.vinculos-grid-section h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.vinculos-grid-container {
    margin-top: 1rem;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.875rem;
}

.data-table thead {
    background: var(--gray-100);
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table th {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table tbody tr:hover {
    background: var(--gray-100);
}

.data-table tbody tr:nth-child(even) {
    background: rgba(248, 249, 250, 0.5);
}

.data-table tbody tr:nth-child(even):hover {
    background: var(--gray-100);
}

.data-table .actions-cell {
    white-space: nowrap;
}

.data-table .actions-cell .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

.data-table .type-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.data-table .type-badge.chamada {
    background: #e3f2fd;
    color: #1565c0;
}

.data-table .type-badge.sms {
    background: #f3e5f5;
    color: #7b1fa2;
}

.data-table .type-badge.whatsapp {
    background: #e8f5e8;
    color: #2e7d32;
}

.data-table .type-badge.pix {
    background: #fff3e0;
    color: #ef6c00;
}

.data-table .type-badge.outros {
    background: var(--gray-200);
    color: var(--gray-700);
}

.data-table .frequency-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--gray-200);
    color: var(--gray-700);
}

.data-table .terminal-info {
    font-weight: 500;
    color: var(--text-primary);
}

.data-table .notes-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table .date-cell {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Navigation Controls */
.navigation-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.navigation-controls .btn {
    min-width: 40px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.navigation-controls .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.navigation-controls .btn i {
    font-size: 14px;
}

@media (max-width: 768px) {
    .vinculos-grid-section .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .data-table {
        font-size: 0.75rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
    
    .data-table .notes-cell {
        max-width: 150px;
    }
    
    .navigation-controls {
        justify-content: center;
    }
    
    .navigation-controls .btn {
        min-width: 36px;
        height: 32px;
    }
}

/* Range control styles */
.range-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.range-control input[type="range"] {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.range-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.range-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.range-control span {
    min-width: 60px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    background: var(--white);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}