/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    display: flex;
    background: #2b1f17;
    color: #f5e9d3;
}

/*==================== SIDEBAR ====================*/
.sidebar {
    width: 240px;
    background: #3a2a1f;
    border-right: 3px solid #5a4636;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.logo {
    font-family: 'Rye', serif;
    font-size: 1.8rem;
    text-align: center;
}

.nav-btn {
    width: 100%;
    padding: 10px;
    background: #2b1f17;
    border: 2px solid #5a4636;
    border-radius: 6px;
    color: #f5e9d3;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
}

.nav-btn.active,
.nav-btn:hover {
    background: #8b5e34;
}

/*==================== MAIN CONTENT ====================*/
.main-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.overview-header h1 {
    font-family: 'Rye', serif;
    font-size: 2rem;
}

.date {
    opacity: 0.8;
    margin-top: 4px;
}

/*==================== STATS GRID ====================*/
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    background: #3a2a1f;
    border: 2px solid #5a4636;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.stat-number {
    font-size: 1.6rem;
    margin-top: 6px;
    color: #f5d08a;
}

/*==================== PANELS ====================*/
.panel {
    background: #3a2a1f;
    border: 2px solid #5a4636;
    border-radius: 10px;
    padding: 16px;
}

.panel-title {
    font-family: 'Rye', serif;
    margin-bottom: 10px;
}

/*==================== LISTS ====================*/
.list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-item {
    padding: 10px;
    background: #2b1f17;
    border: 2px solid #5a4636;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-item:hover {
    background: #4a3527;
}

/* Buttons inside list items */
.item-actions button {
    padding: 6px 10px;
    background: #8b5e34;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
}

.item-actions button:hover {
    background: #a97446;
}

/*==================== GRID CARDS ====================*/
#livestock-grid,
#fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.animal-card,
.field-card {
    background: #2b1f17;
    border: 2px solid #5a4636;
    border-radius: 8px;
    padding: 12px;
}

/*==================== MODAL ====================*/
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #3a2a1f;
    border: 3px solid #5a4636;
    padding: 20px;
    width: 300px;
    border-radius: 10px;
}

.modal-content label {
    display: block;
    margin-top: 10px;
}

.modal-content input {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    background: #5a4636;
    border: 2px solid #5a4636;
    color: #f5e9d3;
    border-radius: 6px;
}

.modal-action {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
}

/*==================== CALENDAR ====================*/
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 10px;
}

.calendar-cell {
    background: #2b1f17;
    border: 2px solid #5a4636;
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
}

.calendar-cell:hover {
    background: #8b5e34;
}

.calendar-details {
    margin-top: 16px;
    background: #2b1f17;
    border: 2px solid #5a4636;
    padding: 12px;
    border-radius: 8px;
}
