/* Fertilizer Modal Styles */
#fertilizer-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

#fertilizer-modal .modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s;
}

#fertilizer-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

#fertilizer-modal .modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
}

#fertilizer-modal .modal-close:hover {
    opacity: 1;
}

#fertilizer-modal .modal-body {
    padding: 20px;
}

#fertilizer-form .form-group {
    margin-bottom: 16px;
}

#fertilizer-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

#fertilizer-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #374151;
}

#fertilizer-form .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

#fertilizer-form .form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#fertilizer-form small {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
}

#fertilizer-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background: #d1d5db;
}

/* Fertilizer History */
.fertilizer-history {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #e5e7eb;
}

.fertilizer-history h3 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    color: #374151;
}

.history-list {
    max-height: 250px;
    overflow-y: auto;
}

.history-item {
    padding: 12px;
    margin-bottom: 8px;
    background: #f9fafb;
    border-radius: 4px;
    border-left: 3px solid #667eea;
}

.history-date {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.history-details {
    font-size: 14px;
    color: #374151;
}

.history-details strong {
    color: #111827;
}

.history-details small {
    color: #6b7280;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    z-index: 11000;
    animation: slideInRight 0.3s;
    max-width: 300px;
}

.toast-success {
    background: #10b981;
}

.toast-error {
    background: #ef4444;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* Mobile Responsive */
@media (max-width: 640px) {
    #fertilizer-modal .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    #fertilizer-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Quick Actions Enhancement */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.quick-actions button {
    flex: 1;
    min-width: 120px;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.quick-actions button:hover {
    background: #f9fafb;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Fertilizer Info Badge */
.fertilizer-info {
    display: inline-block;
    padding: 4px 8px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 8px;
}

.fertilizer-info.due {
    background: #fee2e2;
    color: #991b1b;
}

.fertilizer-info.recent {
    background: #dcfce7;
    color: #166534;
}
