body {
    background-color: #ffffff;
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-size: 16px;
    margin: 0;
    padding: 0;
    color: #2c1810;
    line-height: 1.4;
}

.container {
    padding: 0;
}

.main-content {
    margin-left: 150px;
    padding: 0;
    transition: all 0.3s ease-in-out;
    height: calc(100vh - 64px);
}

/* Only adjust width when sidebar is unpinned (not just collapsed) */
.main-content.sidebar-unpinned {
    margin-left: 0;
    width: 100%;
}

.card {
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 8px;
    padding: 0;
    background-color: #ffffff;
    border: 1px solid #d4d4d4;
    border-radius: 0;
}

#googleLogin {
    background-color: #fff;
    color: #757575;
    border: 1px solid #ddd;
}

#googleLogin:hover {
    background-color: #f1f3f4;
}

.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 48px;
    bottom: 0;
    left: 0;
    z-index: 1000;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    width: 150px;
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.3s ease-in-out;
}


.sidebar.collapsed {
    transform: translateX(-150px);
}

/* Sidebar trigger bar */
.sidebar-trigger {
    position: fixed;
    top: 48px;
    left: 0;
    width: 4px;
    height: 100vh;
    background-color: #2c1810;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 5;
    cursor: pointer;
}

.sidebar.collapsed + .sidebar-trigger {
    opacity: 0.3;
}

.sidebar-trigger:hover {
    opacity: 0.5;
}

.sidebar-header {
    position: relative;
    height: 32px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 8px;
}

.sidebar-pin {
    color: #2c1810;
    padding: 0;
    font-size: 16px;
    cursor: pointer;
    background: none;
    border: none;
}

.sidebar-pin:hover {
    color: #000;
}

.sidebar-pin.pinned i {
    transform: rotate(45deg);
}

/* Make sure sidebar links are also bold */
.sidebar .nav-link {
    font-weight: bold;
    padding: 2px 0 2px 8px;
}

/* Adjust sidebar nav items for better spacing with new font size */
.sidebar .nav-item {
    padding: 0;
    margin: 0;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding: 0 0 0 8px;
    overflow-x: hidden;
    overflow-y: auto;
}



/* Typography adjustments */
h1 {
    font-size: 16px;
    margin: 0 0 8px 0;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #2c1810;
}

h2 {
    font-size: 14px;
    margin: 0 0 6px 0;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

h3 {
    font-size: 13px;
    margin: 0 0 4px 0;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

h4, h5, h6 {
    font-size: 12px;
    margin: 0 0 4px 0;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.small {
    font-size: 11px;
}

/* Form adjustments */
.form-control {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    padding: 0;
    height: auto;
    background-color: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 0;
}

.btn {
    /* font-family: "Inter", sans-serif; */
    /* font-size: 16px; */
    /* padding: 3px; */
    /* background-color: #f5f5f0; */
    /* border: 1px solid #d4d4d4; */
    /* border-radius: 0; */
    /* text-transform: uppercase; */
    /* letter-spacing: 0.5px; */
}

.btn:hover {
    background-color: #e6e6e1;
}

footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 12px;
    left: 120px;
    background-color: #ffffff;
    padding: 0;
    margin: 0;
}


/* Table styles */
.table {
    border: 1px solid #d4d4d4;
    margin-bottom: 8px;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: "Inter", sans-serif;
}

.table td, .table th {
    padding: 8px 12px;
    border: 1px solid #d4d4d4;
    font-size: 16px;
    line-height: 1.4;
    vertical-align: middle;
}

.table thead th {
    background-color: #f8f9fa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #2c1810;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1;
}

.table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.table tbody tr:hover {
    background-color: #f0f0f0;
}

.table tbody td {
    border-top: 1px solid #e9ecef;
}

/* Add subtle shadow to table */
.table-container {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 2px;
    overflow: hidden;
}

/* Style for table headers */
.table th {
    white-space: nowrap;
    text-align: left;
}

/* Style for numeric columns */
.table td.numeric {
    text-align: left;
    font-variant-numeric: tabular-nums;
}

/* Style for date columns */
.table td.date {
    white-space: nowrap;
}



.nav-item {
    padding: 0;
}

/* Add typewriter-style underlines for links */
a {
    color: #2c1810;
    text-decoration: none;
    border-bottom: 1px dotted #2c1810;
}

a:hover {
    border-bottom: 1px solid #2c1810;
}

.action-buttons-row {
    display: none;
    background-color: #f9fafb;
}
.action-buttons-row td {
    padding: 0.75rem 1rem;
}
.row {
    cursor: pointer;
    transition: background-color 0.2s;
}
.row:hover {
    background-color: #f3f4f6;
}
.row.active {
    font-weight: 600;
    background-color: #e5e7eb;
}

.farm-map-container {
    width: 100%;
    height: 80vh;
    min-height: 80vh;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Crop link tooltip styles */
.crop-link {
    transition: all 0.2s ease;
    position: relative;
    z-index: 1000;
}

.crop-link:hover {
    text-decoration: none;
    color: #1d4ed8 !important;
    font-weight: 500;
}

/* CSS Tooltip */
.crop-link[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100%;
    margin-bottom: 5px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: pre-line;
    z-index: 1000;
    width: 300px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.crop-link[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100%;
    margin-bottom: -5px;
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    pointer-events: none;
}

/* Field link tooltip styles */
.field-link {
    transition: all 0.2s ease;
    position: relative;
    z-index: 1000;
}



.field-link:hover {
    text-decoration: none;
    color: #1d4ed8 !important;
    font-weight: 500;
}

/* CSS Tooltip for field links */
.field-link[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100%;
    margin-bottom: 5px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: pre-line;
    z-index: 1000;
    width: 300px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.field-link[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100%;
    margin-bottom: -5px;
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    pointer-events: none;
}

/* Ensure navigation dropdowns appear above Leaflet map */
#user-menu,
#farm-selector-menu {
    z-index: 999;
}

.leaflet-container {
    z-index: 1;
}