/* RESET E CONFIGURAÇÕES GERAIS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* LOGIN */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 10px;
}

.login-container h2 {
    text-align: center;
    color: #666;
    font-weight: normal;
    margin-bottom: 30px;
}

/* NAVEGAÇÃO */
.navbar {
    background: #2c3e50;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .logo {
    font-size: 1.5em;
    font-weight: bold;
}

.navbar .menu {
    display: flex;
    gap: 10px;
    align-items: center;
}

.navbar span {
    margin-right: 15px;
    color: #ecf0f1;
}

/* CONTAINER PRINCIPAL */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.container h1 {
    color: #2c3e50;
    margin-bottom: 25px;
}

/* CARDS DO DASHBOARD */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

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

.card h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.card p {
    color: #666;
    margin-bottom: 20px;
}

/* FORMULÁRIOS */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group textarea,
.form-busca input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #667eea;
    outline: none;
}

.form-group small {
    color: #888;
    font-size: 0.85em;
}

.form-planta {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 800px;
}

.form-busca {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    max-width: 600px;
}

.form-busca input {
    flex: 1;
}

/* BOTÕES */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.btn:hover {
    background: #5568d3;
}

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

.btn-success {
    background: #27ae60;
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-warning {
    background: #f39c12;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-secondary {
    background: #95a5a6;
}

.botoes {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* ALERTAS */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

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

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* GRID DE PLANTAS */
.grid-plantas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.card-planta {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.card-planta:hover {
    transform: translateY(-5px);
}

.imagem-planta {
    height: 200px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.imagem-planta img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sem-imagem {
    font-size: 4em;
    color: #bbb;
}

.info-planta {
    padding: 20px;
}

.info-planta h3 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.cientifico {
    color: #667eea;
    font-style: italic;
    margin-bottom: 10px;
}

.funcao {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    display: inline-block;
    margin-bottom: 10px;
}

.descricao {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 15px;
}

.acoes {
    display: flex;
    gap: 10px;
}

.imagem-atual {
    margin: 10px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.imagem-atual img {
    display: block;
    margin-bottom: 10px;
    border-radius: 5px;
}

/* PAGINAÇÃO */
.paginacao {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.paginacao a,
.paginacao span {
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
}

.paginacao a {
    background: #667eea;
    color: white;
}

.paginacao a:hover {
    background: #5568d3;
}

.paginacao span.atual {
    background: #2c3e50;
    color: white;
}

.sem-resultados {
    text-align: center;
    color: #666;
    padding: 40px;
    grid-column: 1 / -1;
}

.info {
    text-align: center;
    color: #888;
    margin-top: 20px;
    font-size: 0.9em;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .cards {
        grid-template-columns: 1fr;
    }
    
    .grid-plantas {
        grid-template-columns: 1fr;
    }
    
    .form-busca {
        flex-direction: column;
    }
    
    /* ESTUDO CIENTIFICO  */
    
/* ============================================
   MODAIS - Estudos Científicos
   ============================================ */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.modal-conteudo {
    background: white;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalEntrada 0.3s ease;
}

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

.modal-fechar {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 32px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    transition: color 0.2s;
}

.modal-fechar:hover {
    color: #333;
}

.modal-conteudo h3 {
    color: #667eea;
    border-bottom: 2px solid #667eea;
    padding-bottom: 12px;
    margin-bottom: 20px;
    padding-right: 40px;
    font-size: 1.3em;
}

.modal-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-lista li {
    margin-bottom: 12px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    word-break: break-all;
    transition: background 0.2s;
}

.modal-lista li:hover {
    background: #e9ecef;
}

.modal-lista a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.95em;
    display: block;
}

.modal-lista a:hover {
    text-decoration: underline;
}

/* Ícone de estudos no card */
.icone-estudos {
    display: inline-flex;
    margin-left: 8px;
    text-decoration: none;
    font-size: 1.3em;
    opacity: 0.6;
    transition: all 0.2s;
    vertical-align: middle;
}

.icone-estudos:hover {
    opacity: 1;
    transform: scale(1.2);
}





/* Ícone de estudos - posição estável */
.cientifico {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.icone-estudos {
    display: inline-flex;
    text-decoration: none;
    font-size: 1.2em;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
    cursor: pointer;
}

.icone-estudos:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* Modal - garantir posição fixa correta */
div[id^="modal-"] {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.5) !important;
    z-index: 9999 !important;
    display: none;
    justify-content: center;
    align-items: center;
}

div[id^="modal-"] > div {
    background: white;
    padding: 25px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
    
}