body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: rgb(244, 248, 253);
    min-height: 100vh;
    overflow-y: auto;
}
.login-form {
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.error {
    color: red;
    margin-bottom: 10px;
}
input[type="password"] {
    padding: 8px;
    margin: 10px 0;
    width: 200px;
}
input[type="submit"] {
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}
.message {
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}
.form-group {
    margin-bottom: 15px;
}
label {
    display: block;
    margin-bottom: 5px;
}
input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-size: inherit;
    resize: vertical;
}
select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 1em;
    padding-right: 32px;
}
select:hover {
    border-color: #bbb;
}
select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}
button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
button:hover {
    background-color: #45a049;
}
.results {
    margin-top: 30px;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
th {
    background-color: #f5f5f5;
}
.land-use-image {
    margin-top: 20px;
    width: 100%;
}
.land-use-image img {
    width: 100%;
    height: auto;
    display: block;
}
.logo {
    text-align: center;
    margin-bottom: 2rem;
    width: 100%;
}
.logo img {
    max-width: 300px;
    height: auto;
}
.attribution {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
}
.climate-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2em;
}
.climate-table th,
.climate-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: right;
}
.climate-table th:first-child,
.climate-table td:first-child {
    text-align: left;
}
.climate-table th {
    background-color: #f5f5f5;
}
.climate-table tr.subheader {
    background-color: #f9f9f9;
}
.climate-section {
    margin-top: 2em;
}
.climate-section h3 {
    margin-bottom: 1em;
}
.source-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0 20px 0;
    font-size: 0.8em;
    color: #6c757d;
}
.source-box small {
    display: block;
    line-height: 1.4;
}

.base-data-box {
    background-color: #e9f5ff;
    border: 1px solid #b8e2ff;
    border-radius: 4px;
    padding: 12px;
    margin: 10px 0 20px 0;
    color: #0066cc;
    font-size: 0.8em;
}

.base-data-box h4 {
    margin: 0 0 8px 0;
    color: #004d99;
}

.base-data-box p {
    margin: 4px 0;
}
.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5em;
}

.form-section h4 {
    color: #444;
    font-size: 1.2em;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.form-section h5 {
    color: #555;
    font-size: 1.1em;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.coordinates-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group.half {
    flex: 1;
    margin: 0;
}

.form-divider {
    text-align: center;
    margin: 20px 0;
    color: #666;
    position: relative;
}

.form-divider::before,
.form-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #ddd;
}

.form-divider::before {
    left: 0;
}

.form-divider::after {
    right: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.menu ul {
    list-style: none;
    padding: 20px;
    margin: 0;
    background: rgb(20, 24, 33);
    border-bottom: 1px solid #dee2e6;
}

.menu li {
    display: inline;
    margin-right: 20px;
}

.menu a {
    text-decoration: none;
    color: #909CB5;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.menu a:hover {
    background-color: #282F3D;
    color: #4f4f4f;
}

/* Dropdown Menu Styles */
.menu-category {
    position: relative;
    display: inline-block;
}

.category-name {
    color: #909CB5;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-block;
}

.category-name:hover {
    background-color: #282F3D;
    color: #ffffff;
}

.menu-category:hover .dropdown {
    display: block;
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgb(20, 24, 33);
    min-width: 250px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 6px;
    padding: 8px 0;
    z-index: 1000;
    margin-top: 5px;
}

.dropdown li {
    display: block;
    margin: 0;
}

.dropdown a {
    display: block;
    padding: 10px 16px;
    color: #909CB5;
    text-decoration: none;
    border-radius: 0;
    transition: background-color 0.2s;
}

.dropdown a:hover {
    background-color: #282F3D;
    color: #ffffff;
}
.risk-cell {
    text-align: center;
    font-weight: 600; /* Made slightly bolder for better readability */
    padding: 8px 12px;
}
.legend-item {
    padding: 5px 10px;
    margin: 0 5px;
    border-radius: 4px;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-icon {
    width: 60px;
    height: 60px;
    background-image: url('/css/images/envoria-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0 auto 20px;
    animation: pulse-icon 1.5s ease-in-out infinite;
}

.loading-content p {
    margin-top: 20px;
    font-size: 18px;
    color: #333;
}

@keyframes pulse-icon {
    0% {
        opacity: 1;
        filter: grayscale(0%);
    }
    50% {
        opacity: 0.5;
        filter: grayscale(100%);
    }
    100% {
        opacity: 1;
        filter: grayscale(0%);
    }
}

.climate-section {
    margin-bottom: 2em;
}

.climate-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.climate-table th,
.climate-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: right;
}

.climate-table th:first-child,
.climate-table td:first-child {
    text-align: left;
}

.climate-table th {
    background-color: #f5f5f5;
}

.climate-table tr.subheader {
    background-color: #e9ecef;
    font-weight: bold;
}

.climate-table tr.subheader td {
    text-align: center;
}

.risk-legend {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.risk-legend h4 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.legend-item {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Risk Level Background Colors */
.bg-lightgreen {
    background-color: rgb(129, 199, 132); /* Light green */
}

.bg-green {
    background-color: rgb(76, 175, 80); /* Light orange/peach */
}
.bg-orange {
    background-color: rgb(255, 152, 0); /* Lighter red */
}
.bg-red {
    background-color: rgb(244, 67, 54); /* Light salmon */
}

.bg-darkred {
    background-color: rgb(183, 28, 28); /* Dark red */
}

/* Text colors for risk levels - adjusted for better contrast with new background colors */
.text-white {
    color: #ffffff;
}

.text-dark {
    color: #343a40;
}

/* Risk Summary Table Styles */
.risk-summary table {
    border-collapse: separate;
    border-spacing: 2px;
    background-color: white;
}

.risk-summary table td,
.risk-summary table th {
    border: none;
    padding: 10px;
}

.risk-summary table th {
    background-color: #f5f5f5;
}

.risk-cell {
    text-align: center;
    font-weight: 600;
    padding: 8px 12px;
}
.methodology-content hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid #dee2e6;
}

.table-responsive {
    overflow-x: auto;
    max-width: 100%;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    margin-bottom: 0;
    white-space: nowrap;
}

.table-responsive th:first-child,
.table-responsive td:first-child,
.table-responsive th:nth-child(2),
.table-responsive td:nth-child(2) {
    position: sticky;
    left: 0;
    background: white;
    z-index: 1;
}

.table-responsive td:nth-child(2) {
    left: 120px; /* Adjust based on the width of the first column */
}

.table-responsive th:nth-child(2) {
    left: 120px; /* Should match the td left value */
}

/* Add shadow to indicate more content */
.table-responsive::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 15px;
    pointer-events: none;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(0,0,0,0.1));
}

/* Methodology View Specific Styles */
.container-methodology {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    padding-right: 2vw;
    padding-left: 2vw;
    margin-right: auto;
    margin-left: auto;
    overflow-x: visible;
}

.methodology-content hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid #dee2e6;
}

.methodology-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
    font-size: 0.8rem;
}

.methodology-table th,
.methodology-table td {
    padding: 6px 8px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
    line-height: 1.3;
}

/* Print-specific styles */
@media print {
    .methodology-table {
        font-size: 0.75rem;
        page-break-inside: auto;
    }

    .methodology-table th,
    .methodology-table td {
        padding: 4px 6px;
    }

    .form-section {
        page-break-inside: avoid;
        box-shadow: none;
        padding: 10px;
    }

    .container-methodology {
        max-width: 100%;
        padding: 0;
    }

    /* Ensure table headers repeat on each page */
    .methodology-table thead {
        display: table-header-group;
    }

    /* Ensure table rows don't break across pages */
    .methodology-table tr {
        page-break-inside: avoid;
    }
}

/* Coordinate Input Styles */
.coordinates-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    position: relative;
}

.coordinates-container {
    margin-bottom: 20px;
}

.add-coordinates {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.remove-coordinates {
    background: #f44336;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 12px;
    cursor: pointer;
    position: absolute;
    right: -12px;
    top: -12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.coordinate-point {
    font-weight: bold;
    margin-bottom: 5px;
}

.text-center {
    text-align: center;
}

.activity-examples {
    margin-top: 8px;
    font-size: 0.8em;
    color: #666;
}

.char-counter {
    text-align: right;
    font-size: 0.8em;
    color: #666;
}

textarea#activity_description {
    font-size: 0.9em;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
}
.btn:hover {
    background-color: #45a049;
}
.btn-primary {
    background-color: #007bff;
}
.btn-primary:hover {
    background-color: #0056b3;
}
.btn-success {
    background-color: #28a745;
}
.btn-success:hover {
    background-color: #218838;
}
.actions {
    margin-bottom: 20px;
}

/* Log View Styles */
.log-container {
    background: #1e1e1e;
    color: #fff;
    padding: 15px;
    border-radius: 5px;
    font-family: monospace;
    white-space: pre-wrap;
    max-height: 80vh;
    overflow-y: auto;
    margin-bottom: 20px;
}

.tab {
    display: none;
}

.tab.active {
    display: block;
}

.tab-buttons {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.tab-button {
    padding: 10px 20px;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: #e0e0e0;
}

.tab-button.active {
    background: #007bff;
    color: white;
}

/* Add horizontal scroll for wide tables in form-section */
.form-section.risk-criteria-scroll {
    overflow-x: auto;
    padding-bottom: 10px;
}

/* Standards List Styles */
.standards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.standard-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: white;
}

.standard-item.completed {
    border-left: 4px solid #28a745;
}

.standard-item.processing {
    border-left: 4px solid #ffc107;
}

.standard-item h3 {
    margin-top: 0;
    color: #333;
}

.standard-item p {
    margin: 8px 0;
    color: #666;
}

.processing-status {
    color: #ffc107;
    font-weight: bold;
}

/* Button styles for standards pages */
.button {
    display: inline-block;
    padding: 8px 16px;
    margin: 5px 5px 5px 0;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.button:hover {
    background-color: #0056b3;
}