:root {
    --primary: #0190bb;
    --primary-dark: #0e2c52;
    --text: #18324a;
    --muted: #6b7c8d;
    --bg-light: #f5f8fb;
    --white: #ffffff;
    --border: #dbe4ec;
    --shadow: 0 8px 28px rgba(0, 57, 102, 0.08);
    --radius: 16px;
    --container: 1240px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Comfortaa", cursive, sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.5;
}

.container {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

/* HEADER */
.site-header {
    background: linear-gradient(rgba(5, 39, 74, 0.55), rgba(5, 39, 74, 0.55)),
        url('https://www.bluepharmagroup.com/storage/app/media/banner-lab-3.jpg') center/cover no-repeat;
    color: var(--white);
    min-height: 520px;
}

.topbar {
    background: rgba(255, 255, 255, 0.96);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 84px;
    gap: 20px;
}

.logo-text {
    text-decoration: none;
    color: var(--primary);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.main-nav {
    display: flex;
    gap: 28px;
}

.main-nav a,
.mobile-nav a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.main-nav a:hover,
.mobile-nav a:hover {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    border: none;
    background: none;
    color: var(--primary);
    font-size: 1.8rem;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 12px 16px 18px;
    gap: 12px;
}

.hero {
    display: flex;
    align-items: center;
    min-height: 436px;
}

.hero-content {
    padding: 64px 0;
}

.hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 14px;
    opacity: 0.95;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.05;
    margin-bottom: 18px;
}

.hero-text {
    font-size: 1.08rem;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 28px;
}

.hero-btn {
    display: inline-block;
    padding: 14px 24px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    border-radius: 999px;
    transition: 0.25s ease;
}

.hero-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* FILTERS */
.filters-section {
    margin-top: -58px;
    position: relative;
    z-index: 5;
}

.filters-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.filters-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
}

.filter-group label {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.filter-group input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 14px;
    font-size: 1rem;
    outline: none;
    transition: 0.2s ease;
}

.filter-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.1);
}

.results-bar {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
}

/* TABLE */
.table-section {
    padding: 30px 0 60px;
}

.table-wrapper {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--primary);
    color: var(--white);
}

th,
td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th {
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tbody tr:hover {
    background: #f8fbfe;
}

td {
    font-size: 0.98rem;
}

.first-col {
    font-weight: 700;
    color: var(--primary-dark);
}

.empty-state {
    padding: 32px;
    text-align: center;
    color: var(--muted);
}

.filter-group select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 14px;
    font-size: 1rem;
    outline: none;
    background: #fff;
    font-family: "Comfortaa", sans-serif;
}

#excelTable th {
    cursor: pointer;
    user-select: none;
}

#excelTable th:hover {
    background: rgba(0, 0, 0, 0.05);
}

#excelTable th.sort-asc::after {
    content: " ▲";
    font-size: 0.7rem;
}

#excelTable th.sort-desc::after {
    content: " ▼";
    font-size: 0.7rem;
}

.filter-group select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 14px;
    font-size: 1rem;
    outline: none;
    background: #fff;
    font-family: "Comfortaa", sans-serif;
    color: var(--text);
    transition: 0.2s ease;
}

.filter-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 149, 195, 0.12);
}

.filters-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
}

.table-wrapper {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-scroll-top {
    overflow-x: auto;
    overflow-y: hidden;
    height: 18px;
    background: #f3f7fa;
    border-bottom: 1px solid #e7edf2;
}

.table-scroll-top-inner {
    height: 1px;
}

.table-scroll-main {
    overflow-x: auto;
    overflow-y: visible;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1400px;
}

#excelTable td,
#excelTable th {
    overflow-wrap: anywhere;
}

@media (max-width: 768px) {
    .table-scroll-top {
        display: none;
    }

    .table-scroll-main {
        overflow-x: visible;
    }

    table {
        min-width: unset;
    }
}

/* MOBILE TABLE */
@media (max-width: 900px) {
    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .site-header {
        min-height: auto;
    }

    .hero {
        min-height: 360px;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead {
        display: none;
    }

    .table-wrapper {
        overflow: visible;
        box-shadow: none;
        background: transparent;
    }

    tbody tr {
        background: var(--white);
        border-radius: 14px;
        box-shadow: var(--shadow);
        padding: 10px 0;
        margin-bottom: 16px;
    }

    td {
        border: none;
        border-bottom: 1px solid #eef3f7;
        position: relative;
        padding: 12px 16px 12px 48%;
        min-height: 48px;
    }

    td:last-child {
        border-bottom: none;
    }

    td::before {
        content: attr(data-label);
        position: absolute;
        left: 16px;
        top: 12px;
        width: 42%;
        font-weight: 700;
        color: var(--text);
    }
}

@media (max-width: 768px) {
    .table-scroll-top {
        display: none;
    }

    .table-scroll-main {
        overflow-x: visible;
    }

    table {
        min-width: unset;
    }

    thead {
        display: none;
    }

    table,
    tbody,
    tr,
    td {
        display: block;
        width: 100%;
    }

    tbody tr {
        border-bottom: 1px solid #e7edf2;
        padding: 10px 0;
        background: #fff;
        border-radius: 14px;
        margin-bottom: 16px;
        box-shadow: var(--shadow);
    }

    td {
        border-bottom: none;
        white-space: normal;
        position: relative;
        padding: 10px 14px 10px 46%;
        min-height: 44px;

        /* o mais importante */
        overflow-wrap: anywhere;
        word-break: break-word;
        hyphens: auto;
    }

    td::before {
        content: attr(data-label);
        position: absolute;
        top: 10px;
        left: 14px;
        width: 40%;
        font-weight: 700;
        color: var(--text);

        /* também deixar o label partir */
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

@font-face {
    font-family: 'Comfortaa';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url(https://fonts.gstatic.com/l/font?kit=1Pt_g8LJRfWJmhDAuUsSQamb1W0lwk4S4TbMPrc&skey=45c59603efbe20e8&v=v47) format('woff');
}