/* OptiManure App Styles */

/* Fonts (ProVacuno theme) */
@font-face {
    font-family: 'Titillium Web';
    src: url('fonts/TitilliumWeb-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
}
@font-face {
    font-family: 'Titillium Web';
    src: url('fonts/TitilliumWeb-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Titillium Web';
    src: url('fonts/TitilliumWeb-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Source Sans 3';
    src: url('fonts/SourceSans3-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}
@font-face {
    font-family: 'Source Sans 3';
    src: url('fonts/SourceSans3-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Source Sans 3';
    src: url('fonts/SourceSans3-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Source Sans 3';
    src: url('fonts/SourceSans3-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

/* General Styles */
body {
    font-family: 'Source Sans 3', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('background-light.png') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
}

/* Headings use Titillium Web (ProVacuno theme) */
h1, h2, h3, h4, h5, h6,
.page-main-title, .login-title, .optifangs-main-title {
    font-family: 'Titillium Web', 'Segoe UI', sans-serif;
}

/* Login Page Styles */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #8cc63f 0%, #007A33 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
    display: flex;
    min-height: 500px;
}

.login-form-section {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-logo-section {
    flex: 1;
    background: linear-gradient(135deg, #8cc63f 0%, #007A33 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    flex-direction: column;
}

.t-bold {
    font-weight: bold;
}

.login-title {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 300;
}

.login-form {
    max-width: 300px;
    margin: 0 auto;
    width: 100%;
}

.login-input {
    margin-bottom: 20px;
}

.login-input input {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.login-input input:focus {
    border-color: #8cc63f;
    box-shadow: 0 0 0 0.2rem rgba(140, 198, 63, 0.25);
}

.login-button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    margin-top: 10px;
}

.login-logo {
    max-width: 100%;
    height: auto;
}

.login-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* Main Container */
.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.logo-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    flex-direction: column;
}

/* Navigation Bar */
.navbar-custom {
    /*background: linear-gradient(135deg, #8cc63f 0%, #007A33 100%);*/
    background-color: #007A33;
    color: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-logo img {
    height: 50px;
}

.navbar-title h4 {
    margin: 0;
    color: white;
    font-weight: 300;
}

.navbar-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.navbar-links a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.navbar-links a:hover {
    background-color: rgba(255,255,255,0.2);
    text-decoration: none;
    color: white;
}

.navbar-links .nav-active {
    background-color: rgba(255,255,255,0.3);
}

/* Page Content */
.page-main-title {
    color: #495057;
    border-bottom: 3px solid #8cc63f;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.section-title {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 1.2em;
}

/* Form Styles */
.form-container {
    padding: 30px;
    background: white;
    border-radius: 10px;
    margin: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.modern-button {
    background: linear-gradient(135deg, #8cc63f 0%, #007A33 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modern-button:hover {
    background: linear-gradient(135deg, #7bb452 0%, #00662b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.full-width {
    width: 100%;
    margin-bottom: 10px;
}

/* File Input */
.modern-file-input input[type="file"] {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 20px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.modern-file-input input[type="file"]:hover {
    border-color: #8cc63f;
    background: #eef7e3;
}

/* Status Messages */
.loading-message {
    color: #0066cc;
    padding: 15px;
    background: #e6f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 5px;
    margin: 10px 0;
    display: none;
}

.success-message {
    color: #28a745;
    padding: 15px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    margin: 10px 0;
    display: none;
}

.warning-message {
    color: #856404;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    margin: 10px 0;
}

.info-message {
    color: #0c5460;
    padding: 15px;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 5px;
    margin: 10px 0;
}

/* Tables */
.data-table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.modern-tab-box .nav-tabs {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modern-tab-box .nav-tabs .nav-link {
    color: #495057;
    border: none;
    padding: 15px 20px;
}

.modern-tab-box .nav-tabs .nav-link.active {
    background: white;
    color: #007A33;
    border-bottom: 3px solid #8cc63f;
}

/* Plot Container */
.plot-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
}

/* Control Panels */
.nir-control-panel, .nir-data-panel {
    padding: 20px;
}

.control-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.action-buttons-section {
    background: #eef7e3;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #cfe8ad;
}

.data-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #6a7d6c 0%, #5e6f60 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    margin-top: auto;
}

.footer a {
    color: #adb5bd;
    text-decoration: none;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

.footer-text {
    font-size: 14px;
    margin: 10px 0;
    line-height: 1.5;
}

.footer-year {
    font-size: 12px;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        margin: 10px;
    }
    
    .login-form-section, .login-logo-section {
        flex: none;
    }
    
    .navbar-custom {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .navbar-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .form-container {
        margin: 10px;
        padding: 20px;
    }
    
    .nir-main-row {
        flex-direction: column;
    }
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #8cc63f 0%, #007A33 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7bb452 0%, #00662b 100%);
}

.btn-success {
    background: linear-gradient(135deg, #8cc63f 0%, #007A33 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #7bb452 0%, #00662b 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
}

/* Input Focus States */
.form-control:focus {
    border-color: #8cc63f;
    box-shadow: 0 0 0 0.2rem rgba(140, 198, 63, 0.25);
}

.selectize-input.focus {
    border-color: #8cc63f;
    box-shadow: 0 0 0 0.2rem rgba(140, 198, 63, 0.25);
}

/* Loading Spinner */
.fa-spin {
    animation: fa-spin 1s infinite linear;
}

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

/* Additional utility classes */
.text-center { text-align: center; }
.mb-3 { margin-bottom: 1rem; }
.mt-3 { margin-top: 1rem; }
.p-3 { padding: 1rem; }
.border-rounded { border-radius: 8px; }

.project-description{
    font-size: 0.9em;
}


 @media (max-width: 720px) { .optifangs-logo {width: 100%;} }

.optifangs-logo {
    height: auto;
}

.navigation-cards-row {
    margin-top: 50px;
}

/* Navigation Cards Styles */
.navigation-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

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

.navigation-card .card-image {
    width: 100%;
    height: auto;
    display: block;
}

.navigation-card .nav-button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 15px 20px;
    margin: 0;
    border-radius: 0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navigation-card .nav-button:hover {
    text-decoration: none;
    transform: none;
}

.optifangs-subtitle {
    margin-bottom:20px;
}

.capabilities-description {
    margin-top:20px; 
    margin-bottom:20px;
}
.dosage-description {
    margin-bottom:20px;
}

a#report:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

a#report:not(:disabled) {
  opacity: 1;
  cursor: pointer;
}

a#report2:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

a#report2:not(:disabled) {
  opacity: 1;
  cursor: pointer;
}

/* ===================== DSS (Sistema de Decisión) ===================== */
.dss-page {
    padding: 40px 24px;
}

.dss-container {
    max-width: 1180px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 48px 56px;
}

.dss-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 3px solid #8cc63f;
}

.dss-main-title {
    color: #007A33;
    font-family: 'Titillium Web', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    margin: 0 0 14px 0;
}

.dss-subtitle {
    color: #6a7d6c;
    font-size: 1.5rem;
    margin: 0;
}

/* Breadcrumb / historial de pasos */
.dss-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    align-items: center;
}

.dss-crumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eef7e3;
    color: #2c3e50;
    border: 1px solid #cfe8ad;
    border-radius: 22px;
    padding: 11px 20px;
    font-size: 1.3rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.dss-crumb:hover {
    background: #8cc63f;
    color: #ffffff;
    border-color: #8cc63f;
}

.dss-crumb .dss-crumb-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #007A33;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
}

.dss-crumb-sep {
    color: #cfd8cf;
}

/* Pregunta actual */
.dss-question {
    font-family: 'Titillium Web', sans-serif;
    font-weight: 600;
    font-size: 2.6rem;
    color: #2c3e50;
    text-align: center;
    margin: 24px 0 40px 0;
}

/* Opciones (botones grandes) */
.dss-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-bottom: 10px;
}

@media (max-width: 640px) {
    .dss-options { grid-template-columns: 1fr; }
}

.dss-option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 120px;
    text-align: center;
    background: linear-gradient(135deg, #8cc63f 0%, #007A33 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 14px;
    padding: 30px 26px;
    font-size: 1.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 122, 51, 0.18);
    text-decoration: none;
}

.dss-option-btn:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 122, 51, 0.28);
    text-decoration: none;
}

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

/* Tarjeta de resultado */
.dss-result-card {
    background: linear-gradient(135deg, #007A33 0%, #00662b 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 44px 40px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 122, 51, 0.25);
    animation: dss-pop 0.3s ease;
}

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

.dss-result-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.dss-result-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.25rem;
    opacity: 0.85;
    margin-bottom: 10px;
}

.dss-result-name {
    font-family: 'Titillium Web', sans-serif;
    font-weight: 700;
    font-size: 2.9rem;
    margin: 0 0 24px 0;
}

.dss-result-desc {
    font-size: 1.6rem;
    line-height: 1.65;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 24px 30px;
    margin: 0;
}

/* Resultado "no analizado" */
.dss-result-card.dss-result-na {
    background: linear-gradient(135deg, #6a7d6c 0%, #5e6f60 100%);
    box-shadow: 0 8px 24px rgba(106, 125, 108, 0.25);
}

/* Barra de acciones */
.dss-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
}

.dss-actions .btn {
    min-width: 240px;
    font-size: 1.55rem;
    font-weight: 600;
    padding: 18px 30px;
}

/* Selector de granja del DSS */
.dss-farm-select {
    margin-bottom: 28px;
}

.dss-farm-picker {
    background: #eef7e3;
    border: 1px solid #cfe8ad;
    border-radius: 12px;
    padding: 20px 24px;
}

.dss-farm-label {
    display: block;
    font-family: 'Titillium Web', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: #007A33;
    margin-bottom: 10px;
}

.dss-farm-picker .form-group,
.dss-farm-picker .selectize-control {
    margin-bottom: 0;
}

.dss-farm-picker .selectize-input,
.dss-farm-picker select.form-control {
    font-size: 1.35rem;
    padding: 14px 16px;
}

/* Crumb fijo (tipo de explotación deducido, no clicable) */
.dss-crumb-fixed {
    background: #007A33;
    color: #ffffff;
    border-color: #007A33;
    cursor: default;
}

.dss-crumb-fixed .dss-crumb-step {
    background: #ffffff;
    color: #007A33;
}

.dss-crumb-fixed:hover {
    background: #007A33;
    color: #ffffff;
    border-color: #007A33;
}
