/* ===========================
   HISTÓRICO - ESTILOS PADRÃO
   =========================== */

/* Reutiliza estilos do Projeto.css - apenas adiciona customizações */

/* Estilos de Navegação */
.nav-desktop {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-link {
    text-decoration: none;
    color: white;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: background-color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    background-color: #15803d;
}

.nav-link.active {
    background-color: #15803d;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: white;
    border-radius: 2px;
}

.nav-user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.nav-user-name {
    color: white;
    font-weight: 500;
}

.btn-logout {
    background-color: #dc2626;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-logout:hover {
    background-color: #b91c1c;
}

.btn-login {
    background-color: white;
    color: #16a34a;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: #f0fdf4;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background-color: #0c5e29;
}

.mobile-nav a {
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #115e2c;
    transition: background-color 0.3s;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    background-color: #115e2c;
}

.hero {
    position: relative;
    height: 400px;
    background-image: url("../images/fundo de planta 1.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.25rem;
    color: rgb(94, 92, 92);
    line-height: 1.6;
}

/* Features Grid - Estatísticas */
.features {
    background-color: #115e2c;
    padding: 4rem 0;
    color: white;
}

.features .section-header h2 {
    color: #f6fffa;
}

.features .section-header p {
    color: #e0f3e2;
}

.features .feature-card {
    background-color: #e0f3e2;
    color: #115e2c;
    text-align: center;
    padding: 2rem 1.5rem;
}

.features .feature-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    transform: translateY(-8px);
    background-color: #d1fae5;
}

.features .feature-icon svg {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    stroke: #16a34a;
}

.features .feature-card h3 {
    color: #115e2c;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #16a34a;
    margin-top: 0.5rem;
}

/* History Section */
.history-section {
    padding: 4rem 0;
    background-color: #115e2c;
    color: white;
}

.history-section .section-header h2 {
    color: #f6fffa;
}

.history-section .section-header p {
    color: #e0f3e2;
}

.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-filter,
.btn-download {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-filter {
    background-color: #e0f3e2;
    color: #115e2c;
}

.btn-filter:hover {
    background-color: #d1fae5;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-download {
    background-color: #16a34a;
    color: white;
}

.btn-download:hover {
    background-color: #15803d;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Filter Panel */
.filter-panel {
    color: #000000; /* texto preto */
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.filter-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    color: #000000;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-group select,
.filter-group input {
    padding: 0.75rem;
    border: 1px solid #ffffff;
    border-radius: 0.375rem;
    background-color: #ffffff;
    color: #1a1a1a;
    font-size: 0.9rem;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #e0f3e2;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.filter-actions {
    display: flex;
    gap: 1rem;
}

.btn-apply {
    padding: 0.75rem 1.5rem;
    background-color: #16a34a;
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-apply:hover {
    background-color: #15803d;
}

.btn-clear {
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: #e0f3e2;
    border: 1px solid #e0f3e2;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    background-color: #e0f3e2;
    color: #0c5e29;
}

/* History Table */
.history-table-wrapper {
    background-color: #024925;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

.history-container {
    padding: 1.5rem;
}

.history-item {
    padding: 1.5rem;
    border-bottom: 1px solid #024925;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: background-color 0.3s ease;
}

.history-item:hover {
    background-color: #02351b;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: #024925;
    color: #024925;
    border-radius: 50%;
    flex-shrink: 0;
}

.history-item-content {
    flex: 1;
}

.history-item-title {
    font-weight: 600;
    color: #115e2c;
    margin-bottom: 0.25rem;
}

.history-item-description {
    font-size: 0.9rem;
    color: #666;
}

.history-item-time {
    color: #999;
    font-size: 0.85rem;
    white-space: nowrap;
}

.history-item-details {
    text-align: right;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background-color: #f0fdf4;
    border-radius: 0.75rem;
}

.empty-state i {
    font-size: 3rem;
    color: #16a34a;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #115e2c;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #666;
}

/* Prontuários Table */
.prontuarios-table-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.prontuarios-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.prontuarios-table thead {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
}

.prontuarios-table th {
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.prontuarios-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
    vertical-align: top;
}

.prontuarios-table tbody tr {
    transition: all 0.3s ease;
}

.prontuarios-table tbody tr:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.prontuarios-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.prontuarios-table tbody tr:nth-child(even):hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.prontuarios-table tbody tr:last-child td {
    border-bottom: none;
}

/* Data column - make it more prominent */
.prontuarios-table td:first-child {
    font-weight: 600;
    color: #16a34a;
    font-size: 0.9rem;
}

/* Queixa column - limit width and add ellipsis */
.prontuarios-table td:nth-child(2) {
    max-width: 300px;
    word-wrap: break-word;
    line-height: 1.5;
}

/* Recomendação column - limit width and add ellipsis */
.prontuarios-table td:nth-child(3) {
    max-width: 400px;
    word-wrap: break-word;
    line-height: 1.5;
    font-style: italic;
    color: #4b5563;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background-color: #16a34a;
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #15803d;
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: white;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-nav.open {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .filter-content {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-item-details {
        text-align: left;
        width: 100%;
    }

    .btn-filter,
    .btn-download {
        width: 100%;
        justify-content: center;
    }

    .pagination {
        gap: 1rem;
    }

    .pagination-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }

    .filter-bar {
        gap: 0.5rem;
    }

    .btn-filter,
    .btn-download {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}



 /* ========== HAMBÚRGUER BUTTON ========== */
        .hamburger-btn {
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 5px;
            width: 40px;
            height: 40px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 6px;
            border-radius: 8px;
            transition: background 0.15s;
        }
        .hamburger-btn:hover {
            background: rgba(255,255,255,0.15);
        }
        .bar {
            display: block;
            width: 22px;
            height: 2px;
            background: #fff;
            border-radius: 2px;
            transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                        opacity 0.25s ease,
                        width 0.3s ease;
            transform-origin: center;
        }
        .hamburger-btn.open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
        .hamburger-btn.open .bar:nth-child(2) { opacity: 0; width: 0; }
        .hamburger-btn.open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

        /* ========== OVERLAY ========== */
        .nav-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0);
            pointer-events: none;
            transition: background 0.35s ease;
            z-index: 1100;
        }
        .nav-overlay.visible {
            background: rgba(0,0,0,0.4);
            pointer-events: all;
        }

        /* ========== SIDEBAR ========== */
        .side-nav {
            position: fixed;
            top: 0;
            left: 0;
            width: 280px;
            height: 100%;
            background: #fff;
            border-right: 1px solid rgba(0,0,0,0.08);
            box-shadow: 4px 0 24px rgba(0,0,0,0.12);
            transform: translateX(-100%);
            transition: transform 0.38s cubic-bezier(0.23, 1, 0.32, 1);
            z-index: 1200;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .side-nav.open { transform: translateX(0); }

        .side-nav-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 18px 12px;
            border-bottom: 1px solid rgba(0,0,0,0.07);
            flex-shrink: 0;
            background: #0b4e23;
        }
        .side-nav-logo {
            height: 52px;
            width: auto;
        }
        .side-close-btn {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            border: none;
            background: rgba(255,255,255,0.15);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-size: 22px;
            line-height: 1;
            transition: background 0.15s;
        }
        .side-close-btn:hover { background: rgba(255,255,255,0.3); }

        .side-nav-links {
            flex: 1;
            padding: 12px;
            overflow-y: auto;
        }

        .side-nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 11px 12px;
            border-radius: 8px;
            font-size: 15px;
            color: #444;
            cursor: pointer;
            text-decoration: none;
            opacity: 0;
            transform: translateX(-16px);
            transition: background 0.15s, color 0.15s, opacity 0.3s ease, transform 0.3s ease;
        }
        .side-nav.open .side-nav-item { opacity: 1; transform: translateX(0); }
        .side-nav.open .side-nav-item:nth-child(1) { transition-delay: 0.06s; }
        .side-nav.open .side-nav-item:nth-child(2) { transition-delay: 0.10s; }
        .side-nav.open .side-nav-item:nth-child(3) { transition-delay: 0.14s; }
        .side-nav.open .side-nav-item:nth-child(4) { transition-delay: 0.18s; }
        .side-nav.open .side-nav-item:nth-child(5) { transition-delay: 0.22s; }

        .side-nav-item:hover { background: #f0fdf4; color: #0b4e23; }
        .side-nav-item.active { background: #e8f5ed; color: #0b4e23; font-weight: 600; }

        .side-nav-item svg {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
            opacity: 0.55;
        }
        .side-nav-item.active svg,
        .side-nav-item:hover svg { opacity: 1; }

        .side-divider {
            height: 1px;
            background: rgba(0,0,0,0.07);
            margin: 8px 12px;
        }

        .side-nav-footer {
            padding: 14px 18px 20px;
            border-top: 1px solid rgba(0,0,0,0.07);
        }
        .side-btn-login {
            display: block;
            width: 100%;
            padding: 11px;
            text-align: center;
            font-size: 14px;
            font-weight: 600;
            color: #fff;
            background: #0b4e23;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            text-decoration: none;
            transition: background 0.15s;
        }
        .side-btn-login:hover { background: #15803d; }

        /* Mostrar hambúrguer só no mobile */
        @media (max-width: 768px) {
            .hamburger-btn { display: flex; }
            /* esconde o botão antigo caso ainda exista */
            .mobile-menu-btn { display: none !important; }
        }