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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Navegação fixa */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 1rem 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 2rem;
    gap: 2rem;
}

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

.logo img {
    height: 45px;
    width: auto;
    max-width: 200px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: linear-gradient(45deg, #8e44ad, #9b59b6);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(142, 68, 173, 0.3);
}

/* Container principal */
.main-container {
    padding: 6rem 2rem 2rem;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Seção Protheus */
.section-protheus {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 4rem);
}

.protheus-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    animation: fadeInUp 0.8s ease-out;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.access-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    padding: 25px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.access-card:nth-child(1) { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.access-card:nth-child(2) { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.access-card:nth-child(3) { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.access-card:nth-child(4) { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.access-card:nth-child(5) { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.access-card:nth-child(6) { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); color: #2c3e50; }
.access-card:nth-child(7) { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); color: #2c3e50; }
.access-card:nth-child(8) { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); color: #2c3e50; }
.access-card:nth-child(9) { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); color: #2c3e50; }

.access-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.access-card:hover::before {
    left: 100%;
}

.access-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.access-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.access-card p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.access-url {
    font-size: 0.8rem;
    opacity: 0.8;
    word-break: break-all;
}

.status-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 12px;
    height: 12px;
    background: #2ecc71;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* Seção Broker */
.broker-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.8s ease-out;
}

.broker-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 3px solid #f0f0f0;
}

.broker-description {
    text-align: center;
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c5aa0;
    margin: 10px 0;
    padding: 8px;
    background-color: #f0f4f8;
    border-radius: 6px;
    border: 2px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #666;
    font-size: 1.2rem;
    font-weight: 300;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.stat {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.search-container {
    text-align: center;
    margin-bottom: 2rem;
}

.search-box {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 25px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    width: 100%;
    max-width: 400px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-box:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

#shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0;
}

.shortcut {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    border-left: 4px solid #FF6B6B;
}

.shortcut::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transition: left 0.4s ease;
}

.shortcut:hover::before {
    left: 0;
}

.shortcut:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

.shortcut-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    position: relative;
    z-index: 1;
}

.shortcut-title {
    position: relative;
    z-index: 1;
    margin-bottom: 0.5rem;
}

.shortcut-url {
    font-size: 0.9rem;
    color: #888;
    position: relative;
    z-index: 1;
}

/* Seção Broker Status */
.broker-status-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out;
}

.broker-status-header {
    text-align: center;
    margin-bottom: 30px;
}

.broker-status-header h1 {
    color: #2d3748;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.broker-status-header p {
    text-align: center;
    color: #718096;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.broker-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.broker-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    text-align: center;
    font-size: 16px;
}

.broker-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.broker-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #4facfe;
}

.port-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 18px;
    text-align: center;
}

.broker-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    font-size: 14px;
}

.broker-link:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.broker-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    background: #718096;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.broker-status-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 15px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #718096;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Seção Serviços Broker */
.servicos-broker-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out;
}

.servicos-broker-header {
    text-align: center;
    margin-bottom: 40px;
}

.servicos-broker-header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.servicos-broker-header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.servicos-search-box {
    position: relative;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.filter-btn {
    background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
    color: #2c3e50;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

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

.filter-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.filter-btn .count {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 8px;
    font-weight: bold;
}

.filter-btn.active .count {
    background: rgba(255, 255, 255, 0.3);
}

.servicos-search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 50px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
}

.servicos-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

.servicos-search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    font-size: 18px;
}

.servicos-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.servicos-stat-card {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.3);
}

.servicos-stat-number {
    font-size: 2rem;
    font-weight: bold;
    display: block;
}

.servicos-stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.category-section {
    margin-bottom: 40px;
}

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 3px solid #ecf0f1;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-right: 15px;
}

.category-count {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.link-card {
    background: white;
    border: 2px solid #ecf0f1;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.link-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    word-break: break-word;
}

.link-url {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 15px;
    word-break: break-all;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.buttons-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.link-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
    font-size: 0.9rem;
    min-width: 140px;
}

.link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.link-button.webapp {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.link-button.webapp:hover {
    box-shadow: 0 10px 25px rgba(46, 204, 113, 0.3);
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-size: 1.2rem;
}

.hidden {
    display: none;
}

.refresh-btn {
    position: fixed;
    bottom: 30px;
    right: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    width: 60px;
    height: 60px;
}

.refresh-btn:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
    color: #95a5a6;
    font-size: 0.9rem;
}

/* Botão flutuante para alternar seções */
.floating-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
}

.floating-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsivo */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 1rem;
        margin-left: 1rem;
    }
    
    .nav-menu a {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .logo img {
        height: 40px;
    }
    
    .nav-menu {
        gap: 0.8rem;
        justify-content: flex-start;
        margin-left: 1rem;
    }

    .nav-menu a {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .protheus-container,
    .broker-container,
    .broker-status-container,
    .servicos-broker-container {
        padding: 25px;
        margin: 10px;
    }
    
    .header h1,
    .main-title,
    .broker-status-header h1,
    .servicos-broker-header h1 {
        font-size: 2rem;
    }
    
    .access-grid,
    #shortcuts,
    .broker-status-grid,
    .links-grid {
        grid-template-columns: 1fr;
    }

    .stats,
    .broker-status-stats,
    .servicos-stats {
        gap: 1rem;
    }

    .stat,
    .servicos-stat-card {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        min-width: 120px;
    }

    .filter-buttons {
        gap: 8px;
        padding: 15px;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    .filter-btn .count {
        padding: 1px 6px;
        font-size: 0.7rem;
        margin-left: 5px;
    }

    .refresh-btn {
        bottom: 20px;
        right: 20px;
    }

    .buttons-container {
        flex-direction: column;
    }

    .link-button {
        min-width: auto;
        font-size: 0.85rem;
        padding: 10px 15px;
    }
}

/* ==============================================
   MONITOR INTERNET STYLES
   ============================================== */

.internet-monitor-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out;
}

.internet-monitor-header {
    text-align: center;
    margin-bottom: 40px;
}

.internet-monitor-header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.internet-monitor-header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Seletor de Filiais */
.branch-selector {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.branch-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2rem;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
}

.branch-card {
    background: white;
    padding: 1.5rem 1rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-left: 4px solid #667eea;
}

.branch-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transition: left 0.4s ease;
}

.branch-card:hover::before {
    left: 0;
}

.branch-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

.branch-card.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #764ba2;
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.branch-card.active::before {
    background: rgba(255, 255, 255, 0.1);
    left: 0;
}

.branch-card-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    display: block;
    position: relative;
    z-index: 1;
}

.branch-card-title {
    position: relative;
    z-index: 1;
    margin-bottom: 0.4rem;
    font-size: 1rem;
    font-weight: 600;
}

.branch-card-info {
    font-size: 0.85rem;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

.branch-info-label {
    font-weight: 600;
    margin-right: 8px;
    color: #2c3e50;
}

.branch-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.branch-provider-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.internet-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.internet-stats .stat-item {
    background: white;
    color: #2c3e50;
    padding: 1.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    transition: transform 0.3s ease;
    border-left: 4px solid #667eea;
}

.internet-stats .stat-item:hover {
    transform: translateY(-5px);
}

.internet-stats .stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #667eea;
}

.internet-stats .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    color: #6c757d;
    font-weight: 500;
}

.internet-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.internet-link-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.internet-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.link-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.link-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
    white-space: nowrap;
}

.status-good {
    background: #d4edda;
    color: #155724;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
}

.status-timeout {
    background: #e2e3e5;
    color: #383d41;
}

.status-checking {
    background: #cce7ff;
    color: #004085;
}

.link-url {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.link-latency {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 15px;
}

.link-chart-mini {
    height: 60px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    font-size: 0.8rem;
}

.chart-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.chart-container h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.chart-container canvas {
    max-height: 400px;
}

/* Responsividade para Monitor Internet */
@media (max-width: 768px) {
    .internet-monitor-header h1 {
        font-size: 2rem;
    }
    
    .internet-stats {
        gap: 1rem;
    }
    
    .internet-stats .stat-item {
        padding: 1rem 1.5rem;
        min-width: 120px;
    }
    
    .internet-stats .stat-number {
        font-size: 1.5rem;
    }
    
    .internet-links-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .link-header {
        gap: 8px;
        align-items: flex-start;
    }

    .link-name {
        font-size: 1rem;
        line-height: 1.3;
    }

    .link-status {
        font-size: 0.7rem;
        padding: 4px 10px;
        margin-top: 2px;
    }

    .link-latency {
        font-size: 1.5rem;
    }
    
    .chart-container {
        padding: 15px;
    }

    .chart-container h2 {
        font-size: 1.2rem;
    }

}

/* Estilos para estatísticas detalhadas nos cards */
.link-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(2, 1fr);
    gap: 12px 8px;
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    width: 100%;
    box-sizing: border-box;
}

.link-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    height: 24px;
    line-height: 1.2;
}

.stat-label {
    color: #6c757d;
    font-weight: 500;
    flex-shrink: 0;
    min-width: 55px;
    text-align: left;
}

.stat-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    text-align: right;
    min-width: 50px;
    flex-shrink: 0;
}

/* Destacar valores das estatísticas nos cards dos provedores */
.link-stat .stat-value {
    font-weight: 700;
    color: #667eea;
    font-size: 0.9rem;
    text-align: right;
    min-width: 50px;
    flex-shrink: 0;
}

/* Estilos de status com CSS moderno */
.uptime-good {
    color: #10b981 !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
}

.uptime-warning {
    color: #f59e0b !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(245, 158, 11, 0.2);
}

.uptime-error {
    color: #ef4444 !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(239, 68, 68, 0.2);
}

/* Efeitos modernos para os cards */
.internet-link-card {
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.internet-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.internet-link-card:hover::before {
    opacity: 1;
}

.internet-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Animações suaves para mudanças de valores */
.stat-value {
    transition: color 0.2s ease, transform 0.1s ease;
}

.stat-value:hover {
    transform: scale(1.05);
}

.view-details {
    color: #667eea;
    font-size: 0.8rem;
    text-align: center;
    font-style: italic;
}

.internet-link-card {
    cursor: pointer;
}

/* Estilos especiais para cards VPN */
.internet-link-card[data-vpn="true"] {
    background: linear-gradient(135deg, rgba(153, 102, 255, 0.1), rgba(123, 63, 228, 0.1));
    border: 1px solid rgba(153, 102, 255, 0.3);
}

.internet-link-card[data-vpn="true"]::before {
    background: linear-gradient(90deg, #9966FF, transparent);
}

.internet-link-card[data-vpn="true"] .link-name {
    color: #7b3fe4;
    font-weight: 600;
}

/* Estilo para mostrar filial nos cards */
.link-branch {
    font-size: 0.8rem;
    color: #667eea;
    font-weight: 600;
    margin: 4px 0;
    padding: 2px 8px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    display: inline-block;
}

/* Filtros de filial dentro do branch-selector */
.branch-selector .filter-buttons {
    margin: 20px 0;
    width: 100%;
    max-width: 1200px;
}

/* Espaçamento da seção de estatísticas após os filtros */
.internet-stats {
    margin-top: 30px;
}

.internet-link-card:hover .view-details {
    color: #764ba2;
    font-weight: 600;
}

/* ==============================================
   MODAL DE LOGS DETALHADOS
   ============================================== */

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

.log-modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

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

.log-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 15px 15px 0 0;
}

.log-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.log-modal-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.log-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.log-modal-body {
    padding: 30px;
}

.log-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.log-stat {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid #667eea;
}

.log-stat-label {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

.log-stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
}

.log-chart-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    height: 300px;
}

.log-history h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.log-entries {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.log-entry {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
    padding: 12px 20px;
    border-bottom: 1px solid #f1f3f4;
    font-size: 0.9rem;
    align-items: center;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry:nth-child(even) {
    background-color: #f8f9fa;
}

/* Estilos para logs em tempo real */
.log-entry-new {
    background: linear-gradient(135deg, #fff5f5, #ffe6e6) !important;
    border-left: 4px solid #dc3545 !important;
    animation: slideInFromTop 0.3s ease-out;
}

.log-entry-highlight {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb) !important;
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

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

.log-timestamp {
    color: #495057;
    font-weight: 500;
}

.log-latency {
    font-weight: 600;
    text-align: center;
    padding: 4px 8px;
    border-radius: 4px;
}

.log-latency.status-good {
    background: #d4edda;
    color: #155724;
}

.log-latency.status-warning {
    background: #fff3cd;
    color: #856404;
}

.log-latency.status-error {
    background: #f8d7da;
    color: #721c24;
}

.log-status {
    text-align: center;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    color: #6c757d;
}

/* Responsividade para modal */
@media (max-width: 768px) {
    .log-modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }
    
    .log-modal-header {
        padding: 15px 20px;
    }
    
    .log-modal-header h2 {
        font-size: 1.2rem;
    }
    
    .log-modal-body {
        padding: 20px;
    }
    
    .log-stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .log-stat {
        padding: 15px;
    }
    
    .log-stat-value {
        font-size: 1.5rem;
    }
    
    .log-chart-container {
        height: 250px;
        padding: 15px;
    }
    
    .log-entry {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
    }
    
    .log-timestamp {
        font-size: 0.8rem;
    }
    
    .link-stats {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        gap: 8px;
    }
    
    .link-stat {
        height: 22px;
    }
    
    /* Responsividade para branch cards */
    .branch-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .branch-card {
        padding: 1.2rem 1rem;
    }
    
    .branch-card-icon {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .branch-card-title {
        font-size: 0.9rem;
    }
    
    .branch-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 12px 15px;
        font-size: 0.85rem;
    }

    .branch-info-label {
        display: block;
        margin-right: 0;
        margin-bottom: 4px;
        font-size: 0.8rem;
    }

    #currentBranchName {
        display: block;
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 6px;
        word-wrap: break-word;
    }

    .branch-provider-count {
        font-size: 0.75rem;
        padding: 3px 10px;
        display: inline-block;
    }
}

/* ==============================================
   SISTEMA DE ALERTAS DISCRETO
   ============================================== */

.alert-notification {
    position: fixed;
    top: 90px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1500;
    transition: all 0.3s ease;
    animation: alertPulse 2s infinite;
}

.alert-notification:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.6);
}

@keyframes alertPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.notification-icon {
    font-size: 1.2rem;
}

.notification-badge {
    background: #fff;
    color: #ff6b6b;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

.notification-text {
    font-size: 0.9rem;
    font-weight: 600;
}

.alerts-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alerts-panel-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

.alerts-panel-header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alerts-panel-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.alerts-panel-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.alerts-panel-close {
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.alerts-panel-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.alerts-panel-body {
    padding: 20px 25px;
    max-height: 60vh;
    overflow-y: auto;
}

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

.alert-header h3 {
    color: #dc3545;
    margin: 0;
    font-size: 1.2rem;
}

.clear-alerts-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.clear-alerts-btn:hover {
    background: #5a6268;
}

.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    animation: alertSlideIn 0.3s ease-out;
}

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

.alert-critical {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.alert-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.alert-provider {
    font-weight: bold;
    font-size: 1rem;
}

.alert-message {
    font-size: 0.9rem;
    opacity: 0.9;
}

.alert-value {
    font-weight: bold;
    font-size: 1.1rem;
}

.alert-time {
    font-size: 0.8rem;
    opacity: 0.7;
    margin: 0 15px;
}

.alert-dismiss {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.alert-dismiss:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Responsividade para sistema de alertas */
@media (max-width: 768px) {
    .alert-notification {
        top: 70px;
        right: 15px;
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .notification-text {
        display: none; /* Ocultar texto em mobile */
    }
    
    .alerts-panel-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .alerts-panel-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .alerts-panel-actions {
        justify-content: center;
    }
    
    .alert-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .alert-content {
        text-align: center;
    }
    
    .alert-time {
        margin: 0;
    }
}

/* Estilos removidos - seção do gráfico agora é oculta completamente no modo "Todas as Filiais" */

/* Estilos para loading state */
.loading-message {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    margin: 20px 0;
}

.loading-content {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    max-width: 400px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    margin: 0 auto 2rem;
    animation: spin 1s linear infinite;
}

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

.loading-content h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.loading-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

.loading-stats {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.loading-stats span {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.loading-stats span:nth-child(1) {
    animation: loadingPulse 2s ease-in-out infinite;
}

.loading-stats span:nth-child(2) {
    animation: loadingPulse 2s ease-in-out infinite 0.5s;
}

.loading-stats span:nth-child(3) {
    animation: loadingPulse 2s ease-in-out infinite 1s;
}

@keyframes loadingPulse {
    0%, 100% {
        background: rgba(255, 255, 255, 0.05);
        transform: scale(1);
    }
    50% {
        background: rgba(76, 175, 80, 0.2);
        transform: scale(1.02);
    }
}

/* Responsividade para loading */
@media (max-width: 768px) {
    .loading-content {
        padding: 1.5rem;
    }
    
    .loading-spinner {
        width: 50px;
        height: 50px;
    }
    
    .loading-content h3 {
        font-size: 1.3rem;
    }
    
    .loading-content p {
        font-size: 1rem;
    }
}