:root {
    --primary: #2e7d32;
    --primary-light: #e8f5e9;
    --dark: #263238;
    --light: #f8f9fa;
    --border: #cfd8dc;
    --text-muted: #78909c;
    --warning: #ffb300;
    --danger: #d32f2f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- HEADER --- */
header {
    background-color: #fff;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 20px;
    color: var(--primary);
}

.property-select{
    width: 100%;
}

.property-select select {
    width: 100%;
    padding: 8px 15px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.user-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 15px;
}

.alert-badge {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

/* --- CONTAINER PRINCIPAL --- */
.main-container {
    display: flex;
    flex: 1;
}
.submenu{
    background: #2e7d32;
    color:white;
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: space-around;    
    font-size: 1.0em;
    align-items: center;
}

/* --- MENU LATERAL --- */
.oculto{
    display: none;
}
nav ul{
    list-style: none;
    padding: 0;
}

aside {
    width: 100%;
    background-color: #fff;
    border-bottom: 1px solid var(--border);
    border-right: none;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: 0.2s;
}

.nav-links li.active a, .nav-links a:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.ti-support-box {
    background: linear-gradient(135deg, var(--primary), #1b5e20);
    color: #fff;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
}

.ti-support-box h4 {
    font-size: 14px;
    margin-bottom: 8px;
}

.btn-support {
    display: block;
    background: #fff;
    color: var(--primary);
    padding: 8px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    margin-top: 10px;
    transition: 0.2s;
}

.btn-support:hover {
    background-color: #f1f1f1;
}

/* --- ÁREA DO DASHBOARD --- */
main {
    flex: 1;
    padding: 15px;
    overflow-x: auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

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

.card-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--primary);
}

/* Estilização interna dos Cards */
.metric-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 12px;
}

.metric-value {
    font-weight: 600;
}

.status-dot {
    height: 8px;
    width: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.dot-online { background-color: var(--primary); }
.dot-warning { background-color: var(--warning); }

/* Barra de Progresso da Colheita  - ainda nao esta em uso*/
.progress-container {
    background-color: #f1f1f1;
    border-radius: 10px;
    height: 12px;
    width: 100%;
    margin-top: 5px;
    overflow: hidden;
}

.progress-bar {
    background-color: var(--primary);
    height: 100%;
    width: 45%; /* Representando os 45% */
}
.responsive{
    width: 100%;
    overflow-x:auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 
}
/*Estilo geral de todas as tabelas*/
    table {
    border-collapse: collapse; /* Une as bordas das células */
    font-family: sans-serif;
    }

    th, td {
    padding: 8px 12px;
    text-align: left;
    /*white-space: nowrap;*/
    }

    th {
    background-color: #009879; /* Cor de destaque do cabeçalho */
    color: #ffffff;
    font-weight: bold;
    }

    tbody tr {
    border-bottom: 1px solid #dddddd;
    }

    tbody tr:nth-of-type(even) {
    background-color: #f3f3f3; /* Linha zebrada */
    }

    tbody tr:last-of-type {
    border-bottom: 2px solid #009879; /* Linha final da tabela */
    }

    tbody tr:hover {
    background-color: #f1f1f1;
    font-weight: bold; /* Destaque ao passar o mouse */
    }

/* --- FOOTER (STATUS DO ECOSSISTEMA) --- */
footer {
    background-color: var(--dark);
    color: #fff;
    padding: 12px 30px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.system-status {
    display: flex;
    gap: 20px;
}

.status-item i {
    color: #81c784;
    margin-right: 5px;
}
.analitico iframe{
    width: 100%;
}


/* Esconde o modal por padrão */
.modal-overlay{
    display: none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background-color:rgba(0,0,0,0.5); /* fundo escuro transparente */
    justify-content:center;
    align-items:center;
    padding: 15px;
    z-index:1000;
}

/* Botão de fechar */
.fechar-modal{
    position:absolute;
    top:10px;
    right:15px;
    font-size:24px;
    border:none;
    background:none;
    cursor:pointer;
}

/* Mostra o modal quando necessário */
.modal-overlay.mostrar{
    display: flex;
}

/*Container principal do formulário*/
.form-container{
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    max-width: 90vh;
    overflow-y: auto;
}

.form-container h2{
    margin-bottom: 20px;
    color: #333333;
    font-size: 22px;
    text-align: center;
}

/* Organização de cada bloco de campo */
.form-group{
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}
.form-group label{
    margin-bottom: 6px;
    color: #666666;
    font-size: 14px;
    font-weight: 600;
}

/* Estilização dos campos de entrada */
.form-group input, .form-group select{
    padding: 10px 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Efeito visual quando o usuário clica no campo */
.form-group input:focus{
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.25);
}

/* Estilização do botão de envio */
.btn-submit{
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px;
    font-size:16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.2s;
}
/* Fixa o rodapé na parte inferior da tela */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #111;
    color: #fff;
    padding: 10px 0;
    font-family: sans-serif;
    overflow: hidden; /* Esconde o texto que sai da tela */
    z-index: 90;
}

.ticker-wrap {
    width: 100%;
    overflow: hidden;
}

.ticker-move {
    display: inline-block;
    white-space: nowrap;
    padding-right: 100%; /* Garante espaço para iniciar a animação */
    animation: ticker-animation 20s linear infinite;
}

/* Pausa o movimento quando o usuário passa o mouse por cima */
.ticker-move:hover {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-block;
    padding: 0 2rem;
    font-size: 14px;
}

/* Movimenta o texto da direita para a esquerda */
@keyframes ticker-animation {
    0% { transform: translate3d(100%, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}


/* Responsividade básica */
@media (min-width: 768px) {
    header{
        padding: 15px 30px;
        flex-direction: row;
        justify-content: space-between;
    }
    .property-select{
        width: auto;
        gap: 20px;
    }
    .user-actions{
        width: auto;
        gap: 20px;
    }
    .main-container{
        flex-direction: row;
    }
    aside{
        width: 260px;
        border-right: 1px solid var(--border);
        border-bottom: nome;
        padding:30px 20px;
    }
    main{
        padding: 30px;
    }
    .dashboard-grid{
        grid-template-columns: repeat(auto-fit,minmax(450px,1fr));
    }
    .modal-overlay{
        top:10%;
        left:25%;
        width: 50%;
        height: 80%;
        padding: 0;
    }
 /* Tabela operacional */
    table{
        width:100%;
        border-collapse: collapse;
        font-family: Arial, sans-serif;
    }
}