/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
}

/* Disabled label styles */
.disabled-label {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 3px 8px;
    font-size: 0.9em;
    color: #fff;
    background: linear-gradient(45deg, #dc3545, #c82333);
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    /* animation: pulse 2s infinite; */
    position: relative;
}

.disabled-label::before {
    content: '•';
    display: inline-block;
    margin-right: 5px;
    font-size: 1.2em;
    animation: blink 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Navbar styles */
.navbar {
    background-color: #ffffff;
    padding: 0.8rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: bold;
    color: #1a73e8;
}

.logo i {
    color: #1a73e8;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #1a73e8;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 1rem;
}

.nav-links a:hover {
    color: #1557b0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1a73e8;
    font-size: 1rem;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background-color: #f8f9fa;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    flex: 1;
    background-color: #f8f9fa;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
    width: 100%;
    position: relative;
}

/* Sidebar styles */
.sidebar {
    width: 280px;
    background-color: #ffffff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    padding: 1.5rem 0;
    height: calc(100vh - 60px);
    position: fixed;
    top: 60px;
    left: 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 999;
}

.sidebar-section {
    margin-bottom: 1.5rem;
    padding: 0 1.5rem;
}

.sidebar-section h3 {
    color: #7f8c8d;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
    position: relative;
}

.sidebar-menu > li > a {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #000000cc;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-menu > li > a:hover {
    background-color: rgba(26, 115, 232, 0.1);
    color: #1557b0;
}

.sidebar-menu > li.active > a {
    background-color: #1a73e8;
    color: white;
}

.sidebar-menu > li > a i {
    width: 1.25rem;
    text-align: center;
    font-size: 1em;
}

/* Submenu styles */
.submenu {
    display: none;
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar-menu li.active .submenu {
    display: block;
}

.submenu li {
    margin: 0;
    position: relative;
}

.submenu a {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    font-size: 0.95em;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #000000cc;
    text-decoration: none;
    transition: all 0.3s ease;
}

.submenu a:hover {
    background-color: rgba(26, 115, 232, 0.1);
    color: #1557b0;
}

.submenu li.active a {
    background-color: #1a73e8;
    color: white;
}

.submenu a i {
    width: 1.25rem;
    text-align: center;
    font-size: 1em;
    opacity: 0.8;
}

.submenu li.active a i {
    opacity: 1;
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    margin-left: 280px;
    padding: 20px;
    background-color: #f8f9fa;
    min-height: calc(100vh - 60px);
    width: calc(100% - 280px);
    overflow-x: auto;
}

.content-header {
    margin-bottom: 10px;
}

.content-header h1 {
    font-size: 28px;
    color: #1a73e8;
    margin: 0;
}

.breadcrumb {
    color: #6c757d;
    font-size: 14px;
    margin-top: 5px;
}

.breadcrumb span {
    color: #2c3e50;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

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

.stat-card i {
    font-size: 2.5rem;
    margin-right: 20px;
    color: #3498db;
}

.stat-info h3 {
    margin: 0;
    font-size: 16px;
    color: #6c757d;
}

.stat-info p {
    margin: 5px 0 0;
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

/* Dashboard Welcome */
.dashboard-welcome {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dashboard-welcome h2 {
    color: #2c3e50;
    margin: 0 0 10px;
    font-size: 20px;
}

.dashboard-welcome p {
    color: #6c757d;
    margin: 0;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 240px;
    }
    
    .dashboard-content {
        margin-left: 240px;
        width: calc(100% - 240px);
    }

    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        height: 50px;
        padding: 0.5rem 3%;
    }

    .dashboard-container {
        margin-top: 50px;
        min-height: calc(100vh - 50px);
    }

    .sidebar {
        width: 100%;
        height: calc(100vh - 50px);
        top: 50px;
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }
    
    .dashboard-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }

    .section-container {
        padding: 15px;
    }

    .content-header {
        margin-bottom: 0px;
    }

    .table-container {
        margin: 0 -15px;
        border-radius: 0;
    }

    .flash-messages {
        top: 60px;
        right: 10px;
        left: 10px;
        width: calc(100% - 20px);
    }

    /* Navbar */
    .navbar {
        padding: 0.5rem 3%;
    }

    .logo {
        font-size: 1.25rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-nav-toggle {
        display: block;
    }

    /* Dashboard */
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-card i {
        font-size: 2rem;
    }

    .stat-info p {
        font-size: 20px;
    }

    .dashboard-welcome {
        padding: 20px;
    }

    /* Tables */
    .feeds-table,
    .farms-table,
    .batches-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .feeds-table th,
    .feeds-table td,
    .farms-table th,
    .farms-table td,
    .batches-table th,
    .batches-table td {
        padding: 12px 8px;
        font-size: 14px;
    }

    /* Headers */
    .feeds-header,
    .farms-header,
    .batches-header {
        flex-direction: column;
        gap: 15px;
    }

    .search-bar {
        width: 100%;
    }

    .add-feed-btn,
    .add-farm-btn,
    .add-batch-btn {
        width: 100%;
        justify-content: center;
    }

    /* Forms */
    .form-container {
        padding: 25px;
        margin: 0 15px;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .cancel-btn,
    .submit-btn {
        width: 100%;
    }

    /* Details View */
    .farm-details,
    .feed-details {
        padding: 20px;
        margin: 0 10px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .edit-btn,
    .status-btn,
    .delete-btn,
    .back-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 0.5rem 2%;
    }

    .logo {
        font-size: 1rem;
    }

    .logo i {
        font-size: 1.1rem;
    }

    /* Content */
    .content-header h1 {
        font-size: 20px;
    }

    .breadcrumb {
        font-size: 12px;
    }

    /* Tables */
    .feeds-table th,
    .feeds-table td,
    .farms-table th,
    .farms-table td,
    .batches-table th,
    .batches-table td {
        padding: 8px 6px;
        font-size: 13px;
    }

    /* Forms */
    .form-group label {
        font-size: 14px;
    }

    .form-group input,
    .form-group select {
        font-size: 14px;
        padding: 8px;
    }

    /* Details View */
    .detail-group label {
        font-size: 16px;
    }

    .info-item label {
        font-size: 14px;
    }

    .info-item span {
        font-size: 16px;
    }
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #2c3e50;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.3rem;
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }

    .sidebar.active {
        display: block;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .sidebar,
    .action-buttons,
    .form-actions,
    .add-feed-btn,
    .add-farm-btn,
    .add-batch-btn {
        display: none !important;
    }

    .dashboard-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .feeds-table,
    .farms-table,
    .batches-table {
        display: table !important;
        width: 100% !important;
    }

    .feeds-table th,
    .feeds-table td,
    .farms-table th,
    .farms-table td,
    .batches-table th,
    .batches-table td {
        border: 1px solid #ddd !important;
    }
}

/* Settings styles */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-section {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.settings-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-section h2 i {
    color: #e74c3c;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-form label {
    color: #2c3e50;
    font-weight: 500;
}

.settings-form input[type="text"],
.settings-form input[type="password"],
.settings-form select {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.settings-form input[type="text"]:focus,
.settings-form input[type="password"]:focus,
.settings-form select:focus {
    outline: none;
    border-color: #e74c3c;
}

.settings-form small {
    color: #7f8c8d;
    font-size: 0.8rem;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
}

.settings-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.settings-btn:hover {
    background-color: #c0392b;
}

/* Responsive adjustments for settings */
@media (max-width: 768px) {
    .settings-section {
        padding: 1.5rem;
    }
    
    .settings-btn {
        width: 100%;
    }
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 999;
    max-width: 400px;
    width: calc(100% - 40px);
}

.flash-message {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flash-message.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.flash-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.flash-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.flash-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Farms styles */
.farms-container {
    padding: 20px;
    
}

.farms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-bar {
    position: relative;
    width: 300px;
}

.search-bar input {
    width: 100%;
    padding: 10px 35px 10px 15px;
    border: 1px solid #1a73e8;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: #1557b0;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.search-bar i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.add-farm-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.add-farm-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.farms-table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow-x: scroll;
}

.farms-table {
    width: 100%;
    border-collapse: collapse;
    
}

.farms-table th,
.farms-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.farms-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

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

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.action-btn {
    background: none;
    font-size: 15px;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    height: 32px;
    text-decoration: none;
    gap: 5px;
}

.action-btn.view, .action-btn.edit, .action-btn.schedule{
    background-color: #1a73e8;
    color: white;
}

.action-btn.view:hover, .action-btn.edit:hover, .action-btn.schedule:hover {
    background-color: #1557b0;
}

.action-btn.delete {
    background-color: #dc3545;
    color: white;
}

.action-btn.delete:hover {
    background-color: #c82333;
}

/* Responsive adjustments for action buttons */
@media (max-width: 768px) {
    .action-buttons {
        justify-content: flex-start;
        gap: 6px;
    }

    .action-btn {
        padding: 8px;
        min-width: 28px;
        height: 28px;
    }

    .action-btn i {
        font-size: 14px;
    }

    /* Ensure table cells with actions have proper width */
    .feeds-table td:last-child,
    .farms-table td:last-child,
    .batches-table td:last-child {
        min-width: 100px;
        white-space: nowrap;
        
    }
}

@media (max-width: 576px) {
    .action-buttons {
        gap: 4px;
    }

    .action-btn {
        padding: 10px;
        min-width: 26px;
        height: 26px;
    }

    .action-btn i {
        font-size: 13px;
    }
}

/* Farm Form Styles */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
}

.farm-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.farm-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.farm-form label {
    font-weight: 500;
    color: #2c3e50;
}

.farm-form input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.farm-form input:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.cancel-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: #f8f9fa;
    border-color: #999;
}

.submit-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #1a73e8;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.submit-btn:hover {
    background: #1557b0;
    transform: translateY(-2px);
}

/* Responsive adjustments for farm forms */
@media (max-width: 768px) {
    .form-container {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .cancel-btn,
    .submit-btn {
        width: 100%;
    }
}

/* Farm Details Styles */
.farm-details-container {
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.farm-info-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-bottom: 20px;
}

.info-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item label {
    color: #666;
    font-size: 0.9rem;
}

.info-item span {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 500;
}

.farm-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.farm-actions .action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.farm-actions .action-btn.edit {
    background: #f1c40f;
    color: white;
}

.farm-actions .action-btn.delete {
    background: #e74c3c;
    color: white;
}

.farm-actions .action-btn.back {
    background: #95a5a6;
    color: white;
}

.farm-actions .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments for farm details */
@media (max-width: 768px) {
    .farm-info-card {
        padding: 20px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .farm-actions {
        flex-direction: column;
    }

    .farm-actions .action-btn {
        width: 100%;
        justify-content: center;
    }
}

.shed-capacities {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shed-capacity {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.shed-number {
    font-weight: 600;
    color: #495057;
    min-width: 80px;
}

.add-shed-btn {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
}

.capacity-value {
    color: #212529;
}

/* Farm Details View Styles */
.farm-details {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
}

.detail-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.detail-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-group label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.detail-group label i {
    margin-right: 8px;
    color: #e74c3c;
}

.detail-group span {
    font-size: 16px;
    color: #2c3e50;
}

.shed-capacities {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.shed-capacity {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s ease;
}

.shed-capacity:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.shed-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shed-number {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.capacity-value {
    font-size: 18px;
    color: #2c3e50;
    font-weight: 600;
}

.capacity-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.capacity-fill {
    height: 100%;
    background-color: #e74c3c;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.edit-btn, .delete-btn, .back-btn, .status-btn, .schedule-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.edit-btn {
    background-color: #f1c40f;
    color: #2c3e50;
    border: none;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
}

.status-btn {
    background-color: #1478db;
    color: #ffffff;
    border: 1px solid #ddd;
}

.back-btn {
    background-color: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #ddd;
}

.edit-btn:hover, .delete-btn:hover, .back-btn:hover, .status-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.edit-btn:hover {
    background-color: #f39c12;
}

.delete-btn:hover {
    background-color: #c0392b;
}

.back-btn:hover {
    background-color: #e9ecef;
}

.status-btn:hover {
    background-color: #1478db;
}

@media (max-width: 768px) {
    .farm-details {
        padding: 20px;
    }

    .shed-capacities {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .edit-btn, .delete-btn, .back-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Batch styles */
.batches-container {
    padding: 20px;
}

.batches-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.add-batch-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.add-batch-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.batches-table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow-x: scroll;
    
}

.batches-table {
    width: 100%;
    border-collapse: collapse;
}

.batches-table th,
.batches-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.batches-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

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

/* Batch Form Styles */
.batch-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.batch-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.batch-form label {
    font-weight: 500;
    color: #2c3e50;
}

.batch-form input,
.batch-form select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.batch-form input:focus,
.batch-form select:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Responsive adjustments for batches */
@media (max-width: 768px) {
    .batches-header {
        flex-direction: column;
        gap: 15px;
    }

    .search-bar {
        width: 100%;
    }

    .add-batch-btn {
        width: 100%;
        justify-content: center;
    }

    .batches-table {
        display: block;
        overflow-x: auto;
    }
}

/* Feed styles */
.feeds-container {
    padding: 20px;
}

.feeds-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.add-feed-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.add-feed-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.feeds-table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.feeds-table {
    width: 100%;
    border-collapse: collapse;
}

.feeds-table th,
.feeds-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.feeds-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

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

/* Feed Form Styles */
.feed-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feed-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feed-form label {
    font-weight: 500;
    color: #2c3e50;
}

.feed-form input,
.feed-form select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.feed-form input:focus,
.feed-form select:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Responsive adjustments for feeds */
@media (max-width: 768px) {
    .feeds-header {
        flex-direction: column;
        gap: 15px;
    }

    .search-bar {
        width: 100%;
    }

    .add-feed-btn {
        width: 100%;
        justify-content: center;
    }

    .feeds-table {
        display: block;
        overflow-x: auto;
    }
}

/* Common Section Styles */
.section-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 0;
}

.section-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Search Bar - Common Style */
.search-bar {
    position: relative;
    width: 300px;
    flex-shrink: 0;
}

.search-bar input {
    width: 100%;
    padding: 10px 35px 10px 15px;
    border: 1px solid #1a73e8;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: #1557b0;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.search-bar i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

/* Add Button - Common Style */
.add-btn {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.add-btn:hover {
    background-color: #1557b0;
    transform: translateY(-2px);
}

/* Table Container - Common Style */
.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    margin-bottom: 20px;
    width: 100%;
}

/* Table - Common Style */
.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px; /* Ensures table doesn't get too compressed */
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

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

/* Form Container - Common Style */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
}

/* Form - Common Style */
.data-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Form Actions - Common Style */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.cancel-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.submit-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #1a73e8;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cancel-btn:hover {
    background: #f8f9fa;
    border-color: #999;
}

.submit-btn:hover {
    background: #1557b0;
    transform: translateY(-2px);
}

/* Details View - Common Style */
.details-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
}

.detail-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.detail-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-group label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.detail-group label i {
    margin-right: 8px;
    color: #e74c3c;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item label {
    color: #666;
    font-size: 0.9rem;
}

.info-item span {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .section-container {
        padding: 15px;
    }
}

@media (max-width: 992px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar {
        width: 100%;
    }

    .add-btn {
        width: 100%;
        justify-content: center;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }

    .form-container,
    .details-container {
        padding: 20px;
        margin: 0 10px;
    }

    .form-actions {
        flex-direction: column;
    }

    .cancel-btn,
    .submit-btn {
        width: 100%;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.3rem;
    }

    .data-table th,
    .data-table td {
        padding: 12px 8px;
        font-size: 13px;
    }

    .form-group label {
        font-size: 14px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 14px;
        padding: 8px;
    }

    .detail-group label {
        font-size: 14px;
    }

    .info-item label {
        font-size: 12px;
    }

    .info-item span {
        font-size: 14px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 70vh;
    overflow-y: auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.close {
    color: #666;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close:hover {
    color: #e74c3c;
}

/* Input Group Styles */
.input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-group input {
    flex: 1;
}

.input-group select {
    width: 120px;
}

/* Schedule Button Styles */
.schedule-btn {
    background-color: #1a73e8;
    color: white;
    border: none;
}

.schedule-btn:hover {
    background-color: #1557b0;
    transform: translateY(-2px);
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 20% auto;
        width: 95%;
        padding: 15px;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    .input-group {
        flex-direction: column;
        gap: 10px;
    }

    .input-group select {
        width: 100%;
    }
}

/* Medicines styles */
.medicines-container {
    padding: 20px;
}

.medicines-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.add-medicine-btn {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.add-medicine-btn:hover {
    background-color: #1557b0;
    transform: translateY(-2px);
}

.medicines-table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.medicines-table {
    width: 100%;
    border-collapse: collapse;
}

.medicines-table th,
.medicines-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.medicines-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

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

/* Responsive adjustments for medicines */
@media (max-width: 768px) {
    .medicines-header {
        flex-direction: column;
        gap: 15px;
    }

    .search-bar {
        width: 100%;
    }

    .add-medicine-btn {
        width: 100%;
        justify-content: center;
    }

    .medicines-table {
        display: block;
        overflow-x: auto;
    }
}

/* Batch Selection Styles */
.batch-selection {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-top: 5px;
}

.batch-checkbox {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.batch-checkbox:last-child {
    border-bottom: none;
}

.batch-checkbox input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.batch-checkbox label {
    cursor: pointer;
    flex: 1;
    font-size: 14px;
    color: #2c3e50;
}

.batch-checkbox:hover {
    background-color: #f8f9fa;
}

/* Responsive adjustments for batch selection */
@media (max-width: 768px) {
    .batch-selection {
        max-height: 150px;
    }
    
    .batch-checkbox label {
        font-size: 13px;
    }
}

/* Vaccine Styles */
.vaccine-btn {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-right: 10px;
}

.vaccine-btn:hover {
    background-color: #1557b0;
}

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

.vaccines-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.add-vaccine-btn {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.add-vaccine-btn:hover {
    background-color: #1557b0;
}

.vaccines-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.vaccines-table th,
.vaccines-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.vaccines-table th {
    background-color: #1a73e8;
    color: white;
    font-weight: 500;
}

.vaccines-table tr:hover {
    background-color: #f5f5f5;
}

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

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.completed {
    background-color: #4caf50;
    color: white;
}

.status-badge.pending {
    background-color: #ff9800;
    color: white;
}

.action-btn.complete {
    background-color: #4caf50;
    color: white;
}

.action-btn.complete:hover {
    background-color: #388e3c;
}

/* Multi-select styles */
.multi-select {
    width: 100%;
    min-height: 100px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.multi-select option {
    padding: 8px;
    margin: 2px 0;
    border-radius: 2px;
}

.multi-select option:hover {
    background-color: #f0f0f0;
}

.multi-select option:checked {
    background-color: #e3f2fd;
    color: #1976d2;
}

.form-text {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 0.875rem;
} 

.add-dose-btn {
    background-color: #1a73e8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
}

/* View batch button special modification */
.view-details-actions {
    display: flex;
    flex-direction: row;
}

/* --- Select2 overrides for form-control look --- */
.select2-container--default .select2-selection--single {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    height: 48px;
    padding: 0;
    font-size: 14px;
    color: #000000;
    box-shadow: none;
    display: flex;
    align-items: center;
    transition: border-color 0.3s ease;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #000000;
    font-size: 14px;
    padding-left: 16px;
    padding-right: 32px;
    line-height: 48px;
    height: 48px;
    display: block;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 48px;
    right: 12px;
    top: 0;
    width: 24px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #000000 transparent transparent transparent;
    border-width: 6px 6px 0 6px;
    margin-left: -6px;
    margin-top: 18px;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default .select2-selection--single.select2-selection--focus {
    border-color: #e74c3c;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.select2-container--default .select2-selection--single:hover {
    border-color: #e74c3c;
}

/* Remove background highlight on open */
.select2-container--open .select2-selection--single {
    background-color: #fff;
}

/* Global Compact Overrides - reduce font sizes and paddings app-wide */
html {
	font-size: 15px;
}

body {
	font-size: 1.00rem;
}

/* Slightly tighten common paddings on larger screens too */
.dashboard-content,
.section-container,
.form-container,
.details-container,
.farm-details,
.farm-info-card,
.table-container {
	padding: 18px;
}

.data-table th,
.data-table td,
.feeds-table th,
.feeds-table td,
.farms-table th,
.farms-table td,
.batches-table th,
.batches-table td {
	padding: 12px 10px;
	font-size: 1.00rem;
}

.add-btn,
.add-farm-btn,
.add-feed-btn,
.add-batch-btn,
.submit-btn,
.cancel-btn,
.action-btn,
.status-btn,
.schedule-btn,
.edit-btn,
.delete-btn,
.back-btn {
	padding: 9px 16px;
	font-size: 1.00rem;
}

.logo { font-size: 1.15rem; }
.nav-links a, .user-info { font-size: 1.00rem; }

@media (max-width: 768px) {
	html { font-size: 13.5px; }
	body { font-size: 1.00rem; }

	.navbar {
		height: 46px;
		padding: 0.4rem 2.5%;
	}

	.dashboard-container {
		margin-top: 46px;
		min-height: calc(100vh - 46px);
	}

	.sidebar {
		padding: 1rem 0;
	}

	.sidebar-menu > li > a,
	.submenu a {
		padding: 0.6rem 0.8rem;
		font-size: 1.00rem;
	}

	.dashboard-content,
	.section-container,
	.form-container,
	.details-container,
	.farm-details,
	.farm-info-card,
	.table-container {
		padding: 14px;
	}

	.data-table th,
	.data-table td,
	.feeds-table th,
	.feeds-table td,
	.farms-table th,
	.farms-table td,
	.batches-table th,
	.batches-table td {
		padding: 10px 8px;
		font-size: 1.00rem;
	}

	.add-btn,
	.add-farm-btn,
	.add-feed-btn,
	.add-batch-btn,
	.submit-btn,
	.cancel-btn,
	.action-btn,
	.status-btn,
	.schedule-btn,
	.edit-btn,
	.delete-btn,
	.back-btn {
		padding: 8px 14px;
		font-size: 1.00rem;
	}

	.logo { font-size: 1.05rem; }
	.logo i { font-size: 1.15rem; }
	.nav-links a, .user-info { font-size: 1.00rem; }
}

@media (max-width: 576px) {
	html { font-size: 13px; }
	body { font-size: 1.00rem; }

	.navbar {
		height: 44px;
		padding: 0.35rem 2%;
	}

	.dashboard-container {
		margin-top: 44px;
		min-height: calc(100vh - 44px);
	}

	.dashboard-content,
	.section-container,
	.form-container,
	.details-container,
	.farm-details,
	.farm-info-card,
	.table-container {
		padding: 12px;
	}

	.data-table th,
	.data-table td,
	.feeds-table th,
	.feeds-table td,
	.farms-table th,
	.farms-table td,
	.batches-table th,
	.batches-table td {
		padding: 8px 6px;
		font-size: 1.00rem;
	}

	.add-btn,
	.add-farm-btn,
	.add-feed-btn,
	.add-batch-btn,
	.submit-btn,
	.cancel-btn,
	.action-btn,
	.status-btn,
	.schedule-btn,
	.edit-btn,
	.delete-btn,
	.back-btn {
		padding: 7px 12px;
		font-size: 1.00rem;
	}

	.section-title { font-size: 1.15rem; }
}

.checkbox-group {
    display: flex;
    flex-direction: row;
    gap: 8px;
}