/* Dairy Management Portal - Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Ensures body takes full screen height */
    margin: 0;
    /* Keeps your existing background */
    font-family: 'Inter', 'Noto Sans Gujarati', sans-serif;
    background: linear-gradient(to bottom right, #eff6ff, #ffffff, #f0fdf4);
}

/* --- Sticky Header --- */
nav {
    position: sticky;
    top: 0;
    z-index: 9;
    /* Higher than other elements */
    /* Your existing gradient */
    /* background: linear-gradient(to right, #2563eb, #1d4ed8); */
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); */
}

.container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
nav {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    background: white;
    padding: 0.75rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    font-family: 'Noto Sans Gujarati', sans-serif;
}

.logo-text p {
    font-size: 0.875rem;
    color: #dbeafe;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-divider {
    margin: 0.3rem 0;
}

.btn-dashboard,
.btn-logout,
.btn-primary,
.btn-secondary,
.btn-success {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: none;
    font-size: 0.875rem;
}

.btn-dashboard {
    background: linear-gradient(to right, #3b82f6, #2563eb);
    color: white;
    border: 2px solid #60a5fa;
}

.btn-dashboard:hover {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.btn-logout {
    background: linear-gradient(to right, #ef4444, #dc2626);
    color: white;
}

.btn-logout:hover {
    background: linear-gradient(to right, #dc2626, #b91c1c);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(to right, #3b82f6, #2563eb);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
}

.btn-success {
    background: linear-gradient(to right, #22c55e, #16a34a);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(to right, #16a34a, #15803d);
}

.btn-secondary {
    background: linear-gradient(to right, #6b7280, #4b5563);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(to right, #4b5563, #374151);
}

.notification-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem;
    border-radius: 0.75rem;
    position: relative;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.notification-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notification-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 0.75rem;
    height: 0.75rem;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
}

.profile-img {
    background-color: #f1f5f9;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    /* makes image round */
    object-fit: cover;
    /* image fits inside circle */
    margin-right: 15px;
    border: 2px solid #e5e7eb;
    /* optional */
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    font-family: 'Noto Sans Gujarati', sans-serif;
}

.user-role {
    font-size: 0.75rem;
    color: #dbeafe;
}

/* Widgets Grid */
.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.widget {
    border-radius: 1rem;
    /* padding: 1.5rem; */
    padding: 15px 30px 10px 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    cursor: pointer;
}

.widget:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.widget-blue {
    background: linear-gradient(to bottom right, #3b82f6, #2563eb);
}

.widget-green {
    background: linear-gradient(to bottom right, #22c55e, #16a34a);
}

.widget-purple {
    background: linear-gradient(to bottom right, #a855f7, #9333ea);
}

.widget-orange {
    background: linear-gradient(to bottom right, #f97316, #ea580c);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.widget-icon {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.75rem;
    border-radius: 0.75rem;
    backdrop-filter: blur(4px);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.live-dot {
    width: 0.5rem;
    height: 0.5rem;
    background: #86efac;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    50% {
        opacity: 0.5;
    }
}

.widget-title {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    font-family: 'Noto Sans Gujarati', sans-serif;
}

.widget-value {
    color: white;
    font-size: 2.25rem;
    font-weight: 700;
}

.widget-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Charts Section */
.charts-grid {
    display: grid;
    /* grid-template-columns: 2fr 1fr; */
    gap: 1.5rem;
    margin: 2rem 0;
}

.chart-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    font-family: 'Noto Sans Gujarati', sans-serif;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 16rem;
    gap: 1rem;
}

.bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.bar-column {
    width: 100%;
    background: linear-gradient(to top, #3b82f6, #93c5fd);
    border-radius: 0.5rem 0.5rem 0 0;
    position: relative;
    transition: all 0.5s;
    cursor: pointer;
}

.bar-column:hover {
    background: linear-gradient(to top, #2563eb, #60a5fa);
}

.bar-label {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    font-family: 'Noto Sans Gujarati', sans-serif;
}

.bar-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    margin-bottom: 0.5rem;
}

.bar-column:hover .bar-tooltip {
    opacity: 1;
}

/* Grade Distribution */
.grade-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.grade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.grade-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.grade-dot {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
}

.grade-dot-green {
    background: #22c55e;
}

.grade-dot-blue {
    background: #3b82f6;
}

.grade-dot-yellow {
    background: #eab308;
}

.grade-value {
    text-align: right;
}

.grade-percentage {
    font-weight: 700;
    color: #1f2937;
}

.grade-liters {
    font-size: 0.75rem;
    color: #6b7280;
}

.grade-bar {
    width: 100%;
    height: 0.75rem;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.grade-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s;
}

.grade-bar-green {
    background: #22c55e;
}

.grade-bar-blue {
    background: #3b82f6;
}

.grade-bar-yellow {
    background: #eab308;
}

/* Quick Actions */
.quick-actions {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

.actions-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    font-family: 'Noto Sans Gujarati', sans-serif;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    border: none;
    text-decoration: none;
}

.action-btn:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.action-btn-blue {
    background: linear-gradient(to bottom right, #3b82f6, #2563eb);
}

.action-btn-green {
    background: linear-gradient(to bottom right, #22c55e, #16a34a);
}

.action-btn-yellow {
    background: linear-gradient(to bottom right, #eab308, #ca8a04);
}

.action-btn-purple {
    background: linear-gradient(to bottom right, #a855f7, #9333ea);
}

.action-btn-pink {
    background: linear-gradient(to bottom right, #ec4899, #db2777);
}

.action-btn-gray {
    background: linear-gradient(to bottom right, #6b7280, #4b5563);
}

.action-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.75rem;
}

.action-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    font-family: 'Noto Sans Gujarati', sans-serif;
}

/* Footer */
footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 0;
    margin-top: 3rem;
}

.footer-text {
    text-align: center;
    color: #6b7280;
    font-family: 'Noto Sans Gujarati', sans-serif;
    margin: 0 auto;
    text-align: center;
    align-items: center;
}

/* Icons using SVG */
.icon {
    width: 2rem;
    height: 2rem;
}

.icon-sm {
    width: 1.5rem;
    height: 1.5rem;
}

/* Farmer Registration Form */
.form-container {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.form-group-full {
    grid-column: span 2;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-family: 'Noto Sans Gujarati', sans-serif;
}

.form-label span.required {
    color: #ef4444;
}

.form-input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.search-section {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
    font-weight: 600;
}

.search-bar {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.search-group {
    flex: 1;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    font-family: 'Noto Sans Gujarati', sans-serif;
}

.preview-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
    font-weight: 600;
}

.farmer-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.farmer-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(to bottom right, #22c55e, #16a34a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.farmer-info-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.farmer-info-mobile {
    font-size: 0.875rem;
    color: #6b7280;
}

.farmer-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-new {
    background: #dbeafe;
    color: #1e40af;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-full {
    flex: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .nav-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

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

    .form-group-full {
        grid-column: span 1;
    }
}

/* Milk Collection Page */
.collection-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-back {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 0.75rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-back:hover {
    background: #f9fafb;
    border-color: #3b82f6;
}

.collection-title-section {
    flex: 1;
}

.collection-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.collection-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
}

.session-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.75rem;
}

.session-morning {
    background: #fef3c7;
    color: #92400e;
}

.session-evening {
    background: #dbeafe;
    color: #1e40af;
}

.collection-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 1.5rem;
}

.collection-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.search-input-group {
    position: relative;
    margin-bottom: 1rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: #9ca3af;
}

.search-input {
    padding-left: 3rem !important;
}

.farmer-list {
    max-height: 300px;
    overflow-y: auto;
}

.farmer-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.farmer-item:hover {
    background: #f9fafb;
    border-color: #3b82f6;
}

.farmer-item.selected {
    background: #eff6ff;
    border-color: #3b82f6;
}

.farmer-avatar-small {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.farmer-item-info {
    flex: 1;
}

.farmer-item-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.farmer-item-meta {
    font-size: 0.75rem;
    color: #6b7280;
}

.animal-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.animal-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.animal-type-btn:hover {
    background: #f9fafb;
    border-color: #3b82f6;
}

.animal-type-btn.active {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #2563eb;
}

.animal-icon {
    width: 3rem;
    height: 3rem;
}

.quantity-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quantity-input {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    width: 100%;
}

.quantity-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.quantity-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.qty-btn {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #f9fafb;
    border-color: #3b82f6;
}

.qty-btn-clear {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}

.qty-btn-clear:hover {
    background: #fecaca;
}

.quality-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.quality-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quality-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.quality-input {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
}

.quality-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.btn-amcu {
    width: 100%;
    background: linear-gradient(to right, #3b82f6, #2563eb);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-amcu:hover {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
}

.price-card {
    background: linear-gradient(to bottom right, #f0fdf4, #dcfce7);
    border: 2px solid #86efac;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.price-item {
    text-align: center;
}

.price-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.total-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    border: 2px solid #22c55e;
}

.total-label {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.total-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #16a34a;
}

.collection-actions {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.75rem;
}

.btn-save-draft {
    background: linear-gradient(to right, #6b7280, #4b5563);
    color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-save-draft:hover {
    background: linear-gradient(to right, #4b5563, #374151);
}

.btn-process-collection {
    background: linear-gradient(to right, #22c55e, #16a34a);
    color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-process-collection:hover {
    background: linear-gradient(to right, #16a34a, #15803d);
}

.btn-print-receipt {
    background: linear-gradient(to right, #f97316, #ea580c);
    color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-print-receipt:hover {
    background: linear-gradient(to right, #ea580c, #c2410c);
}

/* Add Farmer Page Styles */
.farmer-form-layout {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 1.5rem;
}

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

.form-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.form-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.fetch-farmer-group {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.btn-fetch {
    background: linear-gradient(to right, #3b82f6, #2563eb);
    color: white;
    padding: 0.875rem 1.25rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-fetch:hover {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

.form-grid-two {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-textarea {
    resize: vertical;
    font-family: 'Inter', 'Noto Sans Gujarati', sans-serif;
}

.photo-upload-section {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.btn-photo-upload {
    background: linear-gradient(to right, #8b5cf6, #7c3aed);
    color: white;
    padding: 0.875rem 1.25rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-photo-upload:hover {
    background: linear-gradient(to right, #7c3aed, #6d28d9);
    transform: translateY(-1px);
}

.photo-preview {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid #e5e7eb;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-remove-photo {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 0.25rem;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-photo:hover {
    background: rgb(220, 38, 38);
}

.btn-add-farmer {
    width: 100%;
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-add-farmer:hover {
    background: linear-gradient(to right, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(37, 99, 235, 0.3);
}

.farmer-preview-section {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.preview-card-new {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 2px solid #e5e7eb;
}

.preview-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
    color: #3b82f6;
    font-weight: 600;
}

.preview-photo-section {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.preview-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #3b82f6;
    overflow: hidden;
    position: relative;
}

.preview-photo-placeholder {
    width: 80px;
    height: 80px;
    color: #93c5fd;
}

.preview-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-info {
    text-align: center;
    margin-bottom: 1.5rem;
}

.preview-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.preview-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.icon-xs {
    width: 1rem;
    height: 1rem;
}

.preview-animals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.animal-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: linear-gradient(to bottom right, #f0fdf4, #dcfce7);
    border: 2px solid #86efac;
}

.animal-badge-buffalo {
    background: linear-gradient(to bottom right, #eff6ff, #dbeafe);
    border-color: #93c5fd;
}

.animal-icon {
    font-size: 2rem;
}

.animal-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.animal-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
}

.btn-copy-html {
    width: 100%;
    background: linear-gradient(to right, #6b7280, #4b5563);
    color: white;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-copy-html:hover {
    background: linear-gradient(to right, #4b5563, #374151);
    transform: translateY(-1px);
}

/* --- Main Content Area --- */
/* This pushes the footer to the bottom if content is short */
@media (min-width: 1025px) {

    /* Only wrap in a div if not using <main> */
    .flex-grow-1 {
        flex: 1 0 auto;
    }
}

/* Responsive for Add Farmer */
@media (max-width: 1024px) {
    .farmer-form-layout {
        grid-template-columns: 1fr;
    }

    .farmer-preview-section {
        position: static;
    }

    .form-grid-two {
        grid-template-columns: 1fr;
    }
}

/* New Milk Collection Page Styles */
.collection-header-bar {
    background: white;
    border-bottom: 2px solid #e5e7eb;
    padding: 1rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.btn-back-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #1f2937;
}

.btn-back-header:hover {
    background: #f9fafb;
    border-color: #3b82f6;
    color: #3b82f6;
}

.session-toggle-group {
    display: flex;
    gap: 0.5rem;
    background: #f3f4f6;
    padding: 0.25rem;
    border-radius: 0.75rem;
}

.session-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #6b7280;
}

.session-toggle-btn.active {
    background: white;
    color: #2563eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.session-icon {
    font-size: 1.25rem;
}

.datetime-display {
    display: flex;
    gap: 1.5rem;
}

.date-display,
.time-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #4b5563;
}

.collection-main-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1.5rem;
    padding: 1.5rem 1rem;
}

.farmer-selection-panel {
    position: sticky;
    top: 1.5rem;
    height: fit-content;
}

.panel-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.farmer-search-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.btn-search-go {
    background: linear-gradient(to right, #3b82f6, #2563eb);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-search-go:hover {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
}

.farmer-list-scrollable {
    max-height: 600px;
    overflow-y: auto;
    margin: 0 -0.5rem;
    padding: 0 0.5rem;
}

.farmer-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    margin-bottom: 0.5rem;
}

.farmer-list-item:hover {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.farmer-list-item.active {
    background: #eff6ff;
    border-color: #3b82f6;
}

.farmer-list-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.farmer-list-info {
    flex: 1;
    min-width: 0;
}

.farmer-list-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.farmer-list-meta {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.125rem;
}

.collection-form-panel {
    min-height: 400px;
}

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

.farmer-preview-card {
    background: linear-gradient(to bottom right, #f9fafb, #f3f4f6);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.farmer-preview-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.farmer-avatar-large {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
    border: 4px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #9ca3af, #6b7280);
}

.farmer-info-preview {
    flex: 1;
}

.farmer-name-large {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.farmer-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4b5563;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.form-section-card {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.25rem;
}

.animal-type-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stock-type-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* grid-template-columns: 1fr 1fr; */
    gap: 1rem;
}

.animal-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.2rem;
    border: 3px solid #e5e7eb;
    border-radius: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.animal-type-card:hover {
    background: #f9fafb;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.animal-type-card.active {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: scale(1.02);
}

.animal-type-card[data-type="cow"].active {
    border-color: #3b82f6;
    background: linear-gradient(to bottom right, #dbeafe, #eff6ff);
}

.animal-type-card[data-type="buffalo"].active {
    border-color: #92400e;
    background: linear-gradient(to bottom right, #fef3c7, #fef9c3);
}

.animal-type-icon {
    font-size: 3rem;
}

.animal-type-label {
    font-weight: 700;
    font-size: 1rem;
    color: #1f2937;
}

.collection-inputs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.loan-inputs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.price-calculation-card {
    background: linear-gradient(to bottom right, #f0fdf4, #dcfce7);
    border: 2px solid #86efac;
    border-radius: 1rem;
    padding: 1rem;
}

.price-calc-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #166534;
    margin-bottom: 1rem;
}

.price-calc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.price-calc-item {
    text-align: center;
}

.price-calc-label {
    font-size: 0.75rem;
    color: #15803d;
    /* margin-bottom: 0.5rem; */
    font-weight: 600;
}

.price-calc-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #166534;
}

.quality-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
}

.quality-badge-none {
    background: #f3f4f6;
    color: #6b7280;
}

.quality-badge-a {
    background: #22c55e;
    color: white;
}

.quality-badge-b {
    background: #f97316;
    color: white;
}

.quality-badge-c {
    background: #ef4444;
    color: white;
}

.total-amount-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px 0 10px;
    background: white;
    border-radius: 0.75rem;
    border: 2px solid #22c55e;
}

.total-amount-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.total-amount-value {
    font-size: 2rem;
    font-weight: 700;
    color: #16a34a;
}

.collection-actions-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
}

.btn-process-collection-full {
    background: linear-gradient(to right, #22c55e, #16a34a);
    color: white;
    padding: 1.25rem 2rem;
    border-radius: 0.75rem;
    border: none;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.2s;
}

.btn-process-collection-full:hover {
    background: linear-gradient(to right, #16a34a, #15803d);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(34, 197, 94, 0.3);
}

.btn-print-receipt-icon {
    background: linear-gradient(to right, #f97316, #ea580c);
    color: white;
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-print-receipt-icon:hover {
    background: linear-gradient(to right, #ea580c, #c2410c);
    transform: translateY(-2px);
}

.btn-copy-html-bottom {
    width: 100%;
    background: linear-gradient(to right, #6b7280, #4b5563);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-copy-html-bottom:hover {
    background: linear-gradient(to right, #4b5563, #374151);
}

/* Responsive for New Milk Collection */
@media (max-width: 1024px) {
    .collection-main-layout {
        grid-template-columns: 1fr;
    }

    .farmer-selection-panel {
        position: static;
    }

    .collection-inputs-grid {
        grid-template-columns: 1fr;
    }

    .loan-inputs-grid {
        grid-template-columns: 1fr;
    }

    .price-calc-grid {
        grid-template-columns: 1fr;
    }

    .header-bar-content {
        flex-wrap: wrap;
        justify-content: center;
    }

    .datetime-display {
        width: 100%;
        justify-content: center;
    }
}

/* Utility Classes */
.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.gap-1 {
    gap: 0.5rem;
}

/* Report Page Styles */
.page-header-section {
    background: linear-gradient(to right, #0078d7, #0063b1);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-back-page {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.btn-back-page:hover {
    background: rgba(255, 255, 255, 0.3);
}

.page-header-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-icon {
    width: 2.5rem;
    height: 2.5rem;
    color: white;
}

.page-header-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: black;
    margin: 0;
}

.report-main-container {
    padding: 2rem 1rem;
}

.report-filter-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.filter-card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.filter-grid-4x {
    grid-template-columns: repeat(4, 1fr)
}

.filter-grid-5x {
    grid-template-columns: repeat(5, 1fr)
}


.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.filter-button-group {
    display: flex;
    align-items: flex-end;
}

.btn-search-report {
    width: 100%;
    background: linear-gradient(to right, #0078d7, #0063b1);
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-search-report:hover {
    background: linear-gradient(to right, #0063b1, #004a87);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 120, 215, 0.3);
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    min-width: 0;
    background: white;
    border-radius: 1rem;
    padding: 0.8rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.summary-card-animate {
    animation: pulse-scale 0.6s ease;
}

@keyframes pulse-scale {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.summary-card-blue {
    border-left: 4px solid #3b82f6;
}

.summary-card-green {
    border-left: 4px solid #22c55e;
}

.summary-card-orange {
    border-left: 4px solid #f97316;
}

.summary-card-purple {
    border-left: 4px solid #a855f7;
}

.summary-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summary-card-blue .summary-icon {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #2563eb;
}

.summary-card-green .summary-icon {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
}

.summary-card-orange .summary-icon {
    background: linear-gradient(135deg, #ffedd5, #fed7aa);
    color: #ea580c;
}

.summary-card-purple .summary-icon {
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    color: #9333ea;
}

.summary-icon svg {
    width: 2rem;
    height: 2rem;
    stroke-width: 2.5;
}

.summary-info {
    flex: 1;
}

.summary-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
}

.report-table-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.table-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.table-action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-export {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-export-excel {
    background: linear-gradient(to right, #22c55e, #16a34a);
    color: white;
}

.btn-export-excel:hover {
    background: linear-gradient(to right, #16a34a, #15803d);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.3);
}

.btn-export-csv {
    background: linear-gradient(to right, #3b82f6, #2563eb);
    color: white;
}

.btn-export-csv:hover {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-export-print {
    background: linear-gradient(to right, #f97316, #ea580c);
    color: white;
}

.btn-export-print:hover {
    background: linear-gradient(to right, #ea580c, #c2410c);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(249, 115, 22, 0.3);
}

.table-responsive {
    overflow-x: auto;
    position: relative;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.report-table thead {
    position: sticky;
    top: 0;
    z-index: 8;
}

.report-table th {
    background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
    color: #1f2937;
    font-weight: 700;
    text-align: left;
    padding: 1rem 0.75rem;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.report-table td {
    padding: 0.875rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.report-table tbody tr {
    transition: all 0.2s;
}

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

.report-table tbody tr:hover {
    background: #eff6ff;
    /* transform: scale(1.01); */
}

.table-row-fade-in {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table-total-row {
    background: linear-gradient(to right, #f0fdf4, #dcfce7) !important;
    font-weight: 700;
}

.table-total-row td {
    border-top: 3px solid #22c55e;
    border-bottom: 3px solid #22c55e;
    padding: 1rem 0.75rem;
    color: #166534;
    font-size: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
}

.badge-animal-cow {
    background: linear-gradient(to right, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.badge-animal-buffalo {
    background: linear-gradient(to right, #fef3c7, #fde68a);
    color: #92400e;
}

.badge-grade-a {
    background: #22c55e;
    color: white;
}

.badge-grade-b {
    background: #f97316;
    color: white;
}

.badge-grade-c {
    background: #ef4444;
    color: white;
}

.table-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    display: none;
}

.table-empty-state .empty-icon {
    width: 5rem;
    height: 5rem;
    color: #d1d5db;
    margin: 0 auto 1.5rem;
}

.table-empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.table-empty-state p {
    color: #9ca3af;
    font-size: 1rem;
}

/* Print Styles */
@media print {

    nav,
    footer,
    .btn-back-page,
    .table-action-buttons,
    .report-filter-card,
    .report-summary-grid {
        display: none !important;
    }

    .page-header-section {
        background: none;
        color: black;
        padding: 1rem 0;
    }

    .report-table {
        font-size: 10pt;
    }

    .report-table th,
    .report-table td {
        padding: 0.5rem 0.25rem;
    }
}

/* Responsive for Report Page */
@media (max-width: 1200px) {
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .report-summary-grid {
        grid-template-columns: 1fr;
    }

    .table-header-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-action-buttons {
        width: 100%;
        flex-direction: column;
    }

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

    .report-table {
        font-size: 0.75rem;
    }

    .report-table th,
    .report-table td {
        padding: 0.5rem 0.375rem;
    }
}

/* Login Page Styles */
.login-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #0078d7 0%, #00a0e3 50%, #0078d7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.bg-milk-drop {
    position: absolute;
    opacity: 0.8;
    animation: float 20s ease-in-out infinite;
}

.bg-milk-drop-1 {
    width: 200px;
    height: 240px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.bg-milk-drop-2 {
    width: 150px;
    height: 180px;
    top: 60%;
    right: 15%;
    animation-delay: 5s;
}

.bg-milk-drop-3 {
    width: 180px;
    height: 216px;
    bottom: 15%;
    left: 20%;
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-20px) rotate(5deg);
    }

    50% {
        transform: translateY(0) rotate(0deg);
    }

    75% {
        transform: translateY(-15px) rotate(-5deg);
    }
}

.login-container {
    width: 100%;
    max-width: 480px;
    padding: 2rem 1rem;
    position: relative;
    z-index: 10;
}

.login-card {
    background: white;
    border-radius: 2rem;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card-visible {
    opacity: 1;
    transform: translateY(0);
}

.login-logo-section {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 120, 215, 0.2);
}

.login-logo-icon svg {
    width: 50px;
    height: 50px;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.login-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    font-weight: 500;
}

.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.input-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #0078d7;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 1rem;
    font-weight: 600;
    color: #6b7280;
    font-size: 1rem;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: all 0.3s;
    font-family: 'Inter', 'Noto Sans Gujarati', sans-serif;
    background: #f9fafb;
}

.form-input-with-prefix {
    padding-left: 4rem;
}

.form-input:focus {
    outline: none;
    border-color: #0078d7;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 120, 215, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.input-error-state {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}

.input-error {
    display: none;
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #6b7280;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #0078d7;
}

.eye-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.role-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.role-btn {
    padding: 1.25rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.role-btn:hover {
    border-color: #0078d7;
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 215, 0.15);
}

.role-btn-active {
    border-color: #0078d7;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    box-shadow: 0 4px 12px rgba(0, 120, 215, 0.2);
}

.role-icon {
    width: 2rem;
    height: 2rem;
    color: #0078d7;
    display: none;
}

.role-emoji {
    font-size: 2rem;
    line-height: 1;
}

.role-text {
    font-weight: 700;
    color: #1f2937;
    font-size: 1rem;
}

.role-subtext {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.btn-login {
    width: 100%;
    padding: 1.125rem 2rem;
    background: linear-gradient(to right, #0078d7, #00a0e3);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 120, 215, 0.3);
}

.btn-login:hover {
    background: linear-gradient(to right, #0063b1, #0078d7);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 120, 215, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.login-loader {
    text-align: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #0078d7;
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.login-loader p {
    color: #6b7280;
    font-weight: 600;
}

.login-footer-links {
    text-align: center;
    margin-top: 1.5rem;
}

.link-forgot-password {
    color: #0078d7;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.link-forgot-password:hover {
    color: #0063b1;
    text-decoration: underline;
}

.login-divider {
    position: relative;
    text-align: center;
    margin: 2rem 0 1.5rem;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.login-divider span {
    position: relative;
    background: white;
    padding: 0 1rem;
    color: #9ca3af;
    font-weight: 600;
    font-size: 0.875rem;
}

.btn-create-account {
    width: 100%;
    padding: 1rem 2rem;
    background: white;
    color: #0078d7;
    border: 2px solid #0078d7;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-create-account:hover {
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 215, 0.15);
}

.login-page-footer {
    text-align: center;
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

.login-page-footer p {
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.success-modal-content {
    background: white;
    padding: 3rem 2.5rem;
    border-radius: 1.5rem;
    text-align: center;
    max-width: 400px;
    margin: 1rem;
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successBounce 0.6s ease;
}

@keyframes successBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: #16a34a;
    stroke-width: 3;
}

.success-modal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1rem 0;
}

.success-modal-content p {
    color: #6b7280;
    margin: 0;
    font-size: 1rem;
}

/* Responsive Login Page */
@media (max-width: 640px) {
    .login-container {
        padding: 1rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 1.5rem;
    }

    .login-logo-icon {
        width: 70px;
        height: 70px;
    }

    .login-logo-icon svg {
        width: 40px;
        height: 40px;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .role-buttons {
        grid-template-columns: 1fr;
    }

    .role-btn {
        padding: 1rem;
    }

    .success-modal-content {
        padding: 2rem 1.5rem;
    }

    .bg-milk-drop {
        display: none;
    }
}

/* Rate Chart Page Styles */
.rate-chart-main {
    padding: 2rem 1rem;
}

.rate-config-card,
.rate-chart-card,
.formula-card,
.preview-widget,
.import-export-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-group-full {
    grid-column: 1 / -1;
}

.input-with-prefix {
    position: relative;
}

.input-prefix-symbol {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    color: #6b7280;
    font-size: 1rem;
}

.input-with-symbol {
    padding-left: 2.5rem;
}

.session-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.session-btn {
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    color: #374151;
}

.session-btn:hover {
    border-color: #0078d7;
    background: #eff6ff;
}

.session-btn-active {
    border-color: #0078d7;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #0078d7;
}

.btn-save-config {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(to right, #0078d7, #00a0e3);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s;
}

.btn-save-config:hover {
    background: linear-gradient(to right, #0063b1, #0078d7);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 120, 215, 0.3);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.chart-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-chart-action {
    padding: 0.625rem 1rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-chart-action:hover {
    border-color: #0078d7;
    color: #0078d7;
    background: #eff6ff;
}

.rate-table-wrapper {
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
}

.rate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.rate-table thead {
    position: sticky;
    top: 0;
    z-index: 8;
}

.rate-table th {
    background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
    color: #1f2937;
    font-weight: 700;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

.corner-cell {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #0078d7;
}

.row-header {
    background: linear-gradient(to right, #f9fafb, #f3f4f6);
    font-weight: 700;
}

.rate-cell {
    padding: 0.875rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.rate-cell:hover {
    box-shadow: inset 0 0 0 2px #0078d7;
    transform: scale(1.05);
    z-index: 5;
}

.rate-value {
    font-weight: 700;
    font-size: 1rem;
    color: #1f2937;
}

.rate-edit-input {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #0078d7;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
}

.formula-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.formula-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.formula-header:hover {
    background: #f9fafb;
}

.expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s;
}

.expand-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #6b7280;
}

.expand-icon-rotated {
    transform: rotate(180deg);
}

.formula-content {
    padding: 0 1.5rem 1.5rem;
}

.formula-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.formula-info {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    border-left: 4px solid #f59e0b;
    color: #92400e;
    font-weight: 600;
}

.btn-save-formula {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(to right, #22c55e, #16a34a);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-save-formula:hover {
    background: linear-gradient(to right, #16a34a, #15803d);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.bottom-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.widget-subtitle {
    color: #ffffff;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.preview-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.preview-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-input-group label {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.preview-input {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.preview-input:focus {
    outline: none;
    border-color: #0078d7;
    box-shadow: 0 0 0 3px rgba(0, 120, 215, 0.1);
}

.preview-result {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    border: 2px solid #22c55e;
}

.preview-rate {
    font-size: 2.5rem;
    font-weight: 700;
    color: #166534;
    margin-bottom: 0.5rem;
}

.preview-grade {
    background: #22c55e;
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 0.5rem;
    display: inline-block;
    font-weight: 700;
}

.ie-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.btn-ie {
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s;
}

.btn-import {
    background: linear-gradient(to right, #3b82f6, #2563eb);
    color: white;
}

.btn-import:hover {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-export {
    background: linear-gradient(to right, #22c55e, #16a34a);
    color: white;
}

.btn-export:hover {
    background: linear-gradient(to right, #16a34a, #15803d);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-copy {
    background: linear-gradient(to right, #f59e0b, #d97706);
    color: white;
}

.btn-copy:hover {
    background: linear-gradient(to right, #d97706, #b45309);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #16a34a;
    stroke-width: 3;
}

.toast-title {
    font-weight: 700;
    color: #1f2937;
    font-size: 1rem;
}

.toast-message {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Responsive Rate Chart */
@media (max-width: 1200px) {
    .config-grid {
        grid-template-columns: 1fr;
    }

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

    .bottom-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .session-buttons {
        grid-template-columns: 1fr;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .chart-actions {
        width: 100%;
        flex-direction: column;
    }

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

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

    .preview-inputs {
        grid-template-columns: 1fr;
    }

    .rate-table {
        font-size: 0.75rem;
    }

    .rate-table th,
    .rate-cell {
        padding: 0.5rem;
    }

    .toast-notification {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}

/* Farmer Ledger Page Styles */
.ledger-main {
    padding: 2rem 1rem;
}

.ledger-filter-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.filter-btn-group {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.btn-filter {
    flex: 2;
    padding: 1rem 1.5rem;
    background: linear-gradient(to right, #0078d7, #00a0e3);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-filter:hover {
    background: linear-gradient(to right, #0063b1, #0078d7);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 120, 215, 0.3);
}

.btn-reset {
    flex: 1;
    padding: 1rem 1.5rem;
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-reset:hover {
    border-color: #9ca3af;
    color: #374151;
    background: #f9fafb;
}

.summary-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.ledger-summary-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 1.25rem;
    align-items: center;
    transition: all 0.3s;
}

.ledger-summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.card-opening {
    border-left: 4px solid #3b82f6;
}

.card-credit {
    border-left: 4px solid #22c55e;
}

.card-debit {
    border-left: 4px solid #ef4444;
}

.card-closing {
    border-left: 4px solid #8b5cf6;
}

.ledger-summary-card .summary-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-opening .summary-icon {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.card-opening .summary-icon svg {
    width: 2rem;
    height: 2rem;
    color: #2563eb;
    stroke-width: 2.5;
}

.card-credit .summary-icon {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
}

.card-credit .summary-icon svg {
    width: 2rem;
    height: 2rem;
    color: #16a34a;
    stroke-width: 2.5;
}

.card-debit .summary-icon {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
}

.card-debit .summary-icon svg {
    width: 2rem;
    height: 2rem;
    color: #dc2626;
    stroke-width: 2.5;
}

.card-closing .summary-icon {
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
}

.card-closing .summary-icon svg {
    width: 2rem;
    height: 2rem;
    color: #7c3aed;
    stroke-width: 2.5;
}

.summary-content {
    flex: 1;
}

.summary-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.summary-value-animate {
    animation: pulse-scale 0.6s ease;
}

.summary-sublabel {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
}

.credit-text {
    color: #16a34a;
}

.debit-text {
    color: #dc2626;
}

.ledger-table-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.table-title-section {
    flex: 1;
}

.table-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.ledger-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.ledger-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.ledger-table th {
    background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
    color: #1f2937;
    font-weight: 700;
    text-align: left;
    padding: 1rem 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.th-subtitle {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.ledger-table tbody tr {
    transition: all 0.2s;
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

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

.ledger-table tbody tr:hover {
    background: #eff6ff;
    transform: scale(1.01);
}

.ledger-table td {
    padding: 0.875rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.75rem;
}

.badge-opening {
    background: linear-gradient(to right, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.badge-credit {
    background: linear-gradient(to right, #dcfce7, #bbf7d0);
    color: #166534;
}

.badge-debit {
    background: linear-gradient(to right, #fee2e2, #fecaca);
    color: #991b1b;
}

.description-cell {
    font-weight: 600;
}

.credit-cell {
    color: #16a34a;
    font-weight: 700;
}

.debit-cell {
    color: #dc2626;
    font-weight: 700;
}

.balance-cell {
    color: #1f2937;
    font-weight: 700;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
}

.note-cell {
    color: #6b7280;
    font-size: 0.8125rem;
}

.ledger-table tfoot {
    position: sticky;
    bottom: 0;
}

.totals-row {
    background: linear-gradient(to right, #f0fdf4, #dcfce7);
    border-top: 3px solid #22c55e;
    border-bottom: 3px solid #22c55e;
}

.totals-row td {
    padding: 1rem 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    color: #166534;
}

.totals-label {
    font-size: 1.125rem;
}

.total-credit {
    color: #16a34a !important;
    font-size: 1.125rem;
}

.total-debit {
    color: #dc2626 !important;
    font-size: 1.125rem;
}

.total-balance {
    color: #166534 !important;
    font-size: 1.125rem;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0) !important;
}

/* --- Fixed Footer --- */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 9;
    background: white;
    /* Matches your current footer background */
    border-top: 1px solid #e5e7eb;
    padding: 0.75rem 0;
    /* Slightly tighter padding for fixed view */
    margin-top: 0;
    /* Remove top margin since it's fixed */
}

/* --- Prevent Content Overlap --- */
body {
    /* Padding-top: not needed because 'sticky' handles flow.
       Padding-bottom: MUST be equal to or greater than footer height
    */
    padding-bottom: 60px;
}

/* Responsive adjustment for Mobile */
@media (max-width: 768px) {
    body {
        padding-bottom: 80px;
        /* More space for mobile footers */
    }
}

/* Print Styles for Ledger */
@media print {

    nav,
    footer,
    .btn-back-page,
    .table-action-buttons,
    .ledger-filter-card {
        display: none !important;
    }

    .page-header-section {
        background: none;
        color: black;
        padding: 1rem 0;
    }

    .ledger-table {
        font-size: 10pt;
    }

    .ledger-table th,
    .ledger-table td {
        padding: 0.5rem 0.25rem;
    }

    .summary-cards-grid {
        page-break-after: avoid;
    }

    .ledger-table-card {
        box-shadow: none;
    }
}

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

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

@media (max-width: 768px) {
    .summary-cards-grid {
        grid-template-columns: 1fr;
    }

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

    .filter-btn-group {
        flex-direction: column;
    }

    .btn-filter,
    .btn-reset {
        width: 100%;
    }

    .table-header-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-action-buttons {
        width: 100%;
        flex-direction: column;
    }

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

    .ledger-table {
        font-size: 0.75rem;
    }

    .ledger-table th,
    .ledger-table td {
        padding: 0.5rem 0.375rem;
    }

    .summary-value {
        font-size: 1.5rem;
    }
}

/* Payment Entry Page Styles */
.payment-main {
    padding: 2rem 1rem;
}

.datetime-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-radius: 0.5rem;
    color: #1e40af;
    font-weight: 600;
    font-size: 0.875rem;
}

.payment-dual-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.payment-left-panel,
.payment-right-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.farmer-selection-card,
.farmer-details-card,
.payment-form-card,
.balance-preview-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.farmer-search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: #9ca3af;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #0078d7;
    box-shadow: 0 0 0 3px rgba(0, 120, 215, 0.1);
}

.farmer-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.farmer-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem;
    border: 2px solid #f3f4f6;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
}

.farmer-item:hover {
    border-color: #0078d7;
    background: #eff6ff;
    transform: translateX(4px);
}

.farmer-item-active {
    border-color: #0078d7;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
}

.farmer-avatar-sm {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.farmer-item-info {
    flex: 1;
    min-width: 0;
}

.farmer-item-name {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.farmer-item-id {
    font-size: 0.75rem;
    color: #6b7280;
}

.farmer-item-balance {
    font-weight: 700;
    font-size: 0.9375rem;
    white-space: nowrap;
}

.balance-positive {
    color: #16a34a;
}

.balance-negative {
    color: #dc2626;
}

.farmer-detail-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.farmer-avatar {
    width: 5rem;
    height: 5rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.farmer-info {
    width: 100%;
}

.farmer-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.farmer-id {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.farmer-meta {
    font-size: 0.875rem;
    color: #9ca3af;
}

.farmer-balance-badge {
    width: 100%;
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
}

.payment-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.file-upload-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px dashed #e5e7eb;
    border-radius: 0.75rem;
    background: #fafafa;
}

.btn-file-upload {
    padding: 0.75rem 1.25rem;
    background: linear-gradient(to right, #6366f1, #4f46e5);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-file-upload:hover {
    background: linear-gradient(to right, #4f46e5, #4338ca);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.file-name {
    font-size: 0.875rem;
    color: #6b7280;
}

.btn-save-payment {
    width: 100%;
    padding: 1.125rem 2rem;
    background: linear-gradient(to right, #22c55e, #16a34a);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s;
}

.btn-save-payment:hover {
    background: linear-gradient(to right, #16a34a, #15803d);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
}

.balance-preview-card {
    border: 2px solid #22c55e;
}

.balance-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.btn-icon-action {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-icon-action:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: rotate(10deg) scale(1.1);
}

.balance-preview-content {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.balance-label {
    font-weight: 600;
    color: #374151;
}

.balance-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.balance-row-payment .payment-amount {
    color: #dc2626;
}

.balance-row-new {
    margin-top: 0.5rem;
    padding-top: 1rem;
}

.balance-row-new .balance-value {
    font-size: 1.75rem;
}

.balance-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #22c55e, transparent);
    margin: 0.5rem 0;
}

.new-balance {
    animation: pulse-scale 0.6s ease;
}

.payment-history-section {
    margin-top: 1.5rem;
}

.payment-history-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.history-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-export-ledger {
    background: linear-gradient(to right, #8b5cf6, #7c3aed);
}

.btn-export-ledger:hover {
    background: linear-gradient(to right, #7c3aed, #6d28d9);
}

.history-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    align-items: center;
}

.form-input-sm {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
}

.btn-filter-sm {
    padding: 0.625rem 1.25rem;
    background: linear-gradient(to right, #0078d7, #00a0e3);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-filter-sm:hover {
    background: linear-gradient(to right, #0063b1, #0078d7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 215, 0.3);
}

.payment-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.payment-history-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.payment-history-table th {
    background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
    color: #1f2937;
    font-weight: 700;
    text-align: left;
    padding: 1rem 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.payment-history-table tbody tr {
    transition: all 0.2s;
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.payment-history-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.payment-history-table tbody tr:hover {
    background: #eff6ff;
    transform: scale(1.01);
}

.payment-history-table td {
    padding: 0.875rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.badge-payment {
    background: linear-gradient(to right, #d1fae5, #a7f3d0);
    color: #065f46;
}

.mode-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(to right, #e0e7ff, #c7d2fe);
    color: #3730a3;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.75rem;
}

.payment-amount-cell {
    font-weight: 700;
    color: #dc2626;
}

.remarks-cell {
    color: #6b7280;
    font-size: 0.8125rem;
}

/* Responsive Payment Entry */
@media (max-width: 1200px) {
    .payment-dual-layout {
        grid-template-columns: 1fr;
    }

    .payment-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .datetime-badge {
        display: none;
    }

    .history-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .history-filters {
        flex-direction: column;
        width: 100%;
    }

    .history-filters .form-group {
        width: 100%;
    }

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

    .payment-history-table {
        font-size: 0.75rem;
    }

    .payment-history-table th,
    .payment-history-table td {
        padding: 0.5rem 0.375rem;
    }

    .balance-value {
        font-size: 1.125rem;
    }

    .balance-row-new .balance-value {
        font-size: 1.5rem;
    }
}

/* Farmer Dashboard Specifics */
.receipt-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 30px;
}

.receipt-header {
    border-bottom: 2px dashed #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 15px;
}

.receipt-label {
    color: #666;
    font-weight: 500;
}

.receipt-value {
    color: #333;
    font-weight: 700;
}

.receipt-total {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
    font-size: 20px;
}

.summary-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.summary-stats-grid .stat-card {
    padding: 1.25rem 0.5rem;
}

@media (max-width: 991px) {
    .summary-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .summary-stats-grid .stat-card {
        padding: 1rem 0.5rem;
    }

    /* Balanced 2-column layout for mobile */
    .summary-stats-grid .stat-card:nth-child(5) {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .summary-stats-grid .stat-card {
        padding: 0.75rem 0.25rem;
    }

    .stat-label {
        font-size: 11px;
    }

    .stat-value {
        font-size: 16px;
    }
}

@media (max-width: 350px) {
    .summary-stats-grid {
        grid-template-columns: 1fr;
    }

    .summary-stats-grid .stat-card:nth-child(5) {
        grid-column: span 1;
    }
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    text-align: center;
    border: 1px solid #f0f0f0;
}

.stat-label {
    font-size: 13px;
    color: #777;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
}

.stat-card-primary {
    border-left: 4px solid #3498db;
}

.stat-card-success {
    border-left: 4px solid #2ecc71;
}

.stat-card-warning {
    border-left: 4px solid #f1c40f;
}

.stat-card-danger {
    border-left: 4px solid #e74c3c;
}

.stat-card-info {
    border-left: 4px solid #9b59b6;
}

/* Farmer Dashboard Styles */
.farmer-nav {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.farmer-nav .nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.farmer-nav .logo-text h1 {
    color: white;
}

.farmer-nav .logo-text p {
    color: rgba(255, 255, 255, 0.9);
}

.btn-nav-action {
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-nav-action:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.farmer-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.farmer-photo {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    color: white;
}

.farmer-name-badge {
    font-weight: 700;
    font-size: 1rem;
}

.farmer-id-badge {
    font-size: 0.75rem;
    opacity: 0.9;
}

.farmer-dashboard-main {
    padding: 2rem 1rem;
}

.welcome-banner {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #3b82f6;
}

.welcome-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    font-size: 1rem;
    color: #6b7280;
}

.welcome-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border-radius: 0.75rem;
    color: #3b82f6;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.farmer-info-card,
.milk-summary-card,
.account-payments-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.btn-edit-profile {
    padding: 0.625rem 1.25rem;
    background: linear-gradient(to right, #6366f1, #4f46e5);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-edit-profile:hover {
    background: linear-gradient(to right, #4f46e5, #4338ca);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.farmer-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    transition: all 0.3s;
}

.info-item:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    transform: translateY(-2px);
}

.info-item-highlight {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #fbbf24;
}

.info-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.info-content {
    flex: 1;
}

.info-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
}

.period-badge {
    padding: 0.5rem 1rem;
    background: linear-gradient(to right, #22c55e, #16a34a);
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.summary-widgets-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.summary-widget {
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-widget:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.widget-milk {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #3b82f6;
}

.widget-fat {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #22c55e;
}

.widget-snf {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #fbbf24;
}

.widget-earnings {
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    border-color: #8b5cf6;
}

.widget-balance {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #ef4444;
}

.widget-icon {
    width: 3rem;
    height: 3rem;
    background: white;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.widget-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.widget-milk .widget-icon svg {
    color: #3b82f6;
}

.widget-fat .widget-icon svg {
    color: #22c55e;
}

.widget-snf .widget-icon svg {
    color: #fbbf24;
}

.widget-earnings .widget-icon svg {
    color: #8b5cf6;
}

.widget-balance .widget-icon svg {
    color: #ef4444;
}

.widget-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
}

.widget-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
}

.widget-sublabel {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.chart-container {
    margin-top: 2rem;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 1rem;
}

.chart-container canvas {
    max-height: 300px;
}

.balance-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.balance-item {
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
}

.balance-opening {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 2px solid #3b82f6;
}

.balance-credit {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #22c55e;
}

.balance-debit {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 2px solid #ef4444;
}

.balance-closing {
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    border: 2px solid #8b5cf6;
}

.balance-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.balance-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
}

.balance-progress-container {
    margin-bottom: 2rem;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
}

.progress-bar {
    height: 1.5rem;
    background: #f3f4f6;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 2px solid #e5e7eb;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #22c55e, #16a34a);
    transition: width 1s ease;
}

.transactions-section {
    margin-bottom: 2rem;
}

.section-subtitle {
    font-size: 1.125rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 1rem;
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.transactions-table thead {
    background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
}

.transactions-table th {
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 700;
    color: #1f2937;
    border-bottom: 2px solid #e5e7eb;
}

.transactions-table tbody tr {
    transition: all 0.2s;
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

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

.transactions-table tbody tr:hover {
    background: #eff6ff;
    transform: scale(1.01);
}

.transactions-table td {
    padding: 0.875rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.amount-credit {
    color: #16a34a;
    font-weight: 700;
}

.amount-debit {
    color: #dc2626;
    font-weight: 700;
}

.account-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.btn-account-action {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s;
}

.btn-view-ledger {
    background: linear-gradient(to right, #3b82f6, #2563eb);
    color: white;
}

.btn-view-ledger:hover {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.btn-download-statement {
    background: linear-gradient(to right, #22c55e, #16a34a);
    color: white;
}

.btn-download-statement:hover {
    background: linear-gradient(to right, #16a34a, #15803d);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
}

.performance-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.performance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.performance-card {
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
}

.performance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.performance-header h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
}

.growth-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 700;
    font-size: 0.875rem;
}

.growth-positive {
    background: linear-gradient(to right, #dcfce7, #bbf7d0);
    color: #166534;
}

.growth-negative {
    background: linear-gradient(to right, #fee2e2, #fecaca);
    color: #991b1b;
}

.icon-xs {
    width: 1rem;
    height: 1rem;
}

.performance-card canvas {
    max-height: 250px;
}

.floating-actions {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 100;
}

.fab {
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
}

.fab:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.toast-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

.toast-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.toast-title {
    font-weight: 700;
    color: #1f2937;
    font-size: 1rem;
}

.toast-message {
    color: #6b7280;
    font-size: 0.875rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Farmer Dashboard */
@media (max-width: 1200px) {
    .farmer-info-grid {
        grid-template-columns: 1fr;
    }

    .summary-widgets-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

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

@media (max-width: 768px) {
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .farmer-info-card,
    .milk-summary-card,
    .account-payments-card,
    .performance-section {
        padding: 1.25rem;
    }

    .card-title {
        font-size: 1.125rem;
    }

    .summary-widgets-grid {
        grid-template-columns: 1fr;
    }

    .balance-summary-grid {
        grid-template-columns: 1fr;
    }

    .account-actions {
        grid-template-columns: 1fr;
    }

    .floating-actions {
        bottom: 1rem;
        right: 1rem;
    }

    .fab {
        width: 3rem;
        height: 3rem;
    }

    .farmer-profile-badge {
        flex-direction: column;
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .nav-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/** Header profile menu sub menu Start */
.empty-state-card {
    align-items: center;
    text-align: center;
    margin: 0 auto;
    position: relative;
    top: 25%;
}


.profile-dropdown {
    position: relative;
    display: inline-block;
}

/* Submenu */
.profile-menu {
    position: absolute;
    top: 100%;
    /* no gap */
    right: 0;
    margin-top: 8px;

    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);

    list-style: none;
    padding: 8px 0;
    min-width: 180px;

    /* IMPORTANT */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(8px);
    transition: all 0.2s ease;
    z-index: 1000;
}

/* Invisible hover bridge */
.profile-menu::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
}

/* Show menu */
.profile-dropdown:hover .profile-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.profile-menu li a {
    display: block;
    padding: 10px 16px;
    color: #1f2937;
    text-decoration: none;
    font-size: 14px;
}

.profile-menu li a:hover {
    background: #f3f4f6;
}

.profile-menu li.logout-item a {
    color: #dc2626;
    /* red */
    font-weight: 600;
}

.profile-menu li.logout-item a:hover {
    background: #fee2e2;
    color: #b91c1c;
}

/** Header profile menu sub menu End */

/** Profile Update Icon Start */
.preview-photo {
    position: relative;
    width: 120px;
    height: 120px;
}

/* Inner circle */
.preview-photo-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image */
#previewPhotoImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* REMOVE ICON */
.remove-photo-icon {
    position: absolute;
    top: -6px;
    /* slightly outside */
    right: -6px;
    width: 26px;
    height: 26px;
    background: #ef4444;
    color: #fff;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    /* VERY IMPORTANT */
    box-shadow: 0 3px 8px rgba(0, 0, 0, .35);
}

.remove-photo-icon:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.hidden {
    display: none !important;
}

/** Profile Update Icon End */

.info-group {
    margin-bottom: 12px;
}

.info-group label {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 2px;
    display: block;
}

.info-group p {
    font-weight: 500;
    margin-bottom: 0;
}

/** List Filter Icon Start */
.filter-dropdown-menu {
    min-width: 300px !important;
    max-width: 360px !important;
    padding: 12px !important;
    border-radius: 8px !important;
}

/* small adjustments for search + filter area */
.table-header-actions .form-control-sm {
    min-width: 220px !important;
}

@media (max-width: 576px) {
    .table-header-actions {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: stretch !important;
    }

    .table-header-actions .d-flex {
        justify-content: flex-end !important;
    }
}

/** List Filter Icon End */


/* Sidebar Popup Start */
.loan-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    z-index: 99;
    transition: right 0.3s ease-in-out;
    visibility: hidden;
}

.loan-drawer.open {
    right: 0;
    visibility: visible;
}

.drawer-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.drawer-content {
    position: absolute;
    right: 0;
    width: 60%;
    /* 60% ratio as requested */
    height: 100%;
    background: #fff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.drawer-header {
    padding: 20px;
    /* background: #f8f9fa; */
    color: #ffffff;
    background: linear-gradient(to right, #0063b1, #004a87);
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-close-drawer {
    background: none;
    color: #ffffff !important;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
}

.drawer-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

@media (max-width: 992px) {
    .drawer-content {
        width: 85%;
    }
}

.avatar-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.bg-soft-info {
    background-color: #e0f7fa;
}

.bg-soft-success {
    background-color: #e8f5e9;
}

/* Sidebar Popup End */


/** Datatable Start */

.page-link {
    display: inline !important;
}


/** Datatable Emd */



/** Report page milk start */

.custom-header-controls {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-date-input {
    background: #fff !important;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.85rem;
    height: 32px;
    color: #333;
}

.header-report-btn {
    background: #ff9800;
    color: white;
    border: none;
    padding: 0 15px;
    height: 32px;
    border-radius: 6px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.summary-value.small {
    font-size: 1.2rem;
}

.farmer-selected-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 8px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #1976d2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hidden {
    display: none;
}

.cursor-pointer {
    cursor: pointer;
}


.custom-header-controls {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-date-picker {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.9rem;
    color: #374151;
    outline: none;
    height: 38px;
}

.header-view-btn {
    background: #f59e0b;
    /* Amber color for visibility */
    color: white;
    border: none;
    padding: 0 15px;
    height: 38px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.header-view-btn:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.header-view-btn:active {
    transform: translateY(0);
}

/** Report page milk end */






/* Update your .collection-main-layout */
.collection-main-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
    padding-top: 20px;
    align-items: start;
}


@media (max-width: 768px) {
    .xs-hidden {
        display: none !important;
    }

    .widgets-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 2fr))
    }

    .widget {
        padding: 15px 20px 10px 19px;
    }

    /* .widgets-grid {
        grid-template-columns: 1fr;
    } */

    .animal-type-icon {
        font-size: 2rem;
    }

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

    .user-profile {
        display: none;
    }

    .search-bar {
        flex-direction: column;
    }

    .farmer-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .collection-header-bar {
        padding: 0.5rem 0;
    }
}

/* Tablet & Mobile: Stack everything vertically */
@media (max-width: 992px) {
    .collection-main-layout {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .farmer-selection-panel {
        width: 100%;
        order: 1;
        /* Put farmer list BELOW the report on mobile */
    }

    .collection-form-panel {
        width: 100%;
        order: 2;
        /* Show report results first on mobile */
    }

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

    .farmer-list-scrollable {
        display: none;
    }
}