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

:root {
    --primary-color: #8BC34A;
    --primary-dark: #689F38;
    --secondary-color: #7B1FA2;
    --secondary-light: #9C27B0;
    --accent-purple: #6A1B9A;
    --accent-green: #7CB342;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --success-color: #8BC34A;
    --dark-color: #333;
    --light-color: #f5f5f5;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
}

body {
    font-family: 'Poppins', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: var(--dark-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

body.dark-mode {
    background: #121212;
    color: #e6e6e6;
}

main {
    flex: 1;
}

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

/* Header - Material Design */
.header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-purple) 100%);
    box-shadow: 0 2px 8px rgba(123, 31, 162, 0.3);
    padding: 20px 0;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .header {
        padding: 12px 0;
    }
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: -8px; /* Cola o hamburger na extrema esquerda */
}

.header-text {
    flex: 1;
    text-align: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: -8px;
}

.btn-dark-mode {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-dark-mode .material-icons {
    font-size: 20px;
}

.btn-dark-mode:hover {
    background: var(--white);
    color: var(--secondary-color);
    border-color: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transform: scale(1.05);
}

.btn-logout {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 0;
}

.btn-logout .material-icons {
    font-size: 20px;
}

.btn-logout:hover {
    background: var(--white);
    color: var(--secondary-color);
    border-color: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transform: scale(1.05);
}

.user-greeting {
    background: rgba(139, 195, 74, 0.08);
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    border-left: 3px solid var(--primary-color);
}

.user-greeting p {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.user-greeting strong {
    color: var(--primary-color);
}

.logo {
    height: 70px;
    width: auto;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

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

/* Títulos responsivos */
.title-mobile {
    display: none;
}

.title-desktop {
    display: inline;
}

.header h1 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 4px;
    font-weight: 600;
}

.subtitle {
    color: var(--white);
    font-size: 1rem;
    font-weight: 400;
}

/* Estatísticas */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.stat-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(123, 31, 162, 0.3);
}

.stat-content h3 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.stat-content p {
    color: #666;
    font-size: 0.9rem;
}

/* Cards - Material Design */
.card {
    background: var(--white);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    margin-bottom: 24px;
    transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08);
}

.card h2 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

/* Formulário */
.form-section {
    margin-bottom: 0;
}

/* Seção de Altura - Material Design */
.altura-section {
    margin-bottom: 20px !important;
}

.altura-section .card {
    padding: 32px 24px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08) !important;
    border: none !important;
    border-radius: 8px !important;
    transition: box-shadow 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
}

.altura-section .card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.1) !important;
}

.altura-section h3 {
    font-size: 1.25rem !important;
    margin-bottom: 0 !important;
    color: #333 !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.altura-section .form-row {
    gap: 16px !important;
    align-items: flex-end !important;
}

.altura-section .form-group {
    margin-bottom: 0 !important;
    flex: 1 !important;
}

.altura-section label {
    font-size: 0.875rem !important;
    margin-bottom: 8px !important;
    color: #5f6368 !important;
    font-weight: 500 !important;
    display: block !important;
}

.altura-section input {
    font-size: 1rem !important;
    padding: 12px 16px !important;
    height: 48px !important;
    border: 1px solid #dadce0 !important;
    border-radius: 4px !important;
    background: #fff !important;
    transition: all 0.2s ease !important;
}

.altura-section input:focus {
    outline: none !important;
    border-color: #1a73e8 !important;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1) !important;
}

.altura-section .btn {
    padding: 12px 24px !important;
    font-size: 0.95rem !important;
    height: 48px !important;
    margin-top: 0 !important;
    line-height: 1 !important;
    font-weight: 500 !important;
}

.altura-section .message {
    font-size: 0.875rem !important;
    padding: 10px 14px !important;
    margin-top: 0 !important;
    border-radius: 4px !important;
}

/* Layout responsivo para pesagem */
.pesagem-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
    align-items: stretch;
}

/* Tablet: layout com 2 colunas */
@media (min-width: 768px) and (max-width: 1199px) {
    .pesagem-layout {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    
    /* No tablet, stats e lista ficam na mesma coluna */
    .stats-section {
        grid-column: 2;
        grid-row: 1;
    }
    
    .lista-section {
        grid-column: 2;
        grid-row: 2;
    }
    
    .form-section {
        grid-row: 1 / 3;
    }
}

/* Desktop: layout horizontal com 3 colunas */
@media (min-width: 1200px) {
    /* Campo altura centralizado */
    .altura-section {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .pesagem-layout {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 24px;
        align-items: start;
    }
    
    .form-section {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px;
    }
    
    .stats-section,
    .lista-section {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .stats-section .card,
    .lista-section .card {
        display: flex !important;
        flex-direction: column !important;
        margin-bottom: 0 !important;
        box-sizing: border-box !important;
    }
    
    .form-section .card {
        display: flex !important;
        flex-direction: column !important;
        box-sizing: border-box !important;
    }
    
    .stats-container,
    .lista-container {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .stats-section h2,
    .lista-section h2 {
        flex-shrink: 0 !important;
    }
}
}

.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    background: #fafafa;
}

.form-group input:hover {
    border-color: #bdbdbd;
    background: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(139, 195, 74, 0.1);
}

/* Botões - Material Design */
.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    width: 100%;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.btn-primary:hover {
    background: var(--accent-green);
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

.btn-primary:active {
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.btn-secondary:hover {
    background: var(--secondary-light);
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

.btn-secondary:active {
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Mensagens */
.message {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    display: none;
    animation: slideDown 0.3s ease;
}

.message.show {
    display: block;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Mensagem da altura - mais discreta */
.altura-section .message {
    padding: 6px 10px;
    font-size: 0.75rem;
    margin-top: 4px;
}

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

/* Ranking */
.ranking-controls {
    margin-bottom: 20px;
}

.ranking-container {
    overflow-x: auto;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table thead {
    background: var(--primary-color);
    color: var(--white);
}

.ranking-table th {
    padding: 16px;
    text-align: left;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ranking-table td {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.875rem;
}

.ranking-table tbody tr {
    transition: background 0.2s ease;
}

.ranking-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.ranking-table tbody tr.usuario-logado {
    background: rgba(139, 195, 74, 0.08);
    border-left: 3px solid var(--primary-color);
    font-weight: 500;
}

.ranking-table tbody tr.usuario-logado:hover {
    background: rgba(139, 195, 74, 0.12);
}

.medal {
    font-size: 1.5rem;
    margin-right: 5px;
    display: inline-block;
    animation: shine 2s infinite;
}

@keyframes shine {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.2); }
}

.perda-positiva {
    color: var(--success-color);
    font-weight: 600;
}

.perda-negativa {
    color: var(--danger-color);
    font-weight: 600;
}

.btn-historico {
    padding: 6px 12px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-historico:hover {
    background: var(--accent-green);
    transform: scale(1.05);
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 24px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15), 0 4px 8px rgba(0,0,0,0.1);
}

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

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

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: var(--dark-color);
}

.historico-item {
    padding: 12px 16px;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 12px;
    background: rgba(139, 195, 74, 0.08);
    border-radius: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.historico-item:hover {
    background: rgba(139, 195, 74, 0.12);
    transform: translateX(4px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.historico-item .data {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.historico-item .peso-valor {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Footer - Material Design */
.footer {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--secondary-color) 100%);
    color: var(--white);
    text-align: center;
    padding: 24px 0;
    margin-top: auto;
    box-shadow: 0 -2px 8px rgba(123, 31, 162, 0.3);
}

.footer p {
    margin: 4px 0;
    color: var(--white);
    font-weight: 500;
}

.footer-small {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Responsividade */
/* ==================== NAVIGATION MENU ==================== */
/* ==================== NAVIGATION MENU ==================== */

/* Botão Hamburguer */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 5px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Menu Desktop */
.nav-menu {
    background: var(--white);
    border-bottom: 2px solid var(--light-color);
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.nav-link {
    display: block;
    padding: 16px 24px;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(139, 195, 74, 0.08);
}

body.dark-mode .nav-menu {
    background: #1b1b1b;
    border-bottom-color: #2e2e2e;
}

body.dark-mode .nav-link {
    color: #e6e6e6;
}

body.dark-mode .nav-link:hover {
    background: #252525;
    color: #8bc34a;
}

body.dark-mode .nav-link.active {
    background: rgba(139, 195, 74, 0.2);
}

/* ==================== MOBILE MENU ==================== */
@media (max-width: 768px) {
    /* Mostrar botão hamburguer */
    .menu-toggle {
        display: block;
    }
    
    /* Esconder menu desktop */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: var(--white);
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        z-index: 1000;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        margin-bottom: 0;
        border-bottom: none;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu .container {
        padding: 0;
    }
    
    /* Header da Sidebar */
    .nav-menu::before {
        content: '';
        display: block;
        height: 120px;
        background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-purple) 100%);
        margin-bottom: 16px;
    }
    
    /* Lista vertical */
    .nav-list {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-link {
        padding: 20px 24px;
        border-bottom: 1px solid var(--light-color);
        border-left: 4px solid transparent;
        font-size: 1.1rem;
    }
    
    .nav-link.active {
        border-left-color: var(--primary-color);
        border-bottom-color: var(--light-color);
        background: rgba(139, 195, 74, 0.1);
    }
    
    .nav-link:hover {
        background: var(--light-color);
        padding-left: 32px;
    }
}

/* ==================== HOME PAGE ==================== */
.home-content {
    padding-bottom: 40px;
}

.hero-section {
    margin-bottom: 32px;
}

.hero-card {
    text-align: center;
    padding: 48px 32px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-purple) 100%);
    color: var(--white);
}

.hero-card h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--white);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 24px;
    font-weight: 500;
    opacity: 0.95;
}

.hero-description {
    font-size: 1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

.welcome-section {
    margin-bottom: 32px;
}

.welcome-section .card {
    text-align: center;
    padding: 32px;
}

.welcome-section h2 {
    font-size: 1.75rem;
    margin-bottom: 16px;
    color: var(--secondary-color);
}

.welcome-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    max-width: 700px;
    margin: 0 auto;
}

body.dark-mode .card,
body.dark-mode .feature-card,
body.dark-mode .testimonial-card {
    background: #1f1f1f;
    color: #e6e6e6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

body.dark-mode .welcome-section h2,
body.dark-mode .section-title,
body.dark-mode .feature-card h3,
body.dark-mode .testimonial-card h3,
body.dark-mode .card h2 {
    color: #d7f5ad;
}

body.dark-mode .welcome-text,
body.dark-mode .feature-card p,
body.dark-mode .testimonial-card p {
    color: #cfcfcf;
}

body.dark-mode .footer {
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.4);
}

body.dark-mode .btn-dark-mode {
    background: rgba(139, 195, 74, 0.2);
    border-color: rgba(139, 195, 74, 0.6);
    color: #d7f5ad;
}

body.dark-mode .btn-dark-mode:hover {
    background: #8bc34a;
    color: #202020;
    border-color: #8bc34a;
}

body.dark-mode .form-group label,
body.dark-mode .imc-label,
body.dark-mode .historico-data,
body.dark-mode .bio-detail span,
body.dark-mode .loading,
body.dark-mode .empty-message,
body.dark-mode .info-message,
body.dark-mode .error-message {
    color: #cfcfcf;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
    background: #2a2a2a;
    border-color: #3a3a3a;
    color: #f1f1f1;
}

body.dark-mode .form-group input::placeholder,
body.dark-mode .form-group textarea::placeholder {
    color: #9a9a9a;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
    border-color: #8bc34a;
    box-shadow: 0 0 0 2px rgba(139, 195, 74, 0.2);
}

body.dark-mode .ranking-table thead {
    background: #2f4d1f;
}

body.dark-mode .ranking-table td {
    border-bottom-color: #2f2f2f;
}

body.dark-mode .ranking-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

body.dark-mode .modal {
    background-color: rgba(0, 0, 0, 0.7);
}

body.dark-mode .modal-content {
    background: #1f1f1f;
    color: #e8e8e8;
}

body.dark-mode .close {
    color: #cfcfcf;
}

body.dark-mode .close:hover {
    color: #ffffff;
}

body.dark-mode .historico-item,
body.dark-mode .imc-card,
body.dark-mode .imc-value,
body.dark-mode .imc-detail-item,
body.dark-mode .imc-progress-section,
body.dark-mode .imc-details,
body.dark-mode .progress-section,
body.dark-mode .bio-historico-item {
    background: #262626;
    color: #e6e6e6;
}

body.dark-mode .historico-item:hover {
    background: #2e2e2e;
}

body.dark-mode .info-message {
    background: rgba(139, 195, 74, 0.12);
}

body.dark-mode .progress-bar,
body.dark-mode .progress-bar-bg {
    background: #3a3a3a;
}

body.dark-mode .menu-overlay {
    background: rgba(0, 0, 0, 0.65);
}

/* Features Section */
.features-section {
    margin-bottom: 32px;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 32px;
    color: var(--secondary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.feature-card {
    background: var(--white);
    padding: 32px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--secondary-color);
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Testimonials Section */
.testimonials-section {
    margin-bottom: 32px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.testimonial-card {
    background: var(--white);
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.testimonial-quote {
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 16px;
}

.testimonial-card h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: var(--secondary-color);
}

.testimonial-card p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 16px;
}

.testimonial-author {
    font-style: italic;
    color: #888;
    font-size: 0.9rem;
}

/* Actions Section */
.actions-section {
    margin-bottom: 32px;
}

.actions-card {
    text-align: center;
    padding: 40px 32px;
}

.actions-card h2 {
    margin-bottom: 24px;
    color: var(--secondary-color);
}

.actions-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.actions-buttons .btn {
    min-width: 200px;
}

/* ==================== HISTORICO PAGE ==================== */
.historico-section {
    margin-top: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-purple) 100%);
    color: var(--white);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.stat-card.stat-positive {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-green) 100%);
}

.stat-card.stat-negative {
    background: linear-gradient(135deg, var(--danger-color) 0%, #d32f2f 100%);
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.2;
}

.historico-container h3 {
    margin: 30px 0 16px 0;
    color: var(--secondary-color);
    font-size: 1.4rem;
    font-weight: 600;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.stats-container,
.lista-container {
    width: 100%;
}

.lista-section .card {
    display: flex;
    flex-direction: column;
}

.lista-section h2 {
    flex-shrink: 0;
    margin-bottom: 16px;
}

.lista-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.stats-section .card {
    display: flex;
    flex-direction: column;
}

.stats-section h2 {
    flex-shrink: 0;
    margin-bottom: 16px;
}

.stats-container {
    flex: 1;
}

.historico-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.historico-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    background: var(--light-color);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.historico-item:hover {
    background: #e8e8e8;
    transform: translateX(4px);
}

.historico-peso {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--primary-color);
}

.historico-data {
    color: #666;
    font-size: 0.95rem;
}

.historico-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.historico-actions {
    display: flex;
    gap: 8px;
}

.btn-edit,
.btn-delete,
.btn-restore {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-edit:hover {
    background: rgba(139, 195, 74, 0.2);
    transform: scale(1.1);
}

.btn-delete:hover {
    background: rgba(244, 67, 54, 0.2);
    transform: scale(1.1);
}

.btn-restore:hover {
    background: rgba(33, 150, 243, 0.2);
    transform: scale(1.1);
}

.empty-message {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1rem;
}

.info-message {
    text-align: center;
    padding: 24px 20px;
    background: rgba(139, 195, 74, 0.08);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    color: var(--dark-color);
    font-size: 1rem;
    line-height: 1.6;
}

.info-message a {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
}

.info-message a:hover {
    text-decoration: underline;
}

.error-message {
    text-align: center;
    padding: 40px;
    color: var(--danger-color);
    font-size: 1.1rem;
}

/* ==================== IMC ==================== */
.imc-container {
    margin-top: 20px;
}

.imc-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.imc-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    flex-wrap: wrap;
}

@media (max-width: 500px) {
    .imc-stats {
        justify-content: center;
    }
}

.imc-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 25px;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.imc-classification {
    flex: 1;
}

.imc-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

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

.classification-badge {
    padding: 10px 24px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    text-align: center;
    min-width: fit-content;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.imc-baixo {
    color: #856404;
    background-color: #fff3cd;
}

.imc-normal {
    color: #155724;
    background-color: #d4edda;
}

.imc-sobrepeso {
    color: #856404;
    background-color: #fff3cd;
}

.imc-obesidade1 {
    color: #721c24;
    background-color: #f8d7da;
}

.imc-obesidade2 {
    color: #721c24;
    background-color: #f5c6cb;
}

.imc-obesidade3 {
    color: #721c24;
    background-color: #f1b0b7;
}

.imc-details {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.imc-details p {
    margin: 8px 0;
    font-size: 0.95rem;
}

.imc-objetivo {
    color: var(--primary-color);
    font-weight: 600;
}

.imc-sucesso {
    color: #155724;
    font-weight: 600;
    font-size: 1rem;
}

.progress-section {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.progress-section h4 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, #45a049 100%);
    border-radius: 15px;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-text {
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.progress-info {
    margin: 10px 0 0 0;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

/* IMC Card - Novo Layout Melhorado */
.imc-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.imc-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.imc-value-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.imc-value-circle .imc-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    color: #333;
    text-align: center;
    width: 100%;
}

.imc-value-circle .imc-label {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    width: 100%;
}

.imc-classification {
    flex: 1;
}

.imc-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.imc-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #dee2e6;
}

.imc-detail-item.highlight {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.imc-detail-item.success {
    background: #d4edda;
    border-left-color: #28a745;
}

.imc-detail-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.imc-detail-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 2px;
}

.imc-detail-value {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.imc-progress-section {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
}

.progress-title {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.progress-bar-wrapper {
    width: 100%;
}

.progress-bar-bg {
    width: 100%;
    height: 32px;
    background: #e9ecef;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-percentage {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.progress-info {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

@media (max-width: 600px) {
    .imc-header {
        flex-direction: column;
        text-align: center;
    }
    
    .imc-details-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== ANÁLISE AVANÇADA COM ABAS ==================== */

.analysis-tabs-container {
    width: 100%;
}

.analysis-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(76, 175, 80, 0.05);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(76, 175, 80, 0.1);
}

.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); }
}

/* Advanced Metrics Grid */
.advanced-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.metric-card.full-width {
    grid-column: 1 / -1;
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.metric-icon {
    font-size: 2rem;
}

.metric-header h3 {
    font-size: 1.1rem;
    color: #333;
    margin: 0;
    font-weight: 600;
}

.metric-value-circle {
    width: 140px;
    height: 140px;
    border: 6px solid;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
}

.metric-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.metric-unit {
    font-size: 0.9rem;
    color: #666;
    margin-top: 4px;
}

.metric-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    margin: 16px auto;
    display: block;
    width: fit-content;
}

.metric-detail {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.metric-detail p {
    margin: 8px 0;
    font-size: 0.95rem;
    color: #555;
}

.metric-detail strong {
    color: #333;
    font-weight: 600;
}

/* Composition Bars */
.composition-bars {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.composition-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.composition-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: #333;
}

.composition-label strong {
    font-weight: 600;
    color: var(--primary-color);
}

.composition-bar-bg {
    width: 100%;
    height: 24px;
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.composition-bar {
    height: 100%;
    border-radius: 12px;
    transition: width 0.5s ease;
}

.composition-status {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 4px;
    display: block;
}

/* Comparison Card */
.comparison-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.comparison-card .metric-header h3 {
    color: white;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: center;
    margin: 24px 0;
}

.comparison-item {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.comparison-item h4 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.comparison-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 8px 0;
}

.comparison-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 8px 0;
}

.comparison-desc {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 8px 0 0 0;
}

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

.comparison-divider .material-icons {
    font-size: 2.5rem;
    opacity: 0.6;
}

.comparison-insight {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

.comparison-insight .material-icons {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.comparison-insight p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.info-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    border-radius: 4px;
    margin-top: 20px;
}

.info-box .material-icons {
    color: #2196f3;
    font-size: 1.5rem;
}

.info-box p {
    margin: 0;
    color: #1565c0;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .advanced-metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .comparison-divider {
        transform: rotate(90deg);
    }
    
    .tab-btn {
        font-size: 0.85rem;
        padding: 10px 12px;
    }
}

/* ==================== BIOIMPEDÂNCIA SCANNER ==================== */
.bioimpedancia-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px dashed #e0e0e0;
}

.bioimpedancia-section h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.subtitle-small {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

.scan-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-scan {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-scan .material-icons {
    font-size: 20px;
}

.btn-scan:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 195, 74, 0.3);
}

.btn-small {
    font-size: 0.85rem;
    padding: 8px 16px;
}

.bio-preview {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.bio-preview p {
    margin: 8px 0;
    font-size: 0.9rem;
}

#dadosExtraidos {
    margin: 10px 0;
    font-size: 0.9rem;
    line-height: 1.8;
}

/* Modal Câmera */
.modal-camera {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-container {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.btn-close-camera {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10001;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-camera:hover {
    background: white;
    transform: scale(1.1);
}

.btn-close-camera .material-icons {
    color: #333;
    font-size: 28px;
}

.camera-view,
.crop-view {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#videoCamera {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-overlay,
#canvasCrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Frame Guide - Overlay de enquadramento */
.frame-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    max-width: 600px;
    height: 70%;
    max-height: 500px;
    border: 3px solid rgba(139, 195, 74, 0.8);
    border-radius: 12px;
    pointer-events: none;
}

.corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-color);
}

.corner.top-left {
    top: -4px;
    left: -4px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 12px;
}

.corner.top-right {
    top: -4px;
    right: -4px;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 12px;
}

.corner.bottom-left {
    bottom: -4px;
    left: -4px;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 12px;
}

.corner.bottom-right {
    bottom: -4px;
    right: -4px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 12px;
}

.frame-text {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

.camera-controls {
    padding: 24px;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-capture {
    padding: 16px 32px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(139, 195, 74, 0.4);
}

.btn-capture:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(139, 195, 74, 0.6);
}

.btn-capture .material-icons {
    font-size: 28px;
}

/* Crop Area */
.crop-view h3 {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.3rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    z-index: 100;
}

.crop-guide {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.crop-area {
    position: absolute;
    border: 3px dashed var(--primary-color);
    background: rgba(139, 195, 74, 0.1);
    cursor: move;
}

.crop-handle {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
}

.crop-handle.top-left {
    top: -10px;
    left: -10px;
    cursor: nw-resize;
}

.crop-handle.top-right {
    top: -10px;
    right: -10px;
    cursor: ne-resize;
}

.crop-handle.bottom-left {
    bottom: -10px;
    left: -10px;
    cursor: sw-resize;
}

.crop-handle.bottom-right {
    bottom: -10px;
    right: -10px;
    cursor: se-resize;
}

/* Loading Modal */
.loading-modal {
    text-align: center;
    max-width: 400px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-modal h3 {
    margin: 15px 0;
    color: var(--dark-color);
}

.loading-modal p {
    color: #666;
    font-size: 0.95rem;
}

.loading-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    transition: width 0.3s ease;
}

.progress-text {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

/* ==================== RESPONSIVE IMC ==================== */
@media (min-width: 992px) and (max-width: 1199px) {
    .imc-stats {
        flex-direction: column;
        gap: 12px;
    }
    
    .imc-number {
        font-size: 2rem;
    }
    
    .classification-badge {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    .imc-stats {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }
    
    .imc-value {
        padding: 12px 20px;
    }
    
    .imc-number {
        font-size: 2rem;
    }
    
    .imc-label {
        font-size: 0.85rem;
    }
    
    .classification-badge {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .imc-details p {
        font-size: 0.9rem;
    }
}

@media (max-width: 500px) {
    .imc-number {
        font-size: 1.75rem;
    }
    
    .classification-badge {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    
    .imc-details {
        padding: 12px;
    }
    
    .imc-details p {
        font-size: 0.85rem;
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    /* Navigation */
    .nav-list {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-link {
        padding: 12px 16px;
        border-bottom: 1px solid var(--light-color);
        border-left: 3px solid transparent;
    }
    
    .nav-link.active {
        border-bottom: 1px solid var(--light-color);
        border-left-color: var(--primary-color);
    }
    
    /* Home Page */
    .hero-card {
        padding: 32px 20px;
    }
    
    .hero-card h2 {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .features-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-buttons {
        flex-direction: column;
    }
    
    .actions-buttons .btn {
        width: 100%;
    }
    
    /* Historico */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    /* Header */
    .logo {
        height: 55px;
    }

    .header-content {
        gap: 15px;
    }

    .header-actions {
        gap: 6px;
    }
    
    .btn-logout {
        width: 40px;
        height: 40px;
        margin-right: 0;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .stats-section {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 20px;
    }

    .card {
        padding: 20px;
    }

    .card h2 {
        font-size: 1.5rem;
    }

    .ranking-table {
        font-size: 0.9rem;
    }

    .ranking-table th,
    .ranking-table td {
        padding: 10px 8px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .logo {
        height: 50px;
    }

    .header-content {
        flex-wrap: nowrap;
    }

    .header-actions {
        gap: 4px;
    }

    .header h1 {
        font-size: 1.1rem;
        line-height: 1.3;
        margin-bottom: 2px;
    }
    
    /* Trocar para título curto em mobile */
    .title-desktop {
        display: none;
    }
    
    .title-mobile {
        display: inline;
    }
    
    .subtitle {
        display: none;
    }
    
    .header-text {
        max-width: 55%;
    }
    
    /* Manter botão logout como ícone em mobile */
    .btn-logout {
        width: 40px;
        height: 40px;
        margin-right: 0;
    }
    
    .header-text {
        text-align: center;
        flex: 1;
    }
    
    /* Home Page */
    .hero-card h2 {
        font-size: 1.25rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .feature-card h3 {
        font-size: 1.1rem;
    }
    
    .testimonial-quote {
        font-size: 3rem;
    }
    
    /* Historico */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-card {
        padding: 14px;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .historico-peso {
        font-size: 1.1rem;
    }

    .stat-icon {
        font-size: 2rem;
        width: 50px;
        height: 50px;
    }

    .stat-content h3 {
        font-size: 1.5rem;
    }

    /* Ranking mobile - esconder colunas menos importantes */
    .ranking-table th:nth-child(3),
    .ranking-table td:nth-child(3),
    .ranking-table th:nth-child(4),
    .ranking-table td:nth-child(4) {
        display: none;
    }
    
    /* Reduzir espaçamento da tabela em mobile */
    .ranking-table th,
    .ranking-table td {
        padding: 8px 4px;
        font-size: 0.8rem;
    }
    
    .ranking-table th:first-child,
    .ranking-table td:first-child {
        padding-left: 8px;
    }
    
    .ranking-table th:last-child,
    .ranking-table td:last-child {
        padding-right: 8px;
    }
    
    /* Aumentar tamanho das medalhas em mobile */
    .medal {
        font-size: 1.2rem;
    }
}

/* Layout de cards para ranking em telas muito pequenas */
@media (max-width: 420px) {
    .ranking-table {
        display: block;
        overflow-x: visible;
    }
    
    .ranking-table thead {
        display: none;
    }
    
    .ranking-table tbody {
        display: block;
    }
    
    .ranking-table tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 12px;
        background: white;
    }
    
    .ranking-table tr.usuario-logado {
        border-left: 4px solid var(--primary-color);
        box-shadow: 0 2px 8px rgba(139, 195, 74, 0.2);
    }
    
    .ranking-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #f5f5f5;
        font-size: 0.875rem;
    }
    
    .ranking-table td:last-child {
        border-bottom: none;
    }
    
    .ranking-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--secondary-color);
        flex: 0 0 45%;
    }
    
    .ranking-table td:first-child {
        font-size: 1.1rem;
        font-weight: 600;
        padding-bottom: 12px;
        border-bottom: 2px solid var(--primary-color);
        justify-content: center;
    }
    
    .ranking-table td:first-child::before {
        display: none;
    }
}

/* Telas muito pequenas - esconder subtítulo */
@media (max-width: 360px) {
    .subtitle {
        display: none;
    }
    
    .header h1 {
        font-size: 1rem;
        margin-bottom: 0;
    }
    
    .logo {
        height: 45px;
    }
    
    .header-text {
        max-width: 50%;
    }
}

/* ==================== MODAIS ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    padding: 32px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-content h3 {
    color: var(--secondary-color);
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.modal-subtitle {
    color: #666;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.modal-subtitle strong {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.modal-text {
    color: var(--dark-color);
    margin-bottom: 16px;
    font-size: 1rem;
}

.modal-warning {
    background: rgba(139, 195, 74, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary-color);
}

.modal-warning strong {
    color: var(--primary-color);
}

.modal-info {
    color: #999;
    font-size: 0.875rem;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.modal-actions .btn {
    min-width: 100px;
    justify-content: center;
}

.btn-secondary {
    background: #e0e0e0;
    color: var(--dark-color);
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

@media (max-width: 600px) {
    .modal-content {
        padding: 24px;
        width: 95%;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

/* ==================== PÁGINA BIOIMPEDÂNCIA ==================== */
.bioimpedancia-page {
    display: grid;
    gap: 24px;
}

.imc-section-full,
.bioimpedancia-section-full,
.historico-bio-section {
    width: 100%;
}

.subtitle-medium {
    color: #666;
    font-size: 1rem;
    margin: 10px 0 20px 0;
    text-align: center;
}

.scan-action {
    text-align: center;
    margin: 30px 0;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    min-width: 250px;
}

.menu-opcoes {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    animation: slideDown 0.3s ease;
}

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

.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .menu-grid {
        grid-template-columns: 1fr;
    }
}

.btn-option {
    padding: 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-option:hover {
    border-color: var(--primary-color);
    background: #f0f9f0;
    transform: translateY(-2px);
}

.btn-option .material-icons {
    font-size: 48px;
    color: var(--primary-color);
}

.bio-preview-full {
    margin-top: 30px;
    padding: 20px;
    background: #e8f5e9;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.bio-preview-full h3 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.dados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.dado-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #d0d0d0;
}

.dado-label {
    font-weight: 500;
    color: #666;
}

.dado-valor {
    font-weight: 600;
    color: var(--dark-color);
}

.confidence-score {
    text-align: center;
    margin: 15px 0 0 0;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
}

@media (max-width: 600px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

.historico-bio-container {
    display: grid;
    gap: 16px;
}

.bio-card {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.bio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.bio-date {
    font-weight: 500;
    color: #666;
}

.bio-peso {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.bio-dados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.bio-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bio-item span {
    font-size: 0.85rem;
    color: #666;
}

.bio-item strong {
    font-size: 1rem;
    color: var(--dark-color);
}

.imc-tip {
    margin-top: 20px;
    padding: 12px;
    background: #e3f2fd;
    border-radius: 6px;
    text-align: center;
}

.imc-tip p {
    margin: 0;
    color: #666;
}

.link-primary {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.link-primary:hover {
    text-decoration: underline;
}

/* Corrigir container da barra de progresso */
.progress-bar-container {
    margin-top: 10px;
}

.progress-label {
    margin: 8px 0 0 0;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

/* ==================== MODAL CROP ==================== */
.modal-crop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-content-crop {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-header-crop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header-crop h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
}

.btn-close-crop {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.btn-close-crop:hover {
    background: #f0f0f0;
}

.btn-close-crop .material-icons {
    font-size: 24px;
    color: #666;
}

.crop-container {
    padding: 24px;
    overflow: auto;
    flex: 1;
}

.crop-view {
    position: relative;
    display: inline-block;
    margin: 0 auto;
}

.crop-view canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.crop-area {
    position: absolute;
    border: 2px solid #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    cursor: move;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #4CAF50;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.crop-handle.handle-tl {
    top: -6px;
    left: -6px;
    cursor: nw-resize;
}

.crop-handle.handle-tr {
    top: -6px;
    right: -6px;
    cursor: ne-resize;
}

.crop-handle.handle-bl {
    bottom: -6px;
    left: -6px;
    cursor: sw-resize;
}

.crop-handle.handle-br {
    bottom: -6px;
    right: -6px;
    cursor: se-resize;
}

.crop-actions {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 2px solid #f0f0f0;
    justify-content: flex-end;
}

.crop-actions .btn {
    min-width: 120px;
}

/* ==================== MODAL LOADING ==================== */
.modal-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.modal-content-loading {
    background: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 15px 0;
}

.loading-subtext {
    font-size: 0.9rem;
    color: #666;
    margin: 10px 0 0 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
    width: 0%;
}

/* ==================== MODAL EDITAR ==================== */
.modal-editar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-content-editar {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}

.modal-header-editar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-body-editar {
    padding: 24px;
    overflow: auto;
    flex: 1;
}

.modal-footer-editar {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 2px solid #f0f0f0;
    justify-content: flex-end;
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10002;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-left: 4px solid;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: all;
    min-width: 300px;
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left-color: #4CAF50;
    background: #f1f8f4;
}

.toast-error {
    border-left-color: #f44336;
    background: #fef1f0;
}

.toast-warning {
    border-left-color: #ff9800;
    background: #fff8e1;
}

.toast-info {
    border-left-color: #2196F3;
    background: #e3f2fd;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(0,0,0,0.1);
    color: #333;
}

@media (max-width: 600px) {
    .toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}

/* ==================== FORMULÁRIO BIOIMPEDÂNCIA ==================== */
.form-bioimpedancia {
    background: #f9f9f9;
    padding: 24px;
    border-radius: 8px;
}

.form-bioimpedancia .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-bioimpedancia .form-group {
    display: flex;
    flex-direction: column;
}

.form-bioimpedancia label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-bioimpedancia label .material-icons {
    font-size: 18px;
    color: var(--primary-color);
}

.form-bioimpedancia input[type="number"] {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-bioimpedancia input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-bioimpedancia input[type="number"]:required {
    border-left: 4px solid var(--primary-color);
}

.form-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #e3f2fd;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #2196F3;
}

.form-info .material-icons {
    color: #2196F3;
    font-size: 20px;
}

.form-info p {
    margin: 0;
    color: #1976D2;
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-large {
    padding: 14px 28px;
    font-size: 1.05rem;
}

/* Histórico de Bioimpedância */
.bio-historico-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.bio-historico-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
}

.bio-historico-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.bio-historico-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.bio-historico-data {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.bio-historico-peso {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.bio-historico-details {
    display: grid;
    gap: 8px;
}

.bio-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    padding: 6px 0;
}

.bio-detail span {
    color: #666;
}

.bio-detail strong {
    color: #2c3e50;
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 1.1rem;
}

/* Responsivo */
@media (max-width: 768px) {
    .form-bioimpedancia .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .bio-historico-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== AJUSTES FINAIS DARK MODE ==================== */
body.dark-mode .subtitle-medium,
body.dark-mode .progress-label,
body.dark-mode .bio-date,
body.dark-mode .bio-item span,
body.dark-mode .bio-historico-data,
body.dark-mode .dado-label,
body.dark-mode .confidence-score,
body.dark-mode .imc-tip p {
    color: #b8c0cc;
}

body.dark-mode .analysis-tabs {
    border-bottom-color: #3a3a3a;
}

body.dark-mode .tab-btn {
    color: #b8c0cc;
}

body.dark-mode .tab-btn:hover {
    background: rgba(139, 195, 74, 0.1);
}

body.dark-mode .tab-btn.active {
    background: rgba(139, 195, 74, 0.18);
}

body.dark-mode .imc-stats,
body.dark-mode .imc-details,
body.dark-mode .imc-progress-section,
body.dark-mode .imc-detail-item,
body.dark-mode .imc-tip,
body.dark-mode .menu-opcoes,
body.dark-mode .bio-card,
body.dark-mode .bio-preview-full,
body.dark-mode .dado-item,
body.dark-mode .bio-historico-card {
    background: #20252b;
    border-color: #313841;
    color: #e6eaf0;
}

body.dark-mode .imc-header,
body.dark-mode .bio-header,
body.dark-mode .bio-historico-header {
    border-bottom-color: #313841;
}

body.dark-mode .imc-detail-value,
body.dark-mode .dado-valor,
body.dark-mode .bio-item strong,
body.dark-mode .bio-detail strong,
body.dark-mode .loading-text {
    color: #e6eaf0;
}

body.dark-mode .form-bioimpedancia {
    background: #1b1f24;
    border: 1px solid #2e353e;
}

body.dark-mode .form-bioimpedancia label {
    color: #d5dce7;
}

body.dark-mode .form-bioimpedancia input[type="number"] {
    background: #232931;
    border-color: #38424d;
    color: #eef2f8;
}

body.dark-mode .form-bioimpedancia input[type="number"]:focus {
    border-color: #8bc34a;
    box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.2);
}

body.dark-mode .form-info {
    background: rgba(33, 150, 243, 0.14);
    border-left-color: #42a5f5;
}

body.dark-mode .form-info p,
body.dark-mode .form-info .material-icons {
    color: #8ecbff;
}

body.dark-mode .form-actions .btn-secondary {
    background: #2c323a;
    color: #d8dee8;
    border: 1px solid #3a424c;
}

body.dark-mode .form-actions .btn-secondary:hover {
    background: #363d47;
}
